Stefan Dösinger : d3d: Pass the cube face to Create*Texture's surface creation callback.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue May 1 07:39:23 CDT 2007
Module: wine
Branch: master
Commit: 94b3fddec8c701dea670b623ee1c02d5ed4aeae5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=94b3fddec8c701dea670b623ee1c02d5ed4aeae5
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue Apr 24 10:29:22 2007 +0200
d3d: Pass the cube face to Create*Texture's surface creation callback.
---
dlls/d3d8/d3d8_private.h | 3 ++-
dlls/d3d8/device.c | 3 ++-
dlls/d3d9/d3d9_private.h | 3 ++-
dlls/d3d9/device.c | 3 ++-
dlls/ddraw/ddraw.c | 2 ++
dlls/wined3d/device.c | 4 ++--
include/wine/wined3d_interface.h | 1 +
7 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index a86867c..f41b7ed 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -626,7 +626,8 @@ size_t convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_el
/* Callbacks */
extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
- IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
+ WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
+ HANDLE* pSharedHandle);
extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 71de017..da3280d 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1769,7 +1769,8 @@ const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl =
/* Internal function called back during the CreateDevice to create a render target */
HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
- IWineD3DSurface **ppSurface, HANDLE *pSharedHandle) {
+ WINED3DCUBEMAP_FACES Face, IWineD3DSurface **ppSurface,
+ HANDLE *pSharedHandle) {
HRESULT res = D3D_OK;
IDirect3DSurface8Impl *d3dSurface = NULL;
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
index 33c780b..af308ac 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
@@ -552,7 +552,8 @@ typedef struct IDirect3DQuery9Impl {
/* Callbacks */
extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
- IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
+ WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
+ HANDLE* pSharedHandle);
extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index af4f3ad..c42f456 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1085,7 +1085,8 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl =
/* Internal function called back during the CreateDevice to create a render target */
HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
- IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) {
+ WINED3DCUBEMAP_FACES Face,IWineD3DSurface** ppSurface,
+ HANDLE* pSharedHandle) {
HRESULT res = D3D_OK;
IDirect3DSurface9Impl *d3dSurface = NULL;
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 9f641e1..a7b0639 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -1578,6 +1578,7 @@ IDirectDrawImpl_RecreateAllSurfaces(IDirectDrawImpl *This)
* Format: The requested format
* Usage, Pool: D3DUSAGE and D3DPOOL of the surface
* level: The mipmap level
+ * Face: The cube map face type
* Surface: Pointer to pass the created surface back at
* SharedHandle: NULL
*
@@ -1591,6 +1592,7 @@ D3D7CB_CreateSurface(IUnknown *device,
UINT Width, UINT Height,
WINED3DFORMAT Format,
DWORD Usage, WINED3DPOOL Pool, UINT level,
+ WINED3DCUBEMAP_FACES Face,
IWineD3DSurface **Surface,
HANDLE *SharedHandle)
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f4f3002..5c2d700 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -851,7 +851,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
for (i = 0; i < object->baseTexture.levels; i++)
{
/* use the callback to create the texture surface */
- hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, &object->surfaces[i],NULL);
+ hr = D3DCB_CreateSurface(This->parent, parent, tmpW, tmpH, Format, Usage, Pool, i, WINED3DCUBEMAP_FACE_POSITIVE_X, &object->surfaces[i],NULL);
if (hr!= WINED3D_OK || ( (IWineD3DSurfaceImpl *) object->surfaces[i])->Flags & SFLAG_OVERSIZE) {
FIXME("Failed to create surface %p\n", object);
/* clean up */
@@ -1046,7 +1046,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
for (j = 0; j < 6; j++) {
hr=D3DCB_CreateSurface(This->parent, parent, tmpW, tmpW, Format, Usage, Pool,
- i /* Level */, &object->surfaces[j][i],pSharedHandle);
+ i /* Level */, j, &object->surfaces[j][i],pSharedHandle);
if(hr!= WINED3D_OK) {
/* clean up */
diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h
index d9f33d0..82ddc23 100644
--- a/include/wine/wined3d_interface.h
+++ b/include/wine/wined3d_interface.h
@@ -209,6 +209,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice,
DWORD Usage,
WINED3DPOOL Pool,
UINT Level,
+ WINED3DCUBEMAP_FACES Face,
struct IWineD3DSurface **ppSurface,
HANDLE *pSharedHandle);
More information about the wine-cvs
mailing list