From 7b1655ccf3471a7c961612197b7227fd0e4abb35 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 28 Aug 2019 16:52:30 +0200 Subject: [PATCH] radv: move setting can_discard to ac_fill_shader_info() Signed-off-by: Samuel Pitoiset Reviewed-by: Dave Airlie --- src/amd/vulkan/radv_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index b4ee28f4d37..1c1633a51e7 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -4298,7 +4298,6 @@ LLVMModuleRef ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm, } else if (shaders[i]->info.stage == MESA_SHADER_VERTEX) { ctx.abi.load_base_vertex = radv_load_base_vertex; } else if (shaders[i]->info.stage == MESA_SHADER_FRAGMENT) { - shader_info->fs.can_discard = shaders[i]->info.fs.uses_discard; ctx.abi.load_sample_position = load_sample_position; ctx.abi.load_sample_mask_in = load_sample_mask_in; ctx.abi.emit_kill = radv_emit_kill; @@ -4521,6 +4520,7 @@ ac_fill_shader_info(struct radv_shader_variant_info *shader_info, struct nir_sha shader_info->cs.block_size[i] = nir->info.cs.local_size[i]; break; case MESA_SHADER_FRAGMENT: + shader_info->fs.can_discard = nir->info.fs.uses_discard; shader_info->fs.early_fragment_test = nir->info.fs.early_fragment_tests; shader_info->fs.post_depth_coverage = nir->info.fs.post_depth_coverage; break; -- 2.30.2