Sign in to follow this  

fxc option /Gfp, prefer flow control doesn't work for ps_2_b

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

Hi all I am rewriting a shader of ps_3_0 to ps_2_b. The main diffculty is that it uses too many float constant registers. I found that the compiler uses only cmp instruction for branch for ps_2_b, so that a bool constant is compiled into a float constant. I need to force the compiler to use if instruction so that the bool constant can be bool constant. I tried to use /Gfp for ps_3_0 and it works fine, but for ps_2_b the compiler just won't change cmp to if. It's so annoying. Another solution would be to compile the shader using ps_3_0 profile and set /Gfp, then change the outputed assembly code to fit into ps_2_b. But this seems to be a dirty way. Any suggestion?

Share this post

Link to post
Share on other sites
Sign in to follow this