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

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


On Wed, Aug 3, 2011 at 11:18 AM, Stefan Dösinger <stefandoesinger at gmx.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?

Thanks,
Michael
-------------- 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: <http://www.winehq.org/pipermail/wine-devel/attachments/20110803/7c52ed24/attachment-0001.bin>


More information about the wine-devel mailing list