diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 11 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_log.c | 7 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_log.h | 3 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index 1a4c7d31f16..dc2e680e991 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2070,16 +2070,9 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) success = compile_shader(ctx, &obj, type, &info_log, shader); - if (success && !info_log.text) { -#if 0 - slang_create_uniforms(&object->expdata, shader); - _mesa_print_program(program); - _mesa_print_program_parameters(ctx, program); -#endif - } - else { + if (!success || info_log.error_flag) { success = GL_FALSE; - /* XXX more work on info log needed here */ + /* copy info-log string to shader object */ if (info_log.text) { if (shader->InfoLog) { free(shader->InfoLog); diff --git a/src/mesa/shader/slang/slang_log.c b/src/mesa/shader/slang/slang_log.c index b6545b2c2e9..e8387444914 100644 --- a/src/mesa/shader/slang/slang_log.c +++ b/src/mesa/shader/slang/slang_log.c @@ -34,7 +34,8 @@ void slang_info_log_construct(slang_info_log * log) { log->text = NULL; - log->dont_free_text = 0; + log->dont_free_text = GL_FALSE; + log->error_flag = GL_FALSE; } void @@ -97,6 +98,7 @@ slang_info_log_error(slang_info_log * log, const char *msg, ...) va_start(va, msg); _mesa_vsprintf(buf, msg, va); va_end(va); + log->error_flag = GL_TRUE; if (slang_info_log_message(log, "Error", buf)) return 1; slang_info_log_memory(log); @@ -122,7 +124,8 @@ void slang_info_log_memory(slang_info_log * log) { if (!slang_info_log_message(log, "Error", "Out of memory.")) { - log->dont_free_text = 1; + log->dont_free_text = GL_TRUE; + log->error_flag = GL_TRUE; log->text = out_of_memory; } } diff --git a/src/mesa/shader/slang/slang_log.h b/src/mesa/shader/slang/slang_log.h index e4ca3a22f11..dcaba0285a7 100644 --- a/src/mesa/shader/slang/slang_log.h +++ b/src/mesa/shader/slang/slang_log.h @@ -30,7 +30,8 @@ typedef struct slang_info_log_ { char *text; - int dont_free_text; + GLboolean dont_free_text; + GLboolean error_flag; } slang_info_log; |