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 <ichgeh@imkreisrum.de>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
This commit is contained in:
Vasily Khoruzhick 2019-08-18 22:48:22 -07:00
parent fd129817f0
commit bf2872eeb2
1 changed files with 5 additions and 1 deletions

View File

@ -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;