d3d11.idl: Added CD3D11_RENDER_TARGET_VIEW_DESC and CD3D11_SHADER_RESOURCE_VIEW_DESC declarations.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-01-20 22:01:39 +01:00 committed by Alexandre Julliard
parent e2f9bc0d0b
commit 13b571c50b
1 changed files with 145 additions and 0 deletions

View File

@ -1086,6 +1086,72 @@ typedef struct D3D11_RENDER_TARGET_VIEW_DESC
};
} D3D11_RENDER_TARGET_VIEW_DESC;
cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined(__cplusplus)")
cpp_quote("struct CD3D11_RENDER_TARGET_VIEW_DESC : public D3D11_RENDER_TARGET_VIEW_DESC {")
cpp_quote(" CD3D11_RENDER_TARGET_VIEW_DESC() {}")
cpp_quote(" explicit CD3D11_RENDER_TARGET_VIEW_DESC(D3D11_RTV_DIMENSION dim, DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,")
cpp_quote(" UINT mip_slice = 0, UINT first_slice = 0, UINT array_size = -1) {")
cpp_quote(" Format = format;")
cpp_quote(" ViewDimension = dim;")
cpp_quote(" switch(dim) {")
cpp_quote(" case D3D11_RTV_DIMENSION_BUFFER:")
cpp_quote(" Buffer.FirstElement = mip_slice;")
cpp_quote(" Buffer.NumElements = first_slice;")
cpp_quote(" break;")
cpp_quote(" case D3D11_RTV_DIMENSION_TEXTURE1D:")
cpp_quote(" Texture1D.MipSlice = mip_slice;")
cpp_quote(" break;")
cpp_quote(" case D3D11_RTV_DIMENSION_TEXTURE1DARRAY:")
cpp_quote(" Texture1DArray.MipSlice = mip_slice;")
cpp_quote(" Texture1DArray.FirstArraySlice = first_slice;")
cpp_quote(" Texture1DArray.ArraySize = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_RTV_DIMENSION_TEXTURE2D:")
cpp_quote(" Texture2D.MipSlice = mip_slice;")
cpp_quote(" break;")
cpp_quote(" case D3D11_RTV_DIMENSION_TEXTURE2DARRAY:")
cpp_quote(" Texture2DArray.MipSlice = mip_slice;")
cpp_quote(" Texture2DArray.FirstArraySlice = first_slice;")
cpp_quote(" Texture2DArray.ArraySize = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY:")
cpp_quote(" Texture2DMSArray.FirstArraySlice = first_slice;")
cpp_quote(" Texture2DMSArray.ArraySize = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_RTV_DIMENSION_TEXTURE3D:")
cpp_quote(" Texture3D.MipSlice = mip_slice;")
cpp_quote(" Texture3D.FirstWSlice = first_slice;")
cpp_quote(" Texture3D.WSize = array_size;")
cpp_quote(" break;")
cpp_quote(" default:")
cpp_quote(" break;")
cpp_quote(" }")
cpp_quote(" }")
cpp_quote(" explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Buffer*, DXGI_FORMAT format, UINT first_elem,")
cpp_quote(" UINT elem_cnt) {")
cpp_quote(" Format = format;")
cpp_quote(" ViewDimension = D3D11_RTV_DIMENSION_BUFFER;")
cpp_quote(" Buffer.FirstElement = first_elem;")
cpp_quote(" Buffer.NumElements = elem_cnt;")
cpp_quote(" }")
cpp_quote(" explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Texture1D *texture, D3D11_RTV_DIMENSION dim,")
cpp_quote(" DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT mip_slice = 0, UINT first_slice = 0,")
cpp_quote(" UINT array_size = -1);") /* FIXME: implement */
cpp_quote(" explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Texture2D *texture, D3D11_RTV_DIMENSION dim,")
cpp_quote(" DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT mip_slice = 0, UINT first_slice = 0,")
cpp_quote(" UINT array_size = -1);") /* FIXME: implement */
cpp_quote(" explicit CD3D11_RENDER_TARGET_VIEW_DESC(ID3D11Texture3D *texture, DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,")
cpp_quote(" UINT mip_slice = 0, UINT first_w_slice = 0, UINT w_slice = -1 );") /* FIXME: implement */
cpp_quote(" ~CD3D11_RENDER_TARGET_VIEW_DESC() {}")
cpp_quote(" explicit CD3D11_RENDER_TARGET_VIEW_DESC(const D3D11_RENDER_TARGET_VIEW_DESC &other)")
cpp_quote(" : D3D11_RENDER_TARGET_VIEW_DESC(other) {}")
cpp_quote(" operator const D3D11_RENDER_TARGET_VIEW_DESC&() const {")
cpp_quote(" return *this;")
cpp_quote(" }")
cpp_quote("};")
cpp_quote("#endif")
typedef struct D3D11_SAMPLER_DESC
{
D3D11_FILTER Filter;
@ -1164,6 +1230,85 @@ typedef struct D3D11_SHADER_RESOURCE_VIEW_DESC
};
} D3D11_SHADER_RESOURCE_VIEW_DESC;
cpp_quote("#if !defined(D3D11_NO_HELPERS) && defined( __cplusplus )")
cpp_quote("struct CD3D11_SHADER_RESOURCE_VIEW_DESC : public D3D11_SHADER_RESOURCE_VIEW_DESC {")
cpp_quote(" CD3D11_SHADER_RESOURCE_VIEW_DESC() {}")
cpp_quote(" explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(D3D11_SRV_DIMENSION dim,")
cpp_quote(" DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT most_detailed_mip = 0,")
cpp_quote(" UINT mip_levels = -1, UINT first_slice = 0, UINT array_size = -1, UINT flags = 0) {")
cpp_quote(" Format = format;")
cpp_quote(" ViewDimension = dim;")
cpp_quote(" switch(ViewDimension) {")
cpp_quote(" case D3D11_SRV_DIMENSION_BUFFER:")
cpp_quote(" Buffer.FirstElement = most_detailed_mip;")
cpp_quote(" Buffer.NumElements = mip_levels;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURE1D:")
cpp_quote(" Texture1D.MostDetailedMip = most_detailed_mip;")
cpp_quote(" Texture1D.MipLevels = mip_levels;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURE1DARRAY:")
cpp_quote(" Texture1DArray.MostDetailedMip = most_detailed_mip;")
cpp_quote(" Texture1DArray.MipLevels = mip_levels;")
cpp_quote(" Texture1DArray.FirstArraySlice = first_slice;")
cpp_quote(" Texture1DArray.ArraySize = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURE2D:")
cpp_quote(" Texture2D.MostDetailedMip = most_detailed_mip;")
cpp_quote(" Texture2D.MipLevels = mip_levels;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURE2DARRAY:")
cpp_quote(" Texture2DArray.MostDetailedMip = most_detailed_mip;")
cpp_quote(" Texture2DArray.MipLevels = mip_levels;")
cpp_quote(" Texture2DArray.FirstArraySlice = first_slice;")
cpp_quote(" Texture2DArray.ArraySize = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY:")
cpp_quote(" Texture2DMSArray.FirstArraySlice = first_slice;")
cpp_quote(" Texture2DMSArray.ArraySize = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURE3D:")
cpp_quote(" Texture3D.MostDetailedMip = most_detailed_mip;")
cpp_quote(" Texture3D.MipLevels = mip_levels;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURECUBE:")
cpp_quote(" TextureCube.MostDetailedMip = most_detailed_mip;")
cpp_quote(" TextureCube.MipLevels = mip_levels;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY:")
cpp_quote(" TextureCubeArray.MostDetailedMip = most_detailed_mip;")
cpp_quote(" TextureCubeArray.MipLevels = mip_levels;")
cpp_quote(" TextureCubeArray.First2DArrayFace = first_slice;")
cpp_quote(" TextureCubeArray.NumCubes = array_size;")
cpp_quote(" break;")
cpp_quote(" case D3D11_SRV_DIMENSION_BUFFEREX:")
cpp_quote(" BufferEx.FirstElement = most_detailed_mip;")
cpp_quote(" BufferEx.NumElements = mip_levels;")
cpp_quote(" BufferEx.Flags = flags;")
cpp_quote(" break;")
cpp_quote(" default:")
cpp_quote(" break;")
cpp_quote(" }")
cpp_quote(" }")
cpp_quote(" explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Buffer*, DXGI_FORMAT format, UINT first_elem,")
cpp_quote(" UINT elem_cnt, UINT flags = 0);") /* FIXME: implement */
cpp_quote(" explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture1D *texture, D3D11_SRV_DIMENSION dim,")
cpp_quote(" DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT most_detailed_mip = 0, UINT mip_levels = -1,")
cpp_quote(" UINT first_slice = 0, UINT array_size = -1 );") /* FIXME: implement */
cpp_quote(" explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture2D *texture, D3D11_SRV_DIMENSION dim,")
cpp_quote(" DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN, UINT most_detailed_mip = 0, UINT mip_levels = -1,")
cpp_quote(" UINT first_slice = 0, UINT array_size = -1 );") /* FIXME: implement */
cpp_quote(" explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture3D *texture, DXGI_FORMAT format = DXGI_FORMAT_UNKNOWN,")
cpp_quote(" UINT most_detailed_mip = 0, UINT mip_levels = -1 );")
cpp_quote(" ~CD3D11_SHADER_RESOURCE_VIEW_DESC() {}")
cpp_quote(" explicit CD3D11_SHADER_RESOURCE_VIEW_DESC(const D3D11_SHADER_RESOURCE_VIEW_DESC &other)")
cpp_quote(" : D3D11_SHADER_RESOURCE_VIEW_DESC(other) {}")
cpp_quote(" operator const D3D11_SHADER_RESOURCE_VIEW_DESC&() const {")
cpp_quote(" return *this;")
cpp_quote(" }")
cpp_quote("};")
cpp_quote("#endif")
typedef struct D3D11_TEXTURE1D_DESC
{
UINT Width;