d3d11: Normalize 1D texture view descriptions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
11f9cac435
commit
f9a66eb40d
|
@ -132,6 +132,8 @@ static HRESULT normalize_dsv_desc(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Res
|
||||||
{
|
{
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
||||||
{
|
{
|
||||||
|
const struct d3d_texture1d *texture;
|
||||||
|
|
||||||
if (desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1D
|
if (desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1D
|
||||||
&& desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1DARRAY)
|
&& desc->ViewDimension != D3D11_DSV_DIMENSION_TEXTURE1DARRAY)
|
||||||
{
|
{
|
||||||
|
@ -139,8 +141,15 @@ static HRESULT normalize_dsv_desc(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Res
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("Unhandled 1D texture resource.\n");
|
if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
|
||||||
return S_OK;
|
{
|
||||||
|
ERR("Cannot get implementation from ID3D11Texture1D.\n");
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
format = texture->desc.Format;
|
||||||
|
layer_count = texture->desc.ArraySize;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
||||||
|
@ -344,6 +353,8 @@ static HRESULT normalize_rtv_desc(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Res
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
||||||
{
|
{
|
||||||
|
const struct d3d_texture1d *texture;
|
||||||
|
|
||||||
if (desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1D
|
if (desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1D
|
||||||
&& desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1DARRAY)
|
&& desc->ViewDimension != D3D11_RTV_DIMENSION_TEXTURE1DARRAY)
|
||||||
{
|
{
|
||||||
|
@ -351,8 +362,15 @@ static HRESULT normalize_rtv_desc(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Res
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("Unhandled 1D texture resource.\n");
|
if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
|
||||||
return S_OK;
|
{
|
||||||
|
ERR("Cannot get implementation from ID3D11Texture1D.\n");
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
format = texture->desc.Format;
|
||||||
|
layer_count = texture->desc.ArraySize;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
||||||
|
@ -626,6 +644,8 @@ static HRESULT normalize_srv_desc(D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11R
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
||||||
{
|
{
|
||||||
|
const struct d3d_texture1d *texture;
|
||||||
|
|
||||||
if (desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1D
|
if (desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1D
|
||||||
&& desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1DARRAY)
|
&& desc->ViewDimension != D3D11_SRV_DIMENSION_TEXTURE1DARRAY)
|
||||||
{
|
{
|
||||||
|
@ -633,8 +653,16 @@ static HRESULT normalize_srv_desc(D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11R
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("Unhandled 1D texture resource.\n");
|
if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
|
||||||
return S_OK;
|
{
|
||||||
|
ERR("Cannot get implementation from ID3D11Texture1D.\n");
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
format = texture->desc.Format;
|
||||||
|
miplevel_count = texture->desc.MipLevels;
|
||||||
|
layer_count = texture->desc.ArraySize;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
||||||
|
@ -871,6 +899,8 @@ static HRESULT normalize_uav_desc(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
|
||||||
{
|
{
|
||||||
|
const struct d3d_texture1d *texture;
|
||||||
|
|
||||||
if (desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1D
|
if (desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1D
|
||||||
&& desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1DARRAY)
|
&& desc->ViewDimension != D3D11_UAV_DIMENSION_TEXTURE1DARRAY)
|
||||||
{
|
{
|
||||||
|
@ -878,8 +908,15 @@ static HRESULT normalize_uav_desc(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("Unhandled 1D texture resource.\n");
|
if (!(texture = unsafe_impl_from_ID3D11Texture1D((ID3D11Texture1D *)resource)))
|
||||||
return S_OK;
|
{
|
||||||
|
ERR("Cannot get implementation from ID3D11Texture1D.\n");
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
format = texture->desc.Format;
|
||||||
|
layer_count = texture->desc.ArraySize;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
case D3D11_RESOURCE_DIMENSION_TEXTURE2D:
|
||||||
|
|
Loading…
Reference in New Issue