glsl: add gl_linked_shader::SourceChecksum
for debugging v2: wrap all checksums in #ifdef DEBUG Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
This commit is contained in:
@@ -2297,6 +2297,16 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
if (ctx->Const.VertexID_is_zero_based)
|
||||
lower_vertex_id(linked);
|
||||
|
||||
#ifdef DEBUG
|
||||
/* Compute the source checksum. */
|
||||
linked->SourceChecksum = 0;
|
||||
for (unsigned i = 0; i < num_shaders; i++) {
|
||||
if (shader_list[i] == NULL)
|
||||
continue;
|
||||
linked->SourceChecksum ^= shader_list[i]->SourceChecksum;
|
||||
}
|
||||
#endif
|
||||
|
||||
return linked;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user