summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-19 01:39:14 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-06-19 11:36:15 -0700
commitca97bd395f476ad2b5a009f92edef4656aab3650 (patch)
tree5a475891c9590b7b75921ea810cfbe907e2f98f1
parent32cf482215f698c46fd782104ca2e0560da5be17 (diff)
Initialize the shader info log
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index f6e5e95fcb..a613334d5c 100644
--- a/main.cpp
+++ b/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;
}