Commit 424532c5 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Remove "view_type" from "wined3d_shader_resource_view_desc".

parent bbe74e34
......@@ -1674,18 +1674,16 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
const D3D11_SHADER_RESOURCE_VIEW_DESC *desc)
{
wined3d_desc->format_id = wined3dformat_from_dxgi_format(desc->Format);
wined3d_desc->flags = 0;
switch (desc->ViewDimension)
{
case D3D11_SRV_DIMENSION_BUFFER:
wined3d_desc->view_type = WINED3D_VTYPE_BUFFER;
wined3d_desc->u.buffer.start_idx = desc->u.Buffer.u1.FirstElement;
wined3d_desc->u.buffer.count = desc->u.Buffer.u2.NumElements;
wined3d_desc->u.buffer.flags = 0;
break;
case D3D11_SRV_DIMENSION_TEXTURE1D:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_1D;
wined3d_desc->u.texture.level_idx = desc->u.Texture1D.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.Texture1D.MipLevels;
wined3d_desc->u.texture.layer_idx = 0;
......@@ -1693,7 +1691,7 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURE1DARRAY:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_1D_ARRAY;
wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
wined3d_desc->u.texture.level_idx = desc->u.Texture1DArray.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.Texture1DArray.MipLevels;
wined3d_desc->u.texture.layer_idx = desc->u.Texture1DArray.FirstArraySlice;
......@@ -1701,7 +1699,6 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURE2D:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_2D;
wined3d_desc->u.texture.level_idx = desc->u.Texture2D.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.Texture2D.MipLevels;
wined3d_desc->u.texture.layer_idx = 0;
......@@ -1709,7 +1706,7 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURE2DARRAY:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_2D_ARRAY;
wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
wined3d_desc->u.texture.level_idx = desc->u.Texture2DArray.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.Texture2DArray.MipLevels;
wined3d_desc->u.texture.layer_idx = desc->u.Texture2DArray.FirstArraySlice;
......@@ -1717,7 +1714,6 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURE2DMS:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_2D;
wined3d_desc->u.texture.level_idx = 0;
wined3d_desc->u.texture.level_count = 1;
wined3d_desc->u.texture.layer_idx = 0;
......@@ -1725,7 +1721,7 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_2D_ARRAY;
wined3d_desc->flags = WINED3D_VIEW_TEXTURE_ARRAY;
wined3d_desc->u.texture.level_idx = 0;
wined3d_desc->u.texture.level_count = 1;
wined3d_desc->u.texture.layer_idx = desc->u.Texture2DMSArray.FirstArraySlice;
......@@ -1733,7 +1729,6 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURE3D:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_3D;
wined3d_desc->u.texture.level_idx = desc->u.Texture3D.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.Texture3D.MipLevels;
wined3d_desc->u.texture.layer_idx = 0;
......@@ -1741,7 +1736,7 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURECUBE:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_CUBE;
wined3d_desc->flags = WINED3D_VIEW_TEXTURE_CUBE;
wined3d_desc->u.texture.level_idx = desc->u.TextureCube.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.TextureCube.MipLevels;
wined3d_desc->u.texture.layer_idx = 0;
......@@ -1749,7 +1744,7 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY:
wined3d_desc->view_type = WINED3D_VTYPE_TEXTURE_CUBE_ARRAY;
wined3d_desc->flags = WINED3D_VIEW_TEXTURE_CUBE | WINED3D_VIEW_TEXTURE_ARRAY;
wined3d_desc->u.texture.level_idx = desc->u.TextureCubeArray.MostDetailedMip;
wined3d_desc->u.texture.level_count = desc->u.TextureCubeArray.MipLevels;
wined3d_desc->u.texture.layer_idx = desc->u.TextureCubeArray.First2DArrayFace;
......@@ -1757,10 +1752,9 @@ static HRESULT wined3d_shader_resource_view_desc_from_d3d11(struct wined3d_shade
break;
case D3D11_SRV_DIMENSION_BUFFEREX:
wined3d_desc->view_type = WINED3D_VTYPE_BUFFER;
wined3d_desc->flags = desc->u.BufferEx.Flags;
wined3d_desc->u.buffer.start_idx = desc->u.BufferEx.FirstElement;
wined3d_desc->u.buffer.count = desc->u.BufferEx.NumElements;
wined3d_desc->u.buffer.flags = desc->u.BufferEx.Flags;
break;
default:
......
......@@ -665,18 +665,6 @@ enum wined3d_resource_type
WINED3D_RTYPE_TEXTURE_3D = 3,
};
enum wined3d_view_type
{
WINED3D_VTYPE_BUFFER = 1,
WINED3D_VTYPE_TEXTURE_1D = 2,
WINED3D_VTYPE_TEXTURE_1D_ARRAY = 3,
WINED3D_VTYPE_TEXTURE_2D = 4,
WINED3D_VTYPE_TEXTURE_2D_ARRAY = 5,
WINED3D_VTYPE_TEXTURE_3D = 6,
WINED3D_VTYPE_TEXTURE_CUBE = 7,
WINED3D_VTYPE_TEXTURE_CUBE_ARRAY = 8,
};
enum wined3d_pool
{
WINED3D_POOL_DEFAULT = 0,
......@@ -1495,6 +1483,12 @@ enum wined3d_display_rotation
#define WINED3D_OUTPUT_SLOT_SEMANTIC 0xffffffff
#define WINED3D_OUTPUT_SLOT_UNUSED 0xfffffffe
#define WINED3D_VIEW_BUFFER_RAW 0x00000001
#define WINED3D_VIEW_BUFFER_APPEND 0x00000002
#define WINED3D_VIEW_BUFFER_COUNTER 0x00000004
#define WINED3D_VIEW_TEXTURE_CUBE 0x00000008
#define WINED3D_VIEW_TEXTURE_ARRAY 0x00000010
struct wined3d_display_mode
{
UINT width;
......@@ -1957,14 +1951,13 @@ struct wined3d_shader_desc
struct wined3d_shader_resource_view_desc
{
enum wined3d_format_id format_id;
enum wined3d_view_type view_type;
unsigned int flags;
union
{
struct
{
unsigned int start_idx;
unsigned int count;
unsigned int flags;
} buffer;
struct
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment