From: Marek Olšák Date: Fri, 18 Nov 2016 20:00:27 +0000 (+0100) Subject: mesa: use special checksums for unset checksums and fixed-func shaders X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d219720d19d9145a68ba4ca148c3cfa0acd1d84f;p=mesa.git mesa: use special checksums for unset checksums and fixed-func shaders for debugging Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index e10a93b32f9..fddcac24f87 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -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); diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 167431dfe67..998656af9c8 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -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;