mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-19 06:00:30 +01:00
Initialize the shader info log
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
32cf482215
commit
ca97bd395f
1 changed files with 7 additions and 0 deletions
7
main.cpp
7
main.cpp
|
|
@ -118,6 +118,7 @@ compile_shader(struct glsl_shader *shader)
|
|||
state.scanner = NULL;
|
||||
state.translation_unit.make_empty();
|
||||
state.symbols = new glsl_symbol_table;
|
||||
state.info_log = talloc_strdup(shader, "");
|
||||
state.error = false;
|
||||
state.temp_index = 0;
|
||||
state.loop_or_switch_nesting = NULL;
|
||||
|
|
@ -164,6 +165,12 @@ compile_shader(struct glsl_shader *shader)
|
|||
|
||||
shader->symbols = state.symbols;
|
||||
shader->CompileStatus = !state.error;
|
||||
|
||||
if (shader->InfoLog)
|
||||
talloc_free(shader->InfoLog);
|
||||
|
||||
shader->InfoLog = state.info_log;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue