From 47b1d8e3bf61f9cadeec22fcc55b45851becc73a Mon Sep 17 00:00:00 2001 From: Cody Northrop Date: Tue, 14 Oct 2014 12:11:30 -0600 Subject: [PATCH] compiler: Print out link errors from CreateShader --- icd/intel/compiler/shader/compiler_interface.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/icd/intel/compiler/shader/compiler_interface.cpp b/icd/intel/compiler/shader/compiler_interface.cpp index 257a1e2..d66448d 100644 --- a/icd/intel/compiler/shader/compiler_interface.cpp +++ b/icd/intel/compiler/shader/compiler_interface.cpp @@ -337,8 +337,10 @@ struct intel_ir *shader_create_ir(const struct intel_gpu *gpu, if (strlen(shader->InfoLog) > 0) printf("Info log:\n%s\n", shader->InfoLog); - if (!shader->CompileStatus) + if (!shader->CompileStatus) { + _mesa_destroy_shader_compiler(); return NULL; + } assert(shader_program->NumShaders == 1); @@ -347,12 +349,15 @@ struct intel_ir *shader_create_ir(const struct intel_gpu *gpu, shader_program->SeparateShader = true; link_shaders(ctx, shader_program); - if (!shader_program->LinkStatus) - return NULL; if (strlen(shader_program->InfoLog) > 0) printf("Info log for linking:\n%s\n", shader_program->InfoLog); + if (!shader_program->LinkStatus) { + _mesa_destroy_shader_compiler(); + return NULL; + } + _mesa_destroy_shader_compiler(); return (struct intel_ir *) shader_program; -- 2.7.4