Hello. I’m unable to merge command lists from two deferred contexts with ExecuteCommandList.
Every time I get “Access violation reading location 0x00000000.”
Here is the sequence of calls:
ID3D11DeviceContext *pDefferedContext=NULL; ID3D11DeviceContext *pDefferedContext2=NULL; g_pd3dDevice->CreateDeferredContext(0,&pDefferedContext); g_pd3dDevice->CreateDeferredContext(0,&pDefferedContext2); //some operations on both contexts unrelated one from another //here m_commandList is NULL HRESULT hr = pDefferedContext->FinishCommandList(FALSE,&m_commandlist);//This line succeeds and m_commandlist != NULL after it; //The line below is supposed to merge commands from both contexts pDefferedContext2->ExecuteCommandList(m_commandlist,FALSE);//Here I get access violation
For sure there are no other calls on m_commandlist from other threads and there is now call on immediate context with executecommandlist between these two calls. There is also no difference if both deferred context are in the same or different threads (of course access to m_commandlist is guarded with critical section).
What could be wrong in this case? Is there a bug here?
Thanks for any help.