Mesa (master): radv: fix regression with mask attrib setting code.

Dave Airlie airlied at kemper.freedesktop.org
Thu Mar 30 02:08:33 UTC 2017


Module: Mesa
Branch: master
Commit: aa27a9f68790db83c728a721d7625f688119cf6c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa27a9f68790db83c728a721d7625f688119cf6c

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Mar 30 12:06:52 2017 +1000

radv: fix regression with mask attrib setting code.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/common/ac_nir_to_llvm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 8f09b0d0d5..5e69a75b4c 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4181,6 +4181,7 @@ handle_shader_output_decl(struct nir_to_llvm_context *ctx,
 	unsigned mask_attribs;
 	variable->data.driver_location = idx * 4;
 
+	mask_attribs = ((1ull << attrib_count) - 1) << idx;
 	if (ctx->stage == MESA_SHADER_VERTEX ||
 	    ctx->stage == MESA_SHADER_GEOMETRY) {
 		if (idx == VARYING_SLOT_CLIP_DIST0) {
@@ -4194,10 +4195,9 @@ handle_shader_output_decl(struct nir_to_llvm_context *ctx,
 				attrib_count = 2;
 			else
 				attrib_count = 1;
+			mask_attribs = 1 << idx;
 		}
-		mask_attribs = 1 << idx;
-	} else
-		mask_attribs = ((1ull << attrib_count) - 1) << idx;
+	}
 
 	for (unsigned i = 0; i < attrib_count; ++i) {
 		for (unsigned chan = 0; chan < 4; chan++) {




More information about the mesa-commit mailing list