pan/bi: Allow branch_offset on BLEND
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 17 Mar 2022 16:15:37 +0000 (12:15 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Mar 2022 19:00:13 +0000 (19:00 +0000)
Required to model BLEND accurately on Valhall, where it encodes a special
relative branch... Midgard style!

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

src/panfrost/bifrost/compiler.h

index 62d86bd..f60a400 100644 (file)
@@ -424,8 +424,6 @@ typedef struct {
                 uint32_t fill;
                 uint32_t index;
                 uint32_t attribute_index;
-                int32_t byte_offset;
-                int32_t branch_offset;
 
                 struct {
                         uint32_t varying_index;
@@ -437,6 +435,14 @@ typedef struct {
                 struct {
                         uint32_t sr_count;
                         uint32_t sr_count_2;
+
+                        union {
+                                /* Atomics effectively require all three */
+                                int32_t byte_offset;
+
+                                /* BLEND requires all three */
+                                int32_t branch_offset;
+                        };
                 };
         };