pan/bi: Handle Valhall texturing in helper analysis
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 3 Aug 2021 15:11:42 +0000 (11:11 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 14:20:45 +0000 (14:20 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15793>

src/panfrost/bifrost/bi_helper_invocations.c

index 975d43fd8472d39f40cc91a5607da61454e2d1da..b69944a03d5d10b6d8c25d683a81a592bb3a86ee 100644 (file)
@@ -65,6 +65,7 @@ static bool
 bi_has_skip_bit(enum bi_opcode op)
 {
         switch (op) {
+        case BI_OPCODE_TEX_SINGLE:
         case BI_OPCODE_TEXC:
         case BI_OPCODE_TEXS_2D_F16:
         case BI_OPCODE_TEXS_2D_F32:
@@ -94,6 +95,9 @@ bi_instr_uses_helpers(bi_instr *I)
         case BI_OPCODE_VAR_TEX_F16:
         case BI_OPCODE_VAR_TEX_F32:
                 return !I->lod_mode; /* set for zero, clear for computed */
+        case BI_OPCODE_TEX_SINGLE:
+                return (I->va_lod_mode == BI_VA_LOD_MODE_COMPUTED_LOD) ||
+                       (I->va_lod_mode == BI_VA_LOD_MODE_COMPUTED_BIAS);
         case BI_OPCODE_CLPER_I32:
         case BI_OPCODE_CLPER_V6_I32:
                 /* Fragment shaders require helpers to implement derivatives.