We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4778

Summary: Direct3D 11 render target warnings
Product: SDL Reporter: Alex <fatlock>
Component: renderAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.10   
Hardware: x86_64   
OS: Windows 10   
Attachments: Sample program

Description Alex 2019-08-30 13:50:02 UTC
Created attachment 3937 [details]
Sample program

(In addition to bug #4767)

When you render to a texture AFTER rendering it to screen you get these warnings:

D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets: Resource being set to OM RenderTarget slot 0 is still bound on input! [ STATE_SETTING WARNING #9: DEVICE_OMSETRENDERTARGETS_HAZARD]
D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets[AndUnorderedAccessViews]: Forcing PS shader resource slot 0 to NULL. [ STATE_SETTING WARNING #7: DEVICE_PSSETSHADERRESOURCES_HAZARD]

I have searched the Internet for a solution. This for example: https://gamedev.stackexchange.com/a/95629

You may see the D3D11 code in comments inside the sample program. This code should fix it, I think.