radv: use radv_physical_cache_key::disable_shrink_image_store more

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40088>
This commit is contained in:
Samuel Pitoiset 2026-02-25 11:17:17 +01:00 committed by Marge Bot
parent 55691035e8
commit 229e892e42
2 changed files with 2 additions and 3 deletions

View file

@ -249,7 +249,6 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_graphics_stat
struct radv_shader_stage *stage)
{
const struct radv_physical_device *pdev = radv_device_physical(device);
const struct radv_instance *instance = radv_physical_device_instance(pdev);
enum amd_gfx_level gfx_level = pdev->info.gfx_level;
bool progress;
@ -302,7 +301,7 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_graphics_stat
NIR_PASS(progress, stage->nir, nir_opt_load_store_vectorize, &vectorize_opts);
if (progress) {
NIR_PASS(_, stage->nir, nir_opt_copy_prop);
NIR_PASS(_, stage->nir, nir_opt_shrink_stores, !instance->drirc.debug.disable_shrink_image_store);
NIR_PASS(_, stage->nir, nir_opt_shrink_stores, !pdev->cache_key.disable_shrink_image_store);
constant_fold_for_push_const = true;
}

View file

@ -743,7 +743,7 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st
});
NIR_PASS(_, nir, nir_lower_load_const_to_scalar);
NIR_PASS(_, nir, nir_opt_shrink_stores, !instance->drirc.debug.disable_shrink_image_store);
NIR_PASS(_, nir, nir_opt_shrink_stores, !pdev->cache_key.disable_shrink_image_store);
if (nir->info.stage == MESA_SHADER_FRAGMENT && nir->info.fs.uses_discard)
NIR_PASS(_, nir, nir_lower_discard_if, nir_move_terminate_out_of_loops);