Jump to content

  • Log In with Google      Sign In   
  • Create Account

Order of calling for ReportLiveDeviceObjects (SharpDX)


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
1 reply to this topic

#1 zipwax   GDNet+   -  Reputation: 114

Like
0Likes
Like

Posted 29 July 2014 - 01:33 AM

I've seen tons of examples on the net about how to get a DebugDevice in SharpDX, and then how at the end, to call ReportLiveDeviceObjects( ). Yet every single example shows a stack of still-instantiated objects. The ID3D11Device always has at least 2 external refcounts on it, and the rest have internal refcounts, but no external refcounts... This seems unclean.

 

I'd like to know if there is *a* way to "clean up" the DebugDevice so that the DebugDevice knows that ALL of the D3D objects are gone and cleaned up. Kinda like a way to call DebugDevice.SetD3DDevice( null ), or DebugDevice.DisposeYourReferenceToD3D( ), and THEN call ReportLiveDeviceObjects( )! I want a clean log! I haven't seen one example where the log is clean.

 

I know enough to flush the context, and clear it's state, by the way. This still-having-entries log file is after doing all that.

 

Possible!?


Edited by zipwax, 29 July 2014 - 01:34 AM.


Sponsor:

#2 xoofx   Members   -  Reputation: 880

Like
0Likes
Like

Posted 29 July 2014 - 06:32 AM

The ID3D11Device always has at least 2 external refcounts on it, and the rest have internal refcounts, but no external refcounts... This seems unclean.

 

The external refcount on the device when using DebugDevice is normal, as it is the DebugDevice itself that is probably holding these references, so you can't really avoid them. If everything else has external refcount = 0, it can be considered clean.

 

When you run the device in debug mode (not using DebugDevice), the d3d11 runtime will output automatically a ReportLiveObject() if there is anything suspicious, but unlike DebugDevice, it is not holding anykind of refcounts on the main device, so if all objects are disposed correctly, you should not get any output. Note that the current auto output seems to be broken on on W8.1 (It doesn't print object type....etc.)






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