mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 04:08:52 +01:00
[dxvk] Use new barrier helpers in launchCuKernelNVX
This commit is contained in:
parent
ab9ade76d7
commit
a4daa63d2b
@ -2414,43 +2414,32 @@ namespace dxvk {
|
|||||||
this->prepareImage(r.first, r.first->getAvailableSubresources());
|
this->prepareImage(r.first, r.first->getAvailableSubresources());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_execBarriers.accessMemory(srcStages, srcAccess,
|
accessMemory(DxvkCmdBuffer::ExecBuffer, srcStages, srcAccess,
|
||||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
|
||||||
VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT);
|
VK_ACCESS_2_SHADER_READ_BIT | VK_ACCESS_2_SHADER_WRITE_BIT);
|
||||||
m_execBarriers.recordCommands(m_cmd);
|
flushBarriers();
|
||||||
|
|
||||||
m_cmd->cmdLaunchCuKernel(nvxLaunchInfo);
|
m_cmd->cmdLaunchCuKernel(nvxLaunchInfo);
|
||||||
|
|
||||||
for (auto& r : buffers) {
|
for (auto& r : buffers) {
|
||||||
VkAccessFlags accessFlags = (r.second.test(DxvkAccess::Read) * VK_ACCESS_SHADER_READ_BIT)
|
VkAccessFlags accessFlags = (r.second.test(DxvkAccess::Read) * VK_ACCESS_SHADER_READ_BIT)
|
||||||
| (r.second.test(DxvkAccess::Write) * VK_ACCESS_SHADER_WRITE_BIT);
|
| (r.second.test(DxvkAccess::Write) * VK_ACCESS_SHADER_WRITE_BIT);
|
||||||
DxvkBufferSliceHandle bufferSlice = r.first->getSliceHandle();
|
|
||||||
m_execBarriers.accessBuffer(bufferSlice,
|
accessBuffer(DxvkCmdBuffer::ExecBuffer,
|
||||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
*r.first, 0, r.first->info().size,
|
||||||
accessFlags,
|
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, accessFlags);
|
||||||
r.first->info().stages,
|
|
||||||
r.first->info().access);
|
if (r.second.test(DxvkAccess::Read)) m_cmd->trackResource<DxvkAccess::Read>(r.first);
|
||||||
|
if (r.second.test(DxvkAccess::Write)) m_cmd->trackResource<DxvkAccess::Write>(r.first);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& r : images) {
|
for (auto& r : images) {
|
||||||
VkAccessFlags accessFlags = (r.second.test(DxvkAccess::Read) * VK_ACCESS_SHADER_READ_BIT)
|
VkAccessFlags accessFlags = (r.second.test(DxvkAccess::Read) * VK_ACCESS_SHADER_READ_BIT)
|
||||||
| (r.second.test(DxvkAccess::Write) * VK_ACCESS_SHADER_WRITE_BIT);
|
| (r.second.test(DxvkAccess::Write) * VK_ACCESS_SHADER_WRITE_BIT);
|
||||||
m_execBarriers.accessImage(r.first,
|
accessImage(DxvkCmdBuffer::ExecBuffer, *r.first,
|
||||||
r.first->getAvailableSubresources(),
|
r.first->getAvailableSubresources(), r.first->info().layout,
|
||||||
r.first->info().layout,
|
VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, accessFlags);
|
||||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
|
|
||||||
accessFlags,
|
|
||||||
r.first->info().layout,
|
|
||||||
r.first->info().stages,
|
|
||||||
r.first->info().access);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& r : images) {
|
|
||||||
if (r.second.test(DxvkAccess::Read)) m_cmd->trackResource<DxvkAccess::Read>(r.first);
|
|
||||||
if (r.second.test(DxvkAccess::Write)) m_cmd->trackResource<DxvkAccess::Write>(r.first);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& r : buffers) {
|
|
||||||
if (r.second.test(DxvkAccess::Read)) m_cmd->trackResource<DxvkAccess::Read>(r.first);
|
if (r.second.test(DxvkAccess::Read)) m_cmd->trackResource<DxvkAccess::Read>(r.first);
|
||||||
if (r.second.test(DxvkAccess::Write)) m_cmd->trackResource<DxvkAccess::Write>(r.first);
|
if (r.second.test(DxvkAccess::Write)) m_cmd->trackResource<DxvkAccess::Write>(r.first);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user