diff options
author | Ian Romanick <[email protected]> | 2010-06-19 01:39:14 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-06-19 11:36:15 -0700 |
commit | ca97bd395f476ad2b5a009f92edef4656aab3650 (patch) | |
tree | 5a475891c9590b7b75921ea810cfbe907e2f98f1 /main.cpp | |
parent | 32cf482215f698c46fd782104ca2e0560da5be17 (diff) |
Initialize the shader info log
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; } |