Device.c and set render states
Chris Ahrendt
celticht32 at aol.com
Sun Jul 27 22:20:03 CDT 2008
While sitting on the airplane I reworked and rethought the set render
states routine I sent last night and have figured out a more efficient
way for it to run...
Logically thinking it through
208 of the 240 states passed into this routine do nothing and have no
real type checking other than to make sure the value is a dword (which
MSDN is very clear that the type of value is a Dword). So what I have
done is those 208 States are in one case statement in the switch that
does a break. So 87% of the calls into set render state will work as
they have worked before and work on windows. That leaves 32 states
which have specific rules that are applied to them such as valid value
ranges or values. This consists of 32 States (13% of the calls into the
routine) which need Value checking. Most of these 32 states do not need
individual rules applied but some do. This should not overly cause any
speed issues for the routine. There are a four States :
WINED3DRS_SRCBLENDALPHA
WINED3DRS_DESTBLENDALPHA
WINED3DRS_DESTBLEND
WINED3DRS_SRCBLEND
which have a large IF associated with them but they are grouped together
in one case statement. I believe on windows these calls tend to be a bit
slower than the others however I would have to test that out to confirm.
As to this patching my issues with everquest2. I forgot that I had the
loader patch on this build I was using. So the actual way I have found
that gets EQ sort of running or atleast the start of it running using my
T60p is the libgl wine loader patch, this patch and the ATI patch which
comments out line 57 and 60 from directx.c all of those get me to the
point where it starts loading and I get past the ipixel issue.
Please comment on the attached patch and let me know what you think..
I would like to submit this to the patch list =). If it is alright with
you I would like going through and where you have noted TODO's to start
working on those. Got to have something to keep me occupied while I am
on the road =)
Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
Url: http://www.winehq.org/pipermail/wine-devel/attachments/20080727/b5ab8840/attachment-0001.txt
More information about the wine-devel
mailing list