mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
pvr: only share scratch buffers when they're the required size
When sharing scratch buffers across framebuffers, it reallocates the scratch buffer to ensure the smallest scratch buffer is always in use. However, the check to do this meant that it was possible to end up with a scratch buffer that was too small, leading to page faults or memory corruption. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
cbf58fea6f
commit
f1580acefb
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ VkResult pvr_spm_scratch_buffer_get_buffer(
|
|||
* framebuffers as the scratch buffer is only used during PRs and only one PR
|
||||
* can ever be executed at any one time.
|
||||
*/
|
||||
if (store->head_ref && store->head_ref->size <= size) {
|
||||
if (store->head_ref && store->head_ref->size == size) {
|
||||
buffer = store->head_ref;
|
||||
} else {
|
||||
VkResult result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue