mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
nir: silence a warning in nir_opt_shrink_vectors
gcc assumes the array is a string, so it treats it as having 15 elements instead of 16. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36099>
This commit is contained in:
parent
b35e8a38e7
commit
a15c1e1896
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ shrink_dest_to_read_mask(nir_def *def, bool shrink_start)
|
|||
|
||||
/* Reswizzle sources, which must be ALU since they have swizzle */
|
||||
assert(first_bit + comps <= NIR_MAX_VEC_COMPONENTS);
|
||||
uint8_t swizzle[NIR_MAX_VEC_COMPONENTS] = { 0 };
|
||||
uint8_t swizzle[NIR_MAX_VEC_COMPONENTS + 1] = { 0 };
|
||||
for (unsigned i = 0; i < comps; ++i) {
|
||||
swizzle[first_bit + i] = i;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue