mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
radeonsi: simplify how the NIR name of shader variants is modified
we don't need to restore the original name Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32910>
This commit is contained in:
parent
36e3f6d9bf
commit
f05021dd2f
1 changed files with 2 additions and 8 deletions
|
|
@ -2254,11 +2254,10 @@ static void get_nir_shader(struct si_shader *shader, struct si_nir_shader_ctx *c
|
|||
bool progress = false;
|
||||
bool opts_not_run = true;
|
||||
|
||||
const char *original_name = NULL;
|
||||
if (unlikely(should_print_nir(nir))) {
|
||||
/* Modify the shader's name so that each variant gets its own name. */
|
||||
original_name = ralloc_strdup(nir, nir->info.name);
|
||||
ralloc_asprintf_append((char **)&nir->info.name, "-%08x", _mesa_hash_data(key, sizeof(*key)));
|
||||
nir->info.name = ralloc_asprintf(nir, "%s-%08x", nir->info.name,
|
||||
_mesa_hash_data(key, sizeof(*key)));
|
||||
|
||||
/* Dummy pass to get the starting point. */
|
||||
printf("nir_dummy_pass\n");
|
||||
|
|
@ -2641,11 +2640,6 @@ static void get_nir_shader(struct si_shader *shader, struct si_nir_shader_ctx *c
|
|||
* 200 is tuned for Viewperf. It should be done last.
|
||||
*/
|
||||
NIR_PASS_V(nir, nir_group_loads, nir_group_same_resource_only, 200);
|
||||
|
||||
if (unlikely(original_name)) {
|
||||
ralloc_free((void*)nir->info.name);
|
||||
nir->info.name = original_name;
|
||||
}
|
||||
}
|
||||
|
||||
void si_update_shader_binary_info(struct si_shader *shader, nir_shader *nir)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue