mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
panfrost: Avoid integer underflow in rt_count_1
If rt_count = 0, this underflows to MAX_MRT. The hw doesn't seem to care but it's semantically incorrect and confuses pandecode. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
This commit is contained in:
parent
77bb19eebd
commit
9addb82148
1 changed files with 1 additions and 1 deletions
|
|
@ -482,7 +482,7 @@ panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
|
|||
/* Seems to configure tib size */
|
||||
.unk1 = pan_is_large_tib(batch) ? 0xc80 : 0x1080,
|
||||
|
||||
.rt_count_1 = MALI_POSITIVE(batch->key.nr_cbufs),
|
||||
.rt_count_1 = MALI_POSITIVE(MAX2(batch->key.nr_cbufs, 1)),
|
||||
.rt_count_2 = 4,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue