[PATCH] WineD3D: Align the ffp_settings struct size=0A=
Stefan Doesinger
stefan at codeweavers.com
Thu Sep 4 15:51:21 CDT 2008
=0A=
This time with a comment=0A=
---=0A=
dlls/wined3d/wined3d_private.h | 6 +++++-=0A=
1 files changed, 5 insertions(+), 1 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/wined3d_private.h =
b/dlls/wined3d/wined3d_private.h=0A=
index ebe0f7f..f046cd8 100644=0A=
--- a/dlls/wined3d/wined3d_private.h=0A=
+++ b/dlls/wined3d/wined3d_private.h=0A=
@@ -785,7 +785,11 @@ struct ffp_settings {=0A=
FOG_EXP,=0A=
FOG_EXP2=0A=
} fog;=0A=
- unsigned char sRGB_write;=0A=
+ /* Use an int instead of a char to get dword alignment. gcc tends =
to align the=0A=
+ * size of the whole structure, so there are 3 padding bytes. These =
remain=0A=
+ * uninitialized in the construction function and cause confusion =
in the hashmap=0A=
+ */=0A=
+ unsigned int sRGB_write;=0A=
};=0A=
=0A=
struct ffp_desc=0A=
-- =0A=
1.5.6.4=0A=
=0A=
------=_NextPart_000_0001_01C90EA6.8A2EC250--
More information about the wine-patches
mailing list