Re: GSoC-2011: Implement Missing Mesh Functions in Wine’s D3DX9

Michael Mc Donnell michael at
Wed Aug 3 07:39:15 CDT 2011

On Wed, Aug 3, 2011 at 11:18 AM, Stefan Dösinger <stefandoesinger at> wrote:
> On Wednesday 03 August 2011 10:56:25 Michael Mc Donnell wrote:
>> It is *technically* undefined, but all the compilers I have tested it
>> on do the same thing.
> There may be a future compiler that behaves differently. You may get away with
> it right now, but it will cause pain in the rear sooner or later.
> (I didn't know bitfield layout is undefined, otherwise I wouldn't have advised
> you to keep using them)

Looking at the ISO C99 draft I can't find anything about the memory
layout being undefined. Only that things are implementation specific
like alignment, padding, and endianness. Not much unlike the
definition of int :-)

Anyway you're right it's probably a good idea to stay clear of them in
order to avoid potential compiler issues. I've updated the patch to
implement UDEC3 and UDEC3N using shifts and masks instead of
bit-fields. It will still only work on little-endian machines though.
Does it look ok?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d3dx9-Implemented-D3DXWeldVertices-and-test.patch
Type: text/x-patch
Size: 106938 bytes
Desc: not available
URL: <>

More information about the wine-devel mailing list