freedreno/ir3: move ubo_state into const_state
[mesa.git] / src / freedreno / ir3 / ir3_shader.h
index f646f33469067ca5a6a23fc6f3db25ebfbba8858..a89abfe9e166d1ec268c651d38a5f15e6e019687 100644 (file)
@@ -73,6 +73,22 @@ enum ir3_driver_param {
 #define IR3_MAX_UBO_PUSH_RANGES  32
 
 
+struct ir3_ubo_range {
+       uint32_t offset; /* start offset to push in the const register file */
+       uint32_t block; /* Which constant block */
+       uint32_t start, end; /* range of block that's actually used */
+       uint16_t bindless_base; /* For bindless, which base register is used */
+       bool bindless;
+};
+
+struct ir3_ubo_analysis_state {
+       struct ir3_ubo_range range[IR3_MAX_UBO_PUSH_RANGES];
+       uint32_t num_enabled;
+       uint32_t size;
+       uint32_t lower_count;
+       uint32_t cmdstream_size; /* for per-gen backend to stash required cmdstream size */
+};
+
 /**
  * Describes the layout of shader consts.  This includes:
  *   + User consts + driver lowered UBO ranges
@@ -157,6 +173,9 @@ struct ir3_const_state {
        struct {
                uint32_t val[4];
        } *immediates;
+
+       /* State of ubo access lowered to push consts: */
+       struct ir3_ubo_analysis_state ubo_state;
 };
 
 /**
@@ -588,22 +607,6 @@ ir3_shader_stage(struct ir3_shader_variant *v)
        }
 }
 
-struct ir3_ubo_range {
-       uint32_t offset; /* start offset to push in the const register file */
-       uint32_t block; /* Which constant block */
-       uint32_t start, end; /* range of block that's actually used */
-       uint16_t bindless_base; /* For bindless, which base register is used */
-       bool bindless;
-};
-
-struct ir3_ubo_analysis_state {
-       struct ir3_ubo_range range[IR3_MAX_UBO_PUSH_RANGES];
-       uint32_t num_enabled;
-       uint32_t size;
-       uint32_t lower_count;
-       uint32_t cmdstream_size; /* for per-gen backend to stash required cmdstream size */
-};
-
 
 struct ir3_shader {
        gl_shader_stage type;
@@ -619,8 +622,6 @@ struct ir3_shader {
 
        struct ir3_compiler *compiler;
 
-       struct ir3_ubo_analysis_state ubo_state;
-
        /* Number of UBOs loaded by LDC, as opposed to LDG through pointers in
         * ubo_state.
         */