diff --git a/Samples/Desktop/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp b/Samples/Desktop/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp index 1cc2531c0..4dac43cbf 100644 --- a/Samples/Desktop/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp +++ b/Samples/Desktop/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp @@ -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. diff --git a/Samples/UWP/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp b/Samples/UWP/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp index 92b9f4d49..a58b43c5b 100644 --- a/Samples/UWP/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp +++ b/Samples/UWP/D3D12nBodyGravity/src/D3D12nBodyGravity.cpp @@ -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.