pan/bi: Fix UBO push with nir_opt_shrink_vectors
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026>
This commit is contained in:
parent
16579ca4b7
commit
73f8ef2961
|
@ -79,8 +79,12 @@ bi_analyze_ranges(bi_context *ctx)
|
|||
assert(ubo < res.nr_blocks);
|
||||
assert(channels > 0 && channels <= 4);
|
||||
|
||||
if (word < MAX_UBO_WORDS)
|
||||
res.blocks[ubo].range[word] = channels;
|
||||
if (word >= MAX_UBO_WORDS) continue;
|
||||
|
||||
/* Must use max if the same base is read with different channel
|
||||
* counts, which is possible with nir_opt_shrink_vectors */
|
||||
uint8_t *range = res.blocks[ubo].range;
|
||||
range[word] = MAX2(range[word], channels);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue