=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.

Alexandre Julliard julliard at winehq.org
Mon Jun 11 09:46:54 CDT 2018


Module: vkd3d
Branch: master
Commit: 746d3d4e7e58b2124dbc9b9c380ed166c3aabc8b
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=746d3d4e7e58b2124dbc9b9c380ed166c3aabc8b

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Jun  7 15:52:48 2018 +0200

libs/vkd3d: Use VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if array size is >= 6.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d/resource.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index acd3bad..2ccb847 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -132,7 +132,8 @@ static HRESULT vkd3d_create_image(struct d3d12_resource *resource, struct d3d12_
     image_info.flags = 0;
     if (!(desc->Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) && dxgi_format_is_typeless(desc->Format))
         image_info.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
-    if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D && desc->Width == desc->Height)
+    if (desc->Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE2D
+            && desc->Width == desc->Height && desc->DepthOrArraySize >= 6)
         image_info.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
 
     image_info.imageType = vk_image_type_from_d3d12_resource_dimension(desc->Dimension);




More information about the wine-cvs mailing list