MCPcopy Create free account
hub / github.com/TheRealMJP/DXRPathTracer / ClearCache

Method ClearCache

SampleFramework12/v1.02/Graphics/PostProcessHelper.cpp:97–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void PostProcessHelper::ClearCache()
98{
99 for(uint64 i = 0; i < tempRenderTargets.Count(); ++i)
100 {
101 TempRenderTarget* tempRT = tempRenderTargets[i];
102 tempRT->RT.Shutdown();
103 delete tempRT;
104 }
105
106 tempRenderTargets.RemoveAll(nullptr);
107
108 for(uint64 i = 0; i < pipelineStates.Count(); ++i)
109 DX12::DeferredRelease(pipelineStates[i].PSO);
110
111 pipelineStates.RemoveAll(CachedPSO());
112}
113
114TempRenderTarget* PostProcessHelper::GetTempRenderTarget(uint64 width, uint64 height, DXGI_FORMAT format, bool useAsUAV)
115{

Callers 1

DestroyPSOsMethod · 0.80

Calls 5

DeferredReleaseFunction · 0.85
CachedPSOClass · 0.85
CountMethod · 0.45
ShutdownMethod · 0.45
RemoveAllMethod · 0.45

Tested by

no test coverage detected