microsoft / DirectX-Graphics-Samples

This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.
MIT License
5.89k stars 2k forks source link

WaitForGpu() method in D3D12nBodyGravity sample #806

Open omd24 opened 1 year ago

omd24 commented 1 year ago

I might be wrong but it seems like the m_renderContextFenceValues array is not indexed correctly in the WaitForGpu() function. m_renderContextFenceValues is an array of size ThreadCount but it is indexed using frame-index which might lead to access violation. I couldn't reproduce the issue as the WaitForGpu is only called when DXGI_ERROR_DEVICE_REMOVED or DXGI_ERROR_DEVICE_RESET but I thought it might worth someone double checking it.