d3d11: Add ID3D11Texture3D interface stub.
This commit is contained in:
parent
0707fa1912
commit
4665ae6260
|
@ -116,9 +116,10 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
|
||||||
const D3D11_SUBRESOURCE_DATA *data, struct d3d_texture2d **texture) DECLSPEC_HIDDEN;
|
const D3D11_SUBRESOURCE_DATA *data, struct d3d_texture2d **texture) DECLSPEC_HIDDEN;
|
||||||
struct d3d_texture2d *unsafe_impl_from_ID3D10Texture2D(ID3D10Texture2D *iface) DECLSPEC_HIDDEN;
|
struct d3d_texture2d *unsafe_impl_from_ID3D10Texture2D(ID3D10Texture2D *iface) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* ID3D10Texture3D */
|
/* ID3D11Texture3D, ID3D10Texture3D */
|
||||||
struct d3d_texture3d
|
struct d3d_texture3d
|
||||||
{
|
{
|
||||||
|
ID3D11Texture3D ID3D11Texture3D_iface;
|
||||||
ID3D10Texture3D ID3D10Texture3D_iface;
|
ID3D10Texture3D ID3D10Texture3D_iface;
|
||||||
LONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
|
|
|
@ -542,24 +542,36 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct d3d_texture3d *impl_from_ID3D10Texture3D(ID3D10Texture3D *iface)
|
/* ID3D11Texture3D methods */
|
||||||
|
|
||||||
|
static inline struct d3d_texture3d *impl_from_ID3D11Texture3D(ID3D11Texture3D *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, struct d3d_texture3d, ID3D10Texture3D_iface);
|
return CONTAINING_RECORD(iface, struct d3d_texture3d, ID3D11Texture3D_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D *iface, REFIID riid, void **object)
|
static HRESULT STDMETHODCALLTYPE d3d11_texture3d_QueryInterface(ID3D11Texture3D *iface, REFIID riid, void **object)
|
||||||
{
|
{
|
||||||
|
struct d3d_texture3d *texture = impl_from_ID3D11Texture3D(iface);
|
||||||
|
|
||||||
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
||||||
|
|
||||||
if (IsEqualGUID(riid, &IID_ID3D10Texture3D)
|
if (IsEqualGUID(riid, &IID_ID3D11Texture3D)
|
||||||
|| IsEqualGUID(riid, &IID_ID3D10Resource)
|
|| IsEqualGUID(riid, &IID_ID3D11Resource)
|
||||||
|| IsEqualGUID(riid, &IID_ID3D10DeviceChild)
|
|| IsEqualGUID(riid, &IID_ID3D11DeviceChild)
|
||||||
|| IsEqualGUID(riid, &IID_IUnknown))
|
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||||
{
|
{
|
||||||
IUnknown_AddRef(iface);
|
IUnknown_AddRef(iface);
|
||||||
*object = iface;
|
*object = iface;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
else if (IsEqualGUID(riid, &IID_ID3D10Texture3D)
|
||||||
|
|| IsEqualGUID(riid, &IID_ID3D10Resource)
|
||||||
|
|| IsEqualGUID(riid, &IID_ID3D10DeviceChild))
|
||||||
|
{
|
||||||
|
IUnknown_AddRef(iface);
|
||||||
|
*object = &texture->ID3D10Texture3D_iface;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
||||||
|
|
||||||
|
@ -567,9 +579,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_texture3d_AddRef(ID3D10Texture3D *iface)
|
static ULONG STDMETHODCALLTYPE d3d11_texture3d_AddRef(ID3D11Texture3D *iface)
|
||||||
{
|
{
|
||||||
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
struct d3d_texture3d *texture = impl_from_ID3D11Texture3D(iface);
|
||||||
ULONG refcount = InterlockedIncrement(&texture->refcount);
|
ULONG refcount = InterlockedIncrement(&texture->refcount);
|
||||||
|
|
||||||
TRACE("%p increasing refcount to %u.\n", texture, refcount);
|
TRACE("%p increasing refcount to %u.\n", texture, refcount);
|
||||||
|
@ -593,9 +605,9 @@ static void STDMETHODCALLTYPE d3d_texture3d_wined3d_object_released(void *parent
|
||||||
HeapFree(GetProcessHeap(), 0, parent);
|
HeapFree(GetProcessHeap(), 0, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface)
|
static ULONG STDMETHODCALLTYPE d3d11_texture3d_Release(ID3D11Texture3D *iface)
|
||||||
{
|
{
|
||||||
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
struct d3d_texture3d *texture = impl_from_ID3D11Texture3D(iface);
|
||||||
ULONG refcount = InterlockedDecrement(&texture->refcount);
|
ULONG refcount = InterlockedDecrement(&texture->refcount);
|
||||||
|
|
||||||
TRACE("%p decreasing refcount to %u.\n", texture, refcount);
|
TRACE("%p decreasing refcount to %u.\n", texture, refcount);
|
||||||
|
@ -615,6 +627,113 @@ static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface)
|
||||||
return refcount;
|
return refcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void STDMETHODCALLTYPE d3d11_texture3d_GetDevice(ID3D11Texture3D *iface, ID3D11Device **device)
|
||||||
|
{
|
||||||
|
FIXME("iface %p, device %p stub!\n", iface, device);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT STDMETHODCALLTYPE d3d11_texture3d_GetPrivateData(ID3D11Texture3D *iface,
|
||||||
|
REFGUID guid, UINT *data_size, void *data)
|
||||||
|
{
|
||||||
|
FIXME("iface %p, guid %s, data_size %p, data %p stub!\n", iface, debugstr_guid(guid), data_size, data);
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT STDMETHODCALLTYPE d3d11_texture3d_SetPrivateData(ID3D11Texture3D *iface,
|
||||||
|
REFGUID guid, UINT data_size, const void *data)
|
||||||
|
{
|
||||||
|
FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", iface, debugstr_guid(guid), data_size, data);
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT STDMETHODCALLTYPE d3d11_texture3d_SetPrivateDataInterface(ID3D11Texture3D *iface,
|
||||||
|
REFGUID guid, const IUnknown *data)
|
||||||
|
{
|
||||||
|
FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
|
||||||
|
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void STDMETHODCALLTYPE d3d11_texture3d_GetType(ID3D11Texture3D *iface,
|
||||||
|
D3D11_RESOURCE_DIMENSION *resource_dimension)
|
||||||
|
{
|
||||||
|
TRACE("iface %p, resource_dimension %p.\n", iface, resource_dimension);
|
||||||
|
|
||||||
|
*resource_dimension = D3D11_RESOURCE_DIMENSION_TEXTURE3D;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void STDMETHODCALLTYPE d3d11_texture3d_SetEvictionPriority(ID3D11Texture3D *iface, UINT eviction_priority)
|
||||||
|
{
|
||||||
|
FIXME("iface %p, eviction_priority %#x stub!\n", iface, eviction_priority);
|
||||||
|
}
|
||||||
|
|
||||||
|
static UINT STDMETHODCALLTYPE d3d11_texture3d_GetEvictionPriority(ID3D11Texture3D *iface)
|
||||||
|
{
|
||||||
|
FIXME("iface %p stub!\n", iface);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void STDMETHODCALLTYPE d3d11_texture3d_GetDesc(ID3D11Texture3D *iface, D3D11_TEXTURE3D_DESC *desc)
|
||||||
|
{
|
||||||
|
FIXME("iface %p, desc %p stub!\n", iface, desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct ID3D11Texture3DVtbl d3d11_texture3d_vtbl =
|
||||||
|
{
|
||||||
|
/* IUnknown methods */
|
||||||
|
d3d11_texture3d_QueryInterface,
|
||||||
|
d3d11_texture3d_AddRef,
|
||||||
|
d3d11_texture3d_Release,
|
||||||
|
/* ID3D11DeviceChild methods */
|
||||||
|
d3d11_texture3d_GetDevice,
|
||||||
|
d3d11_texture3d_GetPrivateData,
|
||||||
|
d3d11_texture3d_SetPrivateData,
|
||||||
|
d3d11_texture3d_SetPrivateDataInterface,
|
||||||
|
/* ID3D11Resource methods */
|
||||||
|
d3d11_texture3d_GetType,
|
||||||
|
d3d11_texture3d_SetEvictionPriority,
|
||||||
|
d3d11_texture3d_GetEvictionPriority,
|
||||||
|
/* ID3D11Texture3D methods */
|
||||||
|
d3d11_texture3d_GetDesc,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ID3D10Texture3D methods */
|
||||||
|
|
||||||
|
static inline struct d3d_texture3d *impl_from_ID3D10Texture3D(ID3D10Texture3D *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, struct d3d_texture3d, ID3D10Texture3D_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D *iface, REFIID riid, void **object)
|
||||||
|
{
|
||||||
|
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
||||||
|
|
||||||
|
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
|
||||||
|
|
||||||
|
return d3d11_texture3d_QueryInterface(&texture->ID3D11Texture3D_iface, riid, object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG STDMETHODCALLTYPE d3d10_texture3d_AddRef(ID3D10Texture3D *iface)
|
||||||
|
{
|
||||||
|
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
||||||
|
|
||||||
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
|
return d3d11_texture3d_AddRef(&texture->ID3D11Texture3D_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface)
|
||||||
|
{
|
||||||
|
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
||||||
|
|
||||||
|
TRACE("iface %p.\n", iface);
|
||||||
|
|
||||||
|
return d3d11_texture3d_Release(&texture->ID3D11Texture3D_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d10_texture3d_GetDevice(ID3D10Texture3D *iface, ID3D10Device **device)
|
static void STDMETHODCALLTYPE d3d10_texture3d_GetDevice(ID3D10Texture3D *iface, ID3D10Device **device)
|
||||||
{
|
{
|
||||||
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface);
|
||||||
|
@ -766,6 +885,7 @@ HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_device *dev
|
||||||
unsigned int levels;
|
unsigned int levels;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
texture->ID3D11Texture3D_iface.lpVtbl = &d3d11_texture3d_vtbl;
|
||||||
texture->ID3D10Texture3D_iface.lpVtbl = &d3d10_texture3d_vtbl;
|
texture->ID3D10Texture3D_iface.lpVtbl = &d3d10_texture3d_vtbl;
|
||||||
texture->refcount = 1;
|
texture->refcount = 1;
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
|
|
Loading…
Reference in New Issue