Mesa (main): pan/bi: Add bifrost_dual_texture_operation struct

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


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Nov  8 13:59:55 2021 -0500

pan/bi: Add bifrost_dual_texture_operation struct

This is the other state of the texture operation descriptor. We must
pack it in the compiler when fusing dual texturing.

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

---

 src/panfrost/bifrost/bifrost.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h
index b8c5fb4c6e6..d9b5e1d5e0b 100644
--- a/src/panfrost/bifrost/bifrost.h
+++ b/src/panfrost/bifrost/bifrost.h
@@ -550,6 +550,28 @@ struct bifrost_texture_operation {
         unsigned mask : 4;
 } __attribute__((packed));
 
+struct bifrost_dual_texture_operation {
+        unsigned primary_sampler_index : 2;
+        unsigned mode : 2; /* 0x1 for dual */
+        unsigned primary_texture_index : 2;
+        unsigned secondary_sampler_index : 2;
+        unsigned secondary_texture_index : 2;
+
+        /* Leave zero for dual texturing */
+        unsigned reserved : 1;
+        unsigned index_mode_zero : 1;
+
+        /* Base staging register to write the secondary results to */
+        unsigned secondary_register : 6;
+
+        /* Format/mask for each texture */
+        enum bifrost_texture_format secondary_format : 3;
+        unsigned secondary_mask : 4;
+
+        enum bifrost_texture_format primary_format : 3;
+        unsigned primary_mask : 4;
+} __attribute__((packed));
+
 #define BIFROST_MEGA_SAMPLE 128
 #define BIFROST_ALL_SAMPLES 255
 #define BIFROST_CURRENT_PIXEL 255



More information about the mesa-commit mailing list