Jump to content
  • Advertisement
Sign in to follow this  
Anthom

Using multiple Descriptor Heaps of the same type (SRV_CBV_UAV) with SetDescriptorHeaps possible?

This topic is 1209 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Its really noticable, that the  d3d12 examples only use one descriptor heap for all srv's and cbv's (+ maybe another sampler heap). So i thought i try to split that into 2 heaps, one for srv and one for cbv.

 

Ive made a stackoverflow question documenting my failed try: http://stackoverflow.com/questions/32114174/directx-12-how-to-use-commandlist-with-multiple-descriptor-heaps

 

Maybe i missed something in the documentation like "only one descriptor heap per type per commandlist allowed"?

 

Share this post


Link to post
Share on other sites
Advertisement

Thanks for the hint ajmiles.

Seems like my suspicion was right. After enabling the debug layer, i got the following output:

 

 

 

D3D12 ERROR: ID3D12CommandList::SetDescriptorHeaps: pDescriptorHeaps[1] sets a descriptor heap type that appears earlier in the pDescriptorHeaps array. Only one of any given descriptor heap type can be set at a time. [ EXECUTION ERROR #554: SET_DESCRIPTOR_HEAP_INVALID] D3D12 ERROR: 

 

So only one Descriptor Heap for each Heap Type (SRV_CBV_UAV or SAMPLER) can be set at the same time!

 

So the way to go is to have one big descriptor heap that can store all the needed descriptors. (at least for each commandlist)

Edited by Anthom

Share this post


Link to post
Share on other sites

As per my last comment, you can use multiple descriptor heaps throughout the command list, just not on a single draw.

 

SetDescriptorHeaps can set either:

 

a) 1 CBV/SRV/UAV heap

b) 1 Sampler heap

c) 1 CBV/SRV/UAV heap and 1 sampler heap.

 

Thus the only valid values for "NumDescriptorHeaps" are 1 and 2. By all means change them regularly though within the command list.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!