wined3d: Move the GetLevelDesc() functions to the IWineD3DBaseTexture interface.

This commit is contained in:
Henri Verbeet 2011-03-08 19:41:06 +01:00 committed by Alexandre Julliard
parent 756fdb7c5a
commit 63b72d789d
11 changed files with 19 additions and 28 deletions

View File

@ -260,7 +260,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(IDirect3DCubeTextur
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();
hr = IWineD3DCubeTexture_GetLevelDesc(This->wineD3DCubeTexture, level, &wined3d_desc); hr = IWineD3DCubeTexture_GetSubResourceDesc(This->wineD3DCubeTexture, level, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))

View File

@ -257,7 +257,7 @@ static HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(IDirect3DTexture8 *ifac
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();
hr = IWineD3DTexture_GetLevelDesc(This->wineD3DTexture, level, &wined3d_desc); hr = IWineD3DTexture_GetSubResourceDesc(This->wineD3DTexture, level, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))

View File

@ -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();
hr = IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, level, &wined3d_desc); hr = IWineD3DVolumeTexture_GetSubResourceDesc(This->wineD3DVolumeTexture, level, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))

View File

@ -276,7 +276,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(IDirect3DCubeTextur
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();
hr = IWineD3DCubeTexture_GetLevelDesc(This->wineD3DCubeTexture, level, &wined3d_desc); hr = IWineD3DCubeTexture_GetSubResourceDesc(This->wineD3DCubeTexture, level, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))

View File

@ -272,7 +272,7 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(IDirect3DTexture9 *ifac
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();
hr = IWineD3DTexture_GetLevelDesc(This->wineD3DTexture, level, &wined3d_desc); hr = IWineD3DTexture_GetSubResourceDesc(This->wineD3DTexture, level, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))

View File

@ -298,7 +298,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(IDirect3DVolumeTe
wined3d_mutex_lock(); wined3d_mutex_lock();
hr = IWineD3DVolumeTexture_GetLevelDesc(This->wineD3DVolumeTexture, level, &wined3d_desc); hr = IWineD3DVolumeTexture_GetSubResourceDesc(This->wineD3DVolumeTexture, level, &wined3d_desc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();

View File

@ -2506,7 +2506,7 @@ IDirect3DDeviceImpl_3_GetRenderState(IDirect3DDevice3 *iface,
if(hr == WINED3D_OK && tex) if(hr == WINED3D_OK && tex)
{ {
hr = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc); hr = IWineD3DBaseTexture_GetSubResourceDesc(tex, 0, &desc);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
ddfmt.dwSize = sizeof(ddfmt); ddfmt.dwSize = sizeof(ddfmt);
@ -2815,7 +2815,7 @@ IDirect3DDeviceImpl_3_SetRenderState(IDirect3DDevice3 *iface,
if(hr == WINED3D_OK && tex) if(hr == WINED3D_OK && tex)
{ {
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
hr = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc); hr = IWineD3DBaseTexture_GetSubResourceDesc(tex, 0, &desc);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
ddfmt.dwSize = sizeof(ddfmt); ddfmt.dwSize = sizeof(ddfmt);
@ -4588,7 +4588,7 @@ IDirect3DDeviceImpl_3_SetTexture(IDirect3DDevice3 *iface,
if(result == WINED3D_OK && tex) if(result == WINED3D_OK && tex)
{ {
memset(&desc, 0, sizeof(desc)); memset(&desc, 0, sizeof(desc));
result = IWineD3DTexture_GetLevelDesc((IWineD3DTexture*) tex, 0, &desc); result = IWineD3DBaseTexture_GetSubResourceDesc(tex, 0, &desc);
if (SUCCEEDED(result)) if (SUCCEEDED(result))
{ {
ddfmt.dwSize = sizeof(ddfmt); ddfmt.dwSize = sizeof(ddfmt);

View File

@ -326,7 +326,7 @@ static BOOL WINAPI IWineD3DCubeTextureImpl_IsCondNP2(IWineD3DCubeTexture *iface)
return FALSE; return FALSE;
} }
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface, static HRESULT WINAPI IWineD3DCubeTextureImpl_GetSubResourceDesc(IWineD3DCubeTexture *iface,
UINT sub_resource_idx, struct wined3d_resource_desc *desc) UINT sub_resource_idx, struct wined3d_resource_desc *desc)
{ {
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
@ -450,8 +450,8 @@ static const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
IWineD3DCubeTextureImpl_GetAutoGenFilterType, IWineD3DCubeTextureImpl_GetAutoGenFilterType,
IWineD3DCubeTextureImpl_GenerateMipSubLevels, IWineD3DCubeTextureImpl_GenerateMipSubLevels,
IWineD3DCubeTextureImpl_IsCondNP2, IWineD3DCubeTextureImpl_IsCondNP2,
IWineD3DCubeTextureImpl_GetSubResourceDesc,
/* IWineD3DCubeTexture */ /* IWineD3DCubeTexture */
IWineD3DCubeTextureImpl_GetLevelDesc,
IWineD3DCubeTextureImpl_GetCubeMapSurface, IWineD3DCubeTextureImpl_GetCubeMapSurface,
IWineD3DCubeTextureImpl_Map, IWineD3DCubeTextureImpl_Map,
IWineD3DCubeTextureImpl_Unmap, IWineD3DCubeTextureImpl_Unmap,

View File

@ -351,7 +351,7 @@ static BOOL WINAPI IWineD3DTextureImpl_IsCondNP2(IWineD3DTexture *iface) {
return This->cond_np2; return This->cond_np2;
} }
static HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, static HRESULT WINAPI IWineD3DTextureImpl_GetSubResourceDesc(IWineD3DTexture *iface,
UINT sub_resource_idx, struct wined3d_resource_desc *desc) UINT sub_resource_idx, struct wined3d_resource_desc *desc)
{ {
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
@ -468,8 +468,8 @@ static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
IWineD3DTextureImpl_GetAutoGenFilterType, IWineD3DTextureImpl_GetAutoGenFilterType,
IWineD3DTextureImpl_GenerateMipSubLevels, IWineD3DTextureImpl_GenerateMipSubLevels,
IWineD3DTextureImpl_IsCondNP2, IWineD3DTextureImpl_IsCondNP2,
IWineD3DTextureImpl_GetSubResourceDesc,
/* IWineD3DTexture */ /* IWineD3DTexture */
IWineD3DTextureImpl_GetLevelDesc,
IWineD3DTextureImpl_GetSurfaceLevel, IWineD3DTextureImpl_GetSurfaceLevel,
IWineD3DTextureImpl_Map, IWineD3DTextureImpl_Map,
IWineD3DTextureImpl_Unmap, IWineD3DTextureImpl_Unmap,

View File

@ -263,7 +263,7 @@ static BOOL WINAPI IWineD3DVolumeTextureImpl_IsCondNP2(IWineD3DVolumeTexture *if
return FALSE; return FALSE;
} }
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTexture *iface, static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetSubResourceDesc(IWineD3DVolumeTexture *iface,
UINT sub_resource_idx, struct wined3d_resource_desc *desc) UINT sub_resource_idx, struct wined3d_resource_desc *desc)
{ {
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl *)iface;
@ -380,10 +380,9 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
IWineD3DVolumeTextureImpl_SetAutoGenFilterType, IWineD3DVolumeTextureImpl_SetAutoGenFilterType,
IWineD3DVolumeTextureImpl_GetAutoGenFilterType, IWineD3DVolumeTextureImpl_GetAutoGenFilterType,
IWineD3DVolumeTextureImpl_GenerateMipSubLevels, IWineD3DVolumeTextureImpl_GenerateMipSubLevels,
/* not in d3d */
IWineD3DVolumeTextureImpl_IsCondNP2, IWineD3DVolumeTextureImpl_IsCondNP2,
IWineD3DVolumeTextureImpl_GetSubResourceDesc,
/* volume texture */ /* volume texture */
IWineD3DVolumeTextureImpl_GetLevelDesc,
IWineD3DVolumeTextureImpl_GetVolumeLevel, IWineD3DVolumeTextureImpl_GetVolumeLevel,
IWineD3DVolumeTextureImpl_Map, IWineD3DVolumeTextureImpl_Map,
IWineD3DVolumeTextureImpl_Unmap, IWineD3DVolumeTextureImpl_Unmap,

View File

@ -2362,6 +2362,10 @@ interface IWineD3DBaseTexture : IWineD3DResource
); );
BOOL IsCondNP2( BOOL IsCondNP2(
); );
HRESULT GetSubResourceDesc(
[in] UINT sub_resource_idx,
[out] struct wined3d_resource_desc *desc
);
} }
[ [
@ -2371,10 +2375,6 @@ interface IWineD3DBaseTexture : IWineD3DResource
] ]
interface IWineD3DTexture : IWineD3DBaseTexture interface IWineD3DTexture : IWineD3DBaseTexture
{ {
HRESULT GetLevelDesc(
[in] UINT sub_resource_idx,
[out] struct wined3d_resource_desc *desc
);
HRESULT GetSurfaceLevel( HRESULT GetSurfaceLevel(
[in] UINT sub_resource_idx, [in] UINT sub_resource_idx,
[out] IWineD3DSurface **surface [out] IWineD3DSurface **surface
@ -2400,10 +2400,6 @@ interface IWineD3DTexture : IWineD3DBaseTexture
] ]
interface IWineD3DCubeTexture : IWineD3DBaseTexture interface IWineD3DCubeTexture : IWineD3DBaseTexture
{ {
HRESULT GetLevelDesc(
[in] UINT sub_resource_idx,
[out] struct wined3d_resource_desc *desc
);
HRESULT GetCubeMapSurface( HRESULT GetCubeMapSurface(
[in] UINT sub_resource_idx, [in] UINT sub_resource_idx,
[out] IWineD3DSurface **surface [out] IWineD3DSurface **surface
@ -2430,10 +2426,6 @@ interface IWineD3DCubeTexture : IWineD3DBaseTexture
] ]
interface IWineD3DVolumeTexture : IWineD3DBaseTexture interface IWineD3DVolumeTexture : IWineD3DBaseTexture
{ {
HRESULT GetLevelDesc(
[in] UINT sub_resource_idx,
[out] struct wined3d_resource_desc *desc
);
HRESULT GetVolumeLevel( HRESULT GetVolumeLevel(
[in] UINT sub_resource_idx, [in] UINT sub_resource_idx,
[out] IWineD3DVolume **volume [out] IWineD3DVolume **volume