From 7d31bc9a34ccc4b8570c4145379177c007922504 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Sat, 27 Jun 2020 21:50:17 -0400 Subject: [PATCH] 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 Part-of: --- 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); -- 2.30.2