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;