From 73cb17f41bf019df504d2d2af4ebdf45aa3201c6 Mon Sep 17 00:00:00 2001
From: FernandoS27 <fsahmkow27@gmail.com>
Date: Sun, 4 Apr 2021 09:38:15 +0200
Subject: shader: Implement indexed Position and ClipDistances

---
 src/shader_recompiler/program_header.h | 45 +++++++++++++++++++++++++++++++---
 1 file changed, 42 insertions(+), 3 deletions(-)

(limited to 'src/shader_recompiler/program_header.h')

diff --git a/src/shader_recompiler/program_header.h b/src/shader_recompiler/program_header.h
index ce65fc1a41..15f43f2d8e 100644
--- a/src/shader_recompiler/program_header.h
+++ b/src/shader_recompiler/program_header.h
@@ -69,7 +69,20 @@ struct ProgramHeader {
     union {
         struct {
             INSERT_PADDING_BYTES_NOINIT(3); // ImapSystemValuesA
-            INSERT_PADDING_BYTES_NOINIT(1); // ImapSystemValuesB
+
+            union {
+                BitField<0, 1, u8> primitive_array_id;
+                BitField<1, 1, u8> rt_array_index;
+                BitField<2, 1, u8> viewport_index;
+                BitField<3, 1, u8> point_size;
+                BitField<4, 1, u8> position_x;
+                BitField<5, 1, u8> position_y;
+                BitField<6, 1, u8> position_z;
+                BitField<7, 1, u8> position_w;
+                BitField<0, 4, u8> first;
+                BitField<4, 4, u8> position;
+                u8 raw;
+            } imap_systemb;
 
             union {
                 BitField<0, 1, u8> x;
@@ -99,7 +112,20 @@ struct ProgramHeader {
             INSERT_PADDING_BYTES_NOINIT(5); // ImapFixedFncTexture[10]
             INSERT_PADDING_BYTES_NOINIT(1); // ImapReserved
             INSERT_PADDING_BYTES_NOINIT(3); // OmapSystemValuesA
-            INSERT_PADDING_BYTES_NOINIT(1); // OmapSystemValuesB
+
+            union {
+                BitField<0, 1, u8> primitive_array_id;
+                BitField<1, 1, u8> rt_array_index;
+                BitField<2, 1, u8> viewport_index;
+                BitField<3, 1, u8> point_size;
+                BitField<4, 1, u8> position_x;
+                BitField<5, 1, u8> position_y;
+                BitField<6, 1, u8> position_z;
+                BitField<7, 1, u8> position_w;
+                BitField<0, 4, u8> first;
+                BitField<4, 4, u8> position;
+                u8 raw;
+            } omap_systemb;
 
             union {
                 BitField<0, 1, u8> x;
@@ -148,7 +174,20 @@ struct ProgramHeader {
 
         struct {
             INSERT_PADDING_BYTES_NOINIT(3); // ImapSystemValuesA
-            INSERT_PADDING_BYTES_NOINIT(1); // ImapSystemValuesB
+
+            union {
+                BitField<0, 1, u8> primitive_array_id;
+                BitField<1, 1, u8> rt_array_index;
+                BitField<2, 1, u8> viewport_index;
+                BitField<3, 1, u8> point_size;
+                BitField<4, 1, u8> position_x;
+                BitField<5, 1, u8> position_y;
+                BitField<6, 1, u8> position_z;
+                BitField<7, 1, u8> position_w;
+                BitField<0, 4, u8> first;
+                BitField<4, 4, u8> position;
+                u8 raw;
+            } imap_systemb;
 
             union {
                 BitField<0, 2, PixelImap> x;
-- 
cgit v1.2.3-70-g09d2