From 6d28c6e52cfd76855c1368560dd90f12493e2580 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 2 Jan 2016 03:21:28 -0800 Subject: i965: Select ranges of UBO data to be uploaded as push constants. This adds a NIR pass that decides which portions of UBOS we should upload as push constants, rather than pull constants. v2: Switch to uint16_t for the UBO block number, because we may have a lot of them in Vulkan (suggested by Jason). Add more comments about bitfield trickery (requested by Matt). v3: Skip vec4 stages for now...I haven't finished wiring up support in the vec4 backend, and so pushing the data but not using it will just be wasteful. Reviewed-by: Matt Turner --- src/intel/compiler/brw_compiler.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/intel/compiler/brw_compiler.h') diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index e4c22e31177..bebd2447361 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -468,6 +468,13 @@ struct brw_image_param { */ #define BRW_SHADER_TIME_STRIDE 64 +struct brw_ubo_range +{ + uint16_t block; + uint8_t start; + uint8_t length; +}; + struct brw_stage_prog_data { struct { /** size of our binding table. */ @@ -488,6 +495,8 @@ struct brw_stage_prog_data { /** @} */ } binding_table; + struct brw_ubo_range ubo_ranges[4]; + GLuint nr_params; /**< number of float params/constants */ GLuint nr_pull_params; unsigned nr_image_params; -- cgit v1.2.3