[PATCH] WineD3D: Report the pitch alignment to ddraw=0A=
Stefan Doesinger
stefan at codeweavers.com
Wed Jul 23 15:43:07 CDT 2008
=0A=
---=0A=
dlls/wined3d/directx.c | 6 +++---=0A=
dlls/wined3d/wined3d_private.h | 2 ++=0A=
2 files changed, 5 insertions(+), 3 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c=0A=
index 7cc9ba5..8ec7397 100644=0A=
--- a/dlls/wined3d/directx.c=0A=
+++ b/dlls/wined3d/directx.c=0A=
@@ -3483,7 +3483,7 @@ static HRESULT WINAPI =
IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,=0A=
WINEDDSCAPS_SYSTEMMEMORY =
|=0A=
WINEDDSCAPS_VIDEOMEMORY =
|=0A=
WINEDDSCAPS_VISIBLE;=0A=
- pCaps->DirectDrawCaps.StrideAlign =3D 0; /* TODO: SURFACE_ALIGNMENT =
*/=0A=
+ pCaps->DirectDrawCaps.StrideAlign =3D DDRAW_PITCH_ALIGNMENT;=0A=
=0A=
/* Set D3D caps if OpenGL is available. */=0A=
if(Adapters[0].opengl) {=0A=
@@ -3535,9 +3535,9 @@ static HRESULT WINAPI =
IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,=0A=
list_init(&object->shaders);=0A=
=0A=
if(This->dxVersion =3D=3D 7) {=0A=
- object->surface_alignment =3D 8;=0A=
+ object->surface_alignment =3D DDRAW_PITCH_ALIGNMENT;=0A=
} else {=0A=
- object->surface_alignment =3D 4;=0A=
+ object->surface_alignment =3D D3D8_PITCH_ALIGNMENT;=0A=
}=0A=
object->posFixup[0] =3D 1.0; /* This is needed to get the x coord =
unmodified through a MAD */=0A=
=0A=
diff --git a/dlls/wined3d/wined3d_private.h =
b/dlls/wined3d/wined3d_private.h=0A=
index 7ba6617..30908b0 100644=0A=
--- a/dlls/wined3d/wined3d_private.h=0A=
+++ b/dlls/wined3d/wined3d_private.h=0A=
@@ -834,6 +834,8 @@ struct IWineD3DDeviceImpl=0A=
BOOL view_ident; /* true iff view matrix =
is identity */=0A=
BOOL untransformed;=0A=
BOOL vertexBlendUsed; /* To avoid needless =
setting of the blend matrices */=0A=
+#define DDRAW_PITCH_ALIGNMENT 8=0A=
+#define D3D8_PITCH_ALIGNMENT 4=0A=
unsigned char surface_alignment; /* Line Alignment of =
surfaces */=0A=
=0A=
/* State block related */=0A=
-- =0A=
1.5.4.5=0A=
=0A=
------=_NextPart_000_00C4_01C8F2F4.B3A6BC50--
More information about the wine-patches
mailing list