Jump to content
  • Advertisement
Sign in to follow this  
aero68

Optimation of renderstates

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

If I have ZEnabled and render a mesh using shaders and that shader sets ZEnable = true. Will that state be set every drawcall or does the driver keep what is set and whats not ?

Share this post


Link to post
Share on other sites
Advertisement
I'm pretty sure FX9 will automatically save/restore pipeline configuration for you (it uses state blocks behind the scenes). I don't have details to hand, but there is a flag you can pass in if you want to disable this feature.

Under FX10 it's the other way around - by default it won't save state and you're responsible for managing the state blocks.

You can always use PIX for Windows to determine this sort of thing. Use D3DPERF_BeginEvent() and D3DPERF_EndEvent() around your rendering code then run a single frame capture. You can then see all of the state change calls that D3DX makes as part of the FX9/FX10 implementation.

hth
Jack

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!