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.
I might be wrong but it seems like the
m_renderContextFenceValues
array is not indexed correctly in theWaitForGpu()
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 theWaitForGpu
is only called whenDXGI_ERROR_DEVICE_REMOVED
orDXGI_ERROR_DEVICE_RESET
but I thought it might worth someone double checking it.