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> (cherry picked from commitd09ba36f98
) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
@@ -1194,7 +1194,7 @@
|
||||
"description": "glsl: fix corruption due to blake3 hash not being set for nir_opt_undef",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "cbfc225e2bda2c8627a4580fa3a9b63bfb7133e0",
|
||||
"notes": null
|
||||
|
@@ -2885,7 +2885,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;
|
||||
@@ -2898,7 +2899,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;
|
||||
|
@@ -247,9 +247,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 */
|
||||
|
||||
/**
|
||||
|
@@ -545,9 +545,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