[PATCH 1/5] include: Pack structures to 4-bytes alignment on x86 in D3D headers.
Matteo Bruni
mbruni at codeweavers.com
Tue Mar 10 13:29:36 CDT 2015
---
include/d3d8caps.h | 8 ++++++++
include/d3d8types.h | 7 +++++++
include/d3dcaps.h | 8 +++++++-
include/d3dtypes.h | 8 ++++++++
4 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/include/d3d8caps.h b/include/d3d8caps.h
index 019d346..d11a46f 100644
--- a/include/d3d8caps.h
+++ b/include/d3d8caps.h
@@ -19,6 +19,10 @@
#ifndef __WINE_D3D8CAPS_H
#define __WINE_D3D8CAPS_H
+#ifdef __i386__
+#include <pshpack4.h>
+#endif
+
/*
* Definitions
*/
@@ -283,4 +287,8 @@ typedef struct _D3DCAPS8 {
float MaxPixelShaderValue;
} D3DCAPS8;
+#ifdef __i386__
+#include <poppack.h>
+#endif
+
#endif /* __WINE_D3D8CAPS_H */
diff --git a/include/d3d8types.h b/include/d3d8types.h
index e848a45..0ffa2db 100644
--- a/include/d3d8types.h
+++ b/include/d3d8types.h
@@ -19,6 +19,9 @@
#ifndef __WINE_D3D8TYPES_H
#define __WINE_D3D8TYPES_H
+#ifdef __i386__
+#include <pshpack4.h>
+#endif
/*****************************************************************************
* Direct 3D v8 #defines
@@ -1210,4 +1213,8 @@ typedef struct _D3DVOLUME_DESC {
UINT Depth;
} D3DVOLUME_DESC;
+#ifdef __i386__
+#include <poppack.h>
+#endif
+
#endif /* __WINE_D3D8TYPES_H */
diff --git a/include/d3dcaps.h b/include/d3dcaps.h
index c36577e..4fc76ba 100644
--- a/include/d3dcaps.h
+++ b/include/d3dcaps.h
@@ -21,6 +21,10 @@
#include <ddraw.h>
+#ifdef __i386__
+#include <pshpack4.h>
+#endif
+
typedef struct _D3DTRANSFORMCAPS {
DWORD dwSize;
DWORD dwCaps;
@@ -428,6 +432,8 @@ typedef struct _D3DDEVINFO_TEXTURING {
DWORD dwNumGetDCs;
} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
-
+#ifdef __i386__
+#include <poppack.h>
+#endif
#endif
diff --git a/include/d3dtypes.h b/include/d3dtypes.h
index 4119c0f..75aee55 100644
--- a/include/d3dtypes.h
+++ b/include/d3dtypes.h
@@ -29,6 +29,10 @@
#include <float.h>
#include <ddraw.h>
+#ifdef __i386__
+#include <pshpack4.h>
+#endif
+
#define D3DVALP(val, prec) ((float)(val))
#define D3DVAL(val) ((float)(val))
#define D3DDivide(a, b) (float)((double) (a) / (double) (b))
@@ -1356,4 +1360,8 @@ typedef enum _D3DTEXTURETRANSFORMFLAGS {
#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
+#ifdef __i386__
+#include <poppack.h>
+#endif
+
#endif
--
2.0.5
More information about the wine-patches
mailing list