DepthStencilState.DebugNames not being assigned correctly #358
Comments
I can't reproduce this. Looks like more likely an installation problem of the debug layer. I'm not sure it is related to ReportLiveObjects() isn't giving me enough information., but native DX debug layer seems to be somehow broken with latest upgrade and we can't fix this on SharpDX side. |
Could this be a 2.5.0 issue ? |
Oh, could be yes, 2.5.0 is almost one year old and lots of fixes came into the repository since then. |
Hmmm, still having some problems here, even after switching from 2.5.0 to DX11.2 via git master branch. This is a tricky one, and terribly frustrating for me. Even after disposing all my render states, one of which has a debug name of "DepthOn", I am still seeing the following line in the live object report... D3D11 WARNING: Live ID3D11DepthStencilState at 0x0090708C, Name: DepthOn, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE] None of my other render-states are still alive. And I still have that warning up top ... D3D11 WARNING: ID3D11DepthStencilState::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS] I can't help but think these warnings are indicative of a common problem. A name not being set properly or something. I have noticed that in the source code there is the following comment: If an application attempts to create a rasterizer-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique rasterizer state objects will stay the same. So what I think is happening, is when I create a new DepthStencilState, I'm getting back one that already exists (maybe as part of the device or toolkit or spritebatch), and I'm then renaming it's debugName. But why then is it not disposed still. |
I would not bother much about these warnings. The state has an external RefCount of 0, so your application does not hold a reference to it, only some internals of D3D11. But as it is just a state, that's not a big issue. Waning for debug names are also just warning, you can ignore them (as explained in Direct3D SDK Debug Layer Tricks ) |
Hi,
I've got a problem with my DepthStencilState objects. I am receiving the following warnings:
D3D11 WARNING: ID3D11DepthStencilState::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS]
D3D11 WARNING: ID3D11DepthStencilState::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS]
And when i look at the object table in graphics diagnostics I see that the DepthStencilState has a DebugName="None", although I'm setting DebugName="DepthStencilState.DepthOn" etc. When I inspect my DepthStencilStates collection, they have the DebugNames I gave them.
I have my DepthStencilStates collection inheriting from Dictionary, with some default states added in the constructor. Here's the code:
I have searched and there are no other calls to new DepthStencilState in my solution. So there is no-where that I could be creating extra unnamed states. It seems that the wrapper is not applying the debug names to the gpu resource, although it is storing the name and returning it on the managed side.
The text was updated successfully, but these errors were encountered: