mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 18:48:28 +02:00
anv: assert we haven't gone over the maximum number of push_buffers
Coverity notes that we break out of the loop walking the analysis_ranges early if n_push_ranges >= max_push_buffers, so it notes that n_push_ranges could already be 3 or 4 (depending on whether we're doing mesh), and that then if we need the padding we insert another, which would write past the end of the array. I don't think this is actually possible in practice, but we can add an assert to both keep coverity happy and detect that this has actually happened. CID: 1681478 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40147>
This commit is contained in:
parent
d7f67171ef
commit
a8ba682919
1 changed files with 1 additions and 0 deletions
|
|
@ -549,6 +549,7 @@ anv_nir_compute_push_layout(nir_shader *nir,
|
|||
}
|
||||
|
||||
if (needs_padding_per_primitive) {
|
||||
assert(n_push_ranges < max_push_buffers);
|
||||
struct anv_push_range push_constant_padding_range = {
|
||||
.set = ANV_DESCRIPTOR_SET_PER_PRIM_PADDING,
|
||||
.start = 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue