Jump to content
  • Advertisement
Sign in to follow this  
Alex F

Detecting shader restrictions

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

Compiling pixel shader I got this error: X4507 - maximum constant register index exceeded How can I detect maximal allowed register index, and other shader restrictions programmatically using D3D functions?

Share this post


Link to post
Share on other sites
Advertisement
I believe those restrictions are all included in the actual shader model spec. Check the D3D docs for the numbers.

Share this post


Link to post
Share on other sites
To get the exact value you need to call GetCaps(). The D3DCAPS9 structure has a MaxVertexShaderConst member.

The specifications will tell you the minimum available for each shader version (it's 256 for both VS 2.0 and VS 3.0), and the caps will tell you how many are actually available. However, they are often identical, since creating code and data to support a variable available register count can be awkward.

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!