dexfx

DX11 DSSetConstantBuffers causing memory leak

Discussion created by dexfx on Jun 8, 2010
Latest reply on Jan 17, 2011 by dexfx
Memory leaking in samples and my own app when tessellation enabled

Hi,

I've been playing around with tessellation in DX11, on HD5870 (x2). Problem is, setting the domain shader constant buffer seems to be leaking memory.

I get this same problem with all of the DirectX 11 samples that include tessellation, including PNTriangles11 (the AMD sample), SimpleBezier11 and DetailTessellation11, and my own app that uses tessellation.

The PNTriangles11 sample is the best example of the problem happening, since the tessellation can be turned on and off, which also turns the memory leaking on and off. Using the adaptive tessellation sometimes seems to speed up the memory leaking. My app leaks a lot faster than these samples, because I'm updating the domain shader constant buffer a lot more (once for each mesh drawn), instead of just once per frame.

I was able to isolate the leak to being caused by DSSetConstantBuffers, since if I comment out that line the leak stops happening (but nothing is rendered properly).

Debug leak check picks up nothing.

I also posted a topic on the DX11 forum about this, at http://forums.xna.com/forums/t/54722.aspx

System specs are: Win7, i7 920, 6GB RAM, HD5870 x2. CCC/driver version 10.5.

Thanks!

 

[EDIT]

I left PNTriangles11 running for a couple of hours using the reference device, and the leak didn't seem to happen. Which seems to point at the graphics drivers being the culprit..

Outcomes