Don't try to use an invalid file!
This commit is contained in:
parent
3ad3635567
commit
dda00b604b
|
@ -345,13 +345,14 @@ bool GL4Shader::CompileProgram(std::string source) {
|
||||||
|
|
||||||
// Note that we put the translated source first so we get good line numbers.
|
// Note that we put the translated source first so we get good line numbers.
|
||||||
FILE* f = fopen(file_name, "w");
|
FILE* f = fopen(file_name, "w");
|
||||||
fprintf(f, "%s", translated_disassembly_.c_str());
|
if (f) {
|
||||||
fprintf(f, "\n\n");
|
fprintf(f, translated_disassembly_.c_str());
|
||||||
fprintf(f, "/*\n");
|
fprintf(f, "/*\n");
|
||||||
fprintf(f, "%s", ucode_disassembly_.c_str());
|
fprintf(f, "%s", ucode_disassembly_.c_str());
|
||||||
fprintf(f, " */\n");
|
fprintf(f, " */\n");
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
program_ = glCreateShaderProgramv(shader_type_ == ShaderType::kVertex
|
program_ = glCreateShaderProgramv(shader_type_ == ShaderType::kVertex
|
||||||
? GL_VERTEX_SHADER
|
? GL_VERTEX_SHADER
|
||||||
|
|
Loading…
Reference in New Issue