aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-10-04 16:58:21 -0700
committerIan Romanick <[email protected]>2011-10-18 17:26:37 -0700
commit118fd08b586970175af9ae269c81c0f501acba25 (patch)
treed5cca82c71500ec61c2cd7d769c487d8f3992f7c /src/mesa/main
parent188f0742558196367df24086c4dc9865ebd86f7e (diff)
mesa: Simplify uniform debug logging logic
This simplificiation was enabled by the earlier refactors that eliminated the references to the assembly shaders stored in the gl_shader_program structure. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index fc52e8c1562..e0af6ee6749 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1833,8 +1833,6 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentFragmentProgram;
for (i = 0; i < MESA_SHADER_TYPES; i++) {
- struct gl_shader *sh;
-
if (shProg[i] == NULL || shProg[i]->_Used
|| shProg[i]->_LinkedShaders[i] == NULL)
continue;
@@ -1842,27 +1840,13 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
/* This is the first time this shader is being used.
* Append shader's constants/uniforms to log file.
*
- * The logic is a little odd here. We only want to log data for each
- * shader target that will actually be used, and we only want to log
- * it once. It's possible to have a program bound to the vertex
+ * Only log data for the program target that matches the shader
+ * target. It's possible to have a program bound to the vertex
* shader target that also supplied a fragment shader. If that
* program isn't also bound to the fragment shader target we don't
* want to log its fragment data.
*/
- sh = shProg[i]->_LinkedShaders[i];
- switch (sh->Type) {
- case GL_VERTEX_SHADER:
- _mesa_append_uniforms_to_file(sh, sh->Program);
- break;
-
- case GL_GEOMETRY_SHADER_ARB:
- _mesa_append_uniforms_to_file(sh, sh->Program);
- break;
-
- case GL_FRAGMENT_SHADER:
- _mesa_append_uniforms_to_file(sh, sh->Program);
- break;
- }
+ _mesa_append_uniforms_to_file(shProg[i]->_LinkedShaders[i]);
}
for (i = 0; i < MESA_SHADER_TYPES; i++) {