Mesa (master): freedreno/ir3: fix resinfo wrmask

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jun 28 17:00:21 UTC 2020


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

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Sat Jun 27 21:50:17 2020 -0400

freedreno/ir3: fix resinfo wrmask

resinfo always writes 3 components, which was not being taken into account

Fixes these tests:
dEQP-VK.renderpass.suballocation.attachment_sparse_filling.input_attachment_3
dEQP-VK.renderpass.suballocation.attachment_sparse_filling.input_attachment_7

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5674>

---

 src/freedreno/ir3/ir3_a6xx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/ir3/ir3_a6xx.c b/src/freedreno/ir3/ir3_a6xx.c
index a8c6553a518..b10e1b95027 100644
--- a/src/freedreno/ir3/ir3_a6xx.c
+++ b/src/freedreno/ir3/ir3_a6xx.c
@@ -351,7 +351,9 @@ emit_intrinsic_image_size(struct ir3_context *ctx, nir_intrinsic_instr *intr,
 	resinfo->cat6.d = intr->num_components;
 	resinfo->cat6.type = TYPE_U32;
 	resinfo->cat6.typed = false;
-	resinfo->regs[0]->wrmask = MASK(intr->num_components);
+	/* resinfo has no writemask and always writes out 3 components: */
+	compile_assert(ctx, intr->num_components <= 3);
+	resinfo->regs[0]->wrmask = MASK(3);
 	ir3_handle_bindless_cat6(resinfo, intr->src[0]);
 
 	ir3_split_dest(b, dst, resinfo, 0, intr->num_components);



More information about the mesa-commit mailing list