Patchwatcher: patchwatcher bug: Try number 2 drawprim.c drawStridedSlow

Henri Verbeet hverbeet at
Thu Sep 11 17:01:14 CDT 2008

2008/9/11 Chris Ahrendt <celticht32 at>:
> Henri Verbeet wrote:
>> 2008/9/11 Chris Ahrendt <celticht32 at>:
>>> Ok what now.... I did a git to get the latest tree... I generated the
>>> patch off the latest tree.. and submitted it again... what I am failing.
>>> so I can fix it =).. the code compiles just fine and runs on my machine
>>> so not sure...
>>> chris
>> The patch is not against current git, it's against an earlier version
>> of your patch.
>> More importantly though, the patch is completely unacceptable. You
>> really need to try to get a better understanding of how D3D vertex
>> declarations work, and what the different D3DDECLTYPE values mean.
> Henri,
> Actually it was based on the current Git tree not a back level.... but will
> try and do a merge to see if there is an issue...

Current git:
 449                     /* The coords to supply depend completely on
the fvf / vertex shader */
 450                     switch (coordsToUse) {
 451                     case 4: q = ptrToCoords[3]; /* drop through */
 452                     case 3: r = ptrToCoords[2]; /* drop through */
 453                     case 2: t = ptrToCoords[1]; /* drop through */
 454                     case 1: s = ptrToCoords[0];
 455                     }

Your patch:
>                     switch (coordsToUse) {
>-                    case 16:
>-                    case 15:
>-                    case 14:
>+                    case 17:
>                     case 13:
>-                    case 12:

Where do you see those lines you're removing in current git?

> I disagree on your comment... I am following the MSDN definition of what the
> function does.  I do know what they mean I have been discussing these with
> stefan.
Well, proof me wrong then:
Did you test on a native Windows system if the code should behave the
way you think it should? Why are you creating a switch statement based
on numeric constants instead of the appropriate enum values? Do you
understand what, for example, D3DDECLTYPE_UBYTE4N means? What is the
size of a D3DDECLTYPE_UBYTE4N element? What is the range of a
component of a D3DDECLTYPE_UBYTE4N element? What is the size of a
float? What is it's range? What are the implications of all that for
using ptrToCoords, which is a float pointer, for D3DDECLTYPE_UBYTE4N
in combination with glMultiTexCoord4fARB(), which expects four
normalized floating point values? How is all this handled for the
other attributes, like diffuse, specular, normal and position? How
does drawStridedSlowVs() handle this? What about

More information about the wine-devel mailing list