From d75fd75d4801ec5abe08a09ea3ffd3bc6b12911c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 28 Mar 2006 14:20:47 +0200 Subject: [PATCH] wined3d: Add WINED3DPOOL to wined3d_types.h. --- dlls/d3d8/cubetexture.c | 2 +- dlls/d3d8/d3d8_private.h | 4 +-- dlls/d3d8/device.c | 16 +++++----- dlls/d3d8/surface.c | 2 +- dlls/d3d8/texture.c | 2 +- dlls/d3d8/volume.c | 4 +-- dlls/d3d8/volumetexture.c | 2 +- dlls/d3d9/cubetexture.c | 4 +-- dlls/d3d9/d3d9_private.h | 4 +-- dlls/d3d9/device.c | 10 +++--- dlls/d3d9/indexbuffer.c | 2 +- dlls/d3d9/surface.c | 2 +- dlls/d3d9/texture.c | 4 +-- dlls/d3d9/vertexbuffer.c | 2 +- dlls/d3d9/volume.c | 4 +-- dlls/d3d9/volumetexture.c | 4 +-- dlls/wined3d/basetexture.c | 6 ++-- dlls/wined3d/device.c | 54 ++++++++++++++++---------------- dlls/wined3d/resource.c | 2 +- dlls/wined3d/surface.c | 6 ++-- dlls/wined3d/utils.c | 12 +++---- dlls/wined3d/wined3d_private.h | 4 +-- include/wine/wined3d_interface.h | 18 +++++------ include/wine/wined3d_types.h | 17 +++++++--- 24 files changed, 98 insertions(+), 89 deletions(-) diff --git a/dlls/d3d8/cubetexture.c b/dlls/d3d8/cubetexture.c index 93b2f5ab667..c43bfc398d2 100644 --- a/dlls/d3d8/cubetexture.c +++ b/dlls/d3d8/cubetexture.c @@ -142,7 +142,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 ifa wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType; wined3ddesc.MultiSampleQuality = NULL; /* DirectX9 only */ diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 40755c4a629..fc975b8c47a 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -560,11 +560,11 @@ typedef struct IDirect3DPixelShader8Impl { /* Callbacks */ extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, - WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level, + WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, - WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage, + WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, IWineD3DVolume **ppVolume, HANDLE * pSharedHandle); diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 10cc70c477b..5f3ceb4afcb 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -303,7 +303,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(LPDIRECT3DDEVICE8 iface, UINT object->lpVtbl = &Direct3DTexture8_Vtbl; object->ref = 1; hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage, - (WINED3DFORMAT)Format, Pool, &object->wineD3DTexture, NULL, (IUnknown *)object, D3D8CB_CreateSurface); + (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DTexture, NULL, (IUnknown *)object, D3D8CB_CreateSurface); if (FAILED(hrc)) { /* free up object */ @@ -339,7 +339,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(LPDIRECT3DDEVICE8 iface, object->lpVtbl = &Direct3DVolumeTexture8_Vtbl; object->ref = 1; hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage, - (WINED3DFORMAT)Format, Pool, &object->wineD3DVolumeTexture, NULL, + (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DVolumeTexture, NULL, (IUnknown *)object, D3D8CB_CreateVolume); if (hrc != D3D_OK) { @@ -376,7 +376,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(LPDIRECT3DDEVICE8 iface, U object->lpVtbl = &Direct3DCubeTexture8_Vtbl; object->ref = 1; hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage, - (WINED3DFORMAT)Format, Pool, &object->wineD3DCubeTexture, NULL, (IUnknown*)object, + (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DCubeTexture, NULL, (IUnknown*)object, D3D8CB_CreateSurface); if (hr != D3D_OK){ @@ -408,7 +408,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8 iface, object->lpVtbl = &Direct3DVertexBuffer8_Vtbl; object->ref = 1; - hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage, FVF, Pool, &(object->wineD3DVertexBuffer), NULL, (IUnknown *)object); + hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage, FVF, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), NULL, (IUnknown *)object); if (D3D_OK != hrc) { @@ -439,7 +439,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(LPDIRECT3DDEVICE8 iface, U object->lpVtbl = &Direct3DIndexBuffer8_Vtbl; object->ref = 1; TRACE("Calling wined3d create index buffer\n"); - hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, Pool, &object->wineD3DIndexBuffer, NULL, (IUnknown *)object); + hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, (WINED3DPOOL) Pool, &object->wineD3DIndexBuffer, NULL, (IUnknown *)object); if (D3D_OK != hrc) { @@ -487,7 +487,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_CreateSurface(LPDIRECT3DDEVICE8 iface, UINT 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, 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,(IUnknown *)object); if (hrc != D3D_OK || NULL == object->wineD3DSurface) { /* free up object */ FIXME("(%p) call to IWineD3DDevice_CreateSurface failed\n", This); @@ -1471,14 +1471,14 @@ const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl = /* Internal function called back during the CreateDevice to create a render target */ HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, - WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level, + WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface **ppSurface, HANDLE *pSharedHandle) { HRESULT res = D3D_OK; IDirect3DSurface8Impl *d3dSurface = NULL; BOOL Lockable = TRUE; - if((D3DPOOL_DEFAULT == Pool && D3DUSAGE_DYNAMIC != Usage)) + if((WINED3DPOOL_DEFAULT == Pool && WINED3DUSAGE_DYNAMIC != Usage)) Lockable = FALSE; TRACE("relay\n"); diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index e8f3d0c0268..f56aed42e71 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -164,7 +164,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFAC wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType; wined3ddesc.Width = &pDesc->Width; diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c index df0ff089bb8..f8809a77e1c 100644 --- a/dlls/d3d8/texture.c +++ b/dlls/d3d8/texture.c @@ -143,7 +143,7 @@ HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; /* required for d3d8 */ wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType; wined3ddesc.Width = &pDesc->Width; diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 156eb84fd07..b90be9b3014 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -140,7 +140,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_D wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.Width = &pDesc->Width; wined3ddesc.Height = &pDesc->Height; @@ -181,7 +181,7 @@ const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl = /* Internal function called back during the CreateVolumeTexture */ HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, - WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage, + WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, IWineD3DVolume **ppVolume, HANDLE * pSharedHandle) { IDirect3DVolume8Impl *object; diff --git a/dlls/d3d8/volumetexture.c b/dlls/d3d8/volumetexture.c index c07bac9c381..322558f8d1d 100644 --- a/dlls/d3d8/volumetexture.c +++ b/dlls/d3d8/volumetexture.c @@ -142,7 +142,7 @@ HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8 wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.Width = &pDesc->Width; wined3ddesc.Height = &pDesc->Height; diff --git a/dlls/d3d9/cubetexture.c b/dlls/d3d9/cubetexture.c index aafedfef367..0c3d3c5121a 100644 --- a/dlls/d3d9/cubetexture.c +++ b/dlls/d3d9/cubetexture.c @@ -163,7 +163,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 ifa wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *) &pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType; wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality; @@ -261,7 +261,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, object->lpVtbl = &Direct3DCubeTexture9_Vtbl; object->ref = 1; hr = IWineD3DDevice_CreateCubeTexture(This->WineD3DDevice, EdgeLength, Levels, Usage, - (WINED3DFORMAT)Format, Pool, &object->wineD3DCubeTexture, pSharedHandle, (IUnknown*)object, + (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DCubeTexture, pSharedHandle, (IUnknown*)object, D3D9CB_CreateSurface); if (hr != D3D_OK){ diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index 05ac0d779dd..b1ee522d220 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -609,11 +609,11 @@ typedef struct IDirect3DQuery9Impl { /* Callbacks */ extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, - WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level, + WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle); extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, - WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage, + WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, IWineD3DVolume **ppVolume, HANDLE * pSharedHandle); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index b4f6eba87e4..32880fa1f66 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -234,7 +234,7 @@ void WINAPI IDirect3DDevice9Impl_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwa } -HRESULT WINAPI IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface,D3DRESOURCETYPE Type, UINT Usage,D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality,HANDLE* pSharedHandle ) { +HRESULT WINAPI IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IDirect3DSurface9 **ppSurface,D3DRESOURCETYPE Type, UINT Usage, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality,HANDLE* pSharedHandle ) { HRESULT hrc; IDirect3DSurface9Impl *object; IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; @@ -268,7 +268,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateSurface(LPDIRECT3DDEVICE9 iface, UINT 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, 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,(IUnknown *)object); if (hrc != D3D_OK || NULL == object->wineD3DSurface) { @@ -368,7 +368,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(LPDIRECT3DDEVI Why, their always lockable? should I change the usage to dynamic? */ - return IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,TRUE/*Loackable*/,FALSE/*Discard*/,0/*Level*/ , ppSurface,D3DRTYPE_SURFACE, 0/*Usage (undefined/none)*/,Pool,D3DMULTISAMPLE_NONE,0/*MultisampleQuality*/,pSharedHandle); + return IDirect3DDevice9Impl_CreateSurface(iface,Width,Height,Format,TRUE/*Loackable*/,FALSE/*Discard*/,0/*Level*/ , ppSurface,D3DRTYPE_SURFACE, 0/*Usage (undefined/none)*/,(WINED3DPOOL) Pool,D3DMULTISAMPLE_NONE,0/*MultisampleQuality*/,pSharedHandle); } /* TODO: move to wineD3D */ @@ -939,7 +939,7 @@ const IDirect3DDevice9Vtbl Direct3DDevice9_Vtbl = /* Internal function called back during the CreateDevice to create a render target */ HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, - WINED3DFORMAT Format, DWORD Usage, D3DPOOL Pool, UINT Level, + WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level, IWineD3DSurface** ppSurface, HANDLE* pSharedHandle) { HRESULT res = D3D_OK; @@ -950,7 +950,7 @@ HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, Lockable = FALSE; TRACE("relay\n"); - res = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9 *)device, Width, Height, (D3DFORMAT)Format, Lockable, FALSE/*Discard*/, Level, (IDirect3DSurface9 **)&d3dSurface, D3DRTYPE_SURFACE, Usage, Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */, pSharedHandle); + res = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9 *)device, Width, Height, (D3DFORMAT)Format, Lockable, FALSE/*Discard*/, Level, (IDirect3DSurface9 **)&d3dSurface, D3DRTYPE_SURFACE, Usage, (D3DPOOL) Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */, pSharedHandle); if (res == D3D_OK) { *ppSurface = d3dSurface->wineD3DSurface; diff --git a/dlls/d3d9/indexbuffer.c b/dlls/d3d9/indexbuffer.c index 5e5def02f07..f2706ddb45d 100644 --- a/dlls/d3d9/indexbuffer.c +++ b/dlls/d3d9/indexbuffer.c @@ -173,7 +173,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, object->lpVtbl = &Direct3DIndexBuffer9_Vtbl; object->ref = 1; TRACE("Calling wined3d create index buffer\n"); - hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, Pool, &object->wineD3DIndexBuffer, pSharedHandle, (IUnknown *)object); + hrc = IWineD3DDevice_CreateIndexBuffer(This->WineD3DDevice, Length, Usage, Format, (WINED3DPOOL) Pool, &object->wineD3DIndexBuffer, pSharedHandle, (IUnknown *)object); if (hrc != D3D_OK) { /* free up object */ diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index e556cc82a41..2dadd3f3170 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -183,7 +183,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFAC wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType; wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality; diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index 6a286b6462b..011c094b4bb 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -162,7 +162,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; /* required for d3d8 */ wined3ddesc.MultiSampleType = (WINED3DMULTISAMPLE_TYPE *) &pDesc->MultiSampleType; wined3ddesc.MultiSampleQuality = &pDesc->MultiSampleQuality; @@ -255,7 +255,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9 iface, UIN object->lpVtbl = &Direct3DTexture9_Vtbl; object->ref = 1; hrc = IWineD3DDevice_CreateTexture(This->WineD3DDevice, Width, Height, Levels, Usage, - (WINED3DFORMAT)Format, Pool, &object->wineD3DTexture, pSharedHandle, (IUnknown *)object, D3D9CB_CreateSurface); + (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DTexture, pSharedHandle, (IUnknown *)object, D3D9CB_CreateSurface); if (FAILED(hrc)) { diff --git a/dlls/d3d9/vertexbuffer.c b/dlls/d3d9/vertexbuffer.c index 9c46783decd..d679c140520 100644 --- a/dlls/d3d9/vertexbuffer.c +++ b/dlls/d3d9/vertexbuffer.c @@ -172,7 +172,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, object->lpVtbl = &Direct3DVertexBuffer9_Vtbl; object->ref = 1; - hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage, FVF, Pool, &(object->wineD3DVertexBuffer), pSharedHandle, (IUnknown *)object); + hrc = IWineD3DDevice_CreateVertexBuffer(This->WineD3DDevice, Size, Usage, FVF, (WINED3DPOOL) Pool, &(object->wineD3DVertexBuffer), pSharedHandle, (IUnknown *)object); if (hrc != D3D_OK) { diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index bd41bd9b36f..670e2796966 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -160,7 +160,7 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_D wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.Width = &pDesc->Width; wined3ddesc.Height = &pDesc->Height; @@ -201,7 +201,7 @@ const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl = /* Internal function called back during the CreateVolumeTexture */ HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, UINT Width, UINT Height, UINT Depth, - WINED3DFORMAT Format, D3DPOOL Pool, DWORD Usage, + WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage, IWineD3DVolume **ppVolume, HANDLE * pSharedHandle) { IDirect3DVolume9Impl *object; diff --git a/dlls/d3d9/volumetexture.c b/dlls/d3d9/volumetexture.c index 279721a7452..db330c56892 100644 --- a/dlls/d3d9/volumetexture.c +++ b/dlls/d3d9/volumetexture.c @@ -161,7 +161,7 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9 wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type; wined3ddesc.Usage = &pDesc->Usage; - wined3ddesc.Pool = &pDesc->Pool; + wined3ddesc.Pool = (WINED3DPOOL *) &pDesc->Pool; wined3ddesc.Size = &tmpInt; wined3ddesc.Width = &pDesc->Width; wined3ddesc.Height = &pDesc->Height; @@ -257,7 +257,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9 ifac object->lpVtbl = &Direct3DVolumeTexture9_Vtbl; object->ref = 1; hrc = IWineD3DDevice_CreateVolumeTexture(This->WineD3DDevice, Width, Height, Depth, Levels, Usage, - (WINED3DFORMAT)Format, Pool, &object->wineD3DVolumeTexture, pSharedHandle, + (WINED3DFORMAT)Format, (WINED3DPOOL) Pool, &object->wineD3DVolumeTexture, pSharedHandle, (IUnknown *)object, D3D9CB_CreateVolume); diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 4665927af09..8d420cfdb62 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -153,7 +153,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_GetParent(IWineD3DBaseTexture *iface, IUn DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew) { IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - if (This->resource.pool != D3DPOOL_MANAGED) { + if (This->resource.pool != WINED3DPOOL_MANAGED) { return D3DERR_INVALIDCALL; } @@ -169,7 +169,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LO DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) { IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; - if (This->resource.pool != D3DPOOL_MANAGED) { + if (This->resource.pool != WINED3DPOOL_MANAGED) { return D3DERR_INVALIDCALL; } @@ -247,7 +247,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) { glGenTextures(1, &This->baseTexture.textureName); checkGLcall("glGenTextures"); TRACE("Generated texture %d\n", This->baseTexture.textureName); - if (This->resource.pool == D3DPOOL_DEFAULT) { + if (This->resource.pool == WINED3DPOOL_DEFAULT) { /* Tell opengl to try and keep this texture in video ram (well mostly) */ GLclampf tmp; tmp = 0.9f; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ec383139e2a..16eac5fb81e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -90,7 +90,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac object->resource.usage = Usage; \ object->resource.size = _size; \ /* Check that we have enough video ram left */ \ - if (Pool == D3DPOOL_DEFAULT) { \ + if (Pool == WINED3DPOOL_DEFAULT) { \ if (IWineD3DDevice_GetAvailableTextureMem(iface) <= _size) { \ WARN("Out of 'bogus' video memory\n"); \ HeapFree(GetProcessHeap(), 0, object); \ @@ -99,8 +99,8 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac } \ globalChangeGlRam(_size); \ } \ - object->resource.allocatedMemory = (0 == _size ? NULL : Pool == D3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \ - if (object->resource.allocatedMemory == NULL && _size != 0 && Pool != D3DPOOL_DEFAULT) { \ + object->resource.allocatedMemory = (0 == _size ? NULL : Pool == WINED3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size)); \ + if (object->resource.allocatedMemory == NULL && _size != 0 && Pool != WINED3DPOOL_DEFAULT) { \ FIXME("Out of memory!\n"); \ HeapFree(GetProcessHeap(), 0, object); \ *pp##type = NULL; \ @@ -462,7 +462,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetParent(IWineD3DDevice *iface, IUnknown **pP } HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT Size, DWORD Usage, - DWORD FVF, D3DPOOL Pool, IWineD3DVertexBuffer** ppVertexBuffer, HANDLE *sharedHandle, + DWORD FVF, WINED3DPOOL Pool, IWineD3DVertexBuffer** ppVertexBuffer, HANDLE *sharedHandle, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DVertexBufferImpl *object; @@ -470,7 +470,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, WINED3DRTYPE_VERTEXBUFFER, Size) /*TODO: use VBO's */ - if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */ + if (Pool == WINED3DPOOL_DEFAULT ) { /* Allocate some system memory for now */ object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, object->resource.size); } object->fvf = FVF; @@ -482,7 +482,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT } HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT Length, DWORD Usage, - WINED3DFORMAT Format, D3DPOOL Pool, IWineD3DIndexBuffer** ppIndexBuffer, + WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DIndexBuffer** ppIndexBuffer, HANDLE *sharedHandle, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DIndexBufferImpl *object; @@ -492,7 +492,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT D3DCREATERESOURCEOBJECTINSTANCE(object,IndexBuffer,WINED3DRTYPE_INDEXBUFFER, Length) /*TODO: use VBO's */ - if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */ + if (Pool == WINED3DPOOL_DEFAULT ) { /* Allocate some system memory for now */ object->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,object->resource.size); } @@ -636,7 +636,7 @@ If this flag is set, the contents of the depth stencil buffer will be invalid af ******************************** */ -HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Width, UINT Height, WINED3DFORMAT Format, BOOL Lockable, BOOL Discard, UINT Level, IWineD3DSurface **ppSurface,WINED3DRESOURCETYPE Type, DWORD Usage, D3DPOOL 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, IUnknown *parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */ unsigned int pow2Width, pow2Height; @@ -768,28 +768,28 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid /** TODO: change this into a texture transform matrix so that it's processed in hardware **/ - TRACE("Pool %d %d %d %d",Pool, D3DPOOL_DEFAULT, D3DPOOL_MANAGED, D3DPOOL_SYSTEMMEM); + TRACE("Pool %d %d %d %d",Pool, WINED3DPOOL_DEFAULT, WINED3DPOOL_MANAGED, WINED3DPOOL_SYSTEMMEM); /** Quick lockable sanity check TODO: remove this after surfaces, usage and locablility have been debugged properly * this function is too deap to need to care about things like this. * Levels need to be checked too, and possibly Type wince they all affect what can be done. * ****************************************/ switch(Pool) { - case D3DPOOL_SCRATCH: + case WINED3DPOOL_SCRATCH: if(Lockable == FALSE) FIXME("Create suface called with a pool of SCRATCH and a Lockable of FALSE \ which are mutually exclusive, setting lockable to true\n"); Lockable = TRUE; break; - case D3DPOOL_SYSTEMMEM: + case WINED3DPOOL_SYSTEMMEM: if(Lockable == FALSE) FIXME("Create surface called with a pool of SYSTEMMEM and a Lockable of FALSE, \ this is acceptable but unexpected (I can't know how the surface can be usable!)\n"); - case D3DPOOL_MANAGED: + case WINED3DPOOL_MANAGED: if(Usage == WINED3DUSAGE_DYNAMIC) FIXME("Create surface called with a pool of MANAGED and a \ Usage of DYNAMIC which are mutually exclusive, not doing \ anything just telling you.\n"); break; - case D3DPOOL_DEFAULT: /*TODO: Create offscreen plain can cause this check to fail..., find out if it should */ + case WINED3DPOOL_DEFAULT: /*TODO: Create offscreen plain can cause this check to fail..., find out if it should */ if(!(Usage & WINED3DUSAGE_DYNAMIC) && !(Usage & WINED3DUSAGE_RENDERTARGET) && !(Usage && WINED3DUSAGE_DEPTHSTENCIL ) && Lockable == TRUE) FIXME("Creating a surface with a POOL of DEFAULT with Locable true, that doesn't specify DYNAMIC usage.\n"); @@ -799,7 +799,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid break; }; - if (Usage & WINED3DUSAGE_RENDERTARGET && Pool != D3DPOOL_DEFAULT) { + if (Usage & WINED3DUSAGE_RENDERTARGET && Pool != WINED3DPOOL_DEFAULT) { FIXME("Trying to create a render target that isn't in the default pool\n"); } @@ -817,7 +817,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid } HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Width, UINT Height, UINT Levels, - DWORD Usage, WINED3DFORMAT Format, D3DPOOL Pool, + DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DTexture** ppTexture, HANDLE* pSharedHandle, IUnknown *parent, D3DCB_CREATESURFACEFN D3DCB_CreateSurface) { @@ -906,7 +906,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, - WINED3DFORMAT Format, D3DPOOL Pool, + WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DVolumeTexture **ppVolumeTexture, HANDLE *pSharedHandle, IUnknown *parent, D3DCB_CREATEVOLUMEFN D3DCB_CreateVolume) { @@ -978,7 +978,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface, HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface, UINT Width, UINT Height, UINT Depth, DWORD Usage, - WINED3DFORMAT Format, D3DPOOL Pool, + WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DVolume** ppVolume, HANDLE* pSharedHandle, IUnknown *parent) { @@ -1006,7 +1006,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface, HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT EdgeLength, UINT Levels, DWORD Usage, - WINED3DFORMAT Format, D3DPOOL Pool, + WINED3DFORMAT Format, WINED3DPOOL Pool, IWineD3DCubeTexture **ppCubeTexture, HANDLE *pSharedHandle, IUnknown *parent, D3DCB_CREATESURFACEFN D3DCB_CreateSurface) { @@ -4678,11 +4678,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD Stage, } if(pTexture != NULL) { - /* SetTexture isn't allowed on textures in D3DPOOL_SCRATCH; The same is - * the case for D3DPOOL_SYSTEMMEM textures unless WINED3DDEVCAPS_TEXTURESYSTEMMORY is set. + /* SetTexture isn't allowed on textures in WINED3DPOOL_SCRATCH; The same is + * the case for WINED3DPOOL_SYSTEMMEM textures unless WINED3DDEVCAPS_TEXTURESYSTEMMORY is set. * We don't check the caps as GetDeviceCaps is inefficient and we don't set the cap anyway. */ - if(((IWineD3DTextureImpl*)pTexture)->resource.pool == D3DPOOL_SCRATCH || ((IWineD3DTextureImpl*)pTexture)->resource.pool == D3DPOOL_SYSTEMMEM) { + if(((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SCRATCH || ((IWineD3DTextureImpl*)pTexture)->resource.pool == WINED3DPOOL_SYSTEMMEM) { WARN("(%p) Attempt to set scratch texture rejected\n", pTexture); return D3DERR_INVALIDCALL; } @@ -5503,7 +5503,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3 WINED3DFORMAT destFormat, srcFormat; UINT destSize; int destLeft, destTop; - D3DPOOL srcPool, destPool; + WINED3DPOOL srcPool, destPool; int offset = 0; int rowoffset = 0; /* how many bytes to add onto the end of a row to wraparound to the beginning of the next */ glDescriptor *glDescription = NULL; @@ -5529,7 +5529,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, IWineD3 IWineD3DSurface_GetDesc(pDestinationSurface, &winedesc); - if(srcPool != D3DPOOL_SYSTEMMEM || destPool != D3DPOOL_DEFAULT){ + if(srcPool != WINED3DPOOL_SYSTEMMEM || destPool != WINED3DPOOL_DEFAULT){ WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning D3DERR_INVALIDCALL\n", pSourceSurface, pDestinationSurface); return D3DERR_INVALIDCALL; } @@ -5706,7 +5706,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface, pSourceSurface, pSourceRectsArray, cRects, pDestinationSurface, pDestPointsArray); - /* Check that the source texture is in D3DPOOL_SYSTEMMEM and the destination texture is in D3DPOOL_DEFAULT */ + /* Check that the source texture is in WINED3DPOOL_SYSTEMMEM and the destination texture is in WINED3DPOOL_DEFAULT */ memset(&winedesc, 0, sizeof(winedesc)); winedesc.Format = &srcFormat; @@ -5847,8 +5847,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurfa DWORD *data; TRACE("(%p) Colour fill Surface: %p rect: %p color: %ld\n", This, pSurface, pRect, color); - if (surface->resource.pool != D3DPOOL_DEFAULT) { - FIXME("call to colorfill with non D3DPOOL_DEFAULT surface\n"); + if (surface->resource.pool != WINED3DPOOL_DEFAULT) { + FIXME("call to colorfill with non WINED3DPOOL_DEFAULT surface\n"); return D3DERR_INVALIDCALL; } @@ -6501,7 +6501,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_TestCooperativeLevel(IWineD3DDevice* iface) { ResourceList *resourceList = This->resources; while (NULL != resourceList) { - if (((IWineD3DResourceImpl *)resourceList->resource)->resource.pool == D3DPOOL_DEFAULT /* TODO: IWineD3DResource_GetPool(resourceList->resource)*/) + if (((IWineD3DResourceImpl *)resourceList->resource)->resource.pool == WINED3DPOOL_DEFAULT /* TODO: IWineD3DResource_GetPool(resourceList->resource)*/) return D3DERR_DEVICENOTRESET; resourceList = resourceList->next; } diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 17ae3a29449..56efcb7b6b7 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -64,7 +64,7 @@ ULONG WINAPI IWineD3DResourceImpl_Release(IWineD3DResource *iface) { void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface){ IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; TRACE("(%p) Cleaning up resource\n", This); - if (This->resource.pool == D3DPOOL_DEFAULT) { + if (This->resource.pool == WINED3DPOOL_DEFAULT) { TRACE("Decrementing device memory pool by %u\n", This->resource.size); globalChangeGlRam(-This->resource.size); } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 18c43964c83..b68c82eaeea 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -143,7 +143,7 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) { FIXME("Mipmap surface has a glTexture bound to it!\n"); } } - if (This->resource.pool == D3DPOOL_DEFAULT) { + if (This->resource.pool == WINED3DPOOL_DEFAULT) { /* Tell opengl to try and keep this texture in video ram (well mostly) */ GLclampf tmp; tmp = 0.9f; @@ -258,7 +258,7 @@ void WINAPI IWineD3DSurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor * const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; /* This should only be called for sysmem textures, it may be a good idea to extend this to all pools at some point in the futture */ - if (This->resource.pool != D3DPOOL_SYSTEMMEM) { + if (This->resource.pool != WINED3DPOOL_SYSTEMMEM) { FIXME(" (%p)Attempting to get system memory for a non-system memory texture\n", iface); } return (CONST void*)(This->resource.allocatedMemory); @@ -951,7 +951,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface) { * In general never store scratch or system mem textures in the video ram. However it is allowed * for system memory textures when WINED3DDEVCAPS_TEXTURESYSTEMMEMORY is set but it isn't right now. */ - if (This->resource.pool == D3DPOOL_SCRATCH || This->resource.pool == D3DPOOL_SYSTEMMEM) + if (This->resource.pool == WINED3DPOOL_SCRATCH || This->resource.pool == WINED3DPOOL_SYSTEMMEM) { FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This); return D3DERR_INVALIDCALL; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 34f1138d336..fab8559beeb 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -338,16 +338,16 @@ const char* debug_d3dtexturestate(DWORD state) { } } -const char* debug_d3dpool(D3DPOOL Pool) { +const char* debug_d3dpool(WINED3DPOOL Pool) { switch (Pool) { #define POOL_TO_STR(p) case p: return #p; - POOL_TO_STR(D3DPOOL_DEFAULT); - POOL_TO_STR(D3DPOOL_MANAGED); - POOL_TO_STR(D3DPOOL_SYSTEMMEM); - POOL_TO_STR(D3DPOOL_SCRATCH); + POOL_TO_STR(WINED3DPOOL_DEFAULT); + POOL_TO_STR(WINED3DPOOL_MANAGED); + POOL_TO_STR(WINED3DPOOL_SYSTEMMEM); + POOL_TO_STR(WINED3DPOOL_SCRATCH); #undef POOL_TO_STR default: - FIXME("Unrecognized %u D3DPOOL!\n", Pool); + FIXME("Unrecognized %u WINED3DPOOL!\n", Pool); return "unrecognized"; } } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 66bf32ba5b0..86a10024813 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -602,7 +602,7 @@ typedef struct IWineD3DResourceClass IUnknown *parent; WINED3DRESOURCETYPE resourceType; IWineD3DDeviceImpl *wineD3DDevice; - D3DPOOL pool; + WINED3DPOOL pool; UINT size; DWORD usage; WINED3DFORMAT format; @@ -1075,7 +1075,7 @@ const char* debug_d3dusage(DWORD usage); const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType); const char* debug_d3drenderstate(DWORD state); const char* debug_d3dtexturestate(DWORD state); -const char* debug_d3dpool(D3DPOOL pool); +const char* debug_d3dpool(WINED3DPOOL pool); /* Routines for GL <-> D3D values */ GLenum StencilOp(DWORD op); diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 95af575f01d..2921da5e30f 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -175,7 +175,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATESURFACEFN) (IUnknown *pDevice, UINT Height, WINED3DFORMAT Format, DWORD Usage, - D3DPOOL Pool, + WINED3DPOOL Pool, UINT Level, struct IWineD3DSurface **ppSurface, HANDLE *pSharedHandle); @@ -196,7 +196,7 @@ typedef HRESULT WINAPI (*D3DCB_CREATEVOLUMEFN) (IUnknown *pDevice, UINT Height, UINT Depth, WINED3DFORMAT Format, - D3DPOOL Pool, + WINED3DPOOL Pool, DWORD Usage, struct IWineD3DVolume **ppVolume, HANDLE *pSharedHandle); @@ -303,14 +303,14 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase) /*** IWineD3DBase methods ***/ STDMETHOD(GetParent)(THIS_ IUnknown **pParent) PURE; /*** IWineD3DDevice methods ***/ - STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,struct IWineD3DVertexBuffer **ppVertexBuffer, HANDLE *sharedHandle, IUnknown *parent) PURE; - STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, WINED3DFORMAT Format, D3DPOOL Pool, struct IWineD3DIndexBuffer** ppIndexBuffer, HANDLE* pSharedHandle, IUnknown *parent) PURE; + 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, D3DPOOL Pool, WINED3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, IUnknown *parent) PURE; - STDMETHOD(CreateTexture)(THIS_ UINT Width, UINT Height, UINT Levels, DWORD Usage, WINED3DFORMAT Format, D3DPOOL 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, D3DPOOL 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, D3DPOOL Pool, struct IWineD3DVolume** ppVolumeTexture, HANDLE* pSharedHandle, IUnknown *parent) PURE; - STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength, UINT Levels, DWORD Usage, WINED3DFORMAT Format, D3DPOOL Pool, struct IWineD3DCubeTexture** ppCubeTexture, HANDLE* pSharedHandle, IUnknown *parent, D3DCB_CREATESURFACEFN pFn) 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(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; + STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength, UINT Levels, DWORD Usage, WINED3DFORMAT Format, WINED3DPOOL Pool, struct IWineD3DCubeTexture** ppCubeTexture, HANDLE* pSharedHandle, IUnknown *parent, D3DCB_CREATESURFACEFN pFn) PURE; STDMETHOD(CreateQuery)(THIS_ WINED3DQUERYTYPE Type, struct IWineD3DQuery **ppQuery, IUnknown *pParent); STDMETHOD(CreateAdditionalSwapChain)(THIS_ WINED3DPRESENT_PARAMETERS *pPresentationParameters, struct IWineD3DSwapChain **pSwapChain, IUnknown *pParent, D3DCB_CREATERENDERTARGETFN pFn, D3DCB_CREATEDEPTHSTENCILSURFACEFN pFn2); STDMETHOD(CreateVertexDeclaration)(THIS_ CONST VOID* pDeclaration, struct IWineD3DVertexDeclaration** ppDecl, IUnknown* pParent) PURE; diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index d38da27849f..08e68ba7d7b 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -503,12 +503,21 @@ typedef enum _WINED3DRESOURCETYPE { #define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1) +typedef enum _WINED3DPOOL { + WINED3DPOOL_DEFAULT = 0, + WINED3DPOOL_MANAGED = 1, + WINED3DPOOL_SYSTEMMEM = 2, + WINED3DPOOL_SCRATCH = 3, + + WINED3DPOOL_FORCE_DWORD = 0x7fffffff +} WINED3DPOOL; + typedef struct _WINED3DSURFACE_DESC { WINED3DFORMAT *Format; WINED3DRESOURCETYPE *Type; DWORD *Usage; - D3DPOOL *Pool; + WINED3DPOOL *Pool; UINT *Size; WINED3DMULTISAMPLE_TYPE *MultiSampleType; @@ -522,7 +531,7 @@ typedef struct _WINED3DVOLUME_DESC WINED3DFORMAT *Format; WINED3DRESOURCETYPE *Type; DWORD *Usage; - D3DPOOL *Pool; + WINED3DPOOL *Pool; UINT *Size; UINT *Width; @@ -643,7 +652,7 @@ typedef struct _WINED3DVERTEXBUFFER_DESC { WINED3DFORMAT Format; WINED3DRESOURCETYPE Type; DWORD Usage; - D3DPOOL Pool; + WINED3DPOOL Pool; UINT Size; DWORD FVF; } WINED3DVERTEXBUFFER_DESC; @@ -652,7 +661,7 @@ typedef struct _WINED3DINDEXBUFFER_DESC { WINED3DFORMAT Format; WINED3DRESOURCETYPE Type; DWORD Usage; - D3DPOOL Pool; + WINED3DPOOL Pool; UINT Size; } WINED3DINDEXBUFFER_DESC;