Sign in to follow this  
schupf

DX9 and redundant render states

Recommended Posts

Hello!

I always thought D3D9 does NOT check for redundant render states. But recently I set the DX runtime to maximum debug out level and noticed tons of such warnings:

[quote]Warning: Ignoring redundant render state[/quote]
Does this mean D3D9 will filter out setting redundant render states?

For example:
[code]mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);[/code]
Will this really set the state 3 times or just once? I am asking because actually I wanted to filter out setting redundant states in my engine, but if D3D9 already makes it, I do not have to do it.

Share this post


Link to post
Share on other sites
Will it also filter out calls like setPixelShader()?
So its best to let D3D filter out redundand state settings?

Share this post


Link to post
Share on other sites

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