Jump to content
  • Advertisement
Sign in to follow this  

DX9 and redundant render states

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

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:

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

For example:
mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
mDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);

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
Advertisement
A non-pure device (one created without D3DCREATE_PUREDEVICE) will filter out redundant changes, a pure device won't.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!