Mesa (main): pan/bi: Use BIFROST_TEXTURE_OPERATION_SINGLE enum

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 12 16:47:45 UTC 2021


Module: Mesa
Branch: main
Commit: 98c1b3e7e1453534d130687971232798860bfebb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=98c1b3e7e1453534d130687971232798860bfebb

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Nov  8 14:00:24 2021 -0500

pan/bi: Use BIFROST_TEXTURE_OPERATION_SINGLE enum

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

---

 src/panfrost/bifrost/bifrost_compile.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 2b8967b6160..db32337ffb8 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -2727,7 +2727,7 @@ bi_emit_texc(bi_builder *b, nir_tex_instr *instr)
                 desc.sampler_index_or_mode = instr->sampler_index;
                 desc.index = instr->texture_index;
         } else {
-                enum bifrost_index mode = 0;
+                unsigned mode = 0;
 
                 if (direct && instr->sampler_index == instr->texture_index) {
                         mode = BIFROST_INDEX_IMMEDIATE_SHARED;
@@ -2749,7 +2749,8 @@ bi_emit_texc(bi_builder *b, nir_tex_instr *instr)
                         mode = BIFROST_INDEX_REGISTER;
                 }
 
-                desc.sampler_index_or_mode = mode | (0x3 << 2);
+                mode |= (BIFROST_TEXTURE_OPERATION_SINGLE << 2);
+                desc.sampler_index_or_mode = mode;
         }
 
         /* Allocate staging registers contiguously by compacting the array.



More information about the mesa-commit mailing list