Mesa (master): pan/bi: Pipe multiple textures through

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 1 00:49:38 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Thu Apr 30 16:10:55 2020 -0400

pan/bi: Pipe multiple textures through

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4844>

---

 src/panfrost/bifrost/bi_pack.c         | 4 ++--
 src/panfrost/bifrost/bifrost_compile.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c
index e884417476f..5cd902da250 100644
--- a/src/panfrost/bifrost/bi_pack.c
+++ b/src/panfrost/bifrost/bi_pack.c
@@ -1441,8 +1441,8 @@ bi_pack_add_tex_compact(bi_clause *clause, bi_instruction *ins, struct bi_regist
                 .op = f16 ? BIFROST_ADD_OP_TEX_COMPACT_F16 :
                         BIFROST_ADD_OP_TEX_COMPACT_F32,
                 .unknown = 1,
-                .tex_index = 0,
-                .sampler_index = 0
+                .tex_index = ins->texture.texture_index,
+                .sampler_index = ins->texture.sampler_index
         };
 
         bi_write_data_register(clause, ins);
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index ca4aa427b49..cd659809a62 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -692,13 +692,13 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr)
 static void
 emit_tex_compact(bi_context *ctx, nir_tex_instr *instr)
 {
-        /* TODO: Pipe through indices */
-        assert(instr->texture_index == 0);
-        assert(instr->sampler_index == 0);
-
         bi_instruction tex = {
                 .type = BI_TEX,
                 .op = { .texture = BI_TEX_COMPACT },
+                .texture = {
+                        .texture_index = instr->texture_index,
+                        .sampler_index = instr->sampler_index,
+                },
                 .dest = pan_dest_index(&instr->dest),
                 .dest_type = instr->dest_type,
                 .src_types = { nir_type_float32, nir_type_float32 },



More information about the mesa-commit mailing list