Jump to content
  • Advertisement
Sign in to follow this  
Funkymunky

[D3D12] What is the benefit of descriptor table ranges?

This topic is 953 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

In regard to root signatures for descriptor heaps, what is the point of having a descriptor table with a range of multiple descriptors?  Is it just to minimize the number of calls to SetGraphicsRootDescriptorTable/SetComputeRootDescriptorTable?  That seems like a small victory for the price of ensuring that your descriptors are contiguous within the heap.  Sharing resources between shaders then requires more complicated root signature creation.  And changing a resource at runtime (like switching to a different texture) requires either: a stall in the rendering so the descriptor can be reused, copying a bunch of descriptors to create another contiguous section, or creating a new root signature on the fly to accommodate the new breakdown of resource descriptors.

 

Is it really that big of a win over calling SetGraphicsRootDescriptorTable for each individual resource, and defining the root signature along the same lines?

Share this post


Link to post
Share on other sites
Advertisement
In addition to everything Hodgman said, remember DX12 had to support three architectures from NVIDIA, one architecture from AMD, and like three from Intel (and they might have considered some mobile GPUs in their Nokia phones as well).

These cards differed vastly in their texture support. What doesn't make sense in one hw architecture, makes sense in another (Intel & Fermi, I'm looking at youuuuu)

Share this post


Link to post
Share on other sites

Hodgman, that sounds like it falls right in line with Vulkan's Descriptor Sets as well.  Alright, so I think my course of action right now is going to be building descriptor tables, and then tracking open spaces in the descriptor heap if I have to switch to a new range based on a texture switch or something.

 

Thanks guys

Share this post


Link to post
Share on other sites

You should avoid copying descriptor if possible. It's not that costly per se but if you intend to issue thousands of draw call doing a copy per draw call may cost you near a millisecond from experience.

 

Don't forget that descriptor sets can be huge, they can contain 1 000 000 of descriptors even in Tier 1. This allows you to bake a lot of textures and buffer combinaison.

Not all app can bake their combinaison though.

 

If you can afford using Tier2 then you can pass several indexes as root constants and then fetch texture descriptor from shader and almost completly avoid rebinding cost.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!