Jump to content
  • Advertisement
Sign in to follow this  
Quat

D3DXSHADER_SKIPOPTIMIZATION

This topic is 4833 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, I wrote a shader with static branching, which my card supports. However, it was not working--the wrong branch was being executed. So I went through the shader debugger, and in doing so it recommended D3DXSHADER_SKIPOPTIMIZATION for debugging. So I set that flag. All of a sudden, it worked correctly. I then switched back to HAL mode and it worked still. Basically, adding D3DXSHADER_SKIPOPTIMIZATION makes it work. So I'm wondering if anyone has expereienced this, and if it is possible that the ID3DXEffect optimization code has a bug in it that in screwing up my if-else statement...

Share this post


Link to post
Share on other sites
Advertisement
I haven't had that particular problem, but optimizers have always been known to induce bugs, so it's likely that it could do so. It might also be masking something that you missed too, so you just never know. I would pursue the debugging with it enabled and try to figure out what was optimized and why it doesn't work anymore.

Share this post


Link to post
Share on other sites
If you load the shader into FX Composer, you can view the optimized ASM. This may help you to understand what exactly what is going on.

If you continue to have problems with it, you could always send an email to the DX team. There is a lot of development done on the HLSL compiler, with an emphasis on optimization. It's completely possible it's a bug in D3DX.

Share this post


Link to post
Share on other sites
You should make sure that you're using the latest SDK installer (August 2005). They fix bugs in the shader compiler all the time.

If the bug still happens with that installer, try reporting the bug on the DirectXDev mailing list (at microsoft), or sending a reproduction case to direct@microsoft.com.

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!