Commit d75fd75d authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Add WINED3DPOOL to wined3d_types.h.

parent 8358c63e
......@@ -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 */
......
......@@ -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);
......
......@@ -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");
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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){
......
......@@ -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);
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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)) {
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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";
}
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment