ReactOS 0.4.17-dev-934-g091855f
view.c File Reference
#include "d3d11_private.h"
Include dependency graph for view.c:

Go to the source code of this file.

Macros

#define NONAMELESSUNION
 
#define WINE_NO_NAMELESS_EXTENSION
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3d11)
 
static HRESULT get_resource_properties (ID3D11Resource *resource, D3D11_RESOURCE_DIMENSION *dimension, DXGI_FORMAT *format, unsigned int *miplevel_count, unsigned int *layer_count)
 
static HRESULT set_dsv_desc_from_resource (D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT normalize_dsv_desc (D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT set_rtv_desc_from_resource (D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT normalize_rtv_desc (D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT set_srv_desc_from_resource (D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT normalize_srv_desc (D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT set_uav_desc_from_resource (D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11Resource *resource)
 
static HRESULT normalize_uav_desc (D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11Resource *resource)
 
static struct d3d_depthstencil_view * impl_from_ID3D11DepthStencilView (ID3D11DepthStencilView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_QueryInterface (ID3D11DepthStencilView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_AddRef (ID3D11DepthStencilView *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_Release (ID3D11DepthStencilView *iface)
 
static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDevice (ID3D11DepthStencilView *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_GetPrivateData (ID3D11DepthStencilView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_SetPrivateData (ID3D11DepthStencilView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_SetPrivateDataInterface (ID3D11DepthStencilView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetResource (ID3D11DepthStencilView *iface, ID3D11Resource **resource)
 
static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDesc (ID3D11DepthStencilView *iface, D3D11_DEPTH_STENCIL_VIEW_DESC *desc)
 
static struct d3d_depthstencil_view * impl_from_ID3D10DepthStencilView (ID3D10DepthStencilView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_QueryInterface (ID3D10DepthStencilView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_AddRef (ID3D10DepthStencilView *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_Release (ID3D10DepthStencilView *iface)
 
static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDevice (ID3D10DepthStencilView *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_GetPrivateData (ID3D10DepthStencilView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateData (ID3D10DepthStencilView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateDataInterface (ID3D10DepthStencilView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetResource (ID3D10DepthStencilView *iface, ID3D10Resource **resource)
 
static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDesc (ID3D10DepthStencilView *iface, D3D10_DEPTH_STENCIL_VIEW_DESC *desc)
 
static void STDMETHODCALLTYPE d3d_depth_stencil_view_wined3d_object_destroyed (void *parent)
 
static void wined3d_depth_stencil_view_desc_from_d3d11 (struct wined3d_view_desc *wined3d_desc, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc)
 
static HRESULT d3d_depthstencil_view_init (struct d3d_depthstencil_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc)
 
HRESULT d3d_depthstencil_view_create (struct d3d_device *device, ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, struct d3d_depthstencil_view **view)
 
struct d3d_depthstencil_view * unsafe_impl_from_ID3D11DepthStencilView (ID3D11DepthStencilView *iface)
 
struct d3d_depthstencil_view * unsafe_impl_from_ID3D10DepthStencilView (ID3D10DepthStencilView *iface)
 
static struct d3d_rendertarget_view * impl_from_ID3D11RenderTargetView (ID3D11RenderTargetView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_QueryInterface (ID3D11RenderTargetView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_AddRef (ID3D11RenderTargetView *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_Release (ID3D11RenderTargetView *iface)
 
static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDevice (ID3D11RenderTargetView *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_GetPrivateData (ID3D11RenderTargetView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_SetPrivateData (ID3D11RenderTargetView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_SetPrivateDataInterface (ID3D11RenderTargetView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetResource (ID3D11RenderTargetView *iface, ID3D11Resource **resource)
 
static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDesc (ID3D11RenderTargetView *iface, D3D11_RENDER_TARGET_VIEW_DESC *desc)
 
static struct d3d_rendertarget_view * impl_from_ID3D10RenderTargetView (ID3D10RenderTargetView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_QueryInterface (ID3D10RenderTargetView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef (ID3D10RenderTargetView *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release (ID3D10RenderTargetView *iface)
 
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDevice (ID3D10RenderTargetView *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_GetPrivateData (ID3D10RenderTargetView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateData (ID3D10RenderTargetView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface (ID3D10RenderTargetView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource (ID3D10RenderTargetView *iface, ID3D10Resource **resource)
 
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDesc (ID3D10RenderTargetView *iface, D3D10_RENDER_TARGET_VIEW_DESC *desc)
 
static void STDMETHODCALLTYPE d3d_render_target_view_wined3d_object_destroyed (void *parent)
 
static void wined3d_rendertarget_view_desc_from_d3d11 (struct wined3d_view_desc *wined3d_desc, const D3D11_RENDER_TARGET_VIEW_DESC *desc)
 
static HRESULT d3d_rendertarget_view_init (struct d3d_rendertarget_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc)
 
HRESULT d3d_rendertarget_view_create (struct d3d_device *device, ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc, struct d3d_rendertarget_view **view)
 
struct d3d_rendertarget_view * unsafe_impl_from_ID3D11RenderTargetView (ID3D11RenderTargetView *iface)
 
struct d3d_rendertarget_view * unsafe_impl_from_ID3D10RenderTargetView (ID3D10RenderTargetView *iface)
 
static struct d3d_shader_resource_view * impl_from_ID3D11ShaderResourceView (ID3D11ShaderResourceView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_QueryInterface (ID3D11ShaderResourceView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_AddRef (ID3D11ShaderResourceView *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_Release (ID3D11ShaderResourceView *iface)
 
static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDevice (ID3D11ShaderResourceView *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_GetPrivateData (ID3D11ShaderResourceView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_SetPrivateData (ID3D11ShaderResourceView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_SetPrivateDataInterface (ID3D11ShaderResourceView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetResource (ID3D11ShaderResourceView *iface, ID3D11Resource **resource)
 
static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDesc (ID3D11ShaderResourceView *iface, D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
 
static struct d3d_shader_resource_view * impl_from_ID3D10ShaderResourceView (ID3D10ShaderResourceView1 *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_QueryInterface (ID3D10ShaderResourceView1 *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_AddRef (ID3D10ShaderResourceView1 *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_Release (ID3D10ShaderResourceView1 *iface)
 
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDevice (ID3D10ShaderResourceView1 *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_GetPrivateData (ID3D10ShaderResourceView1 *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateData (ID3D10ShaderResourceView1 *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateDataInterface (ID3D10ShaderResourceView1 *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetResource (ID3D10ShaderResourceView1 *iface, ID3D10Resource **resource)
 
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc (ID3D10ShaderResourceView1 *iface, D3D10_SHADER_RESOURCE_VIEW_DESC *desc)
 
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc1 (ID3D10ShaderResourceView1 *iface, D3D10_SHADER_RESOURCE_VIEW_DESC1 *desc)
 
static void STDMETHODCALLTYPE d3d_shader_resource_view_wined3d_object_destroyed (void *parent)
 
static unsigned int wined3d_view_flags_from_d3d11_bufferex_flags (unsigned int d3d11_flags)
 
static HRESULT wined3d_shader_resource_view_desc_from_d3d11 (struct wined3d_view_desc *wined3d_desc, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
 
static HRESULT d3d_shader_resource_view_init (struct d3d_shader_resource_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
 
HRESULT d3d_shader_resource_view_create (struct d3d_device *device, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc, struct d3d_shader_resource_view **view)
 
struct d3d_shader_resource_view * unsafe_impl_from_ID3D11ShaderResourceView (ID3D11ShaderResourceView *iface)
 
struct d3d_shader_resource_view * unsafe_impl_from_ID3D10ShaderResourceView (ID3D10ShaderResourceView *iface)
 
static struct d3d11_unordered_access_view * impl_from_ID3D11UnorderedAccessView (ID3D11UnorderedAccessView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_QueryInterface (ID3D11UnorderedAccessView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_AddRef (ID3D11UnorderedAccessView *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_Release (ID3D11UnorderedAccessView *iface)
 
static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDevice (ID3D11UnorderedAccessView *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_GetPrivateData (ID3D11UnorderedAccessView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_SetPrivateData (ID3D11UnorderedAccessView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_SetPrivateDataInterface (ID3D11UnorderedAccessView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetResource (ID3D11UnorderedAccessView *iface, ID3D11Resource **resource)
 
static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDesc (ID3D11UnorderedAccessView *iface, D3D11_UNORDERED_ACCESS_VIEW_DESC *desc)
 
static void STDMETHODCALLTYPE d3d11_unordered_access_view_wined3d_object_destroyed (void *parent)
 
static unsigned int wined3d_view_flags_from_d3d11_buffer_uav_flags (unsigned int d3d11_flags)
 
static HRESULT wined3d_unordered_access_view_desc_from_d3d11 (struct wined3d_view_desc *wined3d_desc, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc)
 
static HRESULT d3d11_unordered_access_view_init (struct d3d11_unordered_access_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc)
 
HRESULT d3d11_unordered_access_view_create (struct d3d_device *device, ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, struct d3d11_unordered_access_view **view)
 
struct d3d11_unordered_access_view * unsafe_impl_from_ID3D11UnorderedAccessView (ID3D11UnorderedAccessView *iface)
 
static struct d3d_video_decoder_output_view * impl_from_ID3D11VideoDecoderOutputView (ID3D11VideoDecoderOutputView *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_QueryInterface (ID3D11VideoDecoderOutputView *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_video_decoder_output_view_AddRef (ID3D11VideoDecoderOutputView *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_video_decoder_output_view_Release (ID3D11VideoDecoderOutputView *iface)
 
static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetDevice (ID3D11VideoDecoderOutputView *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetPrivateData (ID3D11VideoDecoderOutputView *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_SetPrivateData (ID3D11VideoDecoderOutputView *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_SetPrivateDataInterface (ID3D11VideoDecoderOutputView *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetResource (ID3D11VideoDecoderOutputView *iface, ID3D11Resource **resource)
 
static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetDesc (ID3D11VideoDecoderOutputView *iface, D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc)
 
static HRESULT d3d_video_decoder_output_view_init (struct d3d_video_decoder_output_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc)
 
HRESULT d3d_video_decoder_output_view_create (struct d3d_device *device, ID3D11Resource *resource, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc, struct d3d_video_decoder_output_view **view)
 

Variables

static const struct ID3D11DepthStencilViewVtbl d3d11_depthstencil_view_vtbl
 
static const struct ID3D10DepthStencilViewVtbl d3d10_depthstencil_view_vtbl
 
static const struct wined3d_parent_ops d3d_depth_stencil_view_wined3d_parent_ops
 
static const struct ID3D11RenderTargetViewVtbl d3d11_rendertarget_view_vtbl
 
static const struct ID3D10RenderTargetViewVtbl d3d10_rendertarget_view_vtbl
 
static const struct wined3d_parent_ops d3d_render_target_view_wined3d_parent_ops
 
static const struct ID3D11ShaderResourceViewVtbl d3d11_shader_resource_view_vtbl
 
static const struct ID3D10ShaderResourceView1Vtbl d3d10_shader_resource_view_vtbl
 
static const struct wined3d_parent_ops d3d_shader_resource_view_wined3d_parent_ops
 
static const struct ID3D11UnorderedAccessViewVtbl d3d11_unordered_access_view_vtbl
 
static const struct wined3d_parent_ops d3d11_unordered_access_view_wined3d_parent_ops
 
static const struct ID3D11VideoDecoderOutputViewVtbl d3d11_video_decoder_output_view_vtbl
 

Macro Definition Documentation

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 20 of file view.c.

◆ WINE_NO_NAMELESS_EXTENSION

#define WINE_NO_NAMELESS_EXTENSION

Definition at line 21 of file view.c.

Function Documentation

◆ d3d10_depthstencil_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_AddRef ( ID3D10DepthStencilView *  iface)
static

Definition at line 1087 of file view.c.

1088{
1090
1091 TRACE("iface %p.\n", iface);
1092
1093 return d3d11_depthstencil_view_AddRef(&view->ID3D11DepthStencilView_iface);
1094}
static struct d3d_depthstencil_view * impl_from_ID3D10DepthStencilView(ID3D10DepthStencilView *iface)
Definition: view.c:1070
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_AddRef(ID3D11DepthStencilView *iface)
Definition: view.c:956
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d10_depthstencil_view_GetDesc()

static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDesc ( ID3D10DepthStencilView *  iface,
D3D10_DEPTH_STENCIL_VIEW_DESC *  desc 
)
static

Definition at line 1162 of file view.c.

1164{
1166 const D3D11_DEPTH_STENCIL_VIEW_DESC *d3d11_desc = &view->desc;
1167
1168 TRACE("iface %p, desc %p.\n", iface, desc);
1169
1170 desc->Format = d3d11_desc->Format;
1171 desc->ViewDimension = (D3D10_DSV_DIMENSION)d3d11_desc->ViewDimension;
1172 memcpy(&desc->u, &d3d11_desc->u, sizeof(desc->u));
1173}
D3D10_DSV_DIMENSION
Definition: d3d10.idl:603
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683

◆ d3d10_depthstencil_view_GetDevice()

static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDevice ( ID3D10DepthStencilView *  iface,
ID3D10Device **  device 
)
static

Definition at line 1107 of file view.c.

1108{
1110
1111 TRACE("iface %p, device %p.\n", iface, device);
1112
1113 ID3D11Device2_QueryInterface(view->device, &IID_ID3D10Device, (void **)device);
1114}
Definition: devices.h:37

◆ d3d10_depthstencil_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_GetPrivateData ( ID3D10DepthStencilView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1116 of file view.c.

1118{
1120
1121 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
1122 iface, debugstr_guid(guid), data_size, data);
1123
1124 return d3d_get_private_data(&view->private_store, guid, data_size, data);
1125}
HRESULT d3d_get_private_data(struct wined3d_private_store *store, REFGUID guid, UINT *data_size, void *data)
Definition: utils.c:803
GUID guid
Definition: version.c:147
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define debugstr_guid
Definition: kernel32.h:35

◆ d3d10_depthstencil_view_GetResource()

static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetResource ( ID3D10DepthStencilView *  iface,
ID3D10Resource **  resource 
)
static

Definition at line 1150 of file view.c.

1152{
1154
1155 TRACE("iface %p, resource %p.\n", iface, resource);
1156
1157 ID3D11Resource_QueryInterface(view->resource, &IID_ID3D10Resource, (void **)resource);
1158}

◆ d3d10_depthstencil_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_QueryInterface ( ID3D10DepthStencilView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1077 of file view.c.

1079{
1081
1082 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1083
1084 return d3d11_depthstencil_view_QueryInterface(&view->ID3D11DepthStencilView_iface, riid, object);
1085}
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_QueryInterface(ID3D11DepthStencilView *iface, REFIID riid, void **object)
Definition: view.c:924
REFIID riid
Definition: atlbase.h:39

◆ d3d10_depthstencil_view_Release()

static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_Release ( ID3D10DepthStencilView *  iface)
static

Definition at line 1096 of file view.c.

1097{
1099
1100 TRACE("iface %p.\n", iface);
1101
1102 return d3d11_depthstencil_view_Release(&view->ID3D11DepthStencilView_iface);
1103}
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_Release(ID3D11DepthStencilView *iface)
Definition: view.c:972

◆ d3d10_depthstencil_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateData ( ID3D10DepthStencilView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1127 of file view.c.

1129{
1131
1132 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
1133 iface, debugstr_guid(guid), data_size, data);
1134
1135 return d3d_set_private_data(&view->private_store, guid, data_size, data);
1136}
HRESULT d3d_set_private_data(struct wined3d_private_store *store, REFGUID guid, UINT data_size, const void *data)
Definition: utils.c:841

◆ d3d10_depthstencil_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateDataInterface ( ID3D10DepthStencilView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1138 of file view.c.

1140{
1142
1143 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1144
1145 return d3d_set_private_data_interface(&view->private_store, guid, data);
1146}
HRESULT d3d_set_private_data_interface(struct wined3d_private_store *store, REFGUID guid, const IUnknown *object)
Definition: utils.c:867

◆ d3d10_rendertarget_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef ( ID3D10RenderTargetView *  iface)
static

Definition at line 1525 of file view.c.

1526{
1528
1529 TRACE("iface %p.\n", iface);
1530
1531 return d3d11_rendertarget_view_AddRef(&view->ID3D11RenderTargetView_iface);
1532}
static struct d3d_rendertarget_view * impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface)
Definition: view.c:1508
static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_AddRef(ID3D11RenderTargetView *iface)
Definition: view.c:1394

◆ d3d10_rendertarget_view_GetDesc()

static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDesc ( ID3D10RenderTargetView *  iface,
D3D10_RENDER_TARGET_VIEW_DESC *  desc 
)
static

Definition at line 1600 of file view.c.

1602{
1604
1605 TRACE("iface %p, desc %p\n", iface, desc);
1606
1607 memcpy(desc, &view->desc, sizeof(*desc));
1608}

◆ d3d10_rendertarget_view_GetDevice()

static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDevice ( ID3D10RenderTargetView *  iface,
ID3D10Device **  device 
)
static

Definition at line 1545 of file view.c.

1546{
1548
1549 TRACE("iface %p, device %p.\n", iface, device);
1550
1551 ID3D11Device2_QueryInterface(view->device, &IID_ID3D10Device, (void **)device);
1552}

◆ d3d10_rendertarget_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_GetPrivateData ( ID3D10RenderTargetView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1554 of file view.c.

1556{
1558
1559 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
1560 iface, debugstr_guid(guid), data_size, data);
1561
1562 return d3d_get_private_data(&view->private_store, guid, data_size, data);
1563}

◆ d3d10_rendertarget_view_GetResource()

static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource ( ID3D10RenderTargetView *  iface,
ID3D10Resource **  resource 
)
static

Definition at line 1588 of file view.c.

1590{
1592
1593 TRACE("iface %p, resource %p\n", iface, resource);
1594
1595 ID3D11Resource_QueryInterface(view->resource, &IID_ID3D10Resource, (void **)resource);
1596}

◆ d3d10_rendertarget_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_QueryInterface ( ID3D10RenderTargetView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1515 of file view.c.

1517{
1519
1520 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1521
1522 return d3d11_rendertarget_view_QueryInterface(&view->ID3D11RenderTargetView_iface, riid, object);
1523}
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_QueryInterface(ID3D11RenderTargetView *iface, REFIID riid, void **object)
Definition: view.c:1362

◆ d3d10_rendertarget_view_Release()

static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release ( ID3D10RenderTargetView *  iface)
static

Definition at line 1534 of file view.c.

1535{
1537
1538 TRACE("iface %p.\n", iface);
1539
1540 return d3d11_rendertarget_view_Release(&view->ID3D11RenderTargetView_iface);
1541}
static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_Release(ID3D11RenderTargetView *iface)
Definition: view.c:1410

◆ d3d10_rendertarget_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateData ( ID3D10RenderTargetView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1565 of file view.c.

1567{
1569
1570 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
1571 iface, debugstr_guid(guid), data_size, data);
1572
1573 return d3d_set_private_data(&view->private_store, guid, data_size, data);
1574}

◆ d3d10_rendertarget_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface ( ID3D10RenderTargetView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1576 of file view.c.

1578{
1580
1581 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1582
1583 return d3d_set_private_data_interface(&view->private_store, guid, data);
1584}

◆ d3d10_shader_resource_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_AddRef ( ID3D10ShaderResourceView1 *  iface)
static

Definition at line 1967 of file view.c.

1968{
1970
1971 TRACE("iface %p.\n", iface);
1972
1973 return d3d11_shader_resource_view_AddRef(&view->ID3D11ShaderResourceView_iface);
1974}
static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_AddRef(ID3D11ShaderResourceView *iface)
Definition: view.c:1836
static struct d3d_shader_resource_view * impl_from_ID3D10ShaderResourceView(ID3D10ShaderResourceView1 *iface)
Definition: view.c:1950

◆ d3d10_shader_resource_view_GetDesc()

static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc ( ID3D10ShaderResourceView1 *  iface,
D3D10_SHADER_RESOURCE_VIEW_DESC *  desc 
)
static

Definition at line 2043 of file view.c.

2045{
2047
2048 TRACE("iface %p, desc %p.\n", iface, desc);
2049
2050 memcpy(desc, &view->desc, sizeof(*desc));
2051}

◆ d3d10_shader_resource_view_GetDesc1()

static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc1 ( ID3D10ShaderResourceView1 *  iface,
D3D10_SHADER_RESOURCE_VIEW_DESC1 *  desc 
)
static

Definition at line 2053 of file view.c.

2055{
2057
2058 TRACE("iface %p, desc %p.\n", iface, desc);
2059
2060 memcpy(desc, &view->desc, sizeof(*desc));
2061}

◆ d3d10_shader_resource_view_GetDevice()

static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDevice ( ID3D10ShaderResourceView1 *  iface,
ID3D10Device **  device 
)
static

Definition at line 1987 of file view.c.

1989{
1991
1992 TRACE("iface %p, device %p.\n", iface, device);
1993
1994 ID3D11Device2_QueryInterface(view->device, &IID_ID3D10Device, (void **)device);
1995}

◆ d3d10_shader_resource_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_GetPrivateData ( ID3D10ShaderResourceView1 *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1997 of file view.c.

1999{
2001
2002 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
2003 iface, debugstr_guid(guid), data_size, data);
2004
2005 return d3d_get_private_data(&view->private_store, guid, data_size, data);
2006}

◆ d3d10_shader_resource_view_GetResource()

static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetResource ( ID3D10ShaderResourceView1 *  iface,
ID3D10Resource **  resource 
)
static

Definition at line 2031 of file view.c.

2033{
2035
2036 TRACE("iface %p, resource %p.\n", iface, resource);
2037
2038 ID3D11Resource_QueryInterface(view->resource, &IID_ID3D10Resource, (void **)resource);
2039}

◆ d3d10_shader_resource_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_QueryInterface ( ID3D10ShaderResourceView1 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1957 of file view.c.

1959{
1961
1962 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1963
1964 return d3d11_shader_resource_view_QueryInterface(&view->ID3D11ShaderResourceView_iface, riid, object);
1965}
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_QueryInterface(ID3D11ShaderResourceView *iface, REFIID riid, void **object)
Definition: view.c:1803

◆ d3d10_shader_resource_view_Release()

static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_Release ( ID3D10ShaderResourceView1 *  iface)
static

Definition at line 1976 of file view.c.

1977{
1979
1980 TRACE("iface %p.\n", iface);
1981
1982 return d3d11_shader_resource_view_Release(&view->ID3D11ShaderResourceView_iface);
1983}
static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_Release(ID3D11ShaderResourceView *iface)
Definition: view.c:1852

◆ d3d10_shader_resource_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateData ( ID3D10ShaderResourceView1 *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 2008 of file view.c.

2010{
2012
2013 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
2014 iface, debugstr_guid(guid), data_size, data);
2015
2016 return d3d_set_private_data(&view->private_store, guid, data_size, data);
2017}

◆ d3d10_shader_resource_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateDataInterface ( ID3D10ShaderResourceView1 *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 2019 of file view.c.

2021{
2023
2024 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
2025
2026 return d3d_set_private_data_interface(&view->private_store, guid, data);
2027}

◆ d3d11_depthstencil_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_AddRef ( ID3D11DepthStencilView *  iface)
static

Definition at line 956 of file view.c.

957{
960
961 TRACE("%p increasing refcount to %lu.\n", view, refcount);
962
963 if (refcount == 1)
964 {
965 ID3D11Device2_AddRef(view->device);
967 }
968
969 return refcount;
970}
#define InterlockedIncrement
Definition: armddk.h:53
static struct d3d_depthstencil_view * impl_from_ID3D11DepthStencilView(ID3D11DepthStencilView *iface)
Definition: view.c:919
ULONG CDECL wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view)
Definition: view.c:365
uint32_t ULONG
Definition: typedefs.h:59

Referenced by d3d10_depthstencil_view_AddRef().

◆ d3d11_depthstencil_view_GetDesc()

static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDesc ( ID3D11DepthStencilView *  iface,
D3D11_DEPTH_STENCIL_VIEW_DESC *  desc 
)
static

Definition at line 1041 of file view.c.

1043{
1045
1046 TRACE("iface %p, desc %p.\n", iface, desc);
1047
1048 *desc = view->desc;
1049}

◆ d3d11_depthstencil_view_GetDevice()

static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDevice ( ID3D11DepthStencilView *  iface,
ID3D11Device **  device 
)
static

Definition at line 989 of file view.c.

991{
993
994 TRACE("iface %p, device %p.\n", iface, device);
995
996 *device = (ID3D11Device *)view->device;
997 ID3D11Device_AddRef(*device);
998}

◆ d3d11_depthstencil_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_GetPrivateData ( ID3D11DepthStencilView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1000 of file view.c.

1002{
1004
1005 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1006
1007 return d3d_get_private_data(&view->private_store, guid, data_size, data);
1008}

◆ d3d11_depthstencil_view_GetResource()

static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetResource ( ID3D11DepthStencilView *  iface,
ID3D11Resource **  resource 
)
static

Definition at line 1030 of file view.c.

1032{
1034
1035 TRACE("iface %p, resource %p.\n", iface, resource);
1036
1037 *resource = view->resource;
1038 ID3D11Resource_AddRef(*resource);
1039}

◆ d3d11_depthstencil_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_QueryInterface ( ID3D11DepthStencilView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 924 of file view.c.

926{
928
929 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
930
931 if (IsEqualGUID(riid, &IID_ID3D11DepthStencilView)
932 || IsEqualGUID(riid, &IID_ID3D11View)
933 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
935 {
936 ID3D11DepthStencilView_AddRef(iface);
937 *object = iface;
938 return S_OK;
939 }
940
941 if (IsEqualGUID(riid, &IID_ID3D10DepthStencilView)
942 || IsEqualGUID(riid, &IID_ID3D10View)
943 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
944 {
945 ID3D10DepthStencilView_AddRef(&view->ID3D10DepthStencilView_iface);
946 *object = &view->ID3D10DepthStencilView_iface;
947 return S_OK;
948 }
949
950 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
951
952 *object = NULL;
953 return E_NOINTERFACE;
954}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
#define S_OK
Definition: intsafe.h:52
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

Referenced by d3d10_depthstencil_view_QueryInterface().

◆ d3d11_depthstencil_view_Release()

static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_Release ( ID3D11DepthStencilView *  iface)
static

Definition at line 972 of file view.c.

973{
976
977 TRACE("%p decreasing refcount to %lu.\n", view, refcount);
978
979 if (!refcount)
980 {
981 ID3D11Device2 *device = view->device;
983 ID3D11Device2_Release(device);
984 }
985
986 return refcount;
987}
#define InterlockedDecrement
Definition: armddk.h:52
ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *view)
Definition: view.c:379

Referenced by d3d10_depthstencil_view_Release().

◆ d3d11_depthstencil_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_SetPrivateData ( ID3D11DepthStencilView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1010 of file view.c.

1012{
1014
1015 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1016
1017 return d3d_set_private_data(&view->private_store, guid, data_size, data);
1018}

◆ d3d11_depthstencil_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_SetPrivateDataInterface ( ID3D11DepthStencilView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1020 of file view.c.

1022{
1024
1025 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1026
1027 return d3d_set_private_data_interface(&view->private_store, guid, data);
1028}

◆ d3d11_rendertarget_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_AddRef ( ID3D11RenderTargetView *  iface)
static

Definition at line 1394 of file view.c.

1395{
1398
1399 TRACE("%p increasing refcount to %lu.\n", view, refcount);
1400
1401 if (refcount == 1)
1402 {
1403 ID3D11Device2_AddRef(view->device);
1405 }
1406
1407 return refcount;
1408}
static struct d3d_rendertarget_view * impl_from_ID3D11RenderTargetView(ID3D11RenderTargetView *iface)
Definition: view.c:1357

Referenced by d3d10_rendertarget_view_AddRef().

◆ d3d11_rendertarget_view_GetDesc()

static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDesc ( ID3D11RenderTargetView *  iface,
D3D11_RENDER_TARGET_VIEW_DESC *  desc 
)
static

Definition at line 1479 of file view.c.

1481{
1483
1484 TRACE("iface %p, desc %p.\n", iface, desc);
1485
1486 *desc = view->desc;
1487}

◆ d3d11_rendertarget_view_GetDevice()

static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDevice ( ID3D11RenderTargetView *  iface,
ID3D11Device **  device 
)
static

Definition at line 1427 of file view.c.

1429{
1431
1432 TRACE("iface %p, device %p.\n", iface, device);
1433
1434 *device = (ID3D11Device *)view->device;
1435 ID3D11Device_AddRef(*device);
1436}

◆ d3d11_rendertarget_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_GetPrivateData ( ID3D11RenderTargetView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1438 of file view.c.

1440{
1442
1443 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1444
1445 return d3d_get_private_data(&view->private_store, guid, data_size, data);
1446}

◆ d3d11_rendertarget_view_GetResource()

static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetResource ( ID3D11RenderTargetView *  iface,
ID3D11Resource **  resource 
)
static

Definition at line 1468 of file view.c.

1470{
1472
1473 TRACE("iface %p, resource %p.\n", iface, resource);
1474
1475 *resource = view->resource;
1476 ID3D11Resource_AddRef(*resource);
1477}

◆ d3d11_rendertarget_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_QueryInterface ( ID3D11RenderTargetView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1362 of file view.c.

1364{
1366
1367 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1368
1369 if (IsEqualGUID(riid, &IID_ID3D11RenderTargetView)
1370 || IsEqualGUID(riid, &IID_ID3D11View)
1371 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
1373 {
1374 ID3D11RenderTargetView_AddRef(iface);
1375 *object = iface;
1376 return S_OK;
1377 }
1378
1379 if (IsEqualGUID(riid, &IID_ID3D10RenderTargetView)
1380 || IsEqualGUID(riid, &IID_ID3D10View)
1381 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
1382 {
1383 ID3D10RenderTargetView_AddRef(&view->ID3D10RenderTargetView_iface);
1384 *object = &view->ID3D10RenderTargetView_iface;
1385 return S_OK;
1386 }
1387
1388 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
1389
1390 *object = NULL;
1391 return E_NOINTERFACE;
1392}

Referenced by d3d10_rendertarget_view_QueryInterface().

◆ d3d11_rendertarget_view_Release()

static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_Release ( ID3D11RenderTargetView *  iface)
static

Definition at line 1410 of file view.c.

1411{
1414
1415 TRACE("%p decreasing refcount to %lu.\n", view, refcount);
1416
1417 if (!refcount)
1418 {
1419 ID3D11Device2 *device = view->device;
1421 ID3D11Device2_Release(device);
1422 }
1423
1424 return refcount;
1425}

Referenced by d3d10_rendertarget_view_Release().

◆ d3d11_rendertarget_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_SetPrivateData ( ID3D11RenderTargetView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1448 of file view.c.

1450{
1452
1453 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1454
1455 return d3d_set_private_data(&view->private_store, guid, data_size, data);
1456}

◆ d3d11_rendertarget_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_SetPrivateDataInterface ( ID3D11RenderTargetView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1458 of file view.c.

1460{
1462
1463 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1464
1465 return d3d_set_private_data_interface(&view->private_store, guid, data);
1466}

◆ d3d11_shader_resource_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_AddRef ( ID3D11ShaderResourceView *  iface)
static

Definition at line 1836 of file view.c.

1837{
1840
1841 TRACE("%p increasing refcount to %lu.\n", view, refcount);
1842
1843 if (refcount == 1)
1844 {
1845 ID3D11Device2_AddRef(view->device);
1847 }
1848
1849 return refcount;
1850}
static struct d3d_shader_resource_view * impl_from_ID3D11ShaderResourceView(ID3D11ShaderResourceView *iface)
Definition: view.c:1798
ULONG CDECL wined3d_shader_resource_view_incref(struct wined3d_shader_resource_view *view)
Definition: view.c:965

Referenced by d3d10_shader_resource_view_AddRef().

◆ d3d11_shader_resource_view_GetDesc()

static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDesc ( ID3D11ShaderResourceView *  iface,
D3D11_SHADER_RESOURCE_VIEW_DESC *  desc 
)
static

Definition at line 1921 of file view.c.

1923{
1925
1926 TRACE("iface %p, desc %p.\n", iface, desc);
1927
1928 *desc = view->desc;
1929}

◆ d3d11_shader_resource_view_GetDevice()

static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDevice ( ID3D11ShaderResourceView *  iface,
ID3D11Device **  device 
)
static

Definition at line 1869 of file view.c.

1871{
1873
1874 TRACE("iface %p, device %p.\n", iface, device);
1875
1876 *device = (ID3D11Device *)view->device;
1877 ID3D11Device_AddRef(*device);
1878}

◆ d3d11_shader_resource_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_GetPrivateData ( ID3D11ShaderResourceView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1880 of file view.c.

1882{
1884
1885 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1886
1887 return d3d_get_private_data(&view->private_store, guid, data_size, data);
1888}

◆ d3d11_shader_resource_view_GetResource()

static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetResource ( ID3D11ShaderResourceView *  iface,
ID3D11Resource **  resource 
)
static

Definition at line 1910 of file view.c.

1912{
1914
1915 TRACE("iface %p, resource %p.\n", iface, resource);
1916
1917 *resource = view->resource;
1918 ID3D11Resource_AddRef(*resource);
1919}

◆ d3d11_shader_resource_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_QueryInterface ( ID3D11ShaderResourceView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1803 of file view.c.

1805{
1807
1808 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1809
1810 if (IsEqualGUID(riid, &IID_ID3D11ShaderResourceView)
1811 || IsEqualGUID(riid, &IID_ID3D11View)
1812 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
1814 {
1815 ID3D11ShaderResourceView_AddRef(iface);
1816 *object = iface;
1817 return S_OK;
1818 }
1819
1820 if (IsEqualGUID(riid, &IID_ID3D10ShaderResourceView1)
1821 || IsEqualGUID(riid, &IID_ID3D10ShaderResourceView)
1822 || IsEqualGUID(riid, &IID_ID3D10View)
1823 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
1824 {
1825 ID3D10ShaderResourceView1_AddRef(&view->ID3D10ShaderResourceView1_iface);
1826 *object = &view->ID3D10ShaderResourceView1_iface;
1827 return S_OK;
1828 }
1829
1830 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
1831
1832 *object = NULL;
1833 return E_NOINTERFACE;
1834}

Referenced by d3d10_shader_resource_view_QueryInterface().

◆ d3d11_shader_resource_view_Release()

static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_Release ( ID3D11ShaderResourceView *  iface)
static

Definition at line 1852 of file view.c.

1853{
1856
1857 TRACE("%p decreasing refcount to %lu.\n", view, refcount);
1858
1859 if (!refcount)
1860 {
1861 ID3D11Device2 *device = view->device;
1863 ID3D11Device2_Release(device);
1864 }
1865
1866 return refcount;
1867}
ULONG CDECL wined3d_shader_resource_view_decref(struct wined3d_shader_resource_view *view)
Definition: view.c:990

Referenced by d3d10_shader_resource_view_Release().

◆ d3d11_shader_resource_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_SetPrivateData ( ID3D11ShaderResourceView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1890 of file view.c.

1892{
1894
1895 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1896
1897 return d3d_set_private_data(&view->private_store, guid, data_size, data);
1898}

◆ d3d11_shader_resource_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_SetPrivateDataInterface ( ID3D11ShaderResourceView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1900 of file view.c.

1902{
1904
1905 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1906
1907 return d3d_set_private_data_interface(&view->private_store, guid, data);
1908}

◆ d3d11_unordered_access_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_AddRef ( ID3D11UnorderedAccessView *  iface)
static

Definition at line 2315 of file view.c.

2316{
2319
2320 TRACE("%p increasing refcount to %lu.\n", view, refcount);
2321
2322 if (refcount == 1)
2323 {
2324 ID3D11Device2_AddRef(view->device);
2326 }
2327
2328 return refcount;
2329}
static struct d3d11_unordered_access_view * impl_from_ID3D11UnorderedAccessView(ID3D11UnorderedAccessView *iface)
Definition: view.c:2290
ULONG CDECL wined3d_unordered_access_view_incref(struct wined3d_unordered_access_view *view)
Definition: view.c:1522

◆ d3d11_unordered_access_view_create()

HRESULT d3d11_unordered_access_view_create ( struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_UNORDERED_ACCESS_VIEW_DESC *  desc,
struct d3d11_unordered_access_view **  view 
)

Definition at line 2553 of file view.c.

2555{
2557 HRESULT hr;
2558
2559 if (!(object = calloc(1, sizeof(*object))))
2560 return E_OUTOFMEMORY;
2561
2563 {
2564 WARN("Failed to initialise unordered access view, hr %#lx.\n", hr);
2565 free(object);
2566 return hr;
2567 }
2568
2569 TRACE("Created unordered access view %p.\n", object);
2570 *view = object;
2571
2572 return S_OK;
2573}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
static HRESULT d3d11_unordered_access_view_init(struct d3d11_unordered_access_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc)
Definition: view.c:2504
#define FAILED(hr)
Definition: intsafe.h:51
#define calloc
Definition: rosglue.h:14

Referenced by d3d11_device_CreateUnorderedAccessView().

◆ d3d11_unordered_access_view_GetDesc()

static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDesc ( ID3D11UnorderedAccessView *  iface,
D3D11_UNORDERED_ACCESS_VIEW_DESC *  desc 
)
static

Definition at line 2398 of file view.c.

2400{
2402
2403 TRACE("iface %p, desc %p.\n", iface, desc);
2404
2405 *desc = view->desc;
2406}

◆ d3d11_unordered_access_view_GetDevice()

static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDevice ( ID3D11UnorderedAccessView *  iface,
ID3D11Device **  device 
)
static

Definition at line 2348 of file view.c.

2350{
2352
2353 TRACE("iface %p, device %p.\n", iface, device);
2354
2355 ID3D11Device_AddRef(*device = (ID3D11Device *)view->device);
2356}

◆ d3d11_unordered_access_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_GetPrivateData ( ID3D11UnorderedAccessView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 2358 of file view.c.

2360{
2362
2363 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
2364
2365 return d3d_get_private_data(&view->private_store, guid, data_size, data);
2366}

◆ d3d11_unordered_access_view_GetResource()

static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetResource ( ID3D11UnorderedAccessView *  iface,
ID3D11Resource **  resource 
)
static

Definition at line 2388 of file view.c.

2390{
2392
2393 TRACE("iface %p, resource %p.\n", iface, resource);
2394
2395 ID3D11Resource_AddRef(*resource = view->resource);
2396}

◆ d3d11_unordered_access_view_init()

static HRESULT d3d11_unordered_access_view_init ( struct d3d11_unordered_access_view *  view,
struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_UNORDERED_ACCESS_VIEW_DESC *  desc 
)
static

Definition at line 2504 of file view.c.

2506{
2508 struct wined3d_view_desc wined3d_desc;
2509 HRESULT hr;
2510
2511 view->ID3D11UnorderedAccessView_iface.lpVtbl = &d3d11_unordered_access_view_vtbl;
2512 view->refcount = 1;
2513
2514 if (!desc)
2515 {
2517 }
2518 else
2519 {
2520 view->desc = *desc;
2522 }
2523 if (FAILED(hr))
2524 return hr;
2525
2526 if (FAILED(hr = wined3d_unordered_access_view_desc_from_d3d11(&wined3d_desc, &view->desc)))
2527 return hr;
2528
2531 {
2533 ERR("Failed to get wined3d resource for d3d11 resource %p.\n", resource);
2534 return E_FAIL;
2535 }
2536
2539 {
2541 WARN("Failed to create wined3d unordered access view, hr %#lx.\n", hr);
2542 return hr;
2543 }
2544
2545 wined3d_private_store_init(&view->private_store);
2547 view->resource = resource;
2548 ID3D11Device2_AddRef(view->device = &device->ID3D11Device2_iface);
2549
2550 return S_OK;
2551}
#define ERR(fmt,...)
Definition: precomp.h:57
struct wined3d_resource * wined3d_resource_from_d3d11_resource(ID3D11Resource *resource)
Definition: utils.c:680
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT set_uav_desc_from_resource(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:738
static const struct ID3D11UnorderedAccessViewVtbl d3d11_unordered_access_view_vtbl
Definition: view.c:2408
static HRESULT normalize_uav_desc(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:839
static HRESULT wined3d_unordered_access_view_desc_from_d3d11(struct wined3d_view_desc *wined3d_desc, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc)
Definition: view.c:2449
static const struct wined3d_parent_ops d3d11_unordered_access_view_wined3d_parent_ops
Definition: view.c:2433
HRESULT CDECL wined3d_unordered_access_view_create(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_unordered_access_view **view)
Definition: view.c:2551
#define resource
Definition: kernel32.h:9
static void wined3d_private_store_init(struct wined3d_private_store *store)
Definition: wined3d.h:2607
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:539

Referenced by d3d11_unordered_access_view_create().

◆ d3d11_unordered_access_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_QueryInterface ( ID3D11UnorderedAccessView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 2295 of file view.c.

2297{
2298 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
2299
2300 if (IsEqualGUID(riid, &IID_ID3D11UnorderedAccessView)
2301 || IsEqualGUID(riid, &IID_ID3D11View)
2302 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
2304 {
2305 ID3D11UnorderedAccessView_AddRef(*object = iface);
2306 return S_OK;
2307 }
2308
2309 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
2310
2311 *object = NULL;
2312 return E_NOINTERFACE;
2313}

◆ d3d11_unordered_access_view_Release()

static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_Release ( ID3D11UnorderedAccessView *  iface)
static

Definition at line 2331 of file view.c.

2332{
2335
2336 TRACE("%p decreasing refcount to %lu.\n", view, refcount);
2337
2338 if (!refcount)
2339 {
2340 ID3D11Device2 *device = view->device;
2342 ID3D11Device2_Release(device);
2343 }
2344
2345 return refcount;
2346}
ULONG CDECL wined3d_unordered_access_view_decref(struct wined3d_unordered_access_view *view)
Definition: view.c:1536

◆ d3d11_unordered_access_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_SetPrivateData ( ID3D11UnorderedAccessView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 2368 of file view.c.

2370{
2372
2373 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
2374
2375 return d3d_set_private_data(&view->private_store, guid, data_size, data);
2376}

◆ d3d11_unordered_access_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_SetPrivateDataInterface ( ID3D11UnorderedAccessView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 2378 of file view.c.

2380{
2382
2383 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
2384
2385 return d3d_set_private_data_interface(&view->private_store, guid, data);
2386}

◆ d3d11_unordered_access_view_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d11_unordered_access_view_wined3d_object_destroyed ( void *  parent)
static

Definition at line 2425 of file view.c.

2426{
2428
2429 wined3d_private_store_cleanup(&view->private_store);
2430 free(parent);
2431}
r parent
Definition: btrfs.c:3010
static void wined3d_private_store_cleanup(struct wined3d_private_store *store)
Definition: wined3d.h:2636

◆ d3d11_video_decoder_output_view_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_video_decoder_output_view_AddRef ( ID3D11VideoDecoderOutputView *  iface)
static

Definition at line 2609 of file view.c.

2610{
2613
2614 TRACE("%p increasing refcount to %lu.\n", view, refcount);
2615
2616 return refcount;
2617}
static struct d3d_video_decoder_output_view * impl_from_ID3D11VideoDecoderOutputView(ID3D11VideoDecoderOutputView *iface)
Definition: view.c:2584

◆ d3d11_video_decoder_output_view_GetDesc()

static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetDesc ( ID3D11VideoDecoderOutputView *  iface,
D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *  desc 
)
static

Definition at line 2686 of file view.c.

2688{
2690
2691 TRACE("iface %p, desc %p.\n", iface, desc);
2692
2693 *desc = view->desc;
2694}

◆ d3d11_video_decoder_output_view_GetDevice()

static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetDevice ( ID3D11VideoDecoderOutputView *  iface,
ID3D11Device **  device 
)
static

Definition at line 2636 of file view.c.

2638{
2640
2641 TRACE("iface %p, device %p.\n", iface, device);
2642
2643 ID3D11Device_AddRef(*device = (ID3D11Device *)view->device);
2644}

◆ d3d11_video_decoder_output_view_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetPrivateData ( ID3D11VideoDecoderOutputView *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 2646 of file view.c.

2648{
2650
2651 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
2652
2653 return d3d_get_private_data(&view->private_store, guid, data_size, data);
2654}

◆ d3d11_video_decoder_output_view_GetResource()

static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetResource ( ID3D11VideoDecoderOutputView *  iface,
ID3D11Resource **  resource 
)
static

Definition at line 2676 of file view.c.

2678{
2680
2681 TRACE("iface %p, resource %p.\n", iface, resource);
2682
2683 ID3D11Resource_AddRef(*resource = view->resource);
2684}

◆ d3d11_video_decoder_output_view_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_QueryInterface ( ID3D11VideoDecoderOutputView *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 2589 of file view.c.

2591{
2592 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
2593
2594 if (IsEqualGUID(riid, &IID_ID3D11VideoDecoderOutputView)
2595 || IsEqualGUID(riid, &IID_ID3D11View)
2596 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
2598 {
2599 ID3D11VideoDecoderOutputView_AddRef(*object = iface);
2600 return S_OK;
2601 }
2602
2603 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
2604
2605 *object = NULL;
2606 return E_NOINTERFACE;
2607}

◆ d3d11_video_decoder_output_view_Release()

static ULONG STDMETHODCALLTYPE d3d11_video_decoder_output_view_Release ( ID3D11VideoDecoderOutputView *  iface)
static

Definition at line 2619 of file view.c.

2620{
2623
2624 TRACE("%p decreasing refcount to %lu.\n", view, refcount);
2625
2626 if (!refcount)
2627 {
2628 ID3D11Device2_Release(&view->device->ID3D11Device2_iface);
2629 wined3d_private_store_cleanup(&view->private_store);
2630 free(view);
2631 }
2632
2633 return refcount;
2634}

◆ d3d11_video_decoder_output_view_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_SetPrivateData ( ID3D11VideoDecoderOutputView *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 2656 of file view.c.

2658{
2660
2661 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
2662
2663 return d3d_set_private_data(&view->private_store, guid, data_size, data);
2664}

◆ d3d11_video_decoder_output_view_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_SetPrivateDataInterface ( ID3D11VideoDecoderOutputView *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 2666 of file view.c.

2668{
2670
2671 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
2672
2673 return d3d_set_private_data_interface(&view->private_store, guid, data);
2674}

◆ d3d_depth_stencil_view_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_depth_stencil_view_wined3d_object_destroyed ( void *  parent)
static

Definition at line 1192 of file view.c.

1193{
1195
1196 wined3d_private_store_cleanup(&view->private_store);
1197 free(parent);
1198}

◆ d3d_depthstencil_view_create()

HRESULT d3d_depthstencil_view_create ( struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_DEPTH_STENCIL_VIEW_DESC *  desc,
struct d3d_depthstencil_view **  view 
)

Definition at line 1315 of file view.c.

1317{
1319 HRESULT hr;
1320
1321 if (!(object = calloc(1, sizeof(*object))))
1322 return E_OUTOFMEMORY;
1323
1325 {
1326 WARN("Failed to initialise depth/stencil view, hr %#lx.\n", hr);
1327 free(object);
1328 return hr;
1329 }
1330
1331 TRACE("Created depthstencil view %p.\n", object);
1332 *view = object;
1333
1334 return S_OK;
1335}
static HRESULT d3d_depthstencil_view_init(struct d3d_depthstencil_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc)
Definition: view.c:1267

Referenced by d3d10_device_CreateDepthStencilView(), and d3d11_device_CreateDepthStencilView().

◆ d3d_depthstencil_view_init()

static HRESULT d3d_depthstencil_view_init ( struct d3d_depthstencil_view *  view,
struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_DEPTH_STENCIL_VIEW_DESC *  desc 
)
static

Definition at line 1267 of file view.c.

1269{
1271 struct wined3d_view_desc wined3d_desc;
1272 HRESULT hr;
1273
1274 view->ID3D11DepthStencilView_iface.lpVtbl = &d3d11_depthstencil_view_vtbl;
1275 view->ID3D10DepthStencilView_iface.lpVtbl = &d3d10_depthstencil_view_vtbl;
1276 view->refcount = 1;
1277
1278 if (!desc)
1279 {
1281 }
1282 else
1283 {
1284 view->desc = *desc;
1286 }
1287 if (FAILED(hr))
1288 return hr;
1289
1292 {
1294 ERR("Failed to get wined3d resource for d3d11 resource %p.\n", resource);
1295 return E_FAIL;
1296 }
1297
1298 wined3d_depth_stencil_view_desc_from_d3d11(&wined3d_desc, &view->desc);
1301 {
1303 WARN("Failed to create a wined3d rendertarget view, hr %#lx.\n", hr);
1304 return hr;
1305 }
1306
1307 wined3d_private_store_init(&view->private_store);
1309 view->resource = resource;
1310 ID3D11Device2_AddRef(view->device = &device->ID3D11Device2_iface);
1311
1312 return S_OK;
1313}
static HRESULT normalize_dsv_desc(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:190
static HRESULT set_dsv_desc_from_resource(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:94
static void wined3d_depth_stencil_view_desc_from_d3d11(struct wined3d_view_desc *wined3d_desc, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc)
Definition: view.c:1205
static const struct ID3D10DepthStencilViewVtbl d3d10_depthstencil_view_vtbl
Definition: view.c:1175
static const struct ID3D11DepthStencilViewVtbl d3d11_depthstencil_view_vtbl
Definition: view.c:1051
static const struct wined3d_parent_ops d3d_depth_stencil_view_wined3d_parent_ops
Definition: view.c:1200
HRESULT CDECL wined3d_rendertarget_view_create(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)
Definition: view.c:933

Referenced by d3d_depthstencil_view_create().

◆ d3d_render_target_view_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_render_target_view_wined3d_object_destroyed ( void *  parent)
static

Definition at line 1627 of file view.c.

1628{
1630
1631 wined3d_private_store_cleanup(&view->private_store);
1632 free(parent);
1633}

◆ d3d_rendertarget_view_create()

HRESULT d3d_rendertarget_view_create ( struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_RENDER_TARGET_VIEW_DESC *  desc,
struct d3d_rendertarget_view **  view 
)

Definition at line 1756 of file view.c.

1758{
1760 HRESULT hr;
1761
1762 if (!(object = calloc(1, sizeof(*object))))
1763 return E_OUTOFMEMORY;
1764
1766 {
1767 WARN("Failed to initialise rendertarget view, hr %#lx.\n", hr);
1768 free(object);
1769 return hr;
1770 }
1771
1772 TRACE("Created rendertarget view %p.\n", object);
1773 *view = object;
1774
1775 return S_OK;
1776}
static HRESULT d3d_rendertarget_view_init(struct d3d_rendertarget_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc)
Definition: view.c:1708

Referenced by d3d10_device_CreateRenderTargetView(), and d3d11_device_CreateRenderTargetView().

◆ d3d_rendertarget_view_init()

static HRESULT d3d_rendertarget_view_init ( struct d3d_rendertarget_view *  view,
struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_RENDER_TARGET_VIEW_DESC *  desc 
)
static

Definition at line 1708 of file view.c.

1710{
1712 struct wined3d_view_desc wined3d_desc;
1713 HRESULT hr;
1714
1715 view->ID3D11RenderTargetView_iface.lpVtbl = &d3d11_rendertarget_view_vtbl;
1716 view->ID3D10RenderTargetView_iface.lpVtbl = &d3d10_rendertarget_view_vtbl;
1717 view->refcount = 1;
1718
1719 if (!desc)
1720 {
1722 }
1723 else
1724 {
1725 view->desc = *desc;
1727 }
1728 if (FAILED(hr))
1729 return hr;
1730
1733 {
1735 ERR("Failed to get wined3d resource for d3d11 resource %p.\n", resource);
1736 return E_FAIL;
1737 }
1738
1739 wined3d_rendertarget_view_desc_from_d3d11(&wined3d_desc, &view->desc);
1742 {
1744 WARN("Failed to create a wined3d rendertarget view, hr %#lx.\n", hr);
1745 return hr;
1746 }
1747
1748 wined3d_private_store_init(&view->private_store);
1750 view->resource = resource;
1751 ID3D11Device2_AddRef(view->device = &device->ID3D11Device2_iface);
1752
1753 return S_OK;
1754}
static HRESULT set_rtv_desc_from_resource(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:255
static void wined3d_rendertarget_view_desc_from_d3d11(struct wined3d_view_desc *wined3d_desc, const D3D11_RENDER_TARGET_VIEW_DESC *desc)
Definition: view.c:1640
static const struct ID3D10RenderTargetViewVtbl d3d10_rendertarget_view_vtbl
Definition: view.c:1610
static const struct ID3D11RenderTargetViewVtbl d3d11_rendertarget_view_vtbl
Definition: view.c:1489
static HRESULT normalize_rtv_desc(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:374
static const struct wined3d_parent_ops d3d_render_target_view_wined3d_parent_ops
Definition: view.c:1635

Referenced by d3d_rendertarget_view_create().

◆ d3d_shader_resource_view_create()

HRESULT d3d_shader_resource_view_create ( struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_SHADER_RESOURCE_VIEW_DESC *  desc,
struct d3d_shader_resource_view **  view 
)

Definition at line 2250 of file view.c.

2252{
2254 HRESULT hr;
2255
2256 if (!(object = calloc(1, sizeof(*object))))
2257 return E_OUTOFMEMORY;
2258
2260 {
2261 WARN("Failed to initialise shader resource view, hr %#lx.\n", hr);
2262 free(object);
2263 return hr;
2264 }
2265
2266 TRACE("Created shader resource view %p.\n", object);
2267 *view = object;
2268
2269 return S_OK;
2270}
static HRESULT d3d_shader_resource_view_init(struct d3d_shader_resource_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
Definition: view.c:2200

Referenced by d3d10_device_CreateShaderResourceView1(), and d3d11_device_CreateShaderResourceView().

◆ d3d_shader_resource_view_init()

static HRESULT d3d_shader_resource_view_init ( struct d3d_shader_resource_view *  view,
struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_SHADER_RESOURCE_VIEW_DESC *  desc 
)
static

Definition at line 2200 of file view.c.

2202{
2204 struct wined3d_view_desc wined3d_desc;
2205 HRESULT hr;
2206
2207 view->ID3D11ShaderResourceView_iface.lpVtbl = &d3d11_shader_resource_view_vtbl;
2208 view->ID3D10ShaderResourceView1_iface.lpVtbl = &d3d10_shader_resource_view_vtbl;
2209 view->refcount = 1;
2210
2211 if (!desc)
2212 {
2214 }
2215 else
2216 {
2217 view->desc = *desc;
2219 }
2220 if (FAILED(hr))
2221 return hr;
2222
2223 if (FAILED(hr = wined3d_shader_resource_view_desc_from_d3d11(&wined3d_desc, &view->desc)))
2224 return hr;
2225
2228 {
2230 ERR("Failed to get wined3d resource for d3d11 resource %p.\n", resource);
2231 return E_FAIL;
2232 }
2233
2236 {
2238 WARN("Failed to create wined3d shader resource view, hr %#lx.\n", hr);
2239 return hr;
2240 }
2241
2242 wined3d_private_store_init(&view->private_store);
2244 view->resource = resource;
2245 ID3D11Device2_AddRef(view->device = &device->ID3D11Device2_iface);
2246
2247 return S_OK;
2248}
static const struct ID3D11ShaderResourceViewVtbl d3d11_shader_resource_view_vtbl
Definition: view.c:1931
static HRESULT set_srv_desc_from_resource(D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:459
static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_view_desc *wined3d_desc, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
Definition: view.c:2105
static const struct ID3D10ShaderResourceView1Vtbl d3d10_shader_resource_view_vtbl
Definition: view.c:2063
static HRESULT normalize_srv_desc(D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11Resource *resource)
Definition: view.c:620
static const struct wined3d_parent_ops d3d_shader_resource_view_wined3d_parent_ops
Definition: view.c:2090
HRESULT CDECL wined3d_shader_resource_view_create(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader_resource_view **view)
Definition: view.c:1261

Referenced by d3d_shader_resource_view_create().

◆ d3d_shader_resource_view_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_shader_resource_view_wined3d_object_destroyed ( void *  parent)
static

Definition at line 2082 of file view.c.

2083{
2085
2086 wined3d_private_store_cleanup(&view->private_store);
2087 free(parent);
2088}

◆ d3d_video_decoder_output_view_create()

HRESULT d3d_video_decoder_output_view_create ( struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *  desc,
struct d3d_video_decoder_output_view **  view 
)

Definition at line 2729 of file view.c.

2731{
2733 HRESULT hr;
2734
2735 TRACE("profile %s, slice %u.\n", debugstr_guid(&desc->DecodeProfile), desc->u.Texture2D.ArraySlice);
2736
2737 if (!(object = calloc(1, sizeof(*object))))
2738 return E_OUTOFMEMORY;
2739
2741 {
2742 WARN("Failed to initialise video decoder output view, hr %#lx.\n", hr);
2743 free(object);
2744 return hr;
2745 }
2746
2747 TRACE("Created video decoder output view %p.\n", object);
2748 *view = object;
2749
2750 return S_OK;
2751}
static HRESULT d3d_video_decoder_output_view_init(struct d3d_video_decoder_output_view *view, struct d3d_device *device, ID3D11Resource *resource, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc)
Definition: view.c:2713

Referenced by d3d11_video_device_CreateVideoDecoderOutputView().

◆ d3d_video_decoder_output_view_init()

static HRESULT d3d_video_decoder_output_view_init ( struct d3d_video_decoder_output_view *  view,
struct d3d_device *  device,
ID3D11Resource *  resource,
const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *  desc 
)
static

Definition at line 2713 of file view.c.

2715{
2716 view->ID3D11VideoDecoderOutputView_iface.lpVtbl = &d3d11_video_decoder_output_view_vtbl;
2717 view->refcount = 1;
2718
2720 wined3d_private_store_init(&view->private_store);
2722 view->resource = resource;
2723 view->device = device;
2724 ID3D11Device2_AddRef(&device->ID3D11Device2_iface);
2725
2726 return S_OK;
2727}
static const struct ID3D11VideoDecoderOutputViewVtbl d3d11_video_decoder_output_view_vtbl
Definition: view.c:2696

Referenced by d3d_video_decoder_output_view_create().

◆ get_resource_properties()

static HRESULT get_resource_properties ( ID3D11Resource *  resource,
D3D11_RESOURCE_DIMENSION *  dimension,
DXGI_FORMAT *  format,
unsigned int *  miplevel_count,
unsigned int *  layer_count 
)
static

Definition at line 26 of file view.c.

28{
29 ID3D11Resource_GetType(resource, dimension);
30 switch (*dimension)
31 {
32 case D3D11_RESOURCE_DIMENSION_BUFFER:
33 return S_OK;
34
35 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
36 {
37 const struct d3d_texture1d *texture;
38
39 if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
40 {
41 ERR("Cannot get implementation from ID3D11Texture1D.\n");
42 return E_FAIL;
43 }
44
45 *format = texture->desc.Format;
46 if (miplevel_count)
47 *miplevel_count = texture->desc.MipLevels;
48 *layer_count = texture->desc.ArraySize;
49 break;
50 }
51
52 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
53 {
54 const struct d3d_texture2d *texture;
55
56 if (!(texture = unsafe_impl_from_ID3D11Texture2D((ID3D11Texture2D *)resource)))
57 {
58 ERR("Cannot get implementation from ID3D11Texture2D.\n");
59 return E_FAIL;
60 }
61
62 *format = texture->desc.Format;
63 if (miplevel_count)
64 *miplevel_count = texture->desc.MipLevels;
65 *layer_count = texture->desc.ArraySize;
66 break;
67 }
68
69 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
70 {
71 const struct d3d_texture3d *texture;
72
73 if (!(texture = unsafe_impl_from_ID3D11Texture3D((ID3D11Texture3D *)resource)))
74 {
75 ERR("Cannot get implementation from ID3D11Texture3D.\n");
76 return E_FAIL;
77 }
78
79 *format = texture->desc.Format;
80 if (miplevel_count)
81 *miplevel_count = texture->desc.MipLevels;
82 *layer_count = texture->desc.Depth;
83 break;
84 }
85
86 default:
87 WARN("Invalid resource dimension %#x.\n", *dimension);
88 return E_INVALIDARG;
89 }
90
91 return S_OK;
92}
struct d3d_texture2d * unsafe_impl_from_ID3D11Texture2D(ID3D11Texture2D *iface)
Definition: texture.c:718
struct d3d_texture3d * unsafe_impl_from_ID3D11Texture3D(ID3D11Texture3D *iface)
Definition: texture.c:1432
struct d3d_texture1d * unsafe_impl_from_ID3D11Texture1D(ID3D11Texture1D *iface)
Definition: texture.c:216
#define E_INVALIDARG
Definition: ddrawi.h:101
GLenum GLuint texture
Definition: glext.h:6295

Referenced by normalize_dsv_desc(), normalize_rtv_desc(), normalize_srv_desc(), and normalize_uav_desc().

◆ impl_from_ID3D10DepthStencilView()

◆ impl_from_ID3D10RenderTargetView()

◆ impl_from_ID3D10ShaderResourceView()

◆ impl_from_ID3D11DepthStencilView()

◆ impl_from_ID3D11RenderTargetView()

◆ impl_from_ID3D11ShaderResourceView()

◆ impl_from_ID3D11UnorderedAccessView()

◆ impl_from_ID3D11VideoDecoderOutputView()

◆ normalize_dsv_desc()

static HRESULT normalize_dsv_desc ( D3D11_DEPTH_STENCIL_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 190 of file view.c.

191{
192 D3D11_RESOURCE_DIMENSION dimension;
193 unsigned int layer_count;
195 HRESULT hr;
196
197 if (FAILED(hr = get_resource_properties(resource, &dimension, &format, NULL, &layer_count)))
198 return hr;
199 switch (dimension)
200 {
201 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
202 if (desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1D
203 && desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1DARRAY)
204 {
205 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
206 return E_INVALIDARG;
207 }
208 break;
209
210 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
211 if (desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE2D
212 && desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE2DARRAY
213 && desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE2DMS
214 && desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY)
215 {
216 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
217 return E_INVALIDARG;
218 }
219 break;
220
221 case D3D11_RESOURCE_DIMENSION_BUFFER:
222 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
223 default:
224 WARN("Invalid resource dimension %#x.\n", dimension);
225 return E_INVALIDARG;
226 }
227
228 if (desc->Format == DXGI_FORMAT_UNKNOWN)
229 desc->Format = format;
230
231 switch (desc->ViewDimension)
232 {
234 if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < layer_count)
235 desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice;
236 break;
237
239 if (desc->u.Texture2DArray.ArraySize == ~0u && desc->u.Texture2DArray.FirstArraySlice < layer_count)
240 desc->u.Texture2DArray.ArraySize = layer_count - desc->u.Texture2DArray.FirstArraySlice;
241 break;
242
244 if (desc->u.Texture2DMSArray.ArraySize == ~0u && desc->u.Texture2DMSArray.FirstArraySlice < layer_count)
245 desc->u.Texture2DMSArray.ArraySize = layer_count - desc->u.Texture2DMSArray.FirstArraySlice;
246 break;
247
248 default:
249 break;
250 }
251
252 return S_OK;
253}
@ D3D11_DSV_DIMENSION_TEXTURE2DMS
Definition: d3d11.idl:655
@ D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY
Definition: d3d11.idl:656
@ D3D11_DSV_DIMENSION_TEXTURE2D
Definition: d3d11.idl:653
@ D3D11_DSV_DIMENSION_TEXTURE1DARRAY
Definition: d3d11.idl:652
@ D3D11_DSV_DIMENSION_TEXTURE2DARRAY
Definition: d3d11.idl:654
@ D3D11_DSV_DIMENSION_TEXTURE1D
Definition: d3d11.idl:651
static HRESULT get_resource_properties(ID3D11Resource *resource, D3D11_RESOURCE_DIMENSION *dimension, DXGI_FORMAT *format, unsigned int *miplevel_count, unsigned int *layer_count)
Definition: view.c:26
DXGI_FORMAT
Definition: dxgiformat.idl:22
@ DXGI_FORMAT_UNKNOWN
Definition: dxgiformat.idl:23
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240

Referenced by d3d_depthstencil_view_init().

◆ normalize_rtv_desc()

static HRESULT normalize_rtv_desc ( D3D11_RENDER_TARGET_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 374 of file view.c.

375{
376 D3D11_RESOURCE_DIMENSION dimension;
377 unsigned int layer_count;
379 HRESULT hr;
380
381 if (FAILED(hr = get_resource_properties(resource, &dimension, &format, NULL, &layer_count)))
382 return hr;
383 switch (dimension)
384 {
385 case D3D11_RESOURCE_DIMENSION_BUFFER:
386 if (desc->ViewDimension != D3D11_RTV_DIMENSION_BUFFER)
387 {
388 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
389 return E_INVALIDARG;
390 }
391 return S_OK;
392
393 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
394 if (desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1D
395 && desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1DARRAY)
396 {
397 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
398 return E_INVALIDARG;
399 }
400 break;
401
402 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
403 if (desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE2D
404 && desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE2DARRAY
405 && desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE2DMS
406 && desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY)
407 {
408 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
409 return E_INVALIDARG;
410 }
411 break;
412
413 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
414 if (desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE3D)
415 {
416 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
417 return E_INVALIDARG;
418 }
419 break;
420
421 default:
422 WARN("Invalid resource dimension %#x.\n", dimension);
423 return E_INVALIDARG;
424 }
425
426 if (desc->Format == DXGI_FORMAT_UNKNOWN)
427 desc->Format = format;
428
429 switch (desc->ViewDimension)
430 {
431 case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
432 if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < layer_count)
433 desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice;
434 break;
435
436 case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
437 if (desc->u.Texture2DArray.ArraySize == ~0u && desc->u.Texture2DArray.FirstArraySlice < layer_count)
438 desc->u.Texture2DArray.ArraySize = layer_count - desc->u.Texture2DArray.FirstArraySlice;
439 break;
440
441 case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
442 if (desc->u.Texture2DMSArray.ArraySize == ~0u && desc->u.Texture2DMSArray.FirstArraySlice < layer_count)
443 desc->u.Texture2DMSArray.ArraySize = layer_count - desc->u.Texture2DMSArray.FirstArraySlice;
444 break;
445
446 case D3D11_RTV_DIMENSION_TEXTURE3D:
447 layer_count = max(1, layer_count >> desc->u.Texture3D.MipSlice);
448 if (desc->u.Texture3D.WSize == ~0u && desc->u.Texture3D.FirstWSlice < layer_count)
449 desc->u.Texture3D.WSize = layer_count - desc->u.Texture3D.FirstWSlice;
450 break;
451
452 default:
453 break;
454 }
455
456 return S_OK;
457}
#define max(a, b)
Definition: svc.c:63

Referenced by d3d_rendertarget_view_init().

◆ normalize_srv_desc()

static HRESULT normalize_srv_desc ( D3D11_SHADER_RESOURCE_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 620 of file view.c.

621{
622 unsigned int miplevel_count, layer_count;
623 D3D11_RESOURCE_DIMENSION dimension;
625 HRESULT hr;
626
627 if (FAILED(hr = get_resource_properties(resource, &dimension, &format, &miplevel_count, &layer_count)))
628 return hr;
629 switch (dimension)
630 {
631 case D3D11_RESOURCE_DIMENSION_BUFFER:
632 if (desc->ViewDimension != D3D11_SRV_DIMENSION_BUFFER
633 && desc->ViewDimension != D3D11_SRV_DIMENSION_BUFFEREX)
634 {
635 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
636 return E_INVALIDARG;
637 }
638 if (!desc->u.Buffer.u2.NumElements)
639 {
640 WARN("Zero sized buffer view.\n");
641 return E_INVALIDARG;
642 }
643 return S_OK;
644
645 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
646 if (desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1D
647 && desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1DARRAY)
648 {
649 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
650 return E_INVALIDARG;
651 }
652 break;
653
654 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
655 if (desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE2D
656 && desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE2DARRAY
657 && desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE2DMS
658 && desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY
659 && desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURECUBE
660 && desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURECUBEARRAY)
661 {
662 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
663 return E_INVALIDARG;
664 }
665 break;
666
667 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
668 if (desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE3D)
669 {
670 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
671 return E_INVALIDARG;
672 }
673 break;
674
675 default:
676 WARN("Invalid resource dimension %#x.\n", dimension);
677 return E_INVALIDARG;
678 }
679
680 if (desc->Format == DXGI_FORMAT_UNKNOWN)
681 desc->Format = format;
682
683 switch (desc->ViewDimension)
684 {
686 if (desc->u.Texture1D.MipLevels == ~0u && desc->u.Texture1D.MostDetailedMip < miplevel_count)
687 desc->u.Texture1D.MipLevels = miplevel_count - desc->u.Texture1D.MostDetailedMip;
688 break;
689
691 if (desc->u.Texture1DArray.MipLevels == ~0u && desc->u.Texture1DArray.MostDetailedMip < miplevel_count)
692 desc->u.Texture1DArray.MipLevels = miplevel_count - desc->u.Texture1DArray.MostDetailedMip;
693 if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < miplevel_count)
694 desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice;
695 break;
696
698 if (desc->u.Texture2D.MipLevels == ~0u && desc->u.Texture2D.MostDetailedMip < miplevel_count)
699 desc->u.Texture2D.MipLevels = miplevel_count - desc->u.Texture2D.MostDetailedMip;
700 break;
701
703 if (desc->u.Texture2DArray.MipLevels == ~0u && desc->u.Texture2DArray.MostDetailedMip < miplevel_count)
704 desc->u.Texture2DArray.MipLevels = miplevel_count - desc->u.Texture2DArray.MostDetailedMip;
705 if (desc->u.Texture2DArray.ArraySize == ~0u && desc->u.Texture2DArray.FirstArraySlice < layer_count)
706 desc->u.Texture2DArray.ArraySize = layer_count - desc->u.Texture2DArray.FirstArraySlice;
707 break;
708
710 if (desc->u.Texture2DMSArray.ArraySize == ~0u && desc->u.Texture2DMSArray.FirstArraySlice < layer_count)
711 desc->u.Texture2DMSArray.ArraySize = layer_count - desc->u.Texture2DMSArray.FirstArraySlice;
712 break;
713
715 if (desc->u.Texture3D.MipLevels == ~0u && desc->u.Texture3D.MostDetailedMip < miplevel_count)
716 desc->u.Texture3D.MipLevels = miplevel_count - desc->u.Texture3D.MostDetailedMip;
717 break;
718
720 if (desc->u.TextureCube.MipLevels == ~0u && desc->u.TextureCube.MostDetailedMip < miplevel_count)
721 desc->u.TextureCube.MipLevels = miplevel_count - desc->u.TextureCube.MostDetailedMip;
722 break;
723
725 if (desc->u.TextureCubeArray.MipLevels == ~0u && desc->u.TextureCubeArray.MostDetailedMip < miplevel_count)
726 desc->u.TextureCubeArray.MipLevels = miplevel_count - desc->u.TextureCubeArray.MostDetailedMip;
727 if (desc->u.TextureCubeArray.NumCubes == ~0u && desc->u.TextureCubeArray.First2DArrayFace < layer_count)
728 desc->u.TextureCubeArray.NumCubes = (layer_count - desc->u.TextureCubeArray.First2DArrayFace) / 6;
729 break;
730
731 default:
732 break;
733 }
734
735 return S_OK;
736}
@ D3D11_SRV_DIMENSION_TEXTURE1D
Definition: d3dcommon.idl:584
@ D3D11_SRV_DIMENSION_TEXTURECUBE
Definition: d3dcommon.idl:591
@ D3D11_SRV_DIMENSION_TEXTURE2DARRAY
Definition: d3dcommon.idl:587
@ D3D11_SRV_DIMENSION_BUFFER
Definition: d3dcommon.idl:583
@ D3D11_SRV_DIMENSION_TEXTURE1DARRAY
Definition: d3dcommon.idl:585
@ D3D11_SRV_DIMENSION_BUFFEREX
Definition: d3dcommon.idl:593
@ D3D11_SRV_DIMENSION_TEXTURE2DMS
Definition: d3dcommon.idl:588
@ D3D11_SRV_DIMENSION_TEXTURE3D
Definition: d3dcommon.idl:590
@ D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY
Definition: d3dcommon.idl:589
@ D3D11_SRV_DIMENSION_TEXTURE2D
Definition: d3dcommon.idl:586
@ D3D11_SRV_DIMENSION_TEXTURECUBEARRAY
Definition: d3dcommon.idl:592

Referenced by d3d_shader_resource_view_init().

◆ normalize_uav_desc()

static HRESULT normalize_uav_desc ( D3D11_UNORDERED_ACCESS_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 839 of file view.c.

840{
841 D3D11_RESOURCE_DIMENSION dimension;
842 unsigned int layer_count;
844 HRESULT hr;
845
846 if (FAILED(hr = get_resource_properties(resource, &dimension, &format, NULL, &layer_count)))
847 return hr;
848 switch (dimension)
849 {
850 case D3D11_RESOURCE_DIMENSION_BUFFER:
851 if (desc->ViewDimension != D3D11_UAV_DIMENSION_BUFFER)
852 {
853 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
854 return E_INVALIDARG;
855 }
856 return S_OK;
857
858 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
859 if (desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1D
860 && desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1DARRAY)
861 {
862 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
863 return E_INVALIDARG;
864 }
865 break;
866
867 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
868 if (desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE2D
869 && desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE2DARRAY)
870 {
871 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
872 return E_INVALIDARG;
873 }
874 break;
875
876 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
877 if (desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE3D)
878 {
879 WARN("Incompatible dimensions %#x, %#x.\n", dimension, desc->ViewDimension);
880 return E_INVALIDARG;
881 }
882 break;
883
884 default:
885 WARN("Invalid resource dimension %#x.\n", dimension);
886 return E_INVALIDARG;
887 }
888
889 if (desc->Format == DXGI_FORMAT_UNKNOWN)
890 desc->Format = format;
891
892 switch (desc->ViewDimension)
893 {
894 case D3D11_UAV_DIMENSION_TEXTURE1DARRAY:
895 if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < layer_count)
896 desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice;
897 break;
898
899 case D3D11_UAV_DIMENSION_TEXTURE2DARRAY:
900 if (desc->u.Texture2DArray.ArraySize == ~0u && desc->u.Texture2DArray.FirstArraySlice < layer_count)
901 desc->u.Texture2DArray.ArraySize = layer_count - desc->u.Texture2DArray.FirstArraySlice;
902 break;
903
904 case D3D11_UAV_DIMENSION_TEXTURE3D:
905 layer_count = max(1, layer_count >> desc->u.Texture3D.MipSlice);
906 if (desc->u.Texture3D.WSize == ~0u && desc->u.Texture3D.FirstWSlice < layer_count)
907 desc->u.Texture3D.WSize = layer_count - desc->u.Texture3D.FirstWSlice;
908 break;
909
910 default:
911 break;
912 }
913
914 return S_OK;
915}

Referenced by d3d11_unordered_access_view_init().

◆ set_dsv_desc_from_resource()

static HRESULT set_dsv_desc_from_resource ( D3D11_DEPTH_STENCIL_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 94 of file view.c.

95{
96 D3D11_RESOURCE_DIMENSION dimension;
97
98 ID3D11Resource_GetType(resource, &dimension);
99
100 desc->Flags = 0;
101
102 switch (dimension)
103 {
104 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
105 {
106 D3D11_TEXTURE1D_DESC texture_desc;
107 ID3D11Texture1D *texture;
108
109 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture1D, (void **)&texture)))
110 {
111 ERR("Resource of type TEXTURE1D doesn't implement ID3D11Texture1D.\n");
112 return E_INVALIDARG;
113 }
114
115 ID3D11Texture1D_GetDesc(texture, &texture_desc);
116 ID3D11Texture1D_Release(texture);
117
118 desc->Format = texture_desc.Format;
119 if (texture_desc.ArraySize == 1)
120 {
121 desc->ViewDimension = D3D11_DSV_DIMENSION_TEXTURE1D;
122 desc->u.Texture1D.MipSlice = 0;
123 }
124 else
125 {
127 desc->u.Texture1DArray.MipSlice = 0;
128 desc->u.Texture1DArray.FirstArraySlice = 0;
129 desc->u.Texture1DArray.ArraySize = texture_desc.ArraySize;
130 }
131
132 return S_OK;
133 }
134
135 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
136 {
137 D3D11_TEXTURE2D_DESC texture_desc;
138 ID3D11Texture2D *texture;
139
140 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture2D, (void **)&texture)))
141 {
142 ERR("Resource of type TEXTURE2D doesn't implement ID3D11Texture2D.\n");
143 return E_INVALIDARG;
144 }
145
146 ID3D11Texture2D_GetDesc(texture, &texture_desc);
147 ID3D11Texture2D_Release(texture);
148
149 desc->Format = texture_desc.Format;
150 if (texture_desc.ArraySize == 1)
151 {
152 if (texture_desc.SampleDesc.Count == 1)
153 {
154 desc->ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
155 desc->u.Texture2D.MipSlice = 0;
156 }
157 else
158 {
159 desc->ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMS;
160 }
161 }
162 else
163 {
164 if (texture_desc.SampleDesc.Count == 1)
165 {
167 desc->u.Texture2DArray.MipSlice = 0;
168 desc->u.Texture2DArray.FirstArraySlice = 0;
169 desc->u.Texture2DArray.ArraySize = texture_desc.ArraySize;
170 }
171 else
172 {
174 desc->u.Texture2DMSArray.FirstArraySlice = 0;
175 desc->u.Texture2DMSArray.ArraySize = texture_desc.ArraySize;
176 }
177 }
178
179 return S_OK;
180 }
181
182 case D3D11_RESOURCE_DIMENSION_BUFFER:
183 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
184 default:
185 WARN("Invalid resource dimension %#x.\n", dimension);
186 return E_INVALIDARG;
187 }
188}

Referenced by d3d_depthstencil_view_init().

◆ set_rtv_desc_from_resource()

static HRESULT set_rtv_desc_from_resource ( D3D11_RENDER_TARGET_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 255 of file view.c.

256{
257 D3D11_RESOURCE_DIMENSION dimension;
258 HRESULT hr;
259
260 ID3D11Resource_GetType(resource, &dimension);
261
262 switch (dimension)
263 {
264 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
265 {
266 ID3D11Texture1D *texture;
267 D3D11_TEXTURE1D_DESC texture_desc;
268
269 hr = ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture1D, (void **)&texture);
270 if (FAILED(hr))
271 {
272 ERR("Resource of type TEXTURE1D doesn't implement ID3D11Texture1D?\n");
273 return E_INVALIDARG;
274 }
275
276 ID3D11Texture1D_GetDesc(texture, &texture_desc);
277 ID3D11Texture1D_Release(texture);
278
279 desc->Format = texture_desc.Format;
280 if (texture_desc.ArraySize == 1)
281 {
282 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE1D;
283 desc->u.Texture1D.MipSlice = 0;
284 }
285 else
286 {
287 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE1DARRAY;
288 desc->u.Texture1DArray.MipSlice = 0;
289 desc->u.Texture1DArray.FirstArraySlice = 0;
290 desc->u.Texture1DArray.ArraySize = texture_desc.ArraySize;
291 }
292
293 return S_OK;
294 }
295
296 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
297 {
298 ID3D11Texture2D *texture;
299 D3D11_TEXTURE2D_DESC texture_desc;
300
301 hr = ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture2D, (void **)&texture);
302 if (FAILED(hr))
303 {
304 ERR("Resource of type TEXTURE2D doesn't implement ID3D11Texture2D?\n");
305 return E_INVALIDARG;
306 }
307
308 ID3D11Texture2D_GetDesc(texture, &texture_desc);
309 ID3D11Texture2D_Release(texture);
310
311 desc->Format = texture_desc.Format;
312 if (texture_desc.ArraySize == 1)
313 {
314 if (texture_desc.SampleDesc.Count == 1)
315 {
316 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
317 desc->u.Texture2D.MipSlice = 0;
318 }
319 else
320 {
321 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMS;
322 }
323 }
324 else
325 {
326 if (texture_desc.SampleDesc.Count == 1)
327 {
328 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
329 desc->u.Texture2DArray.MipSlice = 0;
330 desc->u.Texture2DArray.FirstArraySlice = 0;
331 desc->u.Texture2DArray.ArraySize = texture_desc.ArraySize;
332 }
333 else
334 {
335 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY;
336 desc->u.Texture2DMSArray.FirstArraySlice = 0;
337 desc->u.Texture2DMSArray.ArraySize = texture_desc.ArraySize;
338 }
339 }
340
341 return S_OK;
342 }
343
344 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
345 {
346 ID3D11Texture3D *texture;
347 D3D11_TEXTURE3D_DESC texture_desc;
348
349 hr = ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture3D, (void **)&texture);
350 if (FAILED(hr))
351 {
352 ERR("Resource of type TEXTURE3D doesn't implement ID3D11Texture3D?\n");
353 return E_INVALIDARG;
354 }
355
356 ID3D11Texture3D_GetDesc(texture, &texture_desc);
357 ID3D11Texture3D_Release(texture);
358
359 desc->Format = texture_desc.Format;
360 desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D;
361 desc->u.Texture3D.MipSlice = 0;
362 desc->u.Texture3D.FirstWSlice = 0;
363 desc->u.Texture3D.WSize = texture_desc.Depth;
364
365 return S_OK;
366 }
367
368 default:
369 FIXME("Unhandled resource dimension %#x.\n", dimension);
370 return E_INVALIDARG;
371 }
372}
#define FIXME(fmt,...)
Definition: precomp.h:53

Referenced by d3d_rendertarget_view_init().

◆ set_srv_desc_from_resource()

static HRESULT set_srv_desc_from_resource ( D3D11_SHADER_RESOURCE_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 459 of file view.c.

460{
461 D3D11_RESOURCE_DIMENSION dimension;
462
463 ID3D11Resource_GetType(resource, &dimension);
464
465 switch (dimension)
466 {
467 case D3D11_RESOURCE_DIMENSION_BUFFER:
468 {
469 D3D11_BUFFER_DESC buffer_desc;
470 ID3D11Buffer *buffer;
471
472 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Buffer, (void **)&buffer)))
473 {
474 ERR("Resource of type BUFFER doesn't implement ID3D11Buffer.\n");
475 return E_INVALIDARG;
476 }
477
478 ID3D11Buffer_GetDesc(buffer, &buffer_desc);
479 ID3D11Buffer_Release(buffer);
480
481 if (buffer_desc.MiscFlags & D3D11_RESOURCE_MISC_BUFFER_STRUCTURED)
482 {
483 desc->Format = DXGI_FORMAT_UNKNOWN;
484 desc->ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
485 desc->u.Buffer.u1.FirstElement = 0;
486 desc->u.Buffer.u2.NumElements = buffer_desc.ByteWidth / buffer_desc.StructureByteStride;
487 return S_OK;
488 }
489
490 return E_INVALIDARG;
491 }
492
493 case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
494 {
495 D3D11_TEXTURE1D_DESC texture_desc;
496 ID3D11Texture1D *texture;
497
498 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture1D, (void **)&texture)))
499 {
500 ERR("Resource of type TEXTURE1D doesn't implement ID3D11Texture1D.\n");
501 return E_INVALIDARG;
502 }
503
504 ID3D11Texture1D_GetDesc(texture, &texture_desc);
505 ID3D11Texture1D_Release(texture);
506
507 desc->Format = texture_desc.Format;
508 if (texture_desc.ArraySize == 1)
509 {
510 desc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1D;
511 desc->u.Texture1D.MostDetailedMip = 0;
512 desc->u.Texture1D.MipLevels = texture_desc.MipLevels;
513 }
514 else
515 {
517 desc->u.Texture1DArray.MostDetailedMip = 0;
518 desc->u.Texture1DArray.MipLevels = texture_desc.MipLevels;
519 desc->u.Texture1DArray.FirstArraySlice = 0;
520 desc->u.Texture1DArray.ArraySize = texture_desc.ArraySize;
521 }
522
523 return S_OK;
524 }
525
526 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
527 {
528 D3D11_TEXTURE2D_DESC texture_desc;
529 ID3D11Texture2D *texture;
530
531 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture2D, (void **)&texture)))
532 {
533 ERR("Resource of type TEXTURE2D doesn't implement ID3D11Texture2D.\n");
534 return E_INVALIDARG;
535 }
536
537 ID3D11Texture2D_GetDesc(texture, &texture_desc);
538 ID3D11Texture2D_Release(texture);
539
540 desc->Format = texture_desc.Format;
541 if (texture_desc.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
542 {
543 if (texture_desc.ArraySize >= 12)
544 {
546 desc->u.TextureCubeArray.MostDetailedMip = 0;
547 desc->u.TextureCubeArray.MipLevels = texture_desc.MipLevels;
548 desc->u.TextureCubeArray.First2DArrayFace = 0;
549 desc->u.TextureCubeArray.NumCubes = texture_desc.ArraySize / 6;
550 }
551 else
552 {
553 desc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE;
554 desc->u.TextureCube.MostDetailedMip = 0;
555 desc->u.TextureCube.MipLevels = texture_desc.MipLevels;
556 }
557 }
558 else if (texture_desc.ArraySize == 1)
559 {
560 if (texture_desc.SampleDesc.Count == 1)
561 {
562 desc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
563 desc->u.Texture2D.MostDetailedMip = 0;
564 desc->u.Texture2D.MipLevels = texture_desc.MipLevels;
565 }
566 else
567 {
568 desc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DMS;
569 }
570 }
571 else
572 {
573 if (texture_desc.SampleDesc.Count == 1)
574 {
576 desc->u.Texture2DArray.MostDetailedMip = 0;
577 desc->u.Texture2DArray.MipLevels = texture_desc.MipLevels;
578 desc->u.Texture2DArray.FirstArraySlice = 0;
579 desc->u.Texture2DArray.ArraySize = texture_desc.ArraySize;
580 }
581 else
582 {
584 desc->u.Texture2DMSArray.FirstArraySlice = 0;
585 desc->u.Texture2DMSArray.ArraySize = texture_desc.ArraySize;
586 }
587 }
588
589 return S_OK;
590 }
591
592 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
593 {
594 D3D11_TEXTURE3D_DESC texture_desc;
595 ID3D11Texture3D *texture;
596
597 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture3D, (void **)&texture)))
598 {
599 ERR("Resource of type TEXTURE3D doesn't implement ID3D11Texture3D.\n");
600 return E_INVALIDARG;
601 }
602
603 ID3D11Texture3D_GetDesc(texture, &texture_desc);
604 ID3D11Texture3D_Release(texture);
605
606 desc->Format = texture_desc.Format;
607 desc->ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D;
608 desc->u.Texture3D.MostDetailedMip = 0;
609 desc->u.Texture3D.MipLevels = texture_desc.MipLevels;
610
611 return S_OK;
612 }
613
614 default:
615 WARN("Invalid resource dimension %#x.\n", dimension);
616 return E_INVALIDARG;
617 }
618}
@ D3D11_RESOURCE_MISC_BUFFER_STRUCTURED
Definition: d3d11.idl:1039
@ D3D11_RESOURCE_MISC_TEXTURECUBE
Definition: d3d11.idl:1036
GLuint buffer
Definition: glext.h:5915

Referenced by d3d_shader_resource_view_init().

◆ set_uav_desc_from_resource()

static HRESULT set_uav_desc_from_resource ( D3D11_UNORDERED_ACCESS_VIEW_DESC *  desc,
ID3D11Resource *  resource 
)
static

Definition at line 738 of file view.c.

739{
740 D3D11_RESOURCE_DIMENSION dimension;
741
742 ID3D11Resource_GetType(resource, &dimension);
743
744 switch (dimension)
745 {
746 case D3D11_RESOURCE_DIMENSION_BUFFER:
747 {
748 D3D11_BUFFER_DESC buffer_desc;
749 ID3D11Buffer *buffer;
750
751 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Buffer, (void **)&buffer)))
752 {
753 ERR("Resource of type BUFFER doesn't implement ID3D11Buffer.\n");
754 return E_INVALIDARG;
755 }
756
757 ID3D11Buffer_GetDesc(buffer, &buffer_desc);
758 ID3D11Buffer_Release(buffer);
759
760 if (buffer_desc.MiscFlags & D3D11_RESOURCE_MISC_BUFFER_STRUCTURED)
761 {
762 desc->Format = DXGI_FORMAT_UNKNOWN;
763 desc->ViewDimension = D3D11_UAV_DIMENSION_BUFFER;
764 desc->u.Buffer.FirstElement = 0;
765 desc->u.Buffer.NumElements = buffer_desc.ByteWidth / buffer_desc.StructureByteStride;
766 desc->u.Buffer.Flags = 0;
767 return S_OK;
768 }
769
770 return E_INVALIDARG;
771 }
772
773 case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
774 {
775 D3D11_TEXTURE2D_DESC texture_desc;
776 ID3D11Texture2D *texture;
777
778 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture2D, (void **)&texture)))
779 {
780 ERR("Resource of type TEXTURE2D doesn't implement ID3D11Texture2D.\n");
781 return E_INVALIDARG;
782 }
783
784 ID3D11Texture2D_GetDesc(texture, &texture_desc);
785 ID3D11Texture2D_Release(texture);
786
787 if (texture_desc.SampleDesc.Count != 1)
788 {
789 WARN("Trying to create view for multisample texture.\n");
790 return E_INVALIDARG;
791 }
792
793 desc->Format = texture_desc.Format;
794 if (texture_desc.ArraySize == 1)
795 {
796 desc->ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2D;
797 desc->u.Texture2D.MipSlice = 0;
798 }
799 else
800 {
801 desc->ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2DARRAY;
802 desc->u.Texture2DArray.MipSlice = 0;
803 desc->u.Texture2DArray.FirstArraySlice = 0;
804 desc->u.Texture2DArray.ArraySize = texture_desc.ArraySize;
805 }
806
807 return S_OK;
808 }
809
810 case D3D11_RESOURCE_DIMENSION_TEXTURE3D:
811 {
812 D3D11_TEXTURE3D_DESC texture_desc;
813 ID3D11Texture3D *texture;
814
815 if (FAILED(ID3D11Resource_QueryInterface(resource, &IID_ID3D11Texture3D, (void **)&texture)))
816 {
817 ERR("Resource of type TEXTURE3D doesn't implement ID3D11Texture3D.\n");
818 return E_INVALIDARG;
819 }
820
821 ID3D11Texture3D_GetDesc(texture, &texture_desc);
822 ID3D11Texture3D_Release(texture);
823
824 desc->Format = texture_desc.Format;
825 desc->ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
826 desc->u.Texture3D.MipSlice = 0;
827 desc->u.Texture3D.FirstWSlice = 0;
828 desc->u.Texture3D.WSize = texture_desc.Depth;
829
830 return S_OK;
831 }
832
833 default:
834 FIXME("Unhandled resource dimension %#x.\n", dimension);
835 return E_INVALIDARG;
836 }
837}

Referenced by d3d11_unordered_access_view_init().

◆ unsafe_impl_from_ID3D10DepthStencilView()

struct d3d_depthstencil_view * unsafe_impl_from_ID3D10DepthStencilView ( ID3D10DepthStencilView *  iface)

Definition at line 1346 of file view.c.

1347{
1348 if (!iface)
1349 return NULL;
1350 assert(iface->lpVtbl == &d3d10_depthstencil_view_vtbl);
1351
1353}
#define assert(_expr)
Definition: assert.h:32

Referenced by d3d10_device_ClearDepthStencilView(), and d3d10_device_OMSetRenderTargets().

◆ unsafe_impl_from_ID3D10RenderTargetView()

struct d3d_rendertarget_view * unsafe_impl_from_ID3D10RenderTargetView ( ID3D10RenderTargetView *  iface)

Definition at line 1787 of file view.c.

1788{
1789 if (!iface)
1790 return NULL;
1791 assert(iface->lpVtbl == &d3d10_rendertarget_view_vtbl);
1792
1794}

Referenced by d3d10_device_ClearRenderTargetView(), and d3d10_device_OMSetRenderTargets().

◆ unsafe_impl_from_ID3D10ShaderResourceView()

struct d3d_shader_resource_view * unsafe_impl_from_ID3D10ShaderResourceView ( ID3D10ShaderResourceView *  iface)

Definition at line 2280 of file view.c.

2281{
2282 if (!iface)
2283 return NULL;
2284 assert(iface->lpVtbl == (ID3D10ShaderResourceViewVtbl *)&d3d10_shader_resource_view_vtbl);
2285 return CONTAINING_RECORD(iface, struct d3d_shader_resource_view, ID3D10ShaderResourceView1_iface);
2286}

Referenced by d3d10_device_GenerateMips(), and d3d10_device_set_shader_resource_views().

◆ unsafe_impl_from_ID3D11DepthStencilView()

struct d3d_depthstencil_view * unsafe_impl_from_ID3D11DepthStencilView ( ID3D11DepthStencilView *  iface)

◆ unsafe_impl_from_ID3D11RenderTargetView()

struct d3d_rendertarget_view * unsafe_impl_from_ID3D11RenderTargetView ( ID3D11RenderTargetView *  iface)

◆ unsafe_impl_from_ID3D11ShaderResourceView()

struct d3d_shader_resource_view * unsafe_impl_from_ID3D11ShaderResourceView ( ID3D11ShaderResourceView *  iface)

Definition at line 2272 of file view.c.

2273{
2274 if (!iface)
2275 return NULL;
2276 assert(iface->lpVtbl == &d3d11_shader_resource_view_vtbl);
2278}

Referenced by d3d11_device_context_GenerateMips(), and d3d11_device_context_set_shader_resource_views().

◆ unsafe_impl_from_ID3D11UnorderedAccessView()

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3d11  )

◆ wined3d_depth_stencil_view_desc_from_d3d11()

static void wined3d_depth_stencil_view_desc_from_d3d11 ( struct wined3d_view_desc *  wined3d_desc,
const D3D11_DEPTH_STENCIL_VIEW_DESC *  desc 
)
static

Definition at line 1205 of file view.c.

1207{
1208 wined3d_desc->format_id = wined3dformat_from_dxgi_format(desc->Format);
1209
1210 wined3d_desc->flags = 0;
1211 if (desc->Flags & D3D11_DSV_READ_ONLY_DEPTH)
1212 wined3d_desc->flags |= WINED3D_VIEW_READ_ONLY_DEPTH;
1213 if (desc->Flags & D3D11_DSV_READ_ONLY_STENCIL)
1214 wined3d_desc->flags |= WINED3D_VIEW_READ_ONLY_STENCIL;
1215
1216 wined3d_desc->u.texture.level_count = 1;
1217 switch (desc->ViewDimension)
1218 {
1220 wined3d_desc->u.texture.level_idx = desc->u.Texture1D.MipSlice;
1221 wined3d_desc->u.texture.layer_idx = 0;
1222 wined3d_desc->u.texture.layer_count = 1;
1223 break;
1224
1226 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
1227 wined3d_desc->u.texture.level_idx = desc->u.Texture1DArray.MipSlice;
1228 wined3d_desc->u.texture.layer_idx = desc->u.Texture1DArray.FirstArraySlice;
1229 wined3d_desc->u.texture.layer_count = desc->u.Texture1DArray.ArraySize;
1230 break;
1231
1233 wined3d_desc->u.texture.level_idx = desc->u.Texture2D.MipSlice;
1234 wined3d_desc->u.texture.layer_idx = 0;
1235 wined3d_desc->u.texture.layer_count = 1;
1236 break;
1237
1239 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
1240 wined3d_desc->u.texture.level_idx = desc->u.Texture2DArray.MipSlice;
1241 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
1242 wined3d_desc->u.texture.layer_count = desc->u.Texture2DArray.ArraySize;
1243 break;
1244
1246 wined3d_desc->u.texture.level_idx = 0;
1247 wined3d_desc->u.texture.layer_idx = 0;
1248 wined3d_desc->u.texture.layer_count = 1;
1249 break;
1250
1252 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
1253 wined3d_desc->u.texture.level_idx = 0;
1254 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
1255 wined3d_desc->u.texture.layer_count = desc->u.Texture2DMSArray.ArraySize;
1256 break;
1257
1258 default:
1259 FIXME("Unhandled view dimension %#x.\n", desc->ViewDimension);
1260 wined3d_desc->u.texture.level_idx = 0;
1261 wined3d_desc->u.texture.layer_idx = 0;
1262 wined3d_desc->u.texture.layer_count = 1;
1263 break;
1264 }
1265}
@ D3D11_DSV_READ_ONLY_STENCIL
Definition: d3d11.idl:936
@ D3D11_DSV_READ_ONLY_DEPTH
Definition: d3d11.idl:935
enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
Definition: utils.c:323
unsigned int flags
Definition: wined3d.h:2131
enum wined3d_format_id format_id
Definition: wined3d.h:2130
struct wined3d_view_desc::@4822::@4824 texture
union wined3d_view_desc::@4822 u
#define WINED3D_VIEW_READ_ONLY_DEPTH
Definition: wined3d.h:1584
#define WINED3D_VIEW_READ_ONLY_STENCIL
Definition: wined3d.h:1585
#define WINED3D_VIEW_TEXTURE_ARRAY
Definition: wined3d.h:1583

Referenced by d3d_depthstencil_view_init().

◆ wined3d_rendertarget_view_desc_from_d3d11()

static void wined3d_rendertarget_view_desc_from_d3d11 ( struct wined3d_view_desc *  wined3d_desc,
const D3D11_RENDER_TARGET_VIEW_DESC *  desc 
)
static

Definition at line 1640 of file view.c.

1642{
1643 wined3d_desc->format_id = wined3dformat_from_dxgi_format(desc->Format);
1644
1645 wined3d_desc->flags = 0;
1646 wined3d_desc->u.texture.level_count = 1;
1647 switch (desc->ViewDimension)
1648 {
1649 case D3D11_RTV_DIMENSION_BUFFER:
1650 wined3d_desc->u.buffer.start_idx = desc->u.Buffer.u1.FirstElement;
1651 wined3d_desc->u.buffer.count = desc->u.Buffer.u2.NumElements;
1652 break;
1653
1654 case D3D11_RTV_DIMENSION_TEXTURE1D:
1655 wined3d_desc->u.texture.level_idx = desc->u.Texture1D.MipSlice;
1656 wined3d_desc->u.texture.layer_idx = 0;
1657 wined3d_desc->u.texture.layer_count = 1;
1658 break;
1659
1660 case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:
1661 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
1662 wined3d_desc->u.texture.level_idx = desc->u.Texture1DArray.MipSlice;
1663 wined3d_desc->u.texture.layer_idx = desc->u.Texture1DArray.FirstArraySlice;
1664 wined3d_desc->u.texture.layer_count = desc->u.Texture1DArray.ArraySize;
1665 break;
1666
1667 case D3D11_RTV_DIMENSION_TEXTURE2D:
1668 wined3d_desc->u.texture.level_idx = desc->u.Texture2D.MipSlice;
1669 wined3d_desc->u.texture.layer_idx = 0;
1670 wined3d_desc->u.texture.layer_count = 1;
1671 break;
1672
1673 case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:
1674 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
1675 wined3d_desc->u.texture.level_idx = desc->u.Texture2DArray.MipSlice;
1676 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
1677 wined3d_desc->u.texture.layer_count = desc->u.Texture2DArray.ArraySize;
1678 break;
1679
1680 case D3D11_RTV_DIMENSION_TEXTURE2DMS:
1681 wined3d_desc->u.texture.level_idx = 0;
1682 wined3d_desc->u.texture.layer_idx = 0;
1683 wined3d_desc->u.texture.layer_count = 1;
1684 break;
1685
1686 case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:
1687 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
1688 wined3d_desc->u.texture.level_idx = 0;
1689 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
1690 wined3d_desc->u.texture.layer_count = desc->u.Texture2DMSArray.ArraySize;
1691 break;
1692
1693 case D3D11_RTV_DIMENSION_TEXTURE3D:
1694 wined3d_desc->u.texture.level_idx = desc->u.Texture3D.MipSlice;
1695 wined3d_desc->u.texture.layer_idx = desc->u.Texture3D.FirstWSlice;
1696 wined3d_desc->u.texture.layer_count = desc->u.Texture3D.WSize;
1697 break;
1698
1699 default:
1700 FIXME("Unhandled view dimension %#x.\n", desc->ViewDimension);
1701 wined3d_desc->u.texture.level_idx = 0;
1702 wined3d_desc->u.texture.layer_idx = 0;
1703 wined3d_desc->u.texture.layer_count = 1;
1704 break;
1705 }
1706}
struct wined3d_view_desc::@4822::@4823 buffer

Referenced by d3d_rendertarget_view_init().

◆ wined3d_shader_resource_view_desc_from_d3d11()

static HRESULT wined3d_shader_resource_view_desc_from_d3d11 ( struct wined3d_view_desc *  wined3d_desc,
const D3D11_SHADER_RESOURCE_VIEW_DESC *  desc 
)
static

Definition at line 2105 of file view.c.

2107{
2108 wined3d_desc->format_id = wined3dformat_from_dxgi_format(desc->Format);
2109 wined3d_desc->flags = 0;
2110
2111 switch (desc->ViewDimension)
2112 {
2114 wined3d_desc->u.buffer.start_idx = desc->u.Buffer.u1.FirstElement;
2115 wined3d_desc->u.buffer.count = desc->u.Buffer.u2.NumElements;
2116 break;
2117
2119 wined3d_desc->u.texture.level_idx = desc->u.Texture1D.MostDetailedMip;
2120 wined3d_desc->u.texture.level_count = desc->u.Texture1D.MipLevels;
2121 wined3d_desc->u.texture.layer_idx = 0;
2122 wined3d_desc->u.texture.layer_count = 1;
2123 break;
2124
2126 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
2127 wined3d_desc->u.texture.level_idx = desc->u.Texture1DArray.MostDetailedMip;
2128 wined3d_desc->u.texture.level_count = desc->u.Texture1DArray.MipLevels;
2129 wined3d_desc->u.texture.layer_idx = desc->u.Texture1DArray.FirstArraySlice;
2130 wined3d_desc->u.texture.layer_count = desc->u.Texture1DArray.ArraySize;
2131 break;
2132
2134 wined3d_desc->u.texture.level_idx = desc->u.Texture2D.MostDetailedMip;
2135 wined3d_desc->u.texture.level_count = desc->u.Texture2D.MipLevels;
2136 wined3d_desc->u.texture.layer_idx = 0;
2137 wined3d_desc->u.texture.layer_count = 1;
2138 break;
2139
2141 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
2142 wined3d_desc->u.texture.level_idx = desc->u.Texture2DArray.MostDetailedMip;
2143 wined3d_desc->u.texture.level_count = desc->u.Texture2DArray.MipLevels;
2144 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
2145 wined3d_desc->u.texture.layer_count = desc->u.Texture2DArray.ArraySize;
2146 break;
2147
2149 wined3d_desc->u.texture.level_idx = 0;
2150 wined3d_desc->u.texture.level_count = 1;
2151 wined3d_desc->u.texture.layer_idx = 0;
2152 wined3d_desc->u.texture.layer_count = 1;
2153 break;
2154
2156 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
2157 wined3d_desc->u.texture.level_idx = 0;
2158 wined3d_desc->u.texture.level_count = 1;
2159 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
2160 wined3d_desc->u.texture.layer_count = desc->u.Texture2DMSArray.ArraySize;
2161 break;
2162
2164 wined3d_desc->u.texture.level_idx = desc->u.Texture3D.MostDetailedMip;
2165 wined3d_desc->u.texture.level_count = desc->u.Texture3D.MipLevels;
2166 wined3d_desc->u.texture.layer_idx = 0;
2167 wined3d_desc->u.texture.layer_count = 1;
2168 break;
2169
2171 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_CUBE;
2172 wined3d_desc->u.texture.level_idx = desc->u.TextureCube.MostDetailedMip;
2173 wined3d_desc->u.texture.level_count = desc->u.TextureCube.MipLevels;
2174 wined3d_desc->u.texture.layer_idx = 0;
2175 wined3d_desc->u.texture.layer_count = 6;
2176 break;
2177
2180 wined3d_desc->u.texture.level_idx = desc->u.TextureCubeArray.MostDetailedMip;
2181 wined3d_desc->u.texture.level_count = desc->u.TextureCubeArray.MipLevels;
2182 wined3d_desc->u.texture.layer_idx = desc->u.TextureCubeArray.First2DArrayFace;
2183 wined3d_desc->u.texture.layer_count = 6 * desc->u.TextureCubeArray.NumCubes;
2184 break;
2185
2187 wined3d_desc->flags = wined3d_view_flags_from_d3d11_bufferex_flags(desc->u.BufferEx.Flags);
2188 wined3d_desc->u.buffer.start_idx = desc->u.BufferEx.FirstElement;
2189 wined3d_desc->u.buffer.count = desc->u.BufferEx.NumElements;
2190 break;
2191
2192 default:
2193 WARN("Unrecognized view dimension %#x.\n", desc->ViewDimension);
2194 return E_FAIL;
2195 }
2196
2197 return S_OK;
2198}
static unsigned int wined3d_view_flags_from_d3d11_bufferex_flags(unsigned int d3d11_flags)
Definition: view.c:2095
#define WINED3D_VIEW_TEXTURE_CUBE
Definition: wined3d.h:1582

Referenced by d3d_shader_resource_view_init().

◆ wined3d_unordered_access_view_desc_from_d3d11()

static HRESULT wined3d_unordered_access_view_desc_from_d3d11 ( struct wined3d_view_desc *  wined3d_desc,
const D3D11_UNORDERED_ACCESS_VIEW_DESC *  desc 
)
static

Definition at line 2449 of file view.c.

2451{
2452 wined3d_desc->format_id = wined3dformat_from_dxgi_format(desc->Format);
2453
2454 wined3d_desc->flags = 0;
2455 wined3d_desc->u.texture.level_count = 1;
2456 switch (desc->ViewDimension)
2457 {
2458 case D3D11_UAV_DIMENSION_BUFFER:
2459 wined3d_desc->flags = wined3d_view_flags_from_d3d11_buffer_uav_flags(desc->u.Buffer.Flags);
2460 wined3d_desc->u.buffer.start_idx = desc->u.Buffer.FirstElement;
2461 wined3d_desc->u.buffer.count = desc->u.Buffer.NumElements;
2462 break;
2463
2464 case D3D11_UAV_DIMENSION_TEXTURE1D:
2465 wined3d_desc->u.texture.level_idx = desc->u.Texture1D.MipSlice;
2466 wined3d_desc->u.texture.layer_idx = 0;
2467 wined3d_desc->u.texture.layer_count = 1;
2468 break;
2469
2470 case D3D11_UAV_DIMENSION_TEXTURE1DARRAY:
2471 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
2472 wined3d_desc->u.texture.level_idx = desc->u.Texture1DArray.MipSlice;
2473 wined3d_desc->u.texture.layer_idx = desc->u.Texture1DArray.FirstArraySlice;
2474 wined3d_desc->u.texture.layer_count = desc->u.Texture1DArray.ArraySize;
2475 break;
2476
2477 case D3D11_UAV_DIMENSION_TEXTURE2D:
2478 wined3d_desc->u.texture.level_idx = desc->u.Texture2D.MipSlice;
2479 wined3d_desc->u.texture.layer_idx = 0;
2480 wined3d_desc->u.texture.layer_count = 1;
2481 break;
2482
2483 case D3D11_UAV_DIMENSION_TEXTURE2DARRAY:
2484 wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
2485 wined3d_desc->u.texture.level_idx = desc->u.Texture2DArray.MipSlice;
2486 wined3d_desc->u.texture.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
2487 wined3d_desc->u.texture.layer_count = desc->u.Texture2DArray.ArraySize;
2488 break;
2489
2490 case D3D11_UAV_DIMENSION_TEXTURE3D:
2491 wined3d_desc->u.texture.level_idx = desc->u.Texture3D.MipSlice;
2492 wined3d_desc->u.texture.layer_idx = desc->u.Texture3D.FirstWSlice;
2493 wined3d_desc->u.texture.layer_count = desc->u.Texture3D.WSize;
2494 break;
2495
2496 default:
2497 WARN("Unrecognized view dimension %#x.\n", desc->ViewDimension);
2498 return E_FAIL;
2499 }
2500
2501 return S_OK;
2502}
static unsigned int wined3d_view_flags_from_d3d11_buffer_uav_flags(unsigned int d3d11_flags)
Definition: view.c:2438

Referenced by d3d11_unordered_access_view_init().

◆ wined3d_view_flags_from_d3d11_buffer_uav_flags()

static unsigned int wined3d_view_flags_from_d3d11_buffer_uav_flags ( unsigned int  d3d11_flags)
static

Definition at line 2438 of file view.c.

2439{
2440 unsigned int wined3d_flags = d3d11_flags & (WINED3D_VIEW_BUFFER_RAW
2442
2443 if (d3d11_flags != wined3d_flags)
2444 FIXME("Unhandled flags %#x.\n", d3d11_flags & ~wined3d_flags);
2445
2446 return wined3d_flags;
2447}
#define WINED3D_VIEW_BUFFER_RAW
Definition: wined3d.h:1579
#define WINED3D_VIEW_BUFFER_APPEND
Definition: wined3d.h:1580
#define WINED3D_VIEW_BUFFER_COUNTER
Definition: wined3d.h:1581

Referenced by wined3d_unordered_access_view_desc_from_d3d11().

◆ wined3d_view_flags_from_d3d11_bufferex_flags()

static unsigned int wined3d_view_flags_from_d3d11_bufferex_flags ( unsigned int  d3d11_flags)
static

Definition at line 2095 of file view.c.

2096{
2097 unsigned int wined3d_flags = d3d11_flags & WINED3D_VIEW_BUFFER_RAW;
2098
2099 if (d3d11_flags != wined3d_flags)
2100 FIXME("Unhandled flags %#x.\n", d3d11_flags & ~wined3d_flags);
2101
2102 return wined3d_flags;
2103}

Referenced by wined3d_shader_resource_view_desc_from_d3d11().

Variable Documentation

◆ d3d10_depthstencil_view_vtbl

const struct ID3D10DepthStencilViewVtbl d3d10_depthstencil_view_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDesc(ID3D10DepthStencilView *iface, D3D10_DEPTH_STENCIL_VIEW_DESC *desc)
Definition: view.c:1162
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateData(ID3D10DepthStencilView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:1127
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_GetPrivateData(ID3D10DepthStencilView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:1116
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_QueryInterface(ID3D10DepthStencilView *iface, REFIID riid, void **object)
Definition: view.c:1077
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_AddRef(ID3D10DepthStencilView *iface)
Definition: view.c:1087
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_Release(ID3D10DepthStencilView *iface)
Definition: view.c:1096
static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetResource(ID3D10DepthStencilView *iface, ID3D10Resource **resource)
Definition: view.c:1150
static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDevice(ID3D10DepthStencilView *iface, ID3D10Device **device)
Definition: view.c:1107
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_SetPrivateDataInterface(ID3D10DepthStencilView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:1138

Definition at line 1175 of file view.c.

Referenced by d3d_depthstencil_view_init(), and unsafe_impl_from_ID3D10DepthStencilView().

◆ d3d10_rendertarget_view_vtbl

const struct ID3D10RenderTargetViewVtbl d3d10_rendertarget_view_vtbl
static
Initial value:
=
{
}
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTargetView *iface)
Definition: view.c:1534
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDesc(ID3D10RenderTargetView *iface, D3D10_RENDER_TARGET_VIEW_DESC *desc)
Definition: view.c:1600
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_QueryInterface(ID3D10RenderTargetView *iface, REFIID riid, void **object)
Definition: view.c:1515
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface(ID3D10RenderTargetView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:1576
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTargetView *iface, ID3D10Resource **resource)
Definition: view.c:1588
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef(ID3D10RenderTargetView *iface)
Definition: view.c:1525
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateData(ID3D10RenderTargetView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:1565
static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_GetPrivateData(ID3D10RenderTargetView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:1554
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDevice(ID3D10RenderTargetView *iface, ID3D10Device **device)
Definition: view.c:1545

Definition at line 1610 of file view.c.

Referenced by d3d_rendertarget_view_init(), and unsafe_impl_from_ID3D10RenderTargetView().

◆ d3d10_shader_resource_view_vtbl

const struct ID3D10ShaderResourceView1Vtbl d3d10_shader_resource_view_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateData(ID3D10ShaderResourceView1 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:2008
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_GetPrivateData(ID3D10ShaderResourceView1 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:1997
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDevice(ID3D10ShaderResourceView1 *iface, ID3D10Device **device)
Definition: view.c:1987
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetResource(ID3D10ShaderResourceView1 *iface, ID3D10Resource **resource)
Definition: view.c:2031
static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_Release(ID3D10ShaderResourceView1 *iface)
Definition: view.c:1976
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_QueryInterface(ID3D10ShaderResourceView1 *iface, REFIID riid, void **object)
Definition: view.c:1957
static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_AddRef(ID3D10ShaderResourceView1 *iface)
Definition: view.c:1967
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc(ID3D10ShaderResourceView1 *iface, D3D10_SHADER_RESOURCE_VIEW_DESC *desc)
Definition: view.c:2043
static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_SetPrivateDataInterface(ID3D10ShaderResourceView1 *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:2019
static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDesc1(ID3D10ShaderResourceView1 *iface, D3D10_SHADER_RESOURCE_VIEW_DESC1 *desc)
Definition: view.c:2053

Definition at line 2063 of file view.c.

Referenced by d3d_shader_resource_view_init(), and unsafe_impl_from_ID3D10ShaderResourceView().

◆ d3d11_depthstencil_view_vtbl

const struct ID3D11DepthStencilViewVtbl d3d11_depthstencil_view_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDesc(ID3D11DepthStencilView *iface, D3D11_DEPTH_STENCIL_VIEW_DESC *desc)
Definition: view.c:1041
static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDevice(ID3D11DepthStencilView *iface, ID3D11Device **device)
Definition: view.c:989
static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetResource(ID3D11DepthStencilView *iface, ID3D11Resource **resource)
Definition: view.c:1030
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_SetPrivateData(ID3D11DepthStencilView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:1010
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_GetPrivateData(ID3D11DepthStencilView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:1000
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_view_SetPrivateDataInterface(ID3D11DepthStencilView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:1020

Definition at line 1051 of file view.c.

Referenced by d3d_depthstencil_view_init(), and unsafe_impl_from_ID3D11DepthStencilView().

◆ d3d11_rendertarget_view_vtbl

const struct ID3D11RenderTargetViewVtbl d3d11_rendertarget_view_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetResource(ID3D11RenderTargetView *iface, ID3D11Resource **resource)
Definition: view.c:1468
static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDevice(ID3D11RenderTargetView *iface, ID3D11Device **device)
Definition: view.c:1427
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_GetPrivateData(ID3D11RenderTargetView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:1438
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_SetPrivateData(ID3D11RenderTargetView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:1448
static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDesc(ID3D11RenderTargetView *iface, D3D11_RENDER_TARGET_VIEW_DESC *desc)
Definition: view.c:1479
static HRESULT STDMETHODCALLTYPE d3d11_rendertarget_view_SetPrivateDataInterface(ID3D11RenderTargetView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:1458

Definition at line 1489 of file view.c.

Referenced by d3d_rendertarget_view_init(), and unsafe_impl_from_ID3D11RenderTargetView().

◆ d3d11_shader_resource_view_vtbl

const struct ID3D11ShaderResourceViewVtbl d3d11_shader_resource_view_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_GetPrivateData(ID3D11ShaderResourceView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:1880
static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDesc(ID3D11ShaderResourceView *iface, D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
Definition: view.c:1921
static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetResource(ID3D11ShaderResourceView *iface, ID3D11Resource **resource)
Definition: view.c:1910
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_SetPrivateData(ID3D11ShaderResourceView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:1890
static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDevice(ID3D11ShaderResourceView *iface, ID3D11Device **device)
Definition: view.c:1869
static HRESULT STDMETHODCALLTYPE d3d11_shader_resource_view_SetPrivateDataInterface(ID3D11ShaderResourceView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:1900

Definition at line 1931 of file view.c.

Referenced by d3d_shader_resource_view_init(), and unsafe_impl_from_ID3D11ShaderResourceView().

◆ d3d11_unordered_access_view_vtbl

const struct ID3D11UnorderedAccessViewVtbl d3d11_unordered_access_view_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_SetPrivateDataInterface(ID3D11UnorderedAccessView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:2378
static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetResource(ID3D11UnorderedAccessView *iface, ID3D11Resource **resource)
Definition: view.c:2388
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_GetPrivateData(ID3D11UnorderedAccessView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:2358
static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDesc(ID3D11UnorderedAccessView *iface, D3D11_UNORDERED_ACCESS_VIEW_DESC *desc)
Definition: view.c:2398
static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_Release(ID3D11UnorderedAccessView *iface)
Definition: view.c:2331
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_SetPrivateData(ID3D11UnorderedAccessView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:2368
static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_AddRef(ID3D11UnorderedAccessView *iface)
Definition: view.c:2315
static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_QueryInterface(ID3D11UnorderedAccessView *iface, REFIID riid, void **object)
Definition: view.c:2295
static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDevice(ID3D11UnorderedAccessView *iface, ID3D11Device **device)
Definition: view.c:2348

Definition at line 2408 of file view.c.

Referenced by d3d11_unordered_access_view_init(), and unsafe_impl_from_ID3D11UnorderedAccessView().

◆ d3d11_unordered_access_view_wined3d_parent_ops

const struct wined3d_parent_ops d3d11_unordered_access_view_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d11_unordered_access_view_wined3d_object_destroyed(void *parent)
Definition: view.c:2425

Definition at line 2433 of file view.c.

Referenced by d3d11_unordered_access_view_init().

◆ d3d11_video_decoder_output_view_vtbl

const struct ID3D11VideoDecoderOutputViewVtbl d3d11_video_decoder_output_view_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetPrivateData(ID3D11VideoDecoderOutputView *iface, REFGUID guid, UINT *data_size, void *data)
Definition: view.c:2646
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_SetPrivateData(ID3D11VideoDecoderOutputView *iface, REFGUID guid, UINT data_size, const void *data)
Definition: view.c:2656
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_QueryInterface(ID3D11VideoDecoderOutputView *iface, REFIID riid, void **object)
Definition: view.c:2589
static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetDevice(ID3D11VideoDecoderOutputView *iface, ID3D11Device **device)
Definition: view.c:2636
static ULONG STDMETHODCALLTYPE d3d11_video_decoder_output_view_Release(ID3D11VideoDecoderOutputView *iface)
Definition: view.c:2619
static HRESULT STDMETHODCALLTYPE d3d11_video_decoder_output_view_SetPrivateDataInterface(ID3D11VideoDecoderOutputView *iface, REFGUID guid, const IUnknown *data)
Definition: view.c:2666
static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetResource(ID3D11VideoDecoderOutputView *iface, ID3D11Resource **resource)
Definition: view.c:2676
static void STDMETHODCALLTYPE d3d11_video_decoder_output_view_GetDesc(ID3D11VideoDecoderOutputView *iface, D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc)
Definition: view.c:2686
static ULONG STDMETHODCALLTYPE d3d11_video_decoder_output_view_AddRef(ID3D11VideoDecoderOutputView *iface)
Definition: view.c:2609

Definition at line 2696 of file view.c.

Referenced by d3d_video_decoder_output_view_init().

◆ d3d_depth_stencil_view_wined3d_parent_ops

const struct wined3d_parent_ops d3d_depth_stencil_view_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_depth_stencil_view_wined3d_object_destroyed(void *parent)
Definition: view.c:1192

Definition at line 1200 of file view.c.

Referenced by d3d_depthstencil_view_init().

◆ d3d_render_target_view_wined3d_parent_ops

const struct wined3d_parent_ops d3d_render_target_view_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_render_target_view_wined3d_object_destroyed(void *parent)
Definition: view.c:1627

Definition at line 1635 of file view.c.

Referenced by d3d_rendertarget_view_init().

◆ d3d_shader_resource_view_wined3d_parent_ops

const struct wined3d_parent_ops d3d_shader_resource_view_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_shader_resource_view_wined3d_object_destroyed(void *parent)
Definition: view.c:2082

Definition at line 2090 of file view.c.

Referenced by d3d_shader_resource_view_init().