summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-04 15:35:48 -0600
committerBrian Paul <[email protected]>2009-08-04 15:36:29 -0600
commitf7783badb55bd2ff9bc544b2f8cc0c4ad7b86ea7 (patch)
treeecc3c340b2f121487012300bcb2a89b71a0690ad /src/mesa/shader/shader_api.c
parentb501263bf5965aa89c408cb8f0db3688847a8384 (diff)
mesa: compute, print shader checksum
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 648fbc186bb..9cfc6dd81c5 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -1431,6 +1431,9 @@ _mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
}
sh->Source = source;
sh->CompileStatus = GL_FALSE;
+#ifdef DEBUG
+ sh->SourceChecksum = _mesa_str_checksum(sh->Source);
+#endif
}
@@ -1506,9 +1509,10 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
GLuint i;
_mesa_printf("Use Shader %u\n", shProg->Name);
for (i = 0; i < shProg->NumShaders; i++) {
- _mesa_printf(" shader %u, type 0x%x\n",
+ _mesa_printf(" shader %u, type 0x%x, checksum %u\n",
shProg->Shaders[i]->Name,
- shProg->Shaders[i]->Type);
+ shProg->Shaders[i]->Type,
+ shProg->Shaders[i]->SourceChecksum);
}
if (shProg->VertexProgram)
printf(" vert prog %u\n", shProg->VertexProgram->Base.Id);