d3d8: It's not an error to have a NULL texture bound to a stage.
This commit is contained in:
parent
c64da00de7
commit
906071aa9f
|
@ -1471,8 +1471,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(LPDIRECT3DDEVICE8 iface
|
||||||
|
|
||||||
static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage,IDirect3DBaseTexture8** ppTexture) {
|
static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage,IDirect3DBaseTexture8** ppTexture) {
|
||||||
IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
|
IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface;
|
||||||
IWineD3DBaseTexture *retTexture = NULL;
|
IWineD3DBaseTexture *retTexture;
|
||||||
HRESULT rc = D3D_OK;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%p) Relay\n" , This);
|
TRACE("(%p) Relay\n" , This);
|
||||||
|
|
||||||
|
@ -1481,17 +1481,27 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, D
|
||||||
}
|
}
|
||||||
|
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, &retTexture);
|
hr = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, &retTexture);
|
||||||
if (rc == D3D_OK && NULL != retTexture) {
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
WARN("Failed to get texture for stage %u, hr %#x.\n", Stage, hr);
|
||||||
|
wined3d_mutex_unlock();
|
||||||
|
*ppTexture = NULL;
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (retTexture)
|
||||||
|
{
|
||||||
IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture);
|
IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture);
|
||||||
IWineD3DBaseTexture_Release(retTexture);
|
IWineD3DBaseTexture_Release(retTexture);
|
||||||
} else {
|
}
|
||||||
FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture);
|
else
|
||||||
|
{
|
||||||
*ppTexture = NULL;
|
*ppTexture = NULL;
|
||||||
}
|
}
|
||||||
wined3d_mutex_unlock();
|
wined3d_mutex_unlock();
|
||||||
|
|
||||||
return rc;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage, IDirect3DBaseTexture8* pTexture) {
|
static HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage, IDirect3DBaseTexture8* pTexture) {
|
||||||
|
|
Loading…
Reference in New Issue