From bf2872eeb2d60d9eb0466728beb64cfee507654e Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Sun, 18 Aug 2019 22:48:22 -0700 Subject: [PATCH] lima/ppir: set write mask for texture loads if dest is reg Destination for texture load can be a reg, so we need to set write mask in this case Tested-by: Andreas Baierl Reviewed-by: Qiang Yu Reviewed-by: Erico Nunes Signed-off-by: Vasily Khoruzhick --- src/gallium/drivers/lima/ir/pp/nir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/lima/ir/pp/nir.c b/src/gallium/drivers/lima/ir/pp/nir.c index 45d8c9b2819..d1a8bc140b6 100644 --- a/src/gallium/drivers/lima/ir/pp/nir.c +++ b/src/gallium/drivers/lima/ir/pp/nir.c @@ -395,7 +395,11 @@ static ppir_node *ppir_emit_tex(ppir_block *block, nir_instr *ni) return NULL; } - node = ppir_node_create_dest(block, ppir_op_load_texture, &instr->dest, 0); + unsigned mask = 0; + if (!instr->dest.is_ssa) + mask = u_bit_consecutive(0, nir_tex_instr_dest_size(instr)); + + node = ppir_node_create_dest(block, ppir_op_load_texture, &instr->dest, mask); if (!node) return NULL; -- 2.30.2