Jump to content

  • Log In with Google      Sign In   
  • Create Account


rainsing

Member Since 25 Dec 2008
Offline Last Active Sep 28 2012 03:22 AM

Topics I've Started

Tracking down D3D9 leaks

10 May 2012 - 09:14 PM

Has anyone encountered such a situation where,

* The D3D9 debug runtime reports memory leaks on application exit, listing all unfreed allocations with their AllocIDs.
* Tell D3D to break on one of the allocations using the "Break on AllocID" feature of DX control panel.
* With the D3D symbols loaded, we get a complete call stack when the break happens. It turns out the allocation is for a vertex declaration.
* We are 100% sure the very vertex declaration IS released during the shutdown process, and the ref count reaches 0 after the release.

Is it possible that the D3D runtime is reporting wrong AllocIDs? Or is the "Break on AllocID" feature unreliable?

Problem with merging small batches

25 December 2008 - 07:05 PM

I'm using particle system to present some of the VFX. Each instance of a particle system is treated as a render unit, which has its own vertex buffer, index buffer, texture, world matrix, etc. In most cases, a single particle system maintains less than 50 particles or 100 triangles at any given time, but needs a whole DrawIndexedPrimtives batch. So I end up with more than 2K DIP per frame when there is a large number of special effects. Then I come up with the idea to merge different instances of a particle system into one large render unit. Merging the VB and IB shouldn't be a problem, and also they use the same texture and other render states, the only difficulty is the different world matrices can not be unified. One possible solution, I manually apply those world transformations to corresponding particle systems before filling the vertex buffer, and submit identity as the world matrix to the graphic pipeline. Is this practical? Would someone offer any help? Thanks.

PARTNERS