Redundant render states!

Started by
1 comment, last by Paul7 19 years, 3 months ago
Hello. I am trying to speed up my application a little, and before I get a profiler on the case I am trying all the 'easy' fixes, such as checking the DirectX debug spew. I keep getting this message. Direct3D9: (WARN) :Ignoring redundant SetRenderState - 60 Could somebody tell me which renderstate this '60' refers to, and also how I would go about finding this out for myself. Thanks in advance. Mark Coleman
Advertisement
1) Open the "d3d9types.h" header file and go to line 325, you'll see a "typedef enum _D3DRENDERSTATETYPE" around there. That contains the numerical value for each renderstate.


2) A quick look at the above list reveals: "D3DRS_TEXTUREFACTOR = 60"


3) D3D does contain its own internal redundant state checker for non-PURE devices. So when you set the same state twice in a row, that warning message is it's state checker telling you. For that reason, unless you're using a PURE device, a redundant state checker in your own code is only truly useful if it can do it on multiple chunks of state (you can use application specific knowledge here).

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Dont mean to take over the thread but does this also apply to sampler states?

I`m getting the following:

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 13
Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 14
Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 25
Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 15
Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 19
Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 20

but the thing is in the "d3d9types.h" header file theres a typedef for the samplerstates but that only goes up to 13 (as far as I can tell)?

Thanks

This topic is closed to new replies.

Advertisement