mesa: use special checksums for unset checksums and fixed-func shaders
authorMarek Olšák <marek.olsak@amd.com>
Fri, 18 Nov 2016 20:00:27 +0000 (21:00 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 22 Nov 2016 17:07:16 +0000 (18:07 +0100)
for debugging

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/mesa/main/ff_fragment_shader.cpp
src/mesa/main/shaderobj.c

index e10a93b32f91f3e6d179e0d9c3e303c9b6feb464..fddcac24f874900de3c66df4eeaae9a8e23dd075 100644 (file)
@@ -1202,6 +1202,9 @@ create_new_program(struct gl_context *ctx, struct state_key *key)
 
    p.mem_ctx = ralloc_context(NULL);
    p.shader = _mesa_new_shader(0, MESA_SHADER_FRAGMENT);
+#ifdef DEBUG
+   p.shader->SourceChecksum = 0xf18ed; /* fixed */
+#endif
    p.shader->ir = new(p.shader) exec_list;
    state = new(p.shader) _mesa_glsl_parse_state(ctx, MESA_SHADER_FRAGMENT,
                                                p.shader);
index 167431dfe67c6b3df50799a87f0c7e8bb6522af6..998656af9c8ed42af8349249176d03f75a42d8d0 100644 (file)
@@ -109,6 +109,9 @@ _mesa_new_shader(GLuint name, gl_shader_stage stage)
    if (shader) {
       shader->Stage = stage;
       shader->Name = name;
+#ifdef DEBUG
+      shader->SourceChecksum = 0xa110c; /* alloc */
+#endif
       _mesa_init_shader(shader);
    }
    return shader;