Commit 445ed18b authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Fix default view descriptions for 2D array textures.

parent b922dcc6
......@@ -1307,7 +1307,7 @@ static void test_create_depthstencil_view(void)
U(dsv_desc).Texture2DArray.MipSlice);
ok(!U(dsv_desc).Texture2DArray.FirstArraySlice, "Got unexpected first array slice %u.\n",
U(dsv_desc).Texture2DArray.FirstArraySlice);
todo_wine ok(U(dsv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize,
ok(U(dsv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize,
"Got unexpected array size %u.\n", U(dsv_desc).Texture2DArray.ArraySize);
ID3D10DepthStencilView_Release(dsview);
......@@ -1518,7 +1518,7 @@ static void test_create_rendertarget_view(void)
U(rtv_desc).Texture2DArray.MipSlice);
ok(!U(rtv_desc).Texture2DArray.FirstArraySlice, "Got unexpected first array slice %u.\n",
U(rtv_desc).Texture2DArray.FirstArraySlice);
todo_wine ok(U(rtv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize, "Got unexpected array size %u.\n",
ok(U(rtv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize, "Got unexpected array size %u.\n",
U(rtv_desc).Texture2DArray.ArraySize);
ID3D10RenderTargetView_Release(rtview);
......
......@@ -1835,7 +1835,7 @@ static void test_create_depthstencil_view(void)
U(dsv_desc).Texture2DArray.MipSlice);
ok(!U(dsv_desc).Texture2DArray.FirstArraySlice, "Got unexpected first array slice %u.\n",
U(dsv_desc).Texture2DArray.FirstArraySlice);
todo_wine ok(U(dsv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize,
ok(U(dsv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize,
"Got unexpected array size %u.\n", U(dsv_desc).Texture2DArray.ArraySize);
ID3D11DepthStencilView_Release(dsview);
......@@ -2047,7 +2047,7 @@ static void test_create_rendertarget_view(void)
U(rtv_desc).Texture2DArray.MipSlice);
ok(!U(rtv_desc).Texture2DArray.FirstArraySlice, "Got unexpected first array slice %u.\n",
U(rtv_desc).Texture2DArray.FirstArraySlice);
todo_wine ok(U(rtv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize, "Got unexpected array size %u.\n",
ok(U(rtv_desc).Texture2DArray.ArraySize == texture_desc.ArraySize, "Got unexpected array size %u.\n",
U(rtv_desc).Texture2DArray.ArraySize);
ID3D11RenderTargetView_Release(rtview);
......
......@@ -60,7 +60,7 @@ static HRESULT set_dsdesc_from_resource(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3
desc->ViewDimension = D3D11_DSV_DIMENSION_TEXTURE1DARRAY;
desc->u.Texture1DArray.MipSlice = 0;
desc->u.Texture1DArray.FirstArraySlice = 0;
desc->u.Texture1DArray.ArraySize = 1;
desc->u.Texture1DArray.ArraySize = texture_desc.ArraySize;
}
return S_OK;
......@@ -100,13 +100,13 @@ static HRESULT set_dsdesc_from_resource(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3
desc->ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DARRAY;
desc->u.Texture2DArray.MipSlice = 0;
desc->u.Texture2DArray.FirstArraySlice = 0;
desc->u.Texture2DArray.ArraySize = 1;
desc->u.Texture2DArray.ArraySize = texture_desc.ArraySize;
}
else
{
desc->ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY;
desc->u.Texture2DMSArray.FirstArraySlice = 0;
desc->u.Texture2DMSArray.ArraySize = 1;
desc->u.Texture2DMSArray.ArraySize = texture_desc.ArraySize;
}
}
......@@ -156,7 +156,7 @@ static HRESULT set_rtdesc_from_resource(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3
desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE1DARRAY;
desc->u.Texture1DArray.MipSlice = 0;
desc->u.Texture1DArray.FirstArraySlice = 0;
desc->u.Texture1DArray.ArraySize = 1;
desc->u.Texture1DArray.ArraySize = texture_desc.ArraySize;
}
return S_OK;
......@@ -197,13 +197,13 @@ static HRESULT set_rtdesc_from_resource(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3
desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
desc->u.Texture2DArray.MipSlice = 0;
desc->u.Texture2DArray.FirstArraySlice = 0;
desc->u.Texture2DArray.ArraySize = 1;
desc->u.Texture2DArray.ArraySize = texture_desc.ArraySize;
}
else
{
desc->ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY;
desc->u.Texture2DMSArray.FirstArraySlice = 0;
desc->u.Texture2DMSArray.ArraySize = 1;
desc->u.Texture2DMSArray.ArraySize = texture_desc.ArraySize;
}
}
......
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