Jump to content
  • Advertisement
Sign in to follow this  
Infinisearch

Static samplers vs sampler heap

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

What are the advantages and disadvantages of both?  Also can someone explain the implementation of static samplers?  They don't take any space in the root signature so my guess is they are in the startup code of the PSO maybe?

Thanks in advance for any help.

Share this post


Link to post
Share on other sites
Advertisement

The implementation really depends on the hardware and driver. AMD hardware is capable of synthesizing sampler descriptors using shader code, so it's very possible that they do this for static samplers. With Nvidia hardware nobody knows how it really works, so it's possible that they turn the static samplers into registers or store descriptors located in memory. You'll notice in the docs that there's a limit of 2032 total unique static samplers across all live root signatures, which suggests that there are implementations that may need to convert static samplers into something heap-based. 

With that in mind, I wouldn't make decisions based off of implementation details since they're not guaranteed. None of the IHV's have said anything positive or negative about static sampler performance or limitations, so I would just make your decision based on what works best for your engine. Personally I like static samplers since they spare me from having to create and bind descriptor tables, which I find pretty convenient. 

Share this post


Link to post
Share on other sites

Thanks for the quick reply MJP.  You're right about not basing design choices based on implementation but I'm curious about the implementation of GPU's, drivers, and dx12 in general anyway.  So besides the limitation on the number of static samplers IIRC there is something you can only do with samplers in a heap and not static samplers. (I forgot what it was though, unless my memory is confusing samplers with something else.)  So there no guidance on static samplers at all?

edit - BTW MJP if its not under NDA could you tell me if dx12 for XBONE is the same as for desktop?

Edited by Infinisearch

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!