mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
radv: Fix shader replay allocation condition
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26891>
(cherry picked from commit 43bdfebbff)
This commit is contained in:
parent
364835c513
commit
0392e4bf5c
2 changed files with 5 additions and 5 deletions
|
|
@ -924,7 +924,7 @@
|
|||
"description": "radv: Fix shader replay allocation condition",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1344,14 +1344,14 @@ radv_replay_shader_arena_block(struct radv_device *device, const struct radv_ser
|
|||
if (!hole->freelist.prev)
|
||||
continue;
|
||||
|
||||
if (hole->offset + hole->size < src->offset)
|
||||
continue;
|
||||
|
||||
uint32_t hole_begin = hole->offset;
|
||||
uint32_t hole_end = hole->offset + hole->size;
|
||||
|
||||
if (hole_end < block_end)
|
||||
continue;
|
||||
|
||||
/* If another allocated block overlaps the current replay block, allocation is impossible */
|
||||
if (block_begin > hole_begin || (hole_end < block_end && hole_end >= block_begin))
|
||||
if (hole_begin > block_begin)
|
||||
return NULL;
|
||||
|
||||
union radv_shader_arena_block *block = insert_block(device, hole, block_begin - hole_begin, src->size, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue