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 - Direct3D 11 render target warnings
Summary: Direct3D 11 render target warnings
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.10
Hardware: x86_64 Windows 10
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-30 13:50 UTC by Alex
Modified: 2019-08-30 13:50 UTC (History)
0 users

See Also:


Attachments
Sample program (1.06 KB, text/plain)
2019-08-30 13:50 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
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.