From aeaa2811f6afd411b260e740dce6208de4118e13 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Tue, 23 Jan 2024 15:29:24 +0000 Subject: [PATCH] D3D12 Pixel History early return if config option is disabled --- renderdoc/driver/d3d12/d3d12_pixelhistory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp index 4c5bbfb5b..1515cc174 100644 --- a/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp +++ b/renderdoc/driver/d3d12/d3d12_pixelhistory.cpp @@ -81,6 +81,7 @@ * We slot the per-fragment data correctly accounting for the fragments that were discarded. */ +#include "core/settings.h" #include "driver/dxgi/dxgi_common.h" #include "maths/formatpacking.h" #include "d3d12_command_queue.h" @@ -88,6 +89,8 @@ #include "d3d12_replay.h" #include "d3d12_shader_cache.h" +RDOC_EXTERN_CONFIG(bool, D3D12_PixelHistory); + struct D3D12CopyPixelParams { // The image being copied from @@ -2718,6 +2721,9 @@ rdcarray D3D12Replay::PixelHistory(rdcarray event { rdcarray history; + if(!D3D12_PixelHistory()) + return history; + if(events.empty()) return history;