Sign in to follow this  
matches81

Lots of "ignoring redundant SetSamplerState...."

Recommended Posts

Hi there! I get loads of these errors:
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: 16

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 17

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 18

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 19

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 20

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 21

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 29

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 30

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 13

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 14

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 25

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 15

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 16

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 17

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 18

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 19

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 1, State: 20
.
.
.
.
As I get those all over the place, I assumed it is something that is called every frame, so I thought this would be easy to fix and scanned through all the functions I call every frame. But: I got not a single SetSamplerState that is called every frame. I only call these at startup once, and I call only 4 of them. So I don´t have a clue where those warnings might be coming from, I even looked in my shader I´m using... nothing. Can anyone tell me what the numbers at the end of each warning mean? Is there any place I can look these up to get closer to the error? [edit] cut away some warnings, since I thought you might get the point without that much of them ;) [/edit]

Share this post


Link to post
Share on other sites
Quote:

I even looked in my shader I´m using... nothing.

So you are not using textures? I think you have a sampler in the shader.

The warning is just a performance warning. It says, if you would sort all your render calls such that it minimizes sampler state changes, you may gain GPU processor cycles. It is because you set a sampler state to a state it already was in.

Also note that with ID3DXEffect the default behavior is that all device states are reset on Begin(). This includes the sampler so even if you have no sampler, it will be reset -- obviously redundantly.

Greetz,

Illco

Share this post


Link to post
Share on other sites
hmm... thx.... interesting....
yes, I have 4 samplers in my shader, the textures for those are set once at startup, since they never change (yet).
So, you´re saying I won´t get rid of this warnings when using shaders??

Share this post


Link to post
Share on other sites
No, you can, because you can configure it such that the device state is not reset. This can be done if you know it is valid from the previous renderings.

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