| 236 | } |
| 237 | |
| 238 | void 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 | |
| 255 | void DeferredRelease_(IUnknown* resource) |
| 256 | { |
no test coverage detected