D3D12 Pixel History early return if config option is disabled

This commit is contained in:
Jake Turner
2024-01-23 15:29:24 +00:00
parent 7b1527e3ac
commit aeaa2811f6
@@ -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<PixelModification> D3D12Replay::PixelHistory(rdcarray<EventUsage> event
{
rdcarray<PixelModification> history;
if(!D3D12_PixelHistory())
return history;
if(events.empty())
return history;