wined3d: Get rid of IWineD3DVolumeTexture.
This commit is contained in:
parent
6110fe3a82
commit
ed0037854a
@ -100,7 +100,7 @@ struct d3d10_texture3d
|
|||||||
const struct ID3D10Texture3DVtbl *vtbl;
|
const struct ID3D10Texture3DVtbl *vtbl;
|
||||||
LONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
IWineD3DVolumeTexture *wined3d_texture;
|
IWineD3DBaseTexture *wined3d_texture;
|
||||||
D3D10_TEXTURE3D_DESC desc;
|
D3D10_TEXTURE3D_DESC desc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -270,7 +270,8 @@ static ULONG STDMETHODCALLTYPE d3d10_texture3d_AddRef(ID3D10Texture3D *iface)
|
|||||||
|
|
||||||
TRACE("%p increasing refcount to %u.\n", texture, refcount);
|
TRACE("%p increasing refcount to %u.\n", texture, refcount);
|
||||||
|
|
||||||
if (refcount == 1) IWineD3DVolumeTexture_AddRef(texture->wined3d_texture);
|
if (refcount == 1)
|
||||||
|
IWineD3DBaseTexture_AddRef(texture->wined3d_texture);
|
||||||
|
|
||||||
return refcount;
|
return refcount;
|
||||||
}
|
}
|
||||||
@ -288,9 +289,7 @@ static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface)
|
|||||||
TRACE("%p decreasing refcount to %u.\n", texture, refcount);
|
TRACE("%p decreasing refcount to %u.\n", texture, refcount);
|
||||||
|
|
||||||
if (!refcount)
|
if (!refcount)
|
||||||
{
|
IWineD3DBaseTexture_Release(texture->wined3d_texture);
|
||||||
IWineD3DVolumeTexture_Release(texture->wined3d_texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
return refcount;
|
return refcount;
|
||||||
}
|
}
|
||||||
@ -362,7 +361,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
|
|||||||
if (map_flags)
|
if (map_flags)
|
||||||
FIXME("Ignoring map_flags %#x.\n", map_flags);
|
FIXME("Ignoring map_flags %#x.\n", map_flags);
|
||||||
|
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wined3d_texture, sub_resource_idx)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, sub_resource_idx)))
|
||||||
hr = E_INVALIDARG;
|
hr = E_INVALIDARG;
|
||||||
else if (SUCCEEDED(hr = IWineD3DVolume_Map(wined3d_volume_from_resource(sub_resource),
|
else if (SUCCEEDED(hr = IWineD3DVolume_Map(wined3d_volume_from_resource(sub_resource),
|
||||||
&wined3d_map_desc, NULL, 0)))
|
&wined3d_map_desc, NULL, 0)))
|
||||||
@ -382,7 +381,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT
|
|||||||
|
|
||||||
TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx);
|
TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx);
|
||||||
|
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wined3d_texture, sub_resource_idx)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, sub_resource_idx)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IWineD3DVolume_Unmap(wined3d_volume_from_resource(sub_resource));
|
IWineD3DVolume_Unmap(wined3d_volume_from_resource(sub_resource));
|
||||||
|
@ -382,15 +382,10 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic
|
|||||||
*/
|
*/
|
||||||
struct IDirect3DVolumeTexture8Impl
|
struct IDirect3DVolumeTexture8Impl
|
||||||
{
|
{
|
||||||
/* IUnknown fields */
|
|
||||||
const IDirect3DVolumeTexture8Vtbl *lpVtbl;
|
const IDirect3DVolumeTexture8Vtbl *lpVtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
IWineD3DBaseTexture *wined3d_texture;
|
||||||
/* IDirect3DResource8 fields */
|
IDirect3DDevice8 *parentDevice;
|
||||||
IWineD3DVolumeTexture *wineD3DVolumeTexture;
|
|
||||||
|
|
||||||
/* Parent reference */
|
|
||||||
LPDIRECT3DDEVICE8 parentDevice;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice8Impl *device,
|
HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice8Impl *device,
|
||||||
|
@ -53,7 +53,7 @@ static ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8
|
|||||||
{
|
{
|
||||||
IDirect3DDevice8_AddRef(This->parentDevice);
|
IDirect3DDevice8_AddRef(This->parentDevice);
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DVolumeTexture_AddRef(This->wineD3DVolumeTexture);
|
IWineD3DBaseTexture_AddRef(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ static ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8
|
|||||||
IDirect3DDevice8 *parentDevice = This->parentDevice;
|
IDirect3DDevice8 *parentDevice = This->parentDevice;
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DVolumeTexture_Release(This->wineD3DVolumeTexture);
|
IWineD3DBaseTexture_Release(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
/* Release the device last, as it may cause the device to be destroyed. */
|
/* Release the device last, as it may cause the device to be destroyed. */
|
||||||
@ -102,7 +102,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_SetPrivateData(LPDIRECT3DVOLUM
|
|||||||
iface, debugstr_guid(refguid), pData, SizeOfData, Flags);
|
iface, debugstr_guid(refguid), pData, SizeOfData, Flags);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags);
|
hr = IWineD3DBaseTexture_SetPrivateData(This->wined3d_texture, refguid, pData, SizeOfData, Flags);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -116,7 +116,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetPrivateData(LPDIRECT3DVOLUM
|
|||||||
iface, debugstr_guid(refguid), pData, pSizeOfData);
|
iface, debugstr_guid(refguid), pData, pSizeOfData);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData);
|
hr = IWineD3DBaseTexture_GetPrivateData(This->wined3d_texture, refguid, pData, pSizeOfData);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -129,7 +129,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_FreePrivateData(LPDIRECT3DVOLU
|
|||||||
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid));
|
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid));
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid);
|
hr = IWineD3DBaseTexture_FreePrivateData(This->wined3d_texture, refguid);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -142,7 +142,7 @@ static DWORD WINAPI IDirect3DVolumeTexture8Impl_SetPriority(LPDIRECT3DVOLUMETEXT
|
|||||||
TRACE("iface %p, priority %u.\n", iface, PriorityNew);
|
TRACE("iface %p, priority %u.\n", iface, PriorityNew);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew);
|
ret = IWineD3DBaseTexture_SetPriority(This->wined3d_texture, PriorityNew);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -155,7 +155,7 @@ static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetPriority(LPDIRECT3DVOLUMETEXT
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture);
|
ret = IWineD3DBaseTexture_GetPriority(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -167,7 +167,7 @@ static void WINAPI IDirect3DVolumeTexture8Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE8
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DVolumeTexture_PreLoad(This->wineD3DVolumeTexture);
|
IWineD3DBaseTexture_PreLoad(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(LPDIRECT3DVOLU
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
type = IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture);
|
type = IWineD3DBaseTexture_GetType(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
@ -192,7 +192,7 @@ static DWORD WINAPI IDirect3DVolumeTexture8Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE8
|
|||||||
TRACE("iface %p, lod %u.\n", iface, LODNew);
|
TRACE("iface %p, lod %u.\n", iface, LODNew);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew);
|
ret = IWineD3DBaseTexture_SetLOD(This->wined3d_texture, LODNew);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -205,7 +205,7 @@ static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE8
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture);
|
ret = IWineD3DBaseTexture_GetLOD(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -218,7 +218,7 @@ static DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLevelCount(LPDIRECT3DVOLUMETE
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
ret = IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture);
|
ret = IWineD3DBaseTexture_GetLevelCount(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -234,7 +234,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(IDirect3DVolumeTe
|
|||||||
TRACE("iface %p, level %u, desc %p.\n", iface, level, desc);
|
TRACE("iface %p, level %u, desc %p.\n", iface, level, desc);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
hr = D3DERR_INVALIDCALL;
|
hr = D3DERR_INVALIDCALL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetVolumeLevel(IDirect3DVolume
|
|||||||
TRACE("iface %p, level %u, volume %p.\n", iface, level, volume);
|
TRACE("iface %p, level %u, volume %p.\n", iface, level, volume);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
{
|
{
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
@ -288,7 +288,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_LockBox(IDirect3DVolumeTexture
|
|||||||
iface, level, locked_box, box, flags);
|
iface, level, locked_box, box, flags);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
hr = D3DERR_INVALIDCALL;
|
hr = D3DERR_INVALIDCALL;
|
||||||
else
|
else
|
||||||
hr = IDirect3DVolume8_LockBox((IDirect3DVolume8 *)wined3d_resource_get_parent(sub_resource),
|
hr = IDirect3DVolume8_LockBox((IDirect3DVolume8 *)wined3d_resource_get_parent(sub_resource),
|
||||||
@ -307,7 +307,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_UnlockBox(IDirect3DVolumeTextu
|
|||||||
TRACE("iface %p, level %u.\n", iface, level);
|
TRACE("iface %p, level %u.\n", iface, level);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
hr = D3DERR_INVALIDCALL;
|
hr = D3DERR_INVALIDCALL;
|
||||||
else
|
else
|
||||||
hr = IDirect3DVolume8_UnlockBox((IDirect3DVolume8 *)wined3d_resource_get_parent(sub_resource));
|
hr = IDirect3DVolume8_UnlockBox((IDirect3DVolume8 *)wined3d_resource_get_parent(sub_resource));
|
||||||
@ -325,7 +325,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(IDirect3DVolumeTex
|
|||||||
TRACE("iface %p, dirty_box %p.\n", iface, dirty_box);
|
TRACE("iface %p, dirty_box %p.\n", iface, dirty_box);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DVolumeTexture_AddDirtyRegion(texture->wineD3DVolumeTexture, 0, (const WINED3DBOX *)dirty_box);
|
hr = IWineD3DBaseTexture_AddDirtyRegion(texture->wined3d_texture, 0, (const WINED3DBOX *)dirty_box);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -379,7 +379,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice
|
|||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_CreateVolumeTexture(device->WineD3DDevice, width, height, depth, levels,
|
hr = IWineD3DDevice_CreateVolumeTexture(device->WineD3DDevice, width, height, depth, levels,
|
||||||
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
|
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
|
||||||
&d3d8_volumetexture_wined3d_parent_ops, &texture->wineD3DVolumeTexture);
|
&d3d8_volumetexture_wined3d_parent_ops, &texture->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
@ -376,15 +376,10 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic
|
|||||||
*/
|
*/
|
||||||
typedef struct IDirect3DVolumeTexture9Impl
|
typedef struct IDirect3DVolumeTexture9Impl
|
||||||
{
|
{
|
||||||
/* IUnknown fields */
|
|
||||||
const IDirect3DVolumeTexture9Vtbl *lpVtbl;
|
const IDirect3DVolumeTexture9Vtbl *lpVtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
IWineD3DBaseTexture *wined3d_texture;
|
||||||
/* IDirect3DResource9 fields */
|
IDirect3DDevice9Ex *parentDevice;
|
||||||
IWineD3DVolumeTexture *wineD3DVolumeTexture;
|
|
||||||
|
|
||||||
/* Parent reference */
|
|
||||||
LPDIRECT3DDEVICE9EX parentDevice;
|
|
||||||
} IDirect3DVolumeTexture9Impl;
|
} IDirect3DVolumeTexture9Impl;
|
||||||
|
|
||||||
HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice9Impl *device,
|
HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice9Impl *device,
|
||||||
|
@ -54,7 +54,7 @@ static ULONG WINAPI IDirect3DVolumeTexture9Impl_AddRef(LPDIRECT3DVOLUMETEXTURE9
|
|||||||
{
|
{
|
||||||
IDirect3DDevice9Ex_AddRef(This->parentDevice);
|
IDirect3DDevice9Ex_AddRef(This->parentDevice);
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DVolumeTexture_AddRef(This->wineD3DVolumeTexture);
|
IWineD3DBaseTexture_AddRef(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ static ULONG WINAPI IDirect3DVolumeTexture9Impl_Release(LPDIRECT3DVOLUMETEXTURE9
|
|||||||
IDirect3DDevice9Ex *parentDevice = This->parentDevice;
|
IDirect3DDevice9Ex *parentDevice = This->parentDevice;
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
IWineD3DVolumeTexture_Release(This->wineD3DVolumeTexture);
|
IWineD3DBaseTexture_Release(This->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
/* Release the device last, as it may cause the device to be destroyed. */
|
/* Release the device last, as it may cause the device to be destroyed. */
|
||||||
@ -103,9 +103,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetPrivateData(LPDIRECT3DVOLUM
|
|||||||
iface, debugstr_guid(refguid), pData, SizeOfData, Flags);
|
iface, debugstr_guid(refguid), pData, SizeOfData, Flags);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
hr = IWineD3DBaseTexture_SetPrivateData(This->wined3d_texture, refguid, pData, SizeOfData, Flags);
|
||||||
hr = IWineD3DVolumeTexture_SetPrivateData(This->wineD3DVolumeTexture, refguid, pData, SizeOfData, Flags);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -119,9 +117,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetPrivateData(LPDIRECT3DVOLUM
|
|||||||
iface, debugstr_guid(refguid), pData, pSizeOfData);
|
iface, debugstr_guid(refguid), pData, pSizeOfData);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
hr = IWineD3DBaseTexture_GetPrivateData(This->wined3d_texture, refguid, pData, pSizeOfData);
|
||||||
hr = IWineD3DVolumeTexture_GetPrivateData(This->wineD3DVolumeTexture, refguid, pData, pSizeOfData);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -134,9 +130,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_FreePrivateData(LPDIRECT3DVOLU
|
|||||||
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid));
|
TRACE("iface %p, guid %s.\n", iface, debugstr_guid(refguid));
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
hr = IWineD3DBaseTexture_FreePrivateData(This->wined3d_texture, refguid);
|
||||||
hr = IWineD3DVolumeTexture_FreePrivateData(This->wineD3DVolumeTexture, refguid);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -149,9 +143,7 @@ static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetPriority(LPDIRECT3DVOLUMETEXT
|
|||||||
TRACE("iface %p, priority %u.\n", iface, PriorityNew);
|
TRACE("iface %p, priority %u.\n", iface, PriorityNew);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
priority = IWineD3DBaseTexture_SetPriority(This->wined3d_texture, PriorityNew);
|
||||||
priority = IWineD3DVolumeTexture_SetPriority(This->wineD3DVolumeTexture, PriorityNew);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return priority;
|
return priority;
|
||||||
@ -164,9 +156,7 @@ static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetPriority(LPDIRECT3DVOLUMETEXT
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
priority = IWineD3DBaseTexture_GetPriority(This->wined3d_texture);
|
||||||
priority = IWineD3DVolumeTexture_GetPriority(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return priority;
|
return priority;
|
||||||
@ -178,9 +168,7 @@ static void WINAPI IDirect3DVolumeTexture9Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE9
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
IWineD3DBaseTexture_PreLoad(This->wined3d_texture);
|
||||||
IWineD3DVolumeTexture_PreLoad(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,9 +179,7 @@ static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture9Impl_GetType(LPDIRECT3DVOLU
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
type = IWineD3DBaseTexture_GetType(This->wined3d_texture);
|
||||||
type = IWineD3DVolumeTexture_GetType(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
@ -207,9 +193,7 @@ static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE9
|
|||||||
TRACE("iface %p, lod %u.\n", iface, LODNew);
|
TRACE("iface %p, lod %u.\n", iface, LODNew);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
lod = IWineD3DBaseTexture_SetLOD(This->wined3d_texture, LODNew);
|
||||||
lod = IWineD3DVolumeTexture_SetLOD(This->wineD3DVolumeTexture, LODNew);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return lod;
|
return lod;
|
||||||
@ -222,9 +206,7 @@ static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE9
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
lod = IWineD3DBaseTexture_GetLOD(This->wined3d_texture);
|
||||||
lod = IWineD3DVolumeTexture_GetLOD(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return lod;
|
return lod;
|
||||||
@ -237,9 +219,7 @@ static DWORD WINAPI IDirect3DVolumeTexture9Impl_GetLevelCount(LPDIRECT3DVOLUMETE
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
level_count = IWineD3DBaseTexture_GetLevelCount(This->wined3d_texture);
|
||||||
level_count = IWineD3DVolumeTexture_GetLevelCount(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return level_count;
|
return level_count;
|
||||||
@ -252,9 +232,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_SetAutoGenFilterType(LPDIRECT3
|
|||||||
TRACE("iface %p, filter_type %#x.\n", iface, FilterType);
|
TRACE("iface %p, filter_type %#x.\n", iface, FilterType);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
hr = IWineD3DBaseTexture_SetAutoGenFilterType(This->wined3d_texture, (WINED3DTEXTUREFILTERTYPE) FilterType);
|
||||||
hr = IWineD3DVolumeTexture_SetAutoGenFilterType(This->wineD3DVolumeTexture, (WINED3DTEXTUREFILTERTYPE) FilterType);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -267,9 +245,7 @@ static D3DTEXTUREFILTERTYPE WINAPI IDirect3DVolumeTexture9Impl_GetAutoGenFilterT
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
filter_type = (D3DTEXTUREFILTERTYPE)IWineD3DBaseTexture_GetAutoGenFilterType(This->wined3d_texture);
|
||||||
filter_type = (D3DTEXTUREFILTERTYPE)IWineD3DVolumeTexture_GetAutoGenFilterType(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return filter_type;
|
return filter_type;
|
||||||
@ -281,9 +257,7 @@ static void WINAPI IDirect3DVolumeTexture9Impl_GenerateMipSubLevels(LPDIRECT3DVO
|
|||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
IWineD3DBaseTexture_GenerateMipSubLevels(This->wined3d_texture);
|
||||||
IWineD3DVolumeTexture_GenerateMipSubLevels(This->wineD3DVolumeTexture);
|
|
||||||
|
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +271,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(IDirect3DVolumeTe
|
|||||||
TRACE("iface %p, level %u, desc %p.\n", iface, level, desc);
|
TRACE("iface %p, level %u, desc %p.\n", iface, level, desc);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
hr = D3DERR_INVALIDCALL;
|
hr = D3DERR_INVALIDCALL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -326,7 +300,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetVolumeLevel(IDirect3DVolume
|
|||||||
TRACE("iface %p, level %u, volume %p.\n", iface, level, volume);
|
TRACE("iface %p, level %u, volume %p.\n", iface, level, volume);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
{
|
{
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
@ -350,7 +324,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_LockBox(IDirect3DVolumeTexture
|
|||||||
iface, level, locked_box, box, flags);
|
iface, level, locked_box, box, flags);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
hr = D3DERR_INVALIDCALL;
|
hr = D3DERR_INVALIDCALL;
|
||||||
else
|
else
|
||||||
hr = IDirect3DVolume9_LockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource),
|
hr = IDirect3DVolume9_LockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource),
|
||||||
@ -369,7 +343,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_UnlockBox(IDirect3DVolumeTextu
|
|||||||
TRACE("iface %p, level %u.\n", iface, level);
|
TRACE("iface %p, level %u.\n", iface, level);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if (!(sub_resource = IWineD3DVolumeTexture_GetSubResource(texture->wineD3DVolumeTexture, level)))
|
if (!(sub_resource = IWineD3DBaseTexture_GetSubResource(texture->wined3d_texture, level)))
|
||||||
hr = D3DERR_INVALIDCALL;
|
hr = D3DERR_INVALIDCALL;
|
||||||
else
|
else
|
||||||
hr = IDirect3DVolume9_UnlockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource));
|
hr = IDirect3DVolume9_UnlockBox((IDirect3DVolume9 *)wined3d_resource_get_parent(sub_resource));
|
||||||
@ -387,7 +361,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_AddDirtyBox(IDirect3DVolumeTex
|
|||||||
TRACE("iface %p, dirty_box %p.\n", iface, dirty_box);
|
TRACE("iface %p, dirty_box %p.\n", iface, dirty_box);
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DVolumeTexture_AddDirtyRegion(texture->wineD3DVolumeTexture, 0, (const WINED3DBOX *)dirty_box);
|
hr = IWineD3DBaseTexture_AddDirtyRegion(texture->wined3d_texture, 0, (const WINED3DBOX *)dirty_box);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -445,7 +419,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice
|
|||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
hr = IWineD3DDevice_CreateVolumeTexture(device->WineD3DDevice, width, height, depth, levels,
|
hr = IWineD3DDevice_CreateVolumeTexture(device->WineD3DDevice, width, height, depth, levels,
|
||||||
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
|
usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture,
|
||||||
&d3d9_volumetexture_wined3d_parent_ops, &texture->wineD3DVolumeTexture);
|
&d3d9_volumetexture_wined3d_parent_ops, &texture->wined3d_texture);
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
@ -1137,7 +1137,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface,
|
|||||||
|
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
|
static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *iface,
|
||||||
UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool,
|
UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool,
|
||||||
void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DVolumeTexture **ppVolumeTexture)
|
void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DBaseTexture **ppVolumeTexture)
|
||||||
{
|
{
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
IWineD3DVolumeTextureImpl *object;
|
IWineD3DVolumeTextureImpl *object;
|
||||||
@ -1164,7 +1164,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
|
|||||||
}
|
}
|
||||||
|
|
||||||
TRACE("(%p) : Created volume texture %p.\n", This, object);
|
TRACE("(%p) : Created volume texture %p.\n", This, object);
|
||||||
*ppVolumeTexture = (IWineD3DVolumeTexture *)object;
|
*ppVolumeTexture = (IWineD3DBaseTexture *)object;
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
@ -139,15 +139,15 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This)
|
|||||||
IWineD3DTexture IUnknown parts follow
|
IWineD3DTexture IUnknown parts follow
|
||||||
******************************************* */
|
******************************************* */
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *iface, REFIID riid, LPVOID *ppobj)
|
static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTexture *iface, REFIID riid, LPVOID *ppobj)
|
||||||
{
|
{
|
||||||
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
||||||
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown)
|
if (IsEqualGUID(riid, &IID_IUnknown)
|
||||||
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|
||||||
|| IsEqualGUID(riid, &IID_IWineD3DResource)
|
|| IsEqualGUID(riid, &IID_IWineD3DResource)
|
||||||
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture)
|
|| IsEqualGUID(riid, &IID_IWineD3DBaseTexture))
|
||||||
|| IsEqualGUID(riid, &IID_IWineD3DVolumeTexture)) {
|
{
|
||||||
IUnknown_AddRef(iface);
|
IUnknown_AddRef(iface);
|
||||||
*ppobj = This;
|
*ppobj = This;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@ -156,14 +156,16 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTex
|
|||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DVolumeTexture *iface) {
|
static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
|
||||||
|
{
|
||||||
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
||||||
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
|
TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
|
||||||
return InterlockedIncrement(&This->resource.ref);
|
return InterlockedIncrement(&This->resource.ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do not call while under the GL lock. */
|
/* Do not call while under the GL lock. */
|
||||||
static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *iface) {
|
static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface)
|
||||||
|
{
|
||||||
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
|
TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
|
||||||
@ -177,93 +179,89 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *ifa
|
|||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************************************
|
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DBaseTexture *iface,
|
||||||
IWineD3DVolumeTexture IWineD3DResource parts follow
|
|
||||||
**************************************************** */
|
|
||||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DVolumeTexture *iface,
|
|
||||||
REFGUID riid, const void *data, DWORD data_size, DWORD flags)
|
REFGUID riid, const void *data, DWORD data_size, DWORD flags)
|
||||||
{
|
{
|
||||||
return resource_set_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, riid, data, data_size, flags);
|
return resource_set_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, riid, data, data_size, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DVolumeTexture *iface,
|
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DBaseTexture *iface,
|
||||||
REFGUID guid, void *data, DWORD *data_size)
|
REFGUID guid, void *data, DWORD *data_size)
|
||||||
{
|
{
|
||||||
return resource_get_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, guid, data, data_size);
|
return resource_get_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, guid, data, data_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid)
|
static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DBaseTexture *iface, REFGUID refguid)
|
||||||
{
|
{
|
||||||
return resource_free_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, refguid);
|
return resource_free_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, refguid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD priority)
|
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DBaseTexture *iface, DWORD priority)
|
||||||
{
|
{
|
||||||
return resource_set_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource, priority);
|
return resource_set_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DVolumeTexture *iface)
|
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
return resource_get_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource);
|
return resource_get_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *iface)
|
static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
volumetexture_preload((IWineD3DBaseTextureImpl *)iface, SRGB_ANY);
|
volumetexture_preload((IWineD3DBaseTextureImpl *)iface, SRGB_ANY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface)
|
static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
return resource_get_type(&((IWineD3DVolumeTextureImpl *)iface)->resource);
|
return resource_get_type(&((IWineD3DVolumeTextureImpl *)iface)->resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DVolumeTexture *iface)
|
static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
TRACE("iface %p\n", iface);
|
TRACE("iface %p\n", iface);
|
||||||
|
|
||||||
return ((IWineD3DVolumeTextureImpl *)iface)->resource.parent;
|
return ((IWineD3DVolumeTextureImpl *)iface)->resource.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ******************************************************
|
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew)
|
||||||
IWineD3DVolumeTexture IWineD3DBaseTexture parts follow
|
{
|
||||||
****************************************************** */
|
|
||||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DVolumeTexture *iface, DWORD LODNew) {
|
|
||||||
return basetexture_set_lod((IWineD3DBaseTextureImpl *)iface, LODNew);
|
return basetexture_set_lod((IWineD3DBaseTextureImpl *)iface, LODNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLOD(IWineD3DVolumeTexture *iface) {
|
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLOD(IWineD3DBaseTexture *iface)
|
||||||
|
{
|
||||||
return basetexture_get_lod((IWineD3DBaseTextureImpl *)iface);
|
return basetexture_get_lod((IWineD3DBaseTextureImpl *)iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLevelCount(IWineD3DVolumeTexture *iface)
|
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLevelCount(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
return basetexture_get_level_count((IWineD3DBaseTextureImpl *)iface);
|
return basetexture_get_level_count((IWineD3DBaseTextureImpl *)iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetAutoGenFilterType(IWineD3DVolumeTexture *iface,
|
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture *iface,
|
||||||
WINED3DTEXTUREFILTERTYPE FilterType)
|
WINED3DTEXTUREFILTERTYPE FilterType)
|
||||||
{
|
{
|
||||||
return basetexture_set_autogen_filter_type((IWineD3DBaseTextureImpl *)iface, FilterType);
|
return basetexture_set_autogen_filter_type((IWineD3DBaseTextureImpl *)iface, FilterType);
|
||||||
}
|
}
|
||||||
|
|
||||||
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DVolumeTextureImpl_GetAutoGenFilterType(IWineD3DVolumeTexture *iface)
|
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DVolumeTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
return basetexture_get_autogen_filter_type((IWineD3DBaseTextureImpl *)iface);
|
return basetexture_get_autogen_filter_type((IWineD3DBaseTextureImpl *)iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI IWineD3DVolumeTextureImpl_GenerateMipSubLevels(IWineD3DVolumeTexture *iface)
|
static void WINAPI IWineD3DVolumeTextureImpl_GenerateMipSubLevels(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
basetexture_generate_mipmaps((IWineD3DBaseTextureImpl *)iface);
|
basetexture_generate_mipmaps((IWineD3DBaseTextureImpl *)iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL WINAPI IWineD3DVolumeTextureImpl_IsCondNP2(IWineD3DVolumeTexture *iface)
|
static BOOL WINAPI IWineD3DVolumeTextureImpl_IsCondNP2(IWineD3DBaseTexture *iface)
|
||||||
{
|
{
|
||||||
TRACE("iface %p.\n", iface);
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct wined3d_resource * WINAPI IWineD3DVolumeTextureImpl_GetSubResource(IWineD3DVolumeTexture *iface,
|
static struct wined3d_resource * WINAPI IWineD3DVolumeTextureImpl_GetSubResource(IWineD3DBaseTexture *iface,
|
||||||
UINT sub_resource_idx)
|
UINT sub_resource_idx)
|
||||||
{
|
{
|
||||||
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
|
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
|
||||||
@ -273,7 +271,7 @@ static struct wined3d_resource * WINAPI IWineD3DVolumeTextureImpl_GetSubResource
|
|||||||
return basetexture_get_sub_resource(texture, sub_resource_idx);
|
return basetexture_get_sub_resource(texture, sub_resource_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyRegion(IWineD3DVolumeTexture *iface,
|
static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyRegion(IWineD3DBaseTexture *iface,
|
||||||
UINT layer, const WINED3DBOX *dirty_region)
|
UINT layer, const WINED3DBOX *dirty_region)
|
||||||
{
|
{
|
||||||
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
|
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
|
||||||
@ -293,7 +291,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyRegion(IWineD3DVolumeTex
|
|||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
|
static const IWineD3DBaseTextureVtbl IWineD3DVolumeTexture_Vtbl =
|
||||||
{
|
{
|
||||||
/* IUnknown */
|
/* IUnknown */
|
||||||
IWineD3DVolumeTextureImpl_QueryInterface,
|
IWineD3DVolumeTextureImpl_QueryInterface,
|
||||||
|
@ -2006,13 +2006,10 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT
|
|||||||
void volume_load(IWineD3DVolumeImpl *volume, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN;
|
void volume_load(IWineD3DVolumeImpl *volume, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN;
|
||||||
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN;
|
void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
* IWineD3DVolumeTexture implementation structure (extends IWineD3DBaseTextureImpl)
|
|
||||||
*/
|
|
||||||
typedef struct IWineD3DVolumeTextureImpl
|
typedef struct IWineD3DVolumeTextureImpl
|
||||||
{
|
{
|
||||||
/* IUnknown & WineD3DResource/WineD3DBaseTexture Information */
|
/* IUnknown & WineD3DResource/WineD3DBaseTexture Information */
|
||||||
const IWineD3DVolumeTextureVtbl *lpVtbl;
|
const IWineD3DBaseTextureVtbl *lpVtbl;
|
||||||
struct wined3d_resource resource;
|
struct wined3d_resource resource;
|
||||||
IWineD3DBaseTextureClass baseTexture;
|
IWineD3DBaseTextureClass baseTexture;
|
||||||
} IWineD3DVolumeTextureImpl;
|
} IWineD3DVolumeTextureImpl;
|
||||||
|
@ -2385,15 +2385,6 @@ interface IWineD3DCubeTexture : IWineD3DBaseTexture
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
|
||||||
object,
|
|
||||||
local,
|
|
||||||
uuid(7b39470c-6f30-11d9-c687-00046142c14f)
|
|
||||||
]
|
|
||||||
interface IWineD3DVolumeTexture : IWineD3DBaseTexture
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[
|
[
|
||||||
object,
|
object,
|
||||||
local,
|
local,
|
||||||
@ -2563,7 +2554,7 @@ interface IWineD3DDevice : IUnknown
|
|||||||
[in] WINED3DPOOL pool,
|
[in] WINED3DPOOL pool,
|
||||||
[in] void *parent,
|
[in] void *parent,
|
||||||
[in] const struct wined3d_parent_ops *parent_ops,
|
[in] const struct wined3d_parent_ops *parent_ops,
|
||||||
[out] IWineD3DVolumeTexture **texture
|
[out] IWineD3DBaseTexture **texture
|
||||||
);
|
);
|
||||||
HRESULT CreateVolume(
|
HRESULT CreateVolume(
|
||||||
[in] UINT width,
|
[in] UINT width,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user