pan/bi: Add f16 TEXC.vtx op
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 27 May 2020 15:43:37 +0000 (11:43 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 27 May 2020 20:49:44 +0000 (16:49 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>

src/panfrost/bifrost/bifrost_compile.c
src/panfrost/bifrost/disassemble.c

index 417c6de7b062a3cfd67a4966f44aaee406871562..09bec283dc23c4a6c7bff11ca162cbb3be2a369d 100644 (file)
@@ -883,6 +883,11 @@ emit_tex_compact(bi_context *ctx, nir_tex_instr *instr)
 
         for (unsigned i = 0; i < instr->num_srcs; ++i) {
                 int index = pan_src_index(&instr->src[i].src);
+
+                /* We were checked ahead-of-time */
+                if (instr->src[i].src_type == nir_tex_src_lod)
+                        continue;
+
                 assert (instr->src[i].src_type == nir_tex_src_coord);
 
                 tex.src[0] = index;
index debc710b3be152eba2927bda3e3060db89c295bd..e5f23eb0a6f0fcc1fbb2633f63871d82447516b6 100644 (file)
@@ -1130,7 +1130,8 @@ static const struct add_op_info add_op_infos[] = {
         { 0x1a000, "LD_VAR.16", ADD_VARYING_INTERP, true },
         { 0x1ae20, "TEX.vtx", ADD_TEX, true },
         { 0x1ae60, "TEX", ADD_TEX, true },
-        { 0x1b000, "TEX.f16", ADD_TEX_COMPACT, true },
+        { 0x1b000, "TEXC.f16", ADD_TEX_COMPACT, true },
+        { 0x1b400, "TEXC.vtx.f16", ADD_TEX_COMPACT, true },
         { 0x1c000, "RSHIFT_NAND.i32", ADD_SHIFT },
         { 0x1c400, "RSHIFT_AND.i32", ADD_SHIFT },
         { 0x1c800, "LSHIFT_NAND.i32", ADD_SHIFT },