Jump to content

  • Log In with Google      Sign In   
  • Create Account

directX 11 Debug output warning


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 csdcsz   Members   -  Reputation: 113

Like
0Likes
Like

Posted 23 May 2012 - 11:34 PM

Hi, I am beginning to learn directX 11. Now i have problem with the run-time debug output of the directX 11 app. here is the debug output warning:

D3D11: WARNING: Live Device: Name="Debug_D3D11Device", Addr=0x00676CD0, ExtRef=25 [ STATE_CREATION WARNING #2097297: LIVE_DEVICE ]
D3D11: WARNING: Live Texture2D: Name="unnamed", Addr=0x0342682C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live Sampler: Name="unnamed", Addr=0x03424CA4, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097268: LIVE_SAMPLER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x03424ADC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live ShaderResourceView: Name="unnamed", Addr=0x03427A84, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097241: LIVE_SHADERRESOURCEVIEW ]
D3D11: WARNING: Live Texture2D: Name="unnamed", Addr=0x03424904, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x03424614, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x03425524, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live InputLayout: Name="unnamed", Addr=0x0342536C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097265: LIVE_INPUTLAYOUT ]
D3D11: WARNING: Live PixelShader: Name="unnamed", Addr=0x0342514C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097262: LIVE_PIXELSHADER ]
D3D11: WARNING: Live VertexShader: Name="unnamed", Addr=0x0341F6EC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097250: LIVE_VERTEXSHADER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x03423FBC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x03423A84, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x034238BC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live ShaderResourceView: Name="unnamed", Addr=0x03424464, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097241: LIVE_SHADERRESOURCEVIEW ]
D3D11: WARNING: Live Texture2D: Name="unnamed", Addr=0x0342991C, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live InputLayout: Name="unnamed", Addr=0x03423D6C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097265: LIVE_INPUTLAYOUT ]
D3D11: WARNING: Live PixelShader: Name="unnamed", Addr=0x034264BC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097262: LIVE_PIXELSHADER ]
D3D11: WARNING: Live VertexShader: Name="unnamed", Addr=0x034261DC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097250: LIVE_VERTEXSHADER ]
D3D11: WARNING: Live Buffer: Name="Debug_Md5Mesh_CamPosCB", Addr=0x0342599C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="Debug_Md5Mesh_WorldCB", Addr=0x03412A84, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="Debug_Md5Mesh_WVPCB", Addr=0x03412884, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x03412584, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x034123BC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x034121F4, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live Buffer: Name="unnamed", Addr=0x0341202C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live ShaderResourceView: Name="unnamed", Addr=0x03412DBC, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097241: LIVE_SHADERRESOURCEVIEW ]
D3D11: WARNING: Live Texture2D: Name="unnamed", Addr=0x034257C4, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live InputLayout: Name="Debug_Md5Mesh_VertexLayout", Addr=0x03429C0C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097265: LIVE_INPUTLAYOUT ]
D3D11: WARNING: Live PixelShader: Name="Debug_Md5Mesh_PixelShader", Addr=0x0341EF44, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097262: LIVE_PIXELSHADER ]
D3D11: WARNING: Live VertexShader: Name="Debug_Md5Mesh_VertexShader", Addr=0x0341EC0C, ExtRef=1, IntRef=0 [ STATE_CREATION WARNING #2097250: LIVE_VERTEXSHADER ]
D3D11: WARNING: Live Buffer: Name="Debug_Font_VertexBuffer", Addr=0x0067F5C4, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097229: LIVE_BUFFER ]
D3D11: WARNING: Live ShaderResourceView: Name="Debug_Font_FontTex", Addr=0x0067F484, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097241: LIVE_SHADERRESOURCEVIEW ]
D3D11: WARNING: Live Texture2D: Name="unnamed", Addr=0x0067F2AC, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live InputLayout: Name="Debug_Font_VertexLayout", Addr=0x0338AB2C, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097265: LIVE_INPUTLAYOUT ]
D3D11: WARNING: Live PixelShader: Name="Debug_Font_PixelShader", Addr=0x0338A814, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097262: LIVE_PIXELSHADER ]
D3D11: WARNING: Live VertexShader: Name="Debug_Font_VertexShader", Addr=0x0067FC64, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097250: LIVE_VERTEXSHADER ]
D3D11: WARNING: Live RasterizerState: Name="Debug_RasterState", Addr=0x0338A5BC, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097277: LIVE_RASTERIZERSTATE ]
D3D11: WARNING: Live DepthStencilView: Name="Debug_DepthStencilView", Addr=0x0338928C, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097247: LIVE_DEPTHSTENCILVIEW ]
D3D11: WARNING: Live DepthStencilState: Name="Debug_DepthDisableStencilState", Addr=0x0067CD64, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097274: LIVE_DEPTHSTENCILSTATE ]
D3D11: WARNING: Live Texture2D: Name="Debug_DepthTexture", Addr=0x0067C8F4, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live RenderTargetView: Name="Debug_BackBufferTarget", Addr=0x0067C62C, ExtRef=0, IntRef=0 [ STATE_CREATION WARNING #2097244: LIVE_RENDERTARGETVIEW ]
D3D11: WARNING: Live Texture2D: Name="unnamed", Addr=0x0067C0A4, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097235: LIVE_TEXTURE2D ]
D3D11: WARNING: Live Query: Name="unnamed", Addr=0x00678FC4, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097280: LIVE_QUERY ]
D3D11: WARNING: Live Sampler: Name="unnamed", Addr=0x00678ECC, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097268: LIVE_SAMPLER ]
D3D11: WARNING: Live RasterizerState: Name="unnamed", Addr=0x00678DD4, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097277: LIVE_RASTERIZERSTATE ]
D3D11: WARNING: Live DepthStencilState: Name="Debug_DepthStencilState", Addr=0x00678CA4, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097274: LIVE_DEPTHSTENCILSTATE ]
D3D11: WARNING: Live BlendState: Name="unnamed", Addr=0x00678B14, ExtRef=0, IntRef=1 [ STATE_CREATION WARNING #2097271: LIVE_BLENDSTATE ]
D3D11: WARNING: Live Context: Name="Debug_D3D11Context", Addr=0x0338006C, ExtRef=4294967295, IntRef=1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT ]
D3D11: WARNING: Live Device Child Summary: Device Addr=0x00676CD0
Using ID3D11Debug::ReportLiveDeviceObjects with D3D11_RLDO_DETAIL will help drill into object lifetimes. Objects with ExtRef=0 and IntRef=0 will be eventually destroyed through typical Immediate Context usage. However, if the application requires these objects to be destroyed sooner, ClearState followed by Flush on the Immediate Context will realize their destruction.
Live Context: 1
Live Buffer: 14
Live Texture1D: 0
Live Texture2D: 7
Live Texture3D: 0
Live ShaderResourceView: 4
Live RenderTargetView: 1
Live DepthStencilView: 1
Live VertexShader: 4
Live GeometryShader: 0
Live PixelShader: 4
Live InputLayout: 4
Live Sampler: 2
Live BlendState: 1
Live DepthStencilState: 2
Live RasterizerState: 2
Live Query: 1
Live Predicate: 0
Live Counter: 0
Live CommandList: 0
Live HullShader: 0
Live DomainShader: 0
Live ClassInstance: 0
Live ClassLinkage: 0
Live ComputeShader: 0
Live UnorderedAccessView: 0


Now, i want to clean these live object , how to do it ? Thanks in advance!

Sponsor:

#2 Tordin   Members   -  Reputation: 604

Like
0Likes
Like

Posted 24 May 2012 - 04:21 AM

You do this by calling the Release(); function.
Dx, donsent take care of your resources when you exit the program. only when it´s active :)

And as you can see it lists what types and how many are left to be released.
"There will be major features. none to be thought of yet"

#3 csdcsz   Members   -  Reputation: 113

Like
0Likes
Like

Posted 24 May 2012 - 07:13 AM

oh, i see. when i use a dx object as a function parameter , i should release it at the end of the function, is it? just like this:
void fun(ID3DBuffer* buf)
{
...
...
buf->Release();
buf = 0;
}

is that right?

and if the parameter is the D3D device, can i do it the same?
void fun(ID3DDevice* device)
{
...
...
device->Release();
device = 0;
}

this will be wrong(will release the real device), is it?
but how to clean "ExtRef=25" of the live device?

any words help ,thanks!

#4 csdcsz   Members   -  Reputation: 113

Like
0Likes
Like

Posted 24 May 2012 - 08:22 PM

wait for reply!
thanks in advance!

#5 MJP   Moderators   -  Reputation: 11450

Like
0Likes
Like

Posted 24 May 2012 - 10:36 PM

oh, i see. when i use a dx object as a function parameter , i should release it at the end of the function, is it? just like this:


No not necessarily...you need to call Release exactly once for every time AddRef is called. When you get a D3D interface from a D3D functional call you only need to call Release once, which you should do when you're totally done with it. Usually you'll do this in a shutdown function that gets executed right before the program exits.

If you go to the "DirectX Documentation for C++" that comes with the SDK there's a section called "Programming with COM" under the "Programming Guide" section. That has an overview of the basics of COM, and how it works in DirectX.

#6 csdcsz   Members   -  Reputation: 113

Like
0Likes
Like

Posted 25 May 2012 - 02:11 AM

thanks , Tordin and MJP. I will have a try and look up the documents!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS