Sign in to follow this  

Unbinding Shader Resources and Render Targets in DirectX 10

This topic is 3499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I'm gettting the following two messages in my DirectX 10 debug spew: [4744] D3D10: INFO: ID3D10Device::PSSetShaderResources: A currently bound PixelShader ShaderResourceView is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #43: PSSETSHADERRESOURCES_UNBINDDELETINGOBJECT ] [4744] D3D10: INFO: ID3D10Device::OMSetRenderTargets: A currently bound RenderTargetView is being deleted; so naturally, will no longer be bound. [ STATE_SETTING INFO #49: OMSETRENDERTARGETS_UNBINDDELETINGOBJECT ] This is indicating that my rendering target and my shader resource are still bound to the pipeline. My question is, how do I unbind them from the pipeline before disposing them? I'm using C# and SlimDX, but I think this is a DirectX 10 issue and not a SlimDX issue...

Share this post


Link to post
Share on other sites
ID3D10Device::ClearState

Restore all default device settings; return the device to the state it was in when it was created. This will set all set all input/output resource slots, shaders, input layouts, predications, scissor rectangles, depth-stencil state, rasterizer state, blend state, sampler state, and viewports to NULL. The primitive topology will be set to UNDEFINED.

and/or

D3DX10UnsetAllDeviceObjects

Removes all resources from the device by setting their pointers to NULL. This should be called during shutdown of your application. It helps ensure that when one is releasing all of their resources that none of them are bound to the device.

Share this post


Link to post
Share on other sites
Note both messages are info messages. They're not saying anything is wrong, just letting you know something is happening.

If it doesn't bother you that this is happening, just let it happen.

If it bothers you for some reason, you can unset them by setting their values to NULL.

If this is happening when you're destroying your device, you can call ClearState or D3DX10UnsetAllDeviceObjects as XVincentX suggested, but this would have little actual impact on behavior.

Hope this helps.

Share this post


Link to post
Share on other sites

This topic is 3499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this