I get the following error message in my output window :-
D3D11 ERROR: ID3D11Device::CreateDeferredContext: Creation of a Device with D3D11_CREATE_DEVICE_SINGLETHREADED prevents the creation of deferred contexts. [ STATE_CREATION ERROR #2097162: CREATEDEFERREDCONTEXT_SINGLETHREADED]
D3D11 ERROR: ID3D11Device::CreateDeferredContext: CreateDeferredContext returning DXGI_ERROR_INVALID_CALL, meaning the function can not be used. [ STATE_CREATION ERROR #2097164: CREATEDEFERREDCONTEXT_INVALID_CALL_RETURN]
But I never call that function and also I have a single threaded immediate render context. This started happening abruptly.
Also, If i do a search for that function call then i get 0 hits in my entire solution.
Update 1 - The culprit seems to swap hain present because even if I don't create any shaders and buffers and just the context device and swapchain I still get this error
Update 2 - I have already tried the following -
- Re-build the solution in debug and release mode.
- Attaching the debugger by directly running the program on different graphic cards.
- Re-installing DirectX.
- Upgrading/Downgrading graphics and audio drivers.
- going back to an old system restore point.
- Re-installing Visual Studio