From e6ec390a0409bf8d1fd2c36b656b3fa3737fe6c0 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Fri, 17 Aug 2018 17:53:01 +0300 Subject: [PATCH] [D3D12] Profile UpdateRenderTargets --- src/xenia/gpu/d3d12/render_target_cache.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/d3d12/render_target_cache.cc b/src/xenia/gpu/d3d12/render_target_cache.cc index f60a398a8..d718838b4 100644 --- a/src/xenia/gpu/d3d12/render_target_cache.cc +++ b/src/xenia/gpu/d3d12/render_target_cache.cc @@ -15,6 +15,7 @@ #include "xenia/base/assert.h" #include "xenia/base/logging.h" #include "xenia/base/math.h" +#include "xenia/base/profiling.h" #include "xenia/gpu/d3d12/d3d12_command_processor.h" namespace xe { @@ -304,8 +305,12 @@ bool RenderTargetCache::UpdateRenderTargets() { if (command_list == nullptr) { return false; } - auto& regs = *register_file_; + +#if FINE_GRAINED_DRAW_SCOPES + SCOPE_profile_cpu_f("gpu"); +#endif // FINE_GRAINED_DRAW_SCOPES + uint32_t rb_surface_info = regs[XE_GPU_REG_RB_SURFACE_INFO].u32; uint32_t surface_pitch = std::min(rb_surface_info & 0x3FFF, 2560u); if (surface_pitch == 0) {