diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index d7a514025b2..4150617b995 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -229,8 +229,6 @@ radv_get_hash_flags(const struct radv_device *device, bool stats) hash_flags |= RADV_HASH_SHADER_GE_WAVE32; if (device->physical_device->use_llvm) hash_flags |= RADV_HASH_SHADER_LLVM; - if (device->instance->enable_mrt_output_nan_fixup) - hash_flags |= RADV_HASH_SHADER_MRT_NAN_FIXUP; if (stats) hash_flags |= RADV_HASH_SHADER_KEEP_STATISTICS; if (device->force_vrs == RADV_FORCE_VRS_2x2) @@ -2727,6 +2725,9 @@ radv_generate_graphics_pipeline_key(const struct radv_pipeline *pipeline, if (pipeline->device->instance->debug_flags & RADV_DEBUG_DISCARD_TO_DEMOTE) key.ps.lower_discard_to_demote = true; + if (pipeline->device->instance->enable_mrt_output_nan_fixup) + key.ps.enable_mrt_output_nan_fixup = true; + if (pipeline->device->instance->debug_flags & RADV_DEBUG_INVARIANT_GEOM) key.invariant_geom = true; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 2c8595108bd..943f053b785 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1659,7 +1659,6 @@ struct radv_event { #define RADV_HASH_SHADER_PS_WAVE32 (1 << 2) #define RADV_HASH_SHADER_GE_WAVE32 (1 << 3) #define RADV_HASH_SHADER_LLVM (1 << 4) -#define RADV_HASH_SHADER_MRT_NAN_FIXUP (1 << 6) #define RADV_HASH_SHADER_KEEP_STATISTICS (1 << 8) #define RADV_HASH_SHADER_FORCE_VRS_2x2 (1 << 9) #define RADV_HASH_SHADER_FORCE_VRS_2x1 (1 << 10) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 4087dfe8396..33fd0c50bb5 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -1570,7 +1570,7 @@ shader_variant_compile(struct radv_device *device, struct vk_shader_module *modu options->address32_hi = device->physical_device->rad_info.address32_hi; options->has_ls_vgpr_init_bug = device->physical_device->rad_info.has_ls_vgpr_init_bug; options->enable_mrt_output_nan_fixup = - module && !module->nir && device->instance->enable_mrt_output_nan_fixup; + module && !module->nir && options->key.ps.enable_mrt_output_nan_fixup; options->adjust_frag_coord_z = device->adjust_frag_coord_z; options->has_image_load_dcc_bug = device->physical_device->rad_info.has_image_load_dcc_bug; options->debug.func = radv_compiler_debug; diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 1d9d2e8e29b..4c607127e16 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -78,6 +78,7 @@ struct radv_pipeline_key { uint8_t num_samples; bool lower_discard_to_demote; + bool enable_mrt_output_nan_fixup; } ps; struct {