mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-22 16:14:10 +00:00
d3d11: Remove null dxgi object checks.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
b581165950
commit
f6f66661b3
|
@ -32,6 +32,7 @@ static inline struct d3d_texture1d *impl_from_ID3D11Texture1D(ID3D11Texture1D *i
|
|||
static HRESULT STDMETHODCALLTYPE d3d11_texture1d_QueryInterface(ID3D11Texture1D *iface, REFIID iid, void **out)
|
||||
{
|
||||
struct d3d_texture1d *texture = impl_from_ID3D11Texture1D(iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
|
||||
|
||||
|
@ -54,16 +55,15 @@ static HRESULT STDMETHODCALLTYPE d3d11_texture1d_QueryInterface(ID3D11Texture1D
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if (texture->dxgi_resource)
|
||||
TRACE("Forwarding to dxgi resource.\n");
|
||||
|
||||
if (FAILED(hr = IUnknown_QueryInterface(texture->dxgi_resource, iid, out)))
|
||||
{
|
||||
TRACE("Forwarding to dxgi resource.\n");
|
||||
return IUnknown_QueryInterface(texture->dxgi_resource, iid, out);
|
||||
WARN("%s not implemented, returning %#lx.\n", debugstr_guid(iid), hr);
|
||||
*out = NULL;
|
||||
}
|
||||
|
||||
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
||||
|
||||
*out = NULL;
|
||||
return E_NOINTERFACE;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static ULONG STDMETHODCALLTYPE d3d11_texture1d_AddRef(ID3D11Texture1D *iface)
|
||||
|
@ -514,6 +514,7 @@ HRESULT d3d_texture1d_create(struct d3d_device *device, const D3D11_TEXTURE1D_DE
|
|||
static HRESULT STDMETHODCALLTYPE d3d11_texture2d_QueryInterface(ID3D11Texture2D *iface, REFIID riid, void **object)
|
||||
{
|
||||
struct d3d_texture2d *texture = impl_from_ID3D11Texture2D(iface);
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
||||
|
||||
|
@ -535,16 +536,15 @@ static HRESULT STDMETHODCALLTYPE d3d11_texture2d_QueryInterface(ID3D11Texture2D
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if (texture->dxgi_resource)
|
||||
TRACE("Forwarding to dxgi resource.\n");
|
||||
|
||||
if (FAILED(hr = IUnknown_QueryInterface(texture->dxgi_resource, riid, object)))
|
||||
{
|
||||
TRACE("Forwarding to dxgi resource.\n");
|
||||
return IUnknown_QueryInterface(texture->dxgi_resource, riid, object);
|
||||
WARN("%s not implemented, returning %#lx.\n", debugstr_guid(riid), hr);
|
||||
*object = NULL;
|
||||
}
|
||||
|
||||
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
||||
|
||||
*object = NULL;
|
||||
return E_NOINTERFACE;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static ULONG STDMETHODCALLTYPE d3d11_texture2d_AddRef(ID3D11Texture2D *iface)
|
||||
|
|
Loading…
Reference in a new issue