Skip to content

Commit

Permalink
D3D12 Pixel History early return if config option is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Jan 23, 2024
1 parent 7b1527e commit aeaa281
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions renderdoc/driver/d3d12/d3d12_pixelhistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,16 @@
* 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"
#include "d3d12_debug.h"
#include "d3d12_replay.h"
#include "d3d12_shader_cache.h"

RDOC_EXTERN_CONFIG(bool, D3D12_PixelHistory);

struct D3D12CopyPixelParams
{
// The image being copied from
Expand Down Expand Up @@ -2718,6 +2721,9 @@ rdcarray<PixelModification> D3D12Replay::PixelHistory(rdcarray<EventUsage> event
{
rdcarray<PixelModification> history;

if(!D3D12_PixelHistory())
return history;

if(events.empty())
return history;

Expand Down

0 comments on commit aeaa281

Please sign in to comment.