Mesa (master): lima/ppir: set write mask for texture loads if dest is reg

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 24 15:36:50 UTC 2019


Module: Mesa
Branch: master
Commit: bf2872eeb2d60d9eb0466728beb64cfee507654e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf2872eeb2d60d9eb0466728beb64cfee507654e

Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date:   Sun Aug 18 22:48:22 2019 -0700

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 at imkreisrum.de>
Reviewed-by: Qiang Yu <yuq825 at gmail.com>
Reviewed-by: Erico Nunes <nunes.erico at gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>

---

 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;
 




More information about the mesa-commit mailing list