From 606660b4e2f1389e59e0b796fa479c8273bd5d55 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 11 Dec 2017 17:49:05 +0000 Subject: [PATCH] Add analytics boolean that tracks if bundles are used in D3D12 --- qrenderdoc/Code/CaptureContext.cpp | 1 + qrenderdoc/Code/Interface/Analytics.cpp | 1 + qrenderdoc/Code/Interface/Analytics.h | 1 + renderdoc/api/replay/data_types.h | 1 + renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp | 2 ++ renderdoc/replay/renderdoc_serialise.inl | 1 + 6 files changed, 7 insertions(+) diff --git a/qrenderdoc/Code/CaptureContext.cpp b/qrenderdoc/Code/CaptureContext.cpp index f54efc33e..3b4beb59e 100644 --- a/qrenderdoc/Code/CaptureContext.cpp +++ b/qrenderdoc/Code/CaptureContext.cpp @@ -150,6 +150,7 @@ void CaptureContext::LoadCapture(const QString &captureFile, const QString &orig ANALYTIC_SET(CaptureFeatures.YUVTextures, m_APIProps.YUVTextures); ANALYTIC_SET(CaptureFeatures.SparseResources, m_APIProps.SparseResources); ANALYTIC_SET(CaptureFeatures.MultiGPU, m_APIProps.MultiGPU); + ANALYTIC_SET(CaptureFeatures.D3D12Bundle, m_APIProps.D3D12Bundle); m_MainWindow->setProgress(-1.0f); diff --git a/qrenderdoc/Code/Interface/Analytics.cpp b/qrenderdoc/Code/Interface/Analytics.cpp index 29c7e815a..430f835a4 100644 --- a/qrenderdoc/Code/Interface/Analytics.cpp +++ b/qrenderdoc/Code/Interface/Analytics.cpp @@ -259,6 +259,7 @@ void AnalyticsSerialise(QVariantMap &values, AnalyticsSerialiseType type) ANALYTIC_SERIALISE(CaptureFeatures.YUVTextures); ANALYTIC_SERIALISE(CaptureFeatures.SparseResources); ANALYTIC_SERIALISE(CaptureFeatures.MultiGPU); + ANALYTIC_SERIALISE(CaptureFeatures.D3D12Bundle); } } diff --git a/qrenderdoc/Code/Interface/Analytics.h b/qrenderdoc/Code/Interface/Analytics.h index 6ac6ebe41..f430d0b19 100644 --- a/qrenderdoc/Code/Interface/Analytics.h +++ b/qrenderdoc/Code/Interface/Analytics.h @@ -230,6 +230,7 @@ struct Analytics bool YUVTextures = false; bool SparseResources = false; bool MultiGPU = false; + bool D3D12Bundle = false; } CaptureFeatures; }; diff --git a/renderdoc/api/replay/data_types.h b/renderdoc/api/replay/data_types.h index dc650b953..c1f9d8dd3 100644 --- a/renderdoc/api/replay/data_types.h +++ b/renderdoc/api/replay/data_types.h @@ -954,6 +954,7 @@ worked around by re-sorting bindings. bool YUVTextures = false; bool SparseResources = false; bool MultiGPU = false; + bool D3D12Bundle = false; #endif }; diff --git a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp index 8e81e16cd..89c0d33db 100644 --- a/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp +++ b/renderdoc/driver/d3d12/d3d12_command_list_wrap.cpp @@ -3258,6 +3258,8 @@ bool WrappedID3D12GraphicsCommandList::Serialise_ExecuteBundle(SerialiserType &s if(IsReplayingAndReading()) { + m_pDevice->APIProps.D3D12Bundle = true; + m_Cmd->m_LastCmdListID = GetResourceManager()->GetOriginalID(GetResID(pCommandList)); if(IsActiveReplaying(m_State)) diff --git a/renderdoc/replay/renderdoc_serialise.inl b/renderdoc/replay/renderdoc_serialise.inl index 311defb14..f021e5dde 100644 --- a/renderdoc/replay/renderdoc_serialise.inl +++ b/renderdoc/replay/renderdoc_serialise.inl @@ -403,6 +403,7 @@ void DoSerialise(SerialiserType &ser, APIProperties &el) SERIALISE_MEMBER(YUVTextures); SERIALISE_MEMBER(SparseResources); SERIALISE_MEMBER(MultiGPU); + SERIALISE_MEMBER(D3D12Bundle); SIZE_CHECK(16); }