Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Apr 2013
Offline Last Active Jun 09 2016 01:30 AM

Posts I've Made

In Topic: [D3D12] Overlapping descriptor heaps bug

10 May 2016 - 09:50 AM

For staging descriptors CPU-side, I wanted to make it really easy to create and destroy descriptors.

I have a class that internally has a list of descriptor heaps, which in turn have a list of free indices.

- When a descriptor is created, the class claims a free slot in any of its internal heaps. If all heaps are full, a new one is automatically created.

- When a descriptor is destroyed, the class determines the heap and index of the descriptor and marks the corresponding slot as free again.

In Topic: [D3D12] Overlapping descriptor heaps bug

10 May 2016 - 08:20 AM

To find out if a descriptor belongs to a certain heap, I check the following condition:

ptr >= base && ptr < base + n * increment

What you're saying is that I should add the following constraint:

&& isMultipleOf(ptr - base, increment)

This would allow for interleaved descriptor heaps, which is what I'm seeing here.


The documentation doesn't say that heaps can be interleaved but it also doesn't say that they can't be, so I suppose my mistake was making an assumption.  :)


Thank you for your help.