From 3906fce88bb473f283e4b064cc996ea6aa6d2922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 18 Sep 2019 17:34:13 -0400 Subject: [PATCH] tgsi_to_nir: fix masked out image loads This caused a failure in NIR validation. Reviewed-by: Connor Abbott Reviewed-by: Eric Anholt --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index b5ca49336af..b92a4485e4c 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -1939,8 +1939,7 @@ ttn_mem(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src) if (tgsi_inst->Instruction.Opcode == TGSI_OPCODE_LOAD) { - nir_ssa_dest_init(&instr->instr, &instr->dest, - util_last_bit(tgsi_inst->Dst[0].Register.WriteMask), + nir_ssa_dest_init(&instr->instr, &instr->dest, instr->num_components, 32, NULL); nir_builder_instr_insert(b, &instr->instr); ttn_move_dest(b, dest, &instr->dest.ssa);