Device.c and set render states

Chris Ahrendt celticht32 at aol.com
Mon Jul 28 16:52:01 CDT 2008


Stefan Dösinger wrote:
> My performance concern is about the switch statement itself, less about the
> actual value checking. If you have something like
> 
> switch(renderstate) {
>     case WINED3DRS_A:
>     case WINED3DRS_B:
>         doSomething();
>         break;
> 
>     default: break;
> }
> 
> The binary code generated by the compiler still checks 239 states against
> D3DRS_A and D3DRS_B(the only exception is D3DRS_A, which is never compared
> against D3DRS_B). That is where my worries come from, not the doSomething()
> itself.
> 
> But beyond that, I think checking the value ranges is just wrong, at least
> we need a test to show Windows does that as well.
> 
> 

Ok I will work on the test case when I get a chance... (I think I can do 
this in a vmware session if not it is going to have to wait till I get 
to the house where I have a windows machine).

Ahh ok...  I also this morning moved the check to see if the call is 
just resetting the same value over and over to before the switch 
statement so that if we are getting the same value  it just returns like 
it did before however it does not set it over again.


Chris



More information about the wine-devel mailing list