pan/midgard: Decontextualize midgard_nir_assign_sysval_body
[mesa.git] / src / panfrost / midgard / compiler.h
index e55a16ad519ddea1c23c7e3eb4cc10beb0e4e0cf..cbe045b09a9753bcbc84cb54756a280f2edd0b44 100644 (file)
@@ -234,6 +234,13 @@ enum midgard_rt_id {
         MIDGARD_NUM_RTS,
 };
 
+struct panfrost_sysvals {
+        /* The mapping of sysvals to uniforms, the count, and the off-by-one inverse */
+        unsigned sysvals[MAX_SYSVAL_COUNT];
+        unsigned sysval_count;
+        struct hash_table_u64 *sysval_to_id;
+};
+
 typedef struct compiler_context {
         nir_shader *nir;
         gl_shader_stage stage;
@@ -307,11 +314,6 @@ typedef struct compiler_context {
 
         unsigned quadword_count;
 
-        /* The mapping of sysvals to uniforms, the count, and the off-by-one inverse */
-        unsigned sysvals[MAX_SYSVAL_COUNT];
-        unsigned sysval_count;
-        struct hash_table_u64 *sysval_to_id;
-
         /* Bitmask of valid metadata */
         unsigned metadata;
 
@@ -320,6 +322,8 @@ typedef struct compiler_context {
 
         /* Writeout instructions for each render target */
         midgard_instruction *writeout_branch[MIDGARD_NUM_RTS];
+
+        struct panfrost_sysvals sysvals;
 } compiler_context;
 
 /* Per-block live_in/live_out */