pan/bi: Use BIFROST_TEXTURE_OPERATION_SINGLE enum
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 8 Nov 2021 19:00:24 +0000 (14:00 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 12 Nov 2021 16:30:02 +0000 (16:30 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13723>

src/panfrost/bifrost/bifrost_compile.c

index 2b8967b..db32337 100644 (file)
@@ -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.