mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-18 21:00:33 +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> (cherry picked from commit8cb1deded6)
This commit is contained in:
parent
7b1f40a3db
commit
90001a78d1
2 changed files with 2 additions and 2 deletions
|
|
@ -1381,7 +1381,7 @@
|
|||
"description": "ir3/analyze_ubo_ranges: Account for reserved consts",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d3b7681df28e89311c4149708311de546e0a58cc"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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