From 5ccadd07f1160fc1c38a7df566e1230ab6196362 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Sat, 27 May 2023 00:38:45 +1000 Subject: [PATCH] vkd3d: Validate plane count for tiled textures. --- libs/vkd3d/resource.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index f305ca8c..59e35b7f 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1686,6 +1686,12 @@ HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC *desc, struct d3d WARN("The device does not support tiled 3D images.\n"); return E_INVALIDARG; } + if (format->plane_count > 1) + { + WARN("Invalid format %#x. D3D12 does not support multiplanar formats for tiled resources.\n", + format->dxgi_format); + return E_INVALIDARG; + } } if (!d3d12_resource_validate_texture_format(desc, format)