mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
brw: Don't shrink UBO push ranges in the backend
Back in the bad old days (vec4?) we had a bunch of smarts in the backend to dead code eliminate unused vector components and re-pack regular uniforms, so we really couldn't decide how much data we were pushing until very late in the backend. Nowadays we have none of that - we do all of our elimination and packing in NIR. anv shrinks ranges to deal with Vulkan API push constants, and iris treats everything as a UBO and as of the previous commit will also shrink appropriately. So we don't need to do this anymore...which will let us simplify quite a bit of code. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32841>
This commit is contained in:
parent
583ad35455
commit
1ab4fe2dd6
1 changed files with 0 additions and 19 deletions
|
|
@ -1147,25 +1147,6 @@ fs_visitor::assign_constant_locations()
|
||||||
push_constant_loc = ralloc_array(mem_ctx, int, uniforms);
|
push_constant_loc = ralloc_array(mem_ctx, int, uniforms);
|
||||||
for (unsigned u = 0; u < uniforms; u++)
|
for (unsigned u = 0; u < uniforms; u++)
|
||||||
push_constant_loc[u] = u;
|
push_constant_loc[u] = u;
|
||||||
|
|
||||||
/* Now that we know how many regular uniforms we'll push, reduce the
|
|
||||||
* UBO push ranges so we don't exceed the 3DSTATE_CONSTANT limits.
|
|
||||||
*/
|
|
||||||
const unsigned max_push_length = 64;
|
|
||||||
unsigned push_length =
|
|
||||||
round_components_to_whole_registers(devinfo, prog_data->nr_params);
|
|
||||||
for (int i = 0; i < 4; i++) {
|
|
||||||
struct brw_ubo_range *range = &prog_data->ubo_ranges[i];
|
|
||||||
|
|
||||||
if (push_length + range->length > max_push_length)
|
|
||||||
range->length = max_push_length - push_length;
|
|
||||||
|
|
||||||
push_length += range->length;
|
|
||||||
|
|
||||||
assert(push_length % (1 * reg_unit(devinfo)) == 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
assert(push_length <= max_push_length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue