MCPcopy Create free account
hub / github.com/GPUOpen-Tools/GPU-Reshape / Flush

Method Flush

Source/Backends/DX12/TestDevice/Source/Device.cpp:798–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796}
797
798void Device::Flush() {
799 graphicsQueue->Signal(waitFence.Get(), ++waitFenceCounter);
800
801 // Wait graphics
802 if (waitFence->GetCompletedValue() != waitFenceCounter) {
803 REQUIRE(SUCCEEDED(waitFence->SetEventOnCompletion(waitFenceCounter, waitFenceEvent)));
804 WaitForSingleObject(waitFenceEvent, INFINITE);
805 }
806
807 computeQueue->Signal(waitFence.Get(), ++waitFenceCounter);
808
809 // Wait compute
810 if (waitFence->GetCompletedValue() != waitFenceCounter) {
811 REQUIRE(SUCCEEDED(waitFence->SetEventOnCompletion(waitFenceCounter, waitFenceEvent)));
812 WaitForSingleObject(waitFenceEvent, INFINITE);
813 }
814
815 copyQueue->Signal(waitFence.Get(), ++waitFenceCounter);
816
817 // Wait copy
818 if (waitFence->GetCompletedValue() != waitFenceCounter) {
819 REQUIRE(SUCCEEDED(waitFence->SetEventOnCompletion(waitFenceCounter, waitFenceEvent)));
820 WaitForSingleObject(waitFenceEvent, INFINITE);
821 }
822
823 // Let the backend catch up to the messages
824 graphicsQueue->ExecuteCommandLists(0u, nullptr);
825 computeQueue->ExecuteCommandLists(0u, nullptr);
826}
827
828SamplerID Device::CreateSampler() {
829 ResourceInfo& resource = resources.emplace_back();

Callers 3

FlushCommandQueueContextFunction · 0.45
BeginCommandListFunction · 0.45
InvokePreSubmitBatchHookFunction · 0.45

Calls 2

SignalMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected