From: Vasily Khoruzhick Date: Mon, 19 Aug 2019 05:48:22 +0000 (-0700) Subject: lima/ppir: set write mask for texture loads if dest is reg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf2872eeb2d60d9eb0466728beb64cfee507654e;p=mesa.git 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 --- 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;