Module: wine Branch: refs/heads/master Commit: 03b256b16d39cfb9f183b7896785c4a6b5e80269 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=03b256b16d39cfb9f183b789...
Author: Stefan Dösinger stefan@codeweavers.com Date: Mon Apr 17 16:13:28 2006 +0200
wined3d: Add a parameter for surface type selection.
---
dlls/d3d8/device.c | 2 +- dlls/d3d9/device.c | 2 +- dlls/wined3d/device.c | 2 +- include/wine/wined3d_interface.h | 4 ++-- include/wine/wined3d_types.h | 7 +++++++ 5 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 1d4ce68..6440233 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -493,7 +493,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Crea
TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface);
- hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality, NULL,(IUnknown *)object); + hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality, NULL, SURFACE_OPENGL, (IUnknown *)object); if (hrc != D3D_OK || NULL == object->wineD3DSurface) { /* free up object */ FIXME("(%p) call to IWineD3DDevice_CreateSurface failed\n", This); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 7aa1337..10cf65f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -271,7 +271,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_Cre
TRACE("(%p) : w(%d) h(%d) fmt(%d) surf@%p\n", This, Width, Height, Format, *ppSurface);
- hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,(IUnknown *)object); + hrc = IWineD3DDevice_CreateSurface(This->WineD3DDevice, Width, Height, Format, Lockable, Discard, Level, &object->wineD3DSurface, Type, Usage, (WINED3DPOOL) Pool,MultiSample,MultisampleQuality,pSharedHandle,SURFACE_OPENGL,(IUnknown *)object);
if (hrc != D3D_OK || NULL == object->wineD3DSurface) {
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index d5561cc..4f9d569 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -632,7 +632,7 @@ If this flag is set, the contents of the
******************************** */
-HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IWineD3DSurface **ppSurface,WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, IUnknown *parent) { +HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IWineD3DSurface **ppSurface,WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, WINED3DSURFTYPE Impl, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */ unsigned int pow2Width, pow2Height; diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 5c2b4d8..9a31acf 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -356,7 +356,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,WINED3DPOOL Pool,struct IWineD3DVertexBuffer **ppVertexBuffer, HANDLE *sharedHandle, IUnknown *parent) PURE; STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DIndexBuffer** ppIndexBuffer, HANDLE* pSharedHandle, IUnknown *parent) PURE; STDMETHOD(CreateStateBlock)(THIS_ WINED3DSTATEBLOCKTYPE Type, struct IWineD3DStateBlock **ppStateBlock, IUnknown *parent) PURE; - STDMETHOD(CreateSurface)(THIS_ UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, struct IWineD3DSurface** ppSurface, WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, IUnknown *parent) PURE; + STDMETHOD(CreateSurface)(THIS_ UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, struct IWineD3DSurface** ppSurface, WINED3DRESOURCETYPE Type, DWORD Usage, WINED3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, WINED3DSURFTYPE Impl, IUnknown *parent) PURE; STDMETHOD(CreateTexture)(THIS_ UINT Width, UINT Height, UINT Levels, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DTexture** ppTexture, HANDLE* pSharedHandle, IUnknown *parent, D3DCB_CREATESURFACEFN pFn) PURE; STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DVolumeTexture** ppVolumeTexture, HANDLE* pSharedHandle, IUnknown *parent, D3DCB_CREATEVOLUMEFN pFn) PURE; STDMETHOD(CreateVolume)(THIS_ UINT Width, UINT Height, UINT Depth, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DVolume** ppVolumeTexture, HANDLE* pSharedHandle, IUnknown *parent) PURE; @@ -499,7 +499,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD #define IWineD3DDevice_CreateVertexBuffer(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f,g) #define IWineD3DDevice_CreateIndexBuffer(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f,g) #define IWineD3DDevice_CreateStateBlock(p,a,b,c) (p)->lpVtbl->CreateStateBlock(p,a,b,c) -#define IWineD3DDevice_CreateSurface(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n) (p)->lpVtbl->CreateSurface(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n) +#define IWineD3DDevice_CreateSurface(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) (p)->lpVtbl->CreateSurface(p,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) #define IWineD3DDevice_CreateTexture(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h,i,j) #define IWineD3DDevice_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i,j,k) #define IWineD3DDevice_CreateVolume(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CreateVolume(p,a,b,c,d,e,f,g,h,i) diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index 88132e4..8358e6d 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -923,6 +923,13 @@ typedef enum _WINED3DDECLUSAGE { #define WINED3DUSAGE_AUTOGENMIPMAP 0x00000400L #define WINED3DUSAGE_DMAP 0x00004000L
+typedef enum _WINED3DSURFTYPE { + SURFACE_UNKNOWN = 0, /* Default / Unknown surface type */ + SURFACE_OPENGL, /* OpenGL surface: Renders using libGL, needed for 3D */ + SURFACE_GDI, /* User surface. No 3D, DirectDraw rendering with GDI */ + SURFACE_XRENDER /* Future dreams: Use XRENDER / EXA / whatever stuff */ +} WINED3DSURFTYPE; + #define WINED3DPRASTERCAPS_DITHER 0x00000001L #define WINED3DPRASTERCAPS_ROP2 0x00000002L #define WINED3DPRASTERCAPS_XOR 0x00000004L