mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
ir3: Use correct immediate size for constlen calculation
"size" is the allocated size of the array, not the number of immediates
actually used. We could wind up returning a too-large constlen, larger
than 512, and since the binning variant uses the non-binning variant's
constlen as it's max_const we could make binning variants use c512.x and
crash when encoding.
Fixes: 86f3c0c4c2 ("ir3: simplify constlen calculation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40961>
This commit is contained in:
parent
280c64d720
commit
49d29d4f10
1 changed files with 1 additions and 1 deletions
|
|
@ -1085,7 +1085,7 @@ static inline unsigned
|
|||
ir3_constlen(const struct ir3_shader_variant *v)
|
||||
{
|
||||
return ir3_const_state(v)->allocs.max_const_offset_vec4 +
|
||||
v->imm_state.size / 4;
|
||||
DIV_ROUND_UP(v->imm_state.count, 4);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue