[GPU] Trace dump: Do PIX/RenderDoc capture if attached
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "xenia/gpu/d3d12/d3d12_command_processor.h"
|
||||
#include "xenia/gpu/d3d12/d3d12_graphics_system.h"
|
||||
#include "xenia/gpu/trace_dump.h"
|
||||
#include "xenia/ui/d3d12/d3d12_provider.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
@@ -24,6 +25,24 @@ class D3D12TraceDump : public TraceDump {
|
||||
std::unique_ptr<gpu::GraphicsSystem> CreateGraphicsSystem() override {
|
||||
return std::unique_ptr<gpu::GraphicsSystem>(new D3D12GraphicsSystem());
|
||||
}
|
||||
|
||||
void BeginHostCapture() override {
|
||||
auto provider = static_cast<const ui::d3d12::D3D12Provider*>(
|
||||
graphics_system_->provider());
|
||||
IDXGraphicsAnalysis* graphics_analysis = provider->GetGraphicsAnalysis();
|
||||
if (graphics_analysis) {
|
||||
graphics_analysis->BeginCapture();
|
||||
}
|
||||
}
|
||||
|
||||
void EndHostCapture() override {
|
||||
auto provider = static_cast<const ui::d3d12::D3D12Provider*>(
|
||||
graphics_system_->provider());
|
||||
IDXGraphicsAnalysis* graphics_analysis = provider->GetGraphicsAnalysis();
|
||||
if (graphics_analysis) {
|
||||
graphics_analysis->EndCapture();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
int trace_dump_main(const std::vector<std::wstring>& args) {
|
||||
|
||||
Reference in New Issue
Block a user