Sign in to follow this  

Optimation of renderstates

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

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