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

[dxvk] Use new barrier helpers in dispatchIndirect

This commit is contained in:
Philip Rebohle 2024-10-12 01:19:15 +02:00 committed by Philip Rebohle
parent 826114f612
commit ee9d09c2e2

View File

@ -834,8 +834,10 @@ namespace dxvk {
auto bufferSlice = m_state.id.argBuffer.getSliceHandle( auto bufferSlice = m_state.id.argBuffer.getSliceHandle(
offset, sizeof(VkDispatchIndirectCommand)); offset, sizeof(VkDispatchIndirectCommand));
if (m_execBarriers.isBufferDirty(bufferSlice, DxvkAccess::Read)) flushPendingAccesses(
m_execBarriers.recordCommands(m_cmd); *m_state.id.argBuffer.buffer(),
m_state.id.argBuffer.offset() + offset,
sizeof(VkDispatchIndirectCommand), DxvkAccess::Read);
if (this->commitComputeState()) { if (this->commitComputeState()) {
this->commitComputeBarriers<false>(); this->commitComputeBarriers<false>();
@ -850,11 +852,12 @@ namespace dxvk {
m_queryManager.endQueries(m_cmd, m_queryManager.endQueries(m_cmd,
VK_QUERY_TYPE_PIPELINE_STATISTICS); VK_QUERY_TYPE_PIPELINE_STATISTICS);
m_execBarriers.accessBuffer(bufferSlice, accessBuffer(DxvkCmdBuffer::ExecBuffer,
VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, *m_state.id.argBuffer.buffer(),
VK_ACCESS_INDIRECT_COMMAND_READ_BIT, m_state.id.argBuffer.offset() + offset,
m_state.id.argBuffer.bufferInfo().stages, sizeof(VkDispatchIndirectCommand),
m_state.id.argBuffer.bufferInfo().access); VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT,
VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT);
this->trackDrawBuffer(); this->trackDrawBuffer();
} }