Search code examples
c#directxvisual-studio-debuggingdirectx-11

D3D11 Debug Layer shows Name="unnamed" even if DebugName property is set


D3D11 Debug Layer shows Name="unnamed" even if DebugName property of the D3D11 object is set with a name ("test" for example).

  1. Context is D3D11 with C# using Vortice.
  2. Debug Layer seems to be working well. It is active using DirectX Control Panel or d3dconfig command line and debug messages are from ID3D11InfoQueue.GetMessages(messageIndex).
  3. DebugName property is set using SetPrivateData and VS Debug shows the value of this property is set ("test" for example).

I must be missing something but I can not figure it out.

Is the Name="unnamed" field in the InfoQueue description the same as DebugName property in D3D11 objects?


Solution

  • Comparing Debug Layer D3D12 with D3D11 I think I found the problem.

    D3D11 issue a debug message during object creation informing the object name. As object name is set after the object is created, the name that appear in this message is "unnamed".

    D3D12 fixed that and there is no more information about object name during object creation.