mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
zink: add TRANSFER_WRITE -> HOST_READ sync to end of batch
this is technically required by spec, even though at a practical level
it probably has no effect
cc: mesa-stable
(cherry picked from commit 3ba275aa70)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
parent
5a61e04572
commit
0486f6bf8b
2 changed files with 18 additions and 1 deletions
|
|
@ -6134,7 +6134,7 @@
|
|||
"description": "zink: add TRANSFER_WRITE -> HOST_READ sync to end of batch",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -701,6 +701,23 @@ submit_queue(void *data, void *gdata, int thread_index)
|
|||
};
|
||||
if (si[ZINK_SUBMIT_CMDBUF].waitSemaphoreCount)
|
||||
si[ZINK_SUBMIT_CMDBUF].pNext = &sem_submit;
|
||||
{
|
||||
VkCommandBuffer sync_cmdbuf = bs->has_work ? bs->cmdbuf :
|
||||
bs->has_reordered_work ? bs->reordered_cmdbuf :
|
||||
bs->has_unsync ? bs->unsynchronized_cmdbuf :
|
||||
VK_NULL_HANDLE;
|
||||
if (sync_cmdbuf) {
|
||||
VkMemoryBarrier mb;
|
||||
mb.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER;
|
||||
mb.pNext = NULL;
|
||||
mb.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
|
||||
mb.dstAccessMask = VK_ACCESS_HOST_READ_BIT;
|
||||
VKSCR(CmdPipelineBarrier)(sync_cmdbuf,
|
||||
VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||
VK_PIPELINE_STAGE_HOST_BIT,
|
||||
0, 1, &mb, 0, NULL, 0, NULL);
|
||||
}
|
||||
}
|
||||
VkCommandBuffer cmdbufs[3];
|
||||
unsigned c = 0;
|
||||
if (bs->has_unsync)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue