From 2f90213c0f97ddef789c1aad7f8f9e940521cbe2 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 31 Aug 2018 16:24:03 +0200 Subject: [PATCH] [dxvk] Enable pipeline statistics queries around compute shaders Fixes potential issues caused by csInvocations being 0. --- src/dxvk/dxvk_context.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index f3b3eab4..49eb54b1 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -871,8 +871,14 @@ namespace dxvk { if (this->validateComputeState()) { this->commitComputeInitBarriers(); + m_queries.beginQueries(m_cmd, + VK_QUERY_TYPE_PIPELINE_STATISTICS); + m_cmd->cmdDispatch(x, y, z); + m_queries.endQueries(m_cmd, + VK_QUERY_TYPE_PIPELINE_STATISTICS); + this->commitComputePostBarriers(); } @@ -892,10 +898,16 @@ namespace dxvk { if (this->validateComputeState()) { this->commitComputeInitBarriers(); + m_queries.beginQueries(m_cmd, + VK_QUERY_TYPE_PIPELINE_STATISTICS); + m_cmd->cmdDispatchIndirect( physicalSlice.handle(), physicalSlice.offset()); + m_queries.endQueries(m_cmd, + VK_QUERY_TYPE_PIPELINE_STATISTICS); + this->commitComputePostBarriers(); }