Sign in to follow this  

Detecting shader restrictions

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

This topic is 3572 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this