2

These are two different reports from the same d3d11 application, for the first report I used RLDO_DETAIL as flag and RLDO_IGNORE_INTERNAL for the second :

---- D3D11_RLDO_DETAIL ----

D3D11 WARNING: Live ID3D11Device at 0x000001EBC400FF20, Name: MainDevice, Refcount: 10 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING:  Live ID3D11Context at 0x000001EBC4097130, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING:  Live ID3DDeviceContextState at 0x000001EBC4087E70, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING:  Live ID3D11BlendState at 0x000001EBB12C5E90, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING:  Live ID3D11DepthStencilState at 0x000001EBB12C6460, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING:  Live ID3D11RasterizerState at 0x000001EBC3C7DCD0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING:  Live ID3D11Sampler at 0x000001EBB12C58C0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING:  Live ID3D11Query at 0x000001EBC4083C50, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #438: LIVE_QUERY]
D3D11 WARNING:  Live ID3D11Buffer at 0x000001EBB1106A10, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING:  Live ID3D11RasterizerState at 0x000001EBC3C7EAD0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING:  Live ID3D11RasterizerState at 0x000001EBC3C7CCD0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING:  Live ID3D11RasterizerState at 0x000001EBC3C7DAD0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING:  Live ID3D11RasterizerState at 0x000001EBC3C7D4D0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING:  Live ID3D11RasterizerState at 0x000001EBC3C800D0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING:  Live ID3D11DepthStencilState at 0x000001EBB12C5100, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING:  Live ID3D11DepthStencilState at 0x000001EBC4015420, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING:  Live ID3D11DepthStencilState at 0x000001EBC4015DD0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING:  Live ID3D11DepthStencilState at 0x000001EBC40163A0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING:  Live ID3D11BlendState at 0x000001EBC40B6B90, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING:  Live ID3D11BlendState at 0x000001EBC40B8BA0, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING:  Live ID3D11Sampler at 0x000001EBC40B85D0, Name: CreateSampler_1, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING:  Live ID3D11Sampler at 0x000001EBC40B9360, Name: CreateSampler_2, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING:  Live ID3D11Buffer at 0x000001EBC40D8E10, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING:  Live ID3D11Buffer at 0x000001EBC40D91F0, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING:  Live ID3D11Buffer at 0x000001EBC40D57D0, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING:  Live ID3D11Texture2D at 0x000001EBC40EF9A0, Name: texture_125, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING:  Live ID3D11ShaderResourceView at 0x000001EBC40E6010, Name: texture2D_Load_125, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING:  Live ID3D11Sampler at 0x000001EBC40B7650, Name: CreateSampler_5, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING:  Live IDXGISwapChain at 0x000001EBC413D550, Refcount: 0 [ STATE_CREATION WARNING #442: LIVE_SWAPCHAIN]
D3D11 WARNING:  Live ID3D11Texture2D at 0x000001EBB7BED300, Name: BackBufferTexture, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING:  Live ID3D11RenderTargetView at 0x000001EBC40DF560, Name: renderView, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #428: LIVE_RENDERTARGETVIEW]
D3D11 WARNING:  Live ID3D11Texture2D at 0x000001EBB7BEE6B0, Name: depthStencilBufferTexture_175, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING:  Live ID3D11DepthStencilView at 0x000001EBB10E1500, Name: depthStencilView, Refcount: 0, IntRef: 0 [ STATE_CREATION WARNING #429: LIVE_DEPTHSTENCILVIEW]
D3D11 WARNING:  Live ID3D11Texture2D at 0x000001EBB7BF0A20, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]


---- D3D11_RLDO_IGNORE_INTERNAL ----

D3D11 WARNING: Live ID3D11Device at 0x00000285B7FB3B90, Name: MainDevice, Refcount: 10 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
  1. Speaking about ReportLiveObjects( D3D11_RLDO_DETAIL ) output, is Refcount and IntRef the number of external and internal reference count respectively?

  2. The docs say that with RLDO_IGNORE_INTERNAL objects with no external references are ignored. However, looking at my output it looks like it is ignoring 3 Buffers, 1 Texture and 1 ShaderResourceView (all with Refcount: 1). Could you point out what I'm missing here?

  • I think it's because these objects are children, allocated (not by you) by the parent ID3D11Device, so they are not counted. But if you allocate a ID3D11Buffer yourself, you will see it at the same level as ID3D11Device (also with a Refcount > 0) – Simon Mourier Aug 03 '22 at 09:29
  • Thanks @SimonMourier. What do you mean by "if you allocate a ID3D11Buffer yourself"? – leone ruggiero Aug 03 '22 at 13:35
  • For example if your code directly calls ID3D11Device::CreateBuffer https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createbuffer – Simon Mourier Aug 03 '22 at 13:36
  • I'm using d3d11 through SharpDX (C#) so my buffer creation looks more like this: `Buffer buff= Buffer.Create(Device, ... )`, however it should be exactly the same I think. So the buffers, texture and srv with refCount > 0 were all created that way (they were test leaks). However, **RLDO_IGNORE_INTERNAL** ignores them too. – leone ruggiero Aug 04 '22 at 13:36

0 Answers0