Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Samples/Desktop/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,14 +698,14 @@ void D3D12nBodyGravity::RestoreD3DResources()
void D3D12nBodyGravity::WaitForGpu()
{
// Schedule a Signal command in the queue.
ThrowIfFailed(m_commandQueue->Signal(m_renderContextFence.Get(), m_renderContextFenceValues[m_frameIndex]));
ThrowIfFailed(m_commandQueue->Signal(m_renderContextFence.Get(), m_renderContextFenceValue));

// Wait until the fence has been processed.
ThrowIfFailed(m_renderContextFence->SetEventOnCompletion(m_renderContextFenceValues[m_frameIndex], m_renderContextFenceEvent));
ThrowIfFailed(m_renderContextFence->SetEventOnCompletion(m_renderContextFenceValue, m_renderContextFenceEvent));
WaitForSingleObjectEx(m_renderContextFenceEvent, INFINITE, FALSE);

// Increment the fence value for the current frame.
m_renderContextFenceValues[m_frameIndex]++;
m_renderContextFenceValue++;
}

// Fill the command list with all the render commands and dependent state.
Expand Down
6 changes: 3 additions & 3 deletions Samples/UWP/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,14 +694,14 @@ void D3D12nBodyGravity::RestoreD3DResources()
void D3D12nBodyGravity::WaitForGpu()
{
// Schedule a Signal command in the queue.
ThrowIfFailed(m_commandQueue->Signal(m_renderContextFence.Get(), m_renderContextFenceValues[m_frameIndex]));
ThrowIfFailed(m_commandQueue->Signal(m_renderContextFence.Get(), m_renderContextFenceValue));

// Wait until the fence has been processed.
ThrowIfFailed(m_renderContextFence->SetEventOnCompletion(m_renderContextFenceValues[m_frameIndex], m_renderContextFenceEvent));
ThrowIfFailed(m_renderContextFence->SetEventOnCompletion(m_renderContextFenceValue, m_renderContextFenceEvent));
WaitForSingleObjectEx(m_renderContextFenceEvent, INFINITE, FALSE);

// Increment the fence value for the current frame.
m_renderContextFenceValues[m_frameIndex]++;
m_renderContextFenceValue++;
}

// Fill the command list with all the render commands and dependent state.
Expand Down