aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/freedreno/ir3/ir3_shader.h')
-rw-r--r--src/freedreno/ir3/ir3_shader.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h
index 647651c03b0..58d14197879 100644
--- a/src/freedreno/ir3/ir3_shader.h
+++ b/src/freedreno/ir3/ir3_shader.h
@@ -67,6 +67,8 @@ enum ir3_driver_param {
#define IR3_MAX_SHADER_IMAGES 32
#define IR3_MAX_SO_BUFFERS 4
#define IR3_MAX_SO_OUTPUTS 64
+#define IR3_MAX_CONSTANT_BUFFERS 32
+
/**
* For consts needed to pass internal values to shader which may or may not
@@ -474,6 +476,19 @@ struct ir3_shader_variant {
struct ir3_shader *shader;
};
+struct ir3_ubo_range {
+ uint32_t offset; /* start offset of this block in const register file */
+ uint32_t start, end; /* range of block that's actually used */
+};
+
+struct ir3_ubo_analysis_state
+{
+ struct ir3_ubo_range range[IR3_MAX_CONSTANT_BUFFERS];
+ uint32_t size;
+ uint32_t lower_count;
+};
+
+
struct ir3_shader {
gl_shader_stage type;
@@ -486,6 +501,8 @@ struct ir3_shader {
struct ir3_compiler *compiler;
+ struct ir3_ubo_analysis_state ubo_state;
+
struct nir_shader *nir;
struct ir3_stream_output_info stream_output;