MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / FlushGPU

Function FlushGPU

SampleFramework12/v1.00/Graphics/DX12.cpp:238–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238void FlushGPU()
239{
240 Assert_(Device);
241
242 // Wait for the GPU to fully catch up with the CPU
243 Assert_(CurrentCPUFrame >= CurrentGPUFrame);
244 if(CurrentCPUFrame > CurrentGPUFrame)
245 {
246 FrameFence.Wait(CurrentCPUFrame);
247 CurrentGPUFrame = CurrentCPUFrame;
248 }
249
250 // Clean up what we can now
251 for(uint64 i = 1; i < RenderLatency; ++i)
252 ProcessDeferredReleases((i + CurrFrameIdx) % RenderLatency);
253}
254
255void DeferredRelease_(IUnknown* resource)
256{

Callers 3

InitializeSceneMethod · 0.85
Shutdown_InternalMethod · 0.85
BeforeReset_InternalMethod · 0.85

Calls 2

ProcessDeferredReleasesFunction · 0.85
WaitMethod · 0.80

Tested by

no test coverage detected