diff options
author | marha <marha@users.sourceforge.net> | 2012-05-21 09:10:35 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-05-21 09:10:35 +0200 |
commit | f543ceaca6820260f15a4eff86938214cf43c7d2 (patch) | |
tree | d66901c0385bd008ba46600be695c500daa78c8f /mesalib/src/mesa/main/shaderapi.c | |
parent | 062c45ff0df6a52080dcd74433710d47127cbe29 (diff) | |
download | vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.tar.gz vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.tar.bz2 vcxsrv-f543ceaca6820260f15a4eff86938214cf43c7d2.zip |
fontconfig mesa xkeyboard-config xserver pixman git update 21 Mar 2012
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r-- | mesalib/src/mesa/main/shaderapi.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index fd793a7ab..6927368de 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -83,6 +83,8 @@ get_shader_flags(void) flags |= GLSL_UNIFORMS; if (strstr(env, "useprog")) flags |= GLSL_USE_PROG; + if (strstr(env, "errors")) + flags |= GLSL_REPORT_ERRORS; } return flags; @@ -627,7 +629,8 @@ get_shader_source(struct gl_context *ctx, GLuint shader, GLsizei maxLength, /** - * Set/replace shader source code. + * Set/replace shader source code. A helper function used by + * glShaderSource[ARB] and glCreateShaderProgramEXT. */ static void shader_source(struct gl_context *ctx, GLuint shader, const GLchar *source) @@ -672,6 +675,12 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) * compilation was successful. */ _mesa_glsl_compile_shader(ctx, sh); + + 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); + } } @@ -702,6 +711,12 @@ link_program(struct gl_context *ctx, GLuint program) _mesa_glsl_link_shader(ctx, shProg); + if (shProg->LinkStatus == GL_FALSE && + (ctx->Shader.Flags & GLSL_REPORT_ERRORS)) { + _mesa_debug(ctx, "Error linking program %u:\n%s\n", + shProg->Name, shProg->InfoLog); + } + /* debug code */ if (0) { GLuint i; @@ -1534,6 +1549,10 @@ _mesa_use_shader_program(struct gl_context *ctx, GLenum type, ctx->Driver.UseProgram(ctx, shProg); } + +/** + * For GL_EXT_separate_shader_objects + */ void GLAPIENTRY _mesa_UseShaderProgramEXT(GLenum type, GLuint program) { @@ -1570,6 +1589,10 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program) _mesa_use_shader_program(ctx, type, shProg); } + +/** + * For GL_EXT_separate_shader_objects + */ void GLAPIENTRY _mesa_ActiveProgramEXT(GLuint program) { @@ -1582,6 +1605,10 @@ _mesa_ActiveProgramEXT(GLuint program) return; } + +/** + * For GL_EXT_separate_shader_objects + */ GLuint GLAPIENTRY _mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string) { |