wined3d: Consistently use WINED3DRESOURCETYPE.

This commit is contained in:
Stefan Dösinger 2006-03-09 23:21:16 +01:00 committed by Alexandre Julliard
parent 29212d8afd
commit 913df5b143
27 changed files with 88 additions and 88 deletions

View File

@ -140,7 +140,7 @@ HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 ifa
/* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -162,7 +162,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFAC
/* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */
memset(&wined3ddesc, 0, sizeof(wined3ddesc)); memset(&wined3ddesc, 0, sizeof(wined3ddesc));
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -141,7 +141,7 @@ HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT
/* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */
memset(&wined3ddesc, 0, sizeof(wined3ddesc)); memset(&wined3ddesc, 0, sizeof(wined3ddesc));
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; /* required for d3d8 */ wined3ddesc.Size = &tmpInt; /* required for d3d8 */

View File

@ -138,7 +138,7 @@ HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_D
/* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -140,7 +140,7 @@ HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8
/* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d8 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -161,7 +161,7 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE9 ifa
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *) &pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -181,7 +181,7 @@ HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(LPDIRECT3DSURFACE9 iface, D3DSURFAC
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -160,7 +160,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(LPDIRECT3DTEXTURE9 iface, UINT
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; /* required for d3d8 */ wined3ddesc.Size = &tmpInt; /* required for d3d8 */

View File

@ -158,7 +158,7 @@ HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(LPDIRECT3DVOLUME9 iface, D3DVOLUME_D
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -159,7 +159,7 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE9
/* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */ /* As d3d8 and d3d9 structures differ, pass in ptrs to where data needs to go */
wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format; wined3ddesc.Format = (WINED3DFORMAT *)&pDesc->Format;
wined3ddesc.Type = &pDesc->Type; wined3ddesc.Type = (WINED3DRESOURCETYPE *)&pDesc->Type;
wined3ddesc.Usage = &pDesc->Usage; wined3ddesc.Usage = &pDesc->Usage;
wined3ddesc.Pool = &pDesc->Pool; wined3ddesc.Pool = &pDesc->Pool;
wined3ddesc.Size = &tmpInt; wined3ddesc.Size = &tmpInt;

View File

@ -136,7 +136,7 @@ void WINAPI IWineD3DBaseTextureImpl_PreLoad(IWineD3DBaseTexture *ifac
return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface); return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface);
} }
D3DRESOURCETYPE WINAPI IWineD3DBaseTextureImpl_GetType(IWineD3DBaseTexture *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DBaseTextureImpl_GetType(IWineD3DBaseTexture *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -157,7 +157,7 @@ void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
return ; return ;
} }
D3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -467,7 +467,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *iface, UINT
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DVertexBufferImpl *object; IWineD3DVertexBufferImpl *object;
WINED3DFORMAT Format = WINED3DFMT_VERTEXDATA; /* Dummy format for now */ WINED3DFORMAT Format = WINED3DFMT_VERTEXDATA; /* Dummy format for now */
D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, D3DRTYPE_VERTEXBUFFER, Size) D3DCREATERESOURCEOBJECTINSTANCE(object, VertexBuffer, WINED3DRTYPE_VERTEXBUFFER, Size)
/*TODO: use VBO's */ /*TODO: use VBO's */
if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */ if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */
@ -489,7 +489,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface, UINT
TRACE("(%p) Creating index buffer\n", This); TRACE("(%p) Creating index buffer\n", This);
/* Allocate the storage for the device */ /* Allocate the storage for the device */
D3DCREATERESOURCEOBJECTINSTANCE(object,IndexBuffer,D3DRTYPE_INDEXBUFFER, Length) D3DCREATERESOURCEOBJECTINSTANCE(object,IndexBuffer,WINED3DRTYPE_INDEXBUFFER, Length)
/*TODO: use VBO's */ /*TODO: use VBO's */
if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */ if (Pool == D3DPOOL_DEFAULT ) { /* Allocate some system memory for now */
@ -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,D3DRESOURCETYPE Type, DWORD Usage, D3DPOOL Pool, D3DMULTISAMPLE_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, D3DPOOL Pool, D3DMULTISAMPLE_TYPE MultiSample ,DWORD MultisampleQuality, HANDLE* pSharedHandle, IUnknown *parent) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */ IWineD3DSurfaceImpl *object; /*NOTE: impl ref allowed since this is a create function */
unsigned int pow2Width, pow2Height; unsigned int pow2Width, pow2Height;
@ -727,7 +727,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
} }
/** Create and initialise the surface resource **/ /** Create and initialise the surface resource **/
D3DCREATERESOURCEOBJECTINSTANCE(object,Surface,D3DRTYPE_SURFACE, Size) D3DCREATERESOURCEOBJECTINSTANCE(object,Surface,WINED3DRTYPE_SURFACE, Size)
/* "Standalone" surface */ /* "Standalone" surface */
IWineD3DSurface_SetContainer((IWineD3DSurface *)object, NULL); IWineD3DSurface_SetContainer((IWineD3DSurface *)object, NULL);
@ -840,7 +840,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, UINT Wid
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, D3DRTYPE_TEXTURE, 0); D3DCREATERESOURCEOBJECTINSTANCE(object, Texture, WINED3DRTYPE_TEXTURE, 0);
D3DINITIALIZEBASETEXTURE(object->baseTexture); D3DINITIALIZEBASETEXTURE(object->baseTexture);
object->width = Width; object->width = Width;
object->height = Height; object->height = Height;
@ -925,7 +925,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, D3DRTYPE_VOLUMETEXTURE, 0); D3DCREATERESOURCEOBJECTINSTANCE(object, VolumeTexture, WINED3DRTYPE_VOLUMETEXTURE, 0);
D3DINITIALIZEBASETEXTURE(object->baseTexture); D3DINITIALIZEBASETEXTURE(object->baseTexture);
TRACE("(%p) : W(%d) H(%d) D(%d), Lvl(%d) Usage(%ld), Fmt(%u,%s), Pool(%s)\n", This, Width, Height, TRACE("(%p) : W(%d) H(%d) D(%d), Lvl(%d) Usage(%ld), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
@ -985,7 +985,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DVolumeImpl *object; /** NOTE: impl ref allowed since this is a create function **/ IWineD3DVolumeImpl *object; /** NOTE: impl ref allowed since this is a create function **/
D3DCREATERESOURCEOBJECTINSTANCE(object, Volume, D3DRTYPE_VOLUME, ((Width * D3DFmtGetBpp(This, Format)) * Height * Depth)) D3DCREATERESOURCEOBJECTINSTANCE(object, Volume, WINED3DRTYPE_VOLUME, ((Width * D3DFmtGetBpp(This, Format)) * Height * Depth))
TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%ld), Fmt(%u,%s), Pool(%s)\n", This, Width, Height, TRACE("(%p) : W(%d) H(%d) D(%d), Usage(%ld), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
Depth, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool)); Depth, Usage, Format, debug_d3dformat(Format), debug_d3dpool(Pool));
@ -1025,7 +1025,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
D3DCREATERESOURCEOBJECTINSTANCE(object, CubeTexture, D3DRTYPE_CUBETEXTURE, 0); D3DCREATERESOURCEOBJECTINSTANCE(object, CubeTexture, WINED3DRTYPE_CUBETEXTURE, 0);
D3DINITIALIZEBASETEXTURE(object->baseTexture); D3DINITIALIZEBASETEXTURE(object->baseTexture);
TRACE("(%p) Create Cube Texture\n", This); TRACE("(%p) Create Cube Texture\n", This);
@ -5120,8 +5120,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *iface,
HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3DBaseTexture *pSourceTexture, IWineD3DBaseTexture *pDestinationTexture){ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3DBaseTexture *pSourceTexture, IWineD3DBaseTexture *pDestinationTexture){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
HRESULT hr = D3D_OK; HRESULT hr = D3D_OK;
D3DRESOURCETYPE sourceType; WINED3DRESOURCETYPE sourceType;
D3DRESOURCETYPE destinationType; WINED3DRESOURCETYPE destinationType;
int i ,levels; int i ,levels;
/* TODO: think about moving the code into IWineD3DBaseTexture */ /* TODO: think about moving the code into IWineD3DBaseTexture */
@ -5165,7 +5165,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D
levels = IWineD3DBaseTexture_GetLevelCount(pDestinationTexture); levels = IWineD3DBaseTexture_GetLevelCount(pDestinationTexture);
switch (sourceType) { switch (sourceType) {
case D3DRTYPE_TEXTURE: case WINED3DRTYPE_TEXTURE:
{ {
IWineD3DSurface *srcSurface; IWineD3DSurface *srcSurface;
IWineD3DSurface *destSurface; IWineD3DSurface *destSurface;
@ -5183,7 +5183,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D
} }
} }
break; break;
case D3DRTYPE_CUBETEXTURE: case WINED3DRTYPE_CUBETEXTURE:
{ {
IWineD3DSurface *srcSurface; IWineD3DSurface *srcSurface;
IWineD3DSurface *destSurface; IWineD3DSurface *destSurface;
@ -5216,7 +5216,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_UpdateTexture (IWineD3DDevice *iface, IWineD3D
} }
break; break;
#if 0 /* TODO: Add support for volume textures */ #if 0 /* TODO: Add support for volume textures */
case D3DRTYPE_VOLUMETEXTURE: case WINED3DRTYPE_VOLUMETEXTURE:
{ {
IWineD3DVolume srcVolume = NULL; IWineD3DVolume srcVolume = NULL;
IWineD3DSurface destVolume = NULL; IWineD3DSurface destVolume = NULL;
@ -6643,12 +6643,12 @@ void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IWineD3DR
TRACE("(%p) : resource %p\n", This, resource); TRACE("(%p) : resource %p\n", This, resource);
switch(IWineD3DResource_GetType(resource)){ switch(IWineD3DResource_GetType(resource)){
case D3DRTYPE_SURFACE: case WINED3DRTYPE_SURFACE:
/* TODO: check front and back buffers, rendertargets etc.. possibly swapchains? */ /* TODO: check front and back buffers, rendertargets etc.. possibly swapchains? */
break; break;
case D3DRTYPE_TEXTURE: case WINED3DRTYPE_TEXTURE:
case D3DRTYPE_CUBETEXTURE: case WINED3DRTYPE_CUBETEXTURE:
case D3DRTYPE_VOLUMETEXTURE: case WINED3DRTYPE_VOLUMETEXTURE:
for (counter = 0; counter < GL_LIMITS(textures); counter++) { for (counter = 0; counter < GL_LIMITS(textures); counter++) {
if (This->stateBlock != NULL && This->stateBlock->textures[counter] == (IWineD3DBaseTexture *)resource) { if (This->stateBlock != NULL && This->stateBlock->textures[counter] == (IWineD3DBaseTexture *)resource) {
WARN("Texture being released is still by a stateblock, Stage = %u Texture = %p\n", counter, resource); WARN("Texture being released is still by a stateblock, Stage = %u Texture = %p\n", counter, resource);
@ -6662,10 +6662,10 @@ void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IWineD3DR
} }
} }
break; break;
case D3DRTYPE_VOLUME: case WINED3DRTYPE_VOLUME:
/* TODO: nothing really? */ /* TODO: nothing really? */
break; break;
case D3DRTYPE_VERTEXBUFFER: case WINED3DRTYPE_VERTEXBUFFER:
/* MSDN: When an application no longer holds a references to this interface, the interface will automatically be freed. */ /* MSDN: When an application no longer holds a references to this interface, the interface will automatically be freed. */
{ {
int streamNumber; int streamNumber;
@ -6697,7 +6697,7 @@ void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IWineD3DR
} }
} }
break; break;
case D3DRTYPE_INDEXBUFFER: case WINED3DRTYPE_INDEXBUFFER:
/* MSDN: When an application no longer holds a references to this interface, the interface will automatically be freed.*/ /* MSDN: When an application no longer holds a references to this interface, the interface will automatically be freed.*/
if (This->updateStateBlock != NULL ) { /* ==NULL when device is being destroyed */ if (This->updateStateBlock != NULL ) { /* ==NULL when device is being destroyed */
if (This->updateStateBlock->pIndexData == (IWineD3DIndexBuffer *)resource) { if (This->updateStateBlock->pIndexData == (IWineD3DIndexBuffer *)resource) {

View File

@ -1327,7 +1327,7 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter, D3DDE
} }
HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, D3DDEVTYPE DeviceType, HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, D3DDEVTYPE DeviceType,
WINED3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat) { WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat) {
IWineD3DImpl *This = (IWineD3DImpl *)iface; IWineD3DImpl *This = (IWineD3DImpl *)iface;
TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%lu,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s)) ", TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%u,%s), AdptFmt:(%u,%s), Use:(%lu,%s), ResTyp:(%x,%s), CheckFmt:(%u,%s)) ",
This, This,

View File

@ -1646,9 +1646,9 @@ void drawStridedSoftwareVS(IWineD3DDevice *iface, Direct3DVertexStridedData *sd,
numcoords[textureNo] = This->stateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] & ~D3DTTFF_PROJECTED; numcoords[textureNo] = This->stateBlock->texture_state[textureNo][D3DTSS_TEXTURETRANSFORMFLAGS] & ~D3DTTFF_PROJECTED;
} else { } else {
switch (IDirect3DBaseTexture8Impl_GetType((LPDIRECT3DBASETEXTURE8) This->stateBlock->textures[textureNo])) { switch (IDirect3DBaseTexture8Impl_GetType((LPDIRECT3DBASETEXTURE8) This->stateBlock->textures[textureNo])) {
case D3DRTYPE_TEXTURE: numcoords[textureNo] = 2; break; case WINED3DRTYPE_TEXTURE: numcoords[textureNo] = 2; break;
case D3DRTYPE_VOLUMETEXTURE: numcoords[textureNo] = 3; break; case WINED3DRTYPE_VOLUMETEXTURE: numcoords[textureNo] = 3; break;
default: numcoords[textureNo] = 4; default: numcoords[textureNo] = 4;
} }
} }
} else { } else {
@ -2197,7 +2197,7 @@ void drawPrimitive(IWineD3DDevice *iface,
if (This->stateBlock->textures[textureNo] != NULL) { if (This->stateBlock->textures[textureNo] != NULL) {
sprintf(buffer, "/tmp/texture_%p_%ld_%d.tga", This->stateBlock->textures[textureNo], primCounter, textureNo); sprintf(buffer, "/tmp/texture_%p_%ld_%d.tga", This->stateBlock->textures[textureNo], primCounter, textureNo);
TRACE("Saving texture %s\n", buffer); TRACE("Saving texture %s\n", buffer);
if (IWineD3DBaseTexture_GetType(This->stateBlock->textures[textureNo]) == D3DRTYPE_TEXTURE) { if (IWineD3DBaseTexture_GetType(This->stateBlock->textures[textureNo]) == WINED3DRTYPE_TEXTURE) {
IWineD3DTexture_GetSurfaceLevel((IWineD3DTexture *)This->stateBlock->textures[textureNo], 0, &pSur); IWineD3DTexture_GetSurfaceLevel((IWineD3DTexture *)This->stateBlock->textures[textureNo], 0, &pSur);
IWineD3DSurface_SaveSnapshot(pSur, buffer); IWineD3DSurface_SaveSnapshot(pSur, buffer);
IWineD3DSurface_Release(pSur); IWineD3DSurface_Release(pSur);

View File

@ -94,7 +94,7 @@ void WINAPI IWineD3DIndexBufferImpl_PreLoad(IWineD3DIndexBuffer *ifac
return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface); return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface);
} }
D3DRESOURCETYPE WINAPI IWineD3DIndexBufferImpl_GetType(IWineD3DIndexBuffer *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DIndexBufferImpl_GetType(IWineD3DIndexBuffer *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -114,7 +114,7 @@ HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWOR
{ {
WINED3DDEVINFO_RESOURCEMANAGER *data = (WINED3DDEVINFO_RESOURCEMANAGER *)pData; WINED3DDEVINFO_RESOURCEMANAGER *data = (WINED3DDEVINFO_RESOURCEMANAGER *)pData;
int i; int i;
for(i = 0; i < D3DRTYPECOUNT; i++){ for(i = 0; i < WINED3DRTYPECOUNT; i++){
/*I'm setting the default values to 1 so as to reduce the risk of a div/0 in the caller*/ /*I'm setting the default values to 1 so as to reduce the risk of a div/0 in the caller*/
/* isTextureResident could be used to get some of this infomration */ /* isTextureResident could be used to get some of this infomration */
data->stats[i].bThrashing = FALSE; data->stats[i].bThrashing = FALSE;

View File

@ -215,7 +215,7 @@ void WINAPI IWineD3DResourceImpl_PreLoad(IWineD3DResource *iface) {
FIXME("(%p) : stub\n", This); FIXME("(%p) : stub\n", This);
} }
D3DRESOURCETYPE WINAPI IWineD3DResourceImpl_GetType(IWineD3DResource *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DResourceImpl_GetType(IWineD3DResource *iface) {
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
TRACE("(%p) : returning %d\n", This, This->resource.resourceType); TRACE("(%p) : returning %d\n", This, This->resource.resourceType);
return This->resource.resourceType; return This->resource.resourceType;

View File

@ -159,7 +159,7 @@ void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
return; return;
} }
D3DRESOURCETYPE WINAPI IWineD3DSurfaceImpl_GetType(IWineD3DSurface *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DSurfaceImpl_GetType(IWineD3DSurface *iface) {
TRACE("(%p) : calling resourceimpl_GetType\n", iface); TRACE("(%p) : calling resourceimpl_GetType\n", iface);
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -141,7 +141,7 @@ void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) {
return ; return ;
} }
D3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -130,19 +130,19 @@ const char* debug_d3dusage(DWORD usage) {
} }
} }
const char* debug_d3dresourcetype(D3DRESOURCETYPE res) { const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res) {
switch (res) { switch (res) {
#define RES_TO_STR(res) case res: return #res; #define RES_TO_STR(res) case res: return #res;
RES_TO_STR(D3DRTYPE_SURFACE); RES_TO_STR(WINED3DRTYPE_SURFACE);
RES_TO_STR(D3DRTYPE_VOLUME); RES_TO_STR(WINED3DRTYPE_VOLUME);
RES_TO_STR(D3DRTYPE_TEXTURE); RES_TO_STR(WINED3DRTYPE_TEXTURE);
RES_TO_STR(D3DRTYPE_VOLUMETEXTURE); RES_TO_STR(WINED3DRTYPE_VOLUMETEXTURE);
RES_TO_STR(D3DRTYPE_CUBETEXTURE); RES_TO_STR(WINED3DRTYPE_CUBETEXTURE);
RES_TO_STR(D3DRTYPE_VERTEXBUFFER); RES_TO_STR(WINED3DRTYPE_VERTEXBUFFER);
RES_TO_STR(D3DRTYPE_INDEXBUFFER); RES_TO_STR(WINED3DRTYPE_INDEXBUFFER);
#undef RES_TO_STR #undef RES_TO_STR
default: default:
FIXME("Unrecognized %u D3DRESOURCETYPE!\n", res); FIXME("Unrecognized %u WINED3DRESOURCETYPE!\n", res);
return "unrecognized"; return "unrecognized";
} }
} }

View File

@ -93,7 +93,7 @@ void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface); return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface);
} }
D3DRESOURCETYPE WINAPI IWineD3DVertexBufferImpl_GetType(IWineD3DVertexBuffer *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DVertexBufferImpl_GetType(IWineD3DVertexBuffer *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -96,7 +96,7 @@ void WINAPI IWineD3DVolumeImpl_PreLoad(IWineD3DVolume *iface) {
return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface); return IWineD3DResourceImpl_PreLoad((IWineD3DResource *)iface);
} }
D3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DVolumeImpl_GetType(IWineD3DVolume *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }
@ -204,9 +204,9 @@ HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, D3DLOCKED_BOX*
if (NULL != This->container) { if (NULL != This->container) {
IWineD3DVolumeTexture *cont = (IWineD3DVolumeTexture*) This->container; IWineD3DVolumeTexture *cont = (IWineD3DVolumeTexture*) This->container;
D3DRESOURCETYPE containerType = IWineD3DBaseTexture_GetType((IWineD3DBaseTexture *) cont); WINED3DRESOURCETYPE containerType = IWineD3DBaseTexture_GetType((IWineD3DBaseTexture *) cont);
if (containerType == D3DRTYPE_VOLUMETEXTURE) { if (containerType == WINED3DRTYPE_VOLUMETEXTURE) {
IWineD3DBaseTextureImpl* pTexture = (IWineD3DBaseTextureImpl*) cont; IWineD3DBaseTextureImpl* pTexture = (IWineD3DBaseTextureImpl*) cont;
pTexture->baseTexture.dirty = TRUE; pTexture->baseTexture.dirty = TRUE;
} else { } else {

View File

@ -132,7 +132,7 @@ void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *iface) {
return ; return ;
} }
D3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) { WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) {
return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface); return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
} }

View File

@ -592,7 +592,7 @@ typedef struct IWineD3DResourceClass
/* WineD3DResource Information */ /* WineD3DResource Information */
IUnknown *parent; IUnknown *parent;
D3DRESOURCETYPE resourceType; WINED3DRESOURCETYPE resourceType;
IWineD3DDeviceImpl *wineD3DDevice; IWineD3DDeviceImpl *wineD3DDevice;
D3DPOOL pool; D3DPOOL pool;
UINT size; UINT size;
@ -1062,7 +1062,7 @@ extern IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl;
/* Trace routines */ /* Trace routines */
const char* debug_d3dformat(WINED3DFORMAT fmt); const char* debug_d3dformat(WINED3DFORMAT fmt);
const char* debug_d3ddevicetype(D3DDEVTYPE devtype); const char* debug_d3ddevicetype(D3DDEVTYPE devtype);
const char* debug_d3dresourcetype(D3DRESOURCETYPE res); const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res);
const char* debug_d3dusage(DWORD usage); const char* debug_d3dusage(DWORD usage);
const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType); const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType);
const char* debug_d3drenderstate(DWORD state); const char* debug_d3drenderstate(DWORD state);
@ -1101,7 +1101,7 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
extern DWORD WINAPI IWineD3DResourceImpl_SetPriority(IWineD3DResource *iface, DWORD PriorityNew); extern DWORD WINAPI IWineD3DResourceImpl_SetPriority(IWineD3DResource *iface, DWORD PriorityNew);
extern DWORD WINAPI IWineD3DResourceImpl_GetPriority(IWineD3DResource *iface); extern DWORD WINAPI IWineD3DResourceImpl_GetPriority(IWineD3DResource *iface);
extern void WINAPI IWineD3DResourceImpl_PreLoad(IWineD3DResource *iface); extern void WINAPI IWineD3DResourceImpl_PreLoad(IWineD3DResource *iface);
extern D3DRESOURCETYPE WINAPI IWineD3DResourceImpl_GetType(IWineD3DResource *iface); extern WINED3DRESOURCETYPE WINAPI IWineD3DResourceImpl_GetType(IWineD3DResource *iface);
/*** class static members ***/ /*** class static members ***/
void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface); void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface);
@ -1118,7 +1118,7 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
extern DWORD WINAPI IWineD3DBaseTextureImpl_SetPriority(IWineD3DBaseTexture *iface, DWORD PriorityNew); extern DWORD WINAPI IWineD3DBaseTextureImpl_SetPriority(IWineD3DBaseTexture *iface, DWORD PriorityNew);
extern DWORD WINAPI IWineD3DBaseTextureImpl_GetPriority(IWineD3DBaseTexture *iface); extern DWORD WINAPI IWineD3DBaseTextureImpl_GetPriority(IWineD3DBaseTexture *iface);
extern void WINAPI IWineD3DBaseTextureImpl_PreLoad(IWineD3DBaseTexture *iface); extern void WINAPI IWineD3DBaseTextureImpl_PreLoad(IWineD3DBaseTexture *iface);
extern D3DRESOURCETYPE WINAPI IWineD3DBaseTextureImpl_GetType(IWineD3DBaseTexture *iface); extern WINED3DRESOURCETYPE WINAPI IWineD3DBaseTextureImpl_GetType(IWineD3DBaseTexture *iface);
/*** IWineD3DBaseTexture methods ***/ /*** IWineD3DBaseTexture methods ***/
extern DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew); extern DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew);
extern DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface); extern DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface);

View File

@ -255,7 +255,7 @@ DECLARE_INTERFACE_(IWineD3D, IWineD3DBase)
STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQuality) PURE; STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT SurfaceFormat, BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQuality) PURE;
STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT AdapterFormat, WINED3DFORMAT RenderTargetFormat, WINED3DFORMAT DepthStencilFormat) PURE; STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT AdapterFormat, WINED3DFORMAT RenderTargetFormat, WINED3DFORMAT DepthStencilFormat) PURE;
STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter, D3DDEVTYPE CheckType, WINED3DFORMAT DisplayFormat, WINED3DFORMAT BackBufferFormat, BOOL Windowed) PURE; STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter, D3DDEVTYPE CheckType, WINED3DFORMAT DisplayFormat, WINED3DFORMAT BackBufferFormat, BOOL Windowed) PURE;
STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat) PURE; STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat) PURE;
STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT SourceFormat, WINED3DFORMAT TargetFormat) PURE; STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DFORMAT SourceFormat, WINED3DFORMAT TargetFormat) PURE;
STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DCAPS *pCaps) PURE; STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, WINED3DCAPS *pCaps) PURE;
STDMETHOD(CreateDevice)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType,HWND hFocusWindow, DWORD BehaviorFlags, WINED3DPRESENT_PARAMETERS *pPresentationParameters, struct IWineD3DDevice **ppReturnedDeviceInterface, IUnknown *parent, D3DCB_CREATEADDITIONALSWAPCHAIN pFn3) PURE; STDMETHOD(CreateDevice)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType,HWND hFocusWindow, DWORD BehaviorFlags, WINED3DPRESENT_PARAMETERS *pPresentationParameters, struct IWineD3DDevice **ppReturnedDeviceInterface, IUnknown *parent, D3DCB_CREATEADDITIONALSWAPCHAIN pFn3) PURE;
@ -306,7 +306,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,struct IWineD3DVertexBuffer **ppVertexBuffer, HANDLE *sharedHandle, IUnknown *parent) PURE; 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(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, WINED3DFORMAT Format, D3DPOOL Pool, struct IWineD3DIndexBuffer** ppIndexBuffer, HANDLE* pSharedHandle, IUnknown *parent) PURE;
STDMETHOD(CreateStateBlock)(THIS_ WINED3DSTATEBLOCKTYPE Type, struct IWineD3DStateBlock **ppStateBlock, 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, D3DRESOURCETYPE Type, DWORD Usage, D3DPOOL Pool, D3DMULTISAMPLE_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, D3DPOOL Pool, D3DMULTISAMPLE_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(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(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(CreateVolume)(THIS_ UINT Width, UINT Height, UINT Depth, DWORD Usage, WINED3DFORMAT Format, D3DPOOL Pool, struct IWineD3DVolume** ppVolumeTexture, HANDLE* pSharedHandle, IUnknown *parent) PURE;
@ -588,7 +588,7 @@ DECLARE_INTERFACE_(IWineD3DResource,IWineD3DBase)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
}; };
#undef INTERFACE #undef INTERFACE
@ -630,7 +630,7 @@ DECLARE_INTERFACE_(IWineD3DVertexBuffer,IWineD3DResource)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DVertexBuffer methods ***/ /*** IWineD3DVertexBuffer methods ***/
STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, BYTE ** ppbData, DWORD Flags) PURE; STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, BYTE ** ppbData, DWORD Flags) PURE;
STDMETHOD(Unlock)(THIS) PURE; STDMETHOD(Unlock)(THIS) PURE;
@ -680,7 +680,7 @@ DECLARE_INTERFACE_(IWineD3DIndexBuffer,IWineD3DResource)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DIndexBuffer methods ***/ /*** IWineD3DIndexBuffer methods ***/
STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, BYTE ** ppbData, DWORD Flags) PURE; STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, BYTE ** ppbData, DWORD Flags) PURE;
STDMETHOD(Unlock)(THIS) PURE; STDMETHOD(Unlock)(THIS) PURE;
@ -732,7 +732,7 @@ DECLARE_INTERFACE_(IWineD3DBaseTexture,IWineD3DResource)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DBaseTexture methods ***/ /*** IWineD3DBaseTexture methods ***/
STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
STDMETHOD_(DWORD, GetLOD)(THIS) PURE; STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
@ -802,7 +802,7 @@ DECLARE_INTERFACE_(IWineD3DTexture,IWineD3DBaseTexture)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DBaseTexture methods ***/ /*** IWineD3DBaseTexture methods ***/
STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
STDMETHOD_(DWORD, GetLOD)(THIS) PURE; STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
@ -882,7 +882,7 @@ DECLARE_INTERFACE_(IWineD3DCubeTexture,IWineD3DBaseTexture)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DBaseTexture methods ***/ /*** IWineD3DBaseTexture methods ***/
STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
STDMETHOD_(DWORD, GetLOD)(THIS) PURE; STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
@ -963,7 +963,7 @@ DECLARE_INTERFACE_(IWineD3DVolumeTexture,IWineD3DBaseTexture)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DBaseTexture methods ***/ /*** IWineD3DBaseTexture methods ***/
STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
STDMETHOD_(DWORD, GetLOD)(THIS) PURE; STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
@ -1043,7 +1043,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE,GetType)(THIS) PURE;
/*** IWineD3DSurface methods ***/ /*** IWineD3DSurface methods ***/
STDMETHOD(GetContainerParent)(THIS_ IUnknown **ppContainerParent) PURE; STDMETHOD(GetContainerParent)(THIS_ IUnknown **ppContainerParent) PURE;
STDMETHOD(GetContainer)(THIS_ REFIID riid, void ** ppContainer) PURE; STDMETHOD(GetContainer)(THIS_ REFIID riid, void ** ppContainer) PURE;
@ -1123,7 +1123,7 @@ DECLARE_INTERFACE_(IWineD3DVolume,IWineD3DResource)
STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE; STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD PriorityNew) PURE;
STDMETHOD_(DWORD,GetPriority)(THIS) PURE; STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
STDMETHOD_(void,PreLoad)(THIS) PURE; STDMETHOD_(void,PreLoad)(THIS) PURE;
STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; STDMETHOD_(WINED3DRESOURCETYPE, GetType)(THIS) PURE;
/*** IWineD3DVolume methods ***/ /*** IWineD3DVolume methods ***/
STDMETHOD(GetContainerParent)(THIS_ IUnknown **ppContainerParent) PURE; STDMETHOD(GetContainerParent)(THIS_ IUnknown **ppContainerParent) PURE;
STDMETHOD(GetContainer)(THIS_ REFIID riid, void ** ppContainer) PURE; STDMETHOD(GetContainer)(THIS_ REFIID riid, void ** ppContainer) PURE;

View File

@ -451,10 +451,24 @@ typedef struct _WINED3DPRESENT_PARAMETERS {
UINT *PresentationInterval; UINT *PresentationInterval;
} WINED3DPRESENT_PARAMETERS; } WINED3DPRESENT_PARAMETERS;
typedef enum _WINED3DRESOURCETYPE {
WINED3DRTYPE_SURFACE = 1,
WINED3DRTYPE_VOLUME = 2,
WINED3DRTYPE_TEXTURE = 3,
WINED3DRTYPE_VOLUMETEXTURE = 4,
WINED3DRTYPE_CUBETEXTURE = 5,
WINED3DRTYPE_VERTEXBUFFER = 6,
WINED3DRTYPE_INDEXBUFFER = 7,
WINED3DRTYPE_FORCE_DWORD = 0x7fffffff
} WINED3DRESOURCETYPE;
#define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
typedef struct _WINED3DSURFACE_DESC typedef struct _WINED3DSURFACE_DESC
{ {
WINED3DFORMAT *Format; WINED3DFORMAT *Format;
D3DRESOURCETYPE *Type; WINED3DRESOURCETYPE *Type;
DWORD *Usage; DWORD *Usage;
D3DPOOL *Pool; D3DPOOL *Pool;
UINT *Size; UINT *Size;
@ -468,7 +482,7 @@ typedef struct _WINED3DSURFACE_DESC
typedef struct _WINED3DVOLUME_DESC typedef struct _WINED3DVOLUME_DESC
{ {
WINED3DFORMAT *Format; WINED3DFORMAT *Format;
D3DRESOURCETYPE *Type; WINED3DRESOURCETYPE *Type;
DWORD *Usage; DWORD *Usage;
D3DPOOL *Pool; D3DPOOL *Pool;
UINT *Size; UINT *Size;
@ -565,20 +579,6 @@ typedef struct WINED3DRESOURCESTATS {
DWORD TotalBytes; DWORD TotalBytes;
} WINED3DRESOURCESTATS; } WINED3DRESOURCESTATS;
typedef enum _WINED3DRESOURCETYPE {
WINED3DRTYPE_SURFACE = 1,
WINED3DRTYPE_VOLUME = 2,
WINED3DRTYPE_TEXTURE = 3,
WINED3DRTYPE_VOLUMETEXTURE = 4,
WINED3DRTYPE_CUBETEXTURE = 5,
WINED3DRTYPE_VERTEXBUFFER = 6,
WINED3DRTYPE_INDEXBUFFER = 7,
WINED3DRTYPE_FORCE_DWORD = 0x7fffffff
} WINED3DRESOURCETYPE;
#define WINED3DRTYPECOUNT (WINED3DRTYPE_INDEXBUFFER+1)
typedef struct _WINED3DDEVINFO_RESOURCEMANAGER { typedef struct _WINED3DDEVINFO_RESOURCEMANAGER {
WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT]; WINED3DRESOURCESTATS stats[WINED3DRTYPECOUNT];
} WINED3DDEVINFO_RESOURCEMANAGER; } WINED3DDEVINFO_RESOURCEMANAGER;