Skip to content

Commit aeaa281

Browse files
committed
D3D12 Pixel History early return if config option is disabled
1 parent 7b1527e commit aeaa281

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

renderdoc/driver/d3d12/d3d12_pixelhistory.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,16 @@
8181
* We slot the per-fragment data correctly accounting for the fragments that were discarded.
8282
*/
8383

84+
#include "core/settings.h"
8485
#include "driver/dxgi/dxgi_common.h"
8586
#include "maths/formatpacking.h"
8687
#include "d3d12_command_queue.h"
8788
#include "d3d12_debug.h"
8889
#include "d3d12_replay.h"
8990
#include "d3d12_shader_cache.h"
9091

92+
RDOC_EXTERN_CONFIG(bool, D3D12_PixelHistory);
93+
9194
struct D3D12CopyPixelParams
9295
{
9396
// The image being copied from
@@ -2718,6 +2721,9 @@ rdcarray<PixelModification> D3D12Replay::PixelHistory(rdcarray<EventUsage> event
27182721
{
27192722
rdcarray<PixelModification> history;
27202723

2724+
if(!D3D12_PixelHistory())
2725+
return history;
2726+
27212727
if(events.empty())
27222728
return history;
27232729

0 commit comments

Comments
 (0)