mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
panfrost: Don't double-create scratchpad
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 4f7fddbd71 ("panfrost: Pass size to panfrost_batch_get_scratchpad")
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3119>
This commit is contained in:
parent
73bd9fe20c
commit
0eb84eb702
1 changed files with 7 additions and 1 deletions
|
|
@ -646,12 +646,18 @@ panfrost_batch_get_scratchpad(struct panfrost_batch *batch,
|
|||
thread_tls_alloc,
|
||||
core_count);
|
||||
|
||||
return panfrost_batch_create_bo(batch, size,
|
||||
if (batch->scratchpad) {
|
||||
assert(batch->scratchpad->size >= size);
|
||||
} else {
|
||||
batch->scratchpad = panfrost_batch_create_bo(batch, size,
|
||||
PAN_BO_INVISIBLE,
|
||||
PAN_BO_ACCESS_PRIVATE |
|
||||
PAN_BO_ACCESS_RW |
|
||||
PAN_BO_ACCESS_VERTEX_TILER |
|
||||
PAN_BO_ACCESS_FRAGMENT);
|
||||
}
|
||||
|
||||
return batch->scratchpad;
|
||||
}
|
||||
|
||||
struct panfrost_bo *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue