mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[dxvk] Optimize clearDepthStencilImage barrier
This commit is contained in:
parent
e24954ca39
commit
4fafeb21d0
@ -461,22 +461,14 @@ namespace dxvk {
|
|||||||
|
|
||||||
m_execBarriers.recordCommands(m_cmd);
|
m_execBarriers.recordCommands(m_cmd);
|
||||||
|
|
||||||
VkImageLayout imageLayoutInitial = image->info().layout;
|
VkImageLayout imageLayoutClear = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
|
||||||
VkImageLayout imageLayoutClear = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
|
|
||||||
|
|
||||||
if (subresources.aspectMask == image->formatInfo()->aspectMask)
|
this->initializeImage(image, subresources,
|
||||||
imageLayoutInitial = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
||||||
|
|
||||||
m_execBarriers.accessImage(
|
|
||||||
image, subresources,
|
|
||||||
imageLayoutInitial,
|
|
||||||
image->info().stages,
|
|
||||||
image->info().access,
|
|
||||||
imageLayoutClear,
|
imageLayoutClear,
|
||||||
VK_PIPELINE_STAGE_TRANSFER_BIT,
|
VK_PIPELINE_STAGE_TRANSFER_BIT,
|
||||||
VK_ACCESS_TRANSFER_WRITE_BIT);
|
VK_ACCESS_TRANSFER_WRITE_BIT);
|
||||||
|
|
||||||
m_execBarriers.recordCommands(m_cmd);
|
m_execAcquires.recordCommands(m_cmd);
|
||||||
|
|
||||||
m_cmd->cmdClearDepthStencilImage(image->handle(),
|
m_cmd->cmdClearDepthStencilImage(image->handle(),
|
||||||
imageLayoutClear, &value, 1, &subresources);
|
imageLayoutClear, &value, 1, &subresources);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user