glsl: fix corruption due to blake3 hash not being set for nir_opt_undef
NIR is generated sooner, so we need to set it sooner.
This fixes Viewperf13/CATIA_car_04.
Fixes: cbfc225e2b
- glsl: switch to a full nir based linker
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32876>
This commit is contained in:
@@ -2882,7 +2882,8 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
|
||||
/* Set the linked source BLAKE3. */
|
||||
if (num_shaders == 1) {
|
||||
memcpy(linked->linked_source_blake3, shader_list[0]->compiled_source_blake3,
|
||||
memcpy(linked->Program->nir->info.source_blake3,
|
||||
shader_list[0]->compiled_source_blake3,
|
||||
BLAKE3_OUT_LEN);
|
||||
} else {
|
||||
struct mesa_blake3 blake3_ctx;
|
||||
@@ -2895,7 +2896,7 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
_mesa_blake3_update(&blake3_ctx, shader_list[i]->compiled_source_blake3,
|
||||
BLAKE3_OUT_LEN);
|
||||
}
|
||||
_mesa_blake3_final(&blake3_ctx, linked->linked_source_blake3);
|
||||
_mesa_blake3_final(&blake3_ctx, linked->Program->nir->info.source_blake3);
|
||||
}
|
||||
|
||||
return linked;
|
||||
|
@@ -246,9 +246,6 @@ struct gl_linked_shader
|
||||
{
|
||||
gl_shader_stage Stage;
|
||||
|
||||
/** All gl_shader::compiled_source_blake3 combined. */
|
||||
blake3_hash linked_source_blake3;
|
||||
|
||||
struct gl_program *Program; /**< Post-compile assembly code */
|
||||
|
||||
/**
|
||||
|
@@ -546,9 +546,6 @@ st_link_glsl_to_nir(struct gl_context *ctx,
|
||||
prog->nir->info.label = ralloc_strdup(shader, shader_program->Label);
|
||||
}
|
||||
|
||||
memcpy(prog->nir->info.source_blake3, shader->linked_source_blake3,
|
||||
BLAKE3_OUT_LEN);
|
||||
|
||||
nir_shader_gather_info(prog->nir, nir_shader_get_entrypoint(prog->nir));
|
||||
if (!st->ctx->SoftFP64 && ((prog->nir->info.bit_sizes_int | prog->nir->info.bit_sizes_float) & 64) &&
|
||||
(options->lower_doubles_options & nir_lower_fp64_full_software) != 0) {
|
||||
|
Reference in New Issue
Block a user