aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-01 13:22:08 +0200
committermarha <marha@users.sourceforge.net>2013-08-01 13:22:08 +0200
commit0659c77949b38440a2a9ba67e1ee9cacef1f3a7f (patch)
tree891077ab7001a45e0e37ff2e554db0c56671acdc /mesalib/src/mesa/main/shaderapi.c
parent4c8cee9b5a37db30af50aafcbf54b36b9fd9e03a (diff)
downloadvcxsrv-0659c77949b38440a2a9ba67e1ee9cacef1f3a7f.tar.gz
vcxsrv-0659c77949b38440a2a9ba67e1ee9cacef1f3a7f.tar.bz2
vcxsrv-0659c77949b38440a2a9ba67e1ee9cacef1f3a7f.zip
libX11 mesa xserver xkeyboard-config git update 1 aug 2013
xserver commit b6e5c4669e0db391966deb397e8c975ec7f0124d xkeyboard-config commit abaf14335dc6504e59d91e77babc8e034df5beb7 libX11 commit 44f84223f5e2dd46883fcbd352af2798bfa9aeb6 mesa commit 3eef7fec677f40eef1674e44e7ebd836bc7f8612
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r--mesalib/src/mesa/main/shaderapi.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 4cc0357b1..c349b0cb5 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -71,7 +71,9 @@ get_shader_flags(void)
const char *env = _mesa_getenv("MESA_GLSL");
if (env) {
- if (strstr(env, "dump"))
+ if (strstr(env, "dump_on_error"))
+ flags |= GLSL_DUMP_ON_ERROR;
+ else if (strstr(env, "dump"))
flags |= GLSL_DUMP;
if (strstr(env, "log"))
flags |= GLSL_LOG;
@@ -783,10 +785,17 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
}
- if (sh->CompileStatus == GL_FALSE &&
- (ctx->Shader.Flags & GLSL_REPORT_ERRORS)) {
- _mesa_debug(ctx, "Error compiling shader %u:\n%s\n",
- sh->Name, sh->InfoLog);
+ if (!sh->CompileStatus) {
+ if (ctx->Shader.Flags & GLSL_DUMP_ON_ERROR) {
+ fprintf(stderr, "GLSL source for %s shader %d:\n",
+ _mesa_glsl_shader_target_name(sh->Type), sh->Name);
+ fprintf(stderr, "%s\n", sh->Source);
+ }
+
+ if (ctx->Shader.Flags & GLSL_REPORT_ERRORS) {
+ _mesa_debug(ctx, "Error compiling shader %u:\n%s\n",
+ sh->Name, sh->InfoLog);
+ }
}
}