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 <mattst88@gmail.com>
This commit is contained in:
@@ -142,6 +142,10 @@ void brw_nir_setup_glsl_uniforms(nir_shader *shader,
|
||||
void brw_nir_setup_arb_uniforms(nir_shader *shader, struct gl_program *prog,
|
||||
struct brw_stage_prog_data *stage_prog_data);
|
||||
|
||||
void brw_nir_analyze_ubo_ranges(const struct brw_compiler *compiler,
|
||||
nir_shader *nir,
|
||||
struct brw_ubo_range out_ranges[4]);
|
||||
|
||||
bool brw_nir_opt_peephole_ffma(nir_shader *shader);
|
||||
|
||||
#define BRW_NIR_FRAG_OUTPUT_INDEX_SHIFT 0
|
||||
|
Reference in New Issue
Block a user