If I am running DirectX 11 in debug mode (D3D11_CREATE_DEVICE_DEBUG), I am constantly getting these warnings:
D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets: Resource being set to OM DepthStencil is still bound on input! [ STATE_SETTING WARNING #9: DEVICE_OMSETRENDERTARGETS_HAZARD] D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets[AndUnorderedAccessViews]: Forcing PS shader resource slot 6 to NULL. [ STATE_SETTING WARNING #7: DEVICE_PSSETSHADERRESOURCES_HAZARD]
It is because I am setting a resource as a render target while it is currently bound to the PS. However, my rendering flow is set up such as it relies on the api to force the resource slot to null, and it works.
Is there any reason I should be bothered with these warnings or I can rely on the api to enforce this every time? I only tested on 2 GPU-s: Intel HD 3000 and Nvidia GT525m.