src/lucus-render/DirectX12/LucusD3D12RenderSystem.cpp
void D3D12RenderSystem::WaitForGpu()
{
    // Schedule a Signal command in the queue.
	ThrowIfFailed(mDevice.mCommandQueue->Signal(mFence.Get(), mFenceValues[mCurrentFrame]));

	// Wait until the fence has been crossed.
	ThrowIfFailed(mFence->SetEventOnCompletion(mFenceValues[mCurrentFrame], mFenceEvent));
	WaitForSingleObjectEx(mFenceEvent, INFINITE, FALSE);

	// Increment the fence value for the current frame.
	mFenceValues[mCurrentFrame]++;
}
// Wait for pending GPU work to complete.
Wait for pending GPU work to complete.
Wait for pending GPU work to complete .
void D3D12RenderSystem::WaitForGpu()
{
	ThrowIfFailed(mDevice.mCommandQueue->Signal(mFence.Get(), mFenceValues[mCurrentFrame]));
	ThrowIfFailed(mFence->SetEventOnCompletion(mFenceValues[mCurrentFrame], mFenceEvent));
	WaitForSingleObjectEx(mFenceEvent, INFINITE, FALSE);
	mFenceValues[mCurrentFrame]++;
}
void D3D12RenderSystem :: WaitForGpu ( ) { ThrowIfFailed ( mDevice . mCommandQueue -> Signal ( mFence . Get ( ) , mFenceValues [ mCurrentFrame ] ) ) ; ThrowIfFailed ( mFence -> SetEventOnCompletion ( mFenceValues [ mCurrentFrame ] , mFenceEvent ) ) ; WaitForSingleObjectEx ( mFenceEvent , INFINITE , FALSE ) ; mFenceValues [ mCurrentFrame ] ++ ; }
Wait for pending GPU work to complete.
Wait for pending GPU work to complete .
// Schedule a Signal command in the queue. // Wait until the fence has been crossed. // Increment the fence value for the current frame.