mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
ir3/analyze_ubo_ranges: Account for reserved consts
We weren't accounting for the reserved consts when calculating how much
we can upload. This led to assertion failures later if we pushed too
much.
Fixes: d3b7681df2 ("tu: ir3: Emit push constants directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>
This commit is contained in:
parent
750ecb0aa9
commit
8cb1deded6
1 changed files with 1 additions and 1 deletions
|
|
@ -425,7 +425,7 @@ ir3_nir_analyze_ubo_ranges(nir_shader *nir, struct ir3_shader_variant *v)
|
|||
|
||||
memset(state, 0, sizeof(*state));
|
||||
|
||||
uint32_t upload_remaining = max_upload;
|
||||
uint32_t upload_remaining = max_upload - v->num_reserved_user_consts * 16;
|
||||
bool push_ubos = compiler->push_ubo_with_preamble;
|
||||
nir_foreach_function (function, nir) {
|
||||
if (function->impl && (!push_ubos || !function->is_preamble)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue