[Mesa-dev] [PATCH 2/2] radv: fix interp at sample code.

Dave Airlie airlied at gmail.com
Mon Apr 3 03:44:46 UTC 2017


From: Dave Airlie <airlied at redhat.com>

Interp at sample needs to use the center, since the sample
positions it retrieves are relative to the center.

This fixes a bunch of CTS tests with multisample_interpolation.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/amd/common/ac_nir_to_llvm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index aabcabe..6985371 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3556,12 +3556,10 @@ static LLVMValueRef visit_interp(struct nir_to_llvm_context *ctx,
 		location = INTERP_CENTROID;
 		break;
 	case nir_intrinsic_interp_var_at_sample:
-		location = INTERP_SAMPLE;
-		src0 = get_src(ctx, instr->src[0]);
-		break;
 	case nir_intrinsic_interp_var_at_offset:
 		location = INTERP_CENTER;
 		src0 = get_src(ctx, instr->src[0]);
+		break;
 	default:
 		break;
 	}
-- 
2.7.4



More information about the mesa-dev mailing list