Jump to content
  • Advertisement
Sign in to follow this  
Mastaba

Question about PS_3_0 assembly

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

I just compiled a HLSL pixel shader, using the 3.0 profile, and according to the DirectX SDK, the shader compiler has output what appears to me to be invalid code. For the cmp instruction, the SDK says that the destination register can not be the same as any of the source registers. So why did the shader compiler output the following line:
cmp r1.xyz, r1, c2.x, c2.y
Does r1.xyz not qualify the same as r1?

Share this post


Link to post
Share on other sites
Advertisement
You're saying that when you load up the shader, the D3D debug runtime complains that it's invalid?

If so you may have found a bug in the HLSL compiler. Which version of the DirectX SDK are you using?

Share this post


Link to post
Share on other sites
Quote:
Original post by Demirug
The compiler output is valid. Only PS 1.2 and 1.3 have this limitation.


So it is. I just reread the relevant page in the SDK and there was a sentence immediately before that limitation saying so, but somehow I didn't see it before.

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!