1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[dxvk] Optimize clearColorImage barrier

This commit is contained in:
Philip Rebohle 2020-05-02 19:57:10 +02:00
parent 52cad95f2c
commit e24954ca39
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -429,19 +429,14 @@ namespace dxvk {
const VkImageSubresourceRange& subresources) {
this->spillRenderPass();
m_execBarriers.recordCommands(m_cmd);
VkImageLayout imageLayoutClear = image->pickLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
m_execBarriers.accessImage(image, subresources,
VK_IMAGE_LAYOUT_UNDEFINED,
image->info().stages,
image->info().access,
this->initializeImage(image, subresources,
imageLayoutClear,
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_ACCESS_TRANSFER_WRITE_BIT);
m_execBarriers.recordCommands(m_cmd);
m_execAcquires.recordCommands(m_cmd);
m_cmd->cmdClearColorImage(image->handle(),
imageLayoutClear, &value, 1, &subresources);