diff options
author | Marek Olšák <[email protected]> | 2016-11-18 21:00:27 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-11-22 18:07:16 +0100 |
commit | d219720d19d9145a68ba4ca148c3cfa0acd1d84f (patch) | |
tree | 8a0b8a4c7b5638d687ed0cb677ba0f18d7dfb9a2 /src/mesa/main | |
parent | b818df1e714ed8bd2f1c3a68ee842cd81a0d7cf4 (diff) |
mesa: use special checksums for unset checksums and fixed-func shaders
for debugging
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/ff_fragment_shader.cpp | 3 | ||||
-rw-r--r-- | src/mesa/main/shaderobj.c | 3 |
2 files changed, 6 insertions, 0 deletions
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; |