mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxvk] Add stat counter for merged draws
This commit is contained in:
parent
e8725d789e
commit
df4222c384
2 changed files with 8 additions and 2 deletions
|
@ -729,7 +729,8 @@ namespace dxvk {
|
|||
const VkMultiDrawInfoEXT* drawInfos,
|
||||
uint32_t instanceCount,
|
||||
uint32_t firstInstance) {
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawCalls, 1);
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawCalls, 1u);
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawsMerged, drawCount - 1u);
|
||||
|
||||
m_vkd->vkCmdDrawMultiEXT(getCmdBuffer(),
|
||||
drawCount, drawInfos, instanceCount, firstInstance, sizeof(*drawInfos));
|
||||
|
@ -742,6 +743,7 @@ namespace dxvk {
|
|||
uint32_t drawCount,
|
||||
uint32_t stride) {
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawCalls, 1);
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawsMerged, drawCount - 1u);
|
||||
|
||||
m_vkd->vkCmdDrawIndirect(getCmdBuffer(),
|
||||
buffer, offset, drawCount, stride);
|
||||
|
@ -783,6 +785,7 @@ namespace dxvk {
|
|||
uint32_t instanceCount,
|
||||
uint32_t firstInstance) {
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawCalls, 1);
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawsMerged, drawCount - 1u);
|
||||
|
||||
m_vkd->vkCmdDrawMultiIndexedEXT(getCmdBuffer(), drawCount,
|
||||
drawInfos, instanceCount, firstInstance, sizeof(*drawInfos), nullptr);
|
||||
|
@ -795,6 +798,7 @@ namespace dxvk {
|
|||
uint32_t drawCount,
|
||||
uint32_t stride) {
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawCalls, 1);
|
||||
m_statCounters.addCtr(DxvkStatCounter::CmdDrawsMerged, drawCount - 1u);
|
||||
|
||||
m_vkd->vkCmdDrawIndexedIndirect(getCmdBuffer(),
|
||||
buffer, offset, drawCount, stride);
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace dxvk {
|
|||
*/
|
||||
enum class DxvkStatCounter : uint32_t {
|
||||
CmdDrawCalls, ///< Number of draw calls
|
||||
CmdDrawsMerged, ///< Number of unique draws, minus draw calls
|
||||
CmdDispatchCalls, ///< Number of compute calls
|
||||
CmdRenderPassCount, ///< Number of render passes
|
||||
CmdBarrierCount, ///< Number of pipeline barriers
|
||||
|
@ -30,7 +31,8 @@ namespace dxvk {
|
|||
CsChunkCount, ///< Submitted CS chunks
|
||||
DescriptorPoolCount, ///< Descriptor pool count
|
||||
DescriptorSetCount, ///< Descriptor sets allocated
|
||||
NumCounters, ///< Number of counters available
|
||||
|
||||
NumCounters ///< Number of counters available
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue