[Mesa-dev] [PATCH 1/6] ac/nir: restrict fmask lookup to image load intrinsics.

Dave Airlie airlied at gmail.com
Mon Mar 19 07:26:52 UTC 2018


From: Dave Airlie <airlied at redhat.com>

We don't ever want to do the fmask lookup on a atomic or
store, the fmask should have been decompressed if the
surface has been moved to IMAGE_LAYOUT
---
 src/amd/common/ac_nir_to_llvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index b0c0d76b470..fa8f91b321d 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -2046,7 +2046,7 @@ static LLVMValueRef get_image_coords(struct ac_nir_context *ctx,
 	bool gfx9_1d = ctx->ac.chip_class >= GFX9 && dim == GLSL_SAMPLER_DIM_1D;
 	count = image_type_to_components_count(dim, is_array);
 
-	if (is_ms) {
+	if (is_ms && instr->intrinsic == nir_intrinsic_image_load) {
 		LLVMValueRef fmask_load_address[3];
 		int chan;
 
-- 
2.14.3



More information about the mesa-dev mailing list