From 5c398c571fb468e29169f1ada469562efdb9b699 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" <hverbeet@gmail.com> Date: Wed, 14 Feb 2007 23:31:18 +0100 Subject: [PATCH] wined3d: Add WINED3DPTADDRESSCAPS flags and use them. --- dlls/wined3d/directx.c | 24 ++++++++++++------------ include/wine/wined3d_caps.h | 7 +++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c71ce5b6b8b..9e128bff7cf 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2063,32 +2063,32 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, } else *pCaps->VolumeTextureFilterCaps = 0; - *pCaps->TextureAddressCaps = D3DPTADDRESSCAPS_INDEPENDENTUV | - D3DPTADDRESSCAPS_CLAMP | - D3DPTADDRESSCAPS_WRAP; + *pCaps->TextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | + WINED3DPTADDRESSCAPS_CLAMP | + WINED3DPTADDRESSCAPS_WRAP; if (GL_SUPPORT(ARB_TEXTURE_BORDER_CLAMP)) { - *pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_BORDER; + *pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; } if (GL_SUPPORT(ARB_TEXTURE_MIRRORED_REPEAT)) { - *pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRROR; + *pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; } if (GL_SUPPORT(ATI_TEXTURE_MIRROR_ONCE)) { - *pCaps->TextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE; + *pCaps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; } if (GL_SUPPORT(EXT_TEXTURE3D)) { - *pCaps->VolumeTextureAddressCaps = D3DPTADDRESSCAPS_INDEPENDENTUV | - D3DPTADDRESSCAPS_CLAMP | - D3DPTADDRESSCAPS_WRAP; + *pCaps->VolumeTextureAddressCaps = WINED3DPTADDRESSCAPS_INDEPENDENTUV | + WINED3DPTADDRESSCAPS_CLAMP | + WINED3DPTADDRESSCAPS_WRAP; if (GL_SUPPORT(ARB_TEXTURE_BORDER_CLAMP)) { - *pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_BORDER; + *pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER; } if (GL_SUPPORT(ARB_TEXTURE_MIRRORED_REPEAT)) { - *pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRROR; + *pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; } if (GL_SUPPORT(ATI_TEXTURE_MIRROR_ONCE)) { - *pCaps->VolumeTextureAddressCaps |= D3DPTADDRESSCAPS_MIRRORONCE; + *pCaps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; } } else *pCaps->VolumeTextureAddressCaps = 0; diff --git a/include/wine/wined3d_caps.h b/include/wine/wined3d_caps.h index 68f80bc5abf..8456705d91a 100644 --- a/include/wine/wined3d_caps.h +++ b/include/wine/wined3d_caps.h @@ -62,6 +62,13 @@ #define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000 #define WINED3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000 +#define WINED3DPTADDRESSCAPS_WRAP 0x00000001 +#define WINED3DPTADDRESSCAPS_MIRROR 0x00000002 +#define WINED3DPTADDRESSCAPS_CLAMP 0x00000004 +#define WINED3DPTADDRESSCAPS_BORDER 0x00000008 +#define WINED3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010 +#define WINED3DPTADDRESSCAPS_MIRRORONCE 0x00000020 + #define WINED3DSTENCILCAPS_KEEP 0x00000001 #define WINED3DSTENCILCAPS_ZERO 0x00000002 #define WINED3DSTENCILCAPS_REPLACE 0x00000004