From 42a88bb73cd702ebea62bfcd821cb03bc685d133 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 15 Feb 2021 11:40:45 +0100 Subject: [PATCH] radv: only apply the MRT output NaN fixup to non-meta shaders We only want this workaround to be applied for game shaders. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4163 Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 955d1b93184..d942fd14773 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -1309,7 +1309,8 @@ shader_variant_compile(struct radv_device *device, 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->use_ngg_streamout = device->physical_device->use_ngg_streamout; - options->enable_mrt_output_nan_fixup = device->instance->enable_mrt_output_nan_fixup; + options->enable_mrt_output_nan_fixup = module && !module->nir && + device->instance->enable_mrt_output_nan_fixup; options->debug.func = radv_compiler_debug; options->debug.private_data = &debug_data;