vkd3d: Fix default layout check when using LINEAR tiled images.

Match behavior of d3d12_resource_pick_layout.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-09-16 14:50:13 +02:00
parent 41295eff6c
commit 9fd422a0fd
1 changed files with 1 additions and 1 deletions

View File

@ -6715,7 +6715,7 @@ static VkImageLayout vk_image_layout_from_d3d12_resource_state(
{
/* Simultaneous access is always general, until we're forced to treat it differently in
* a transfer, render pass, or similar. */
if (resource->flags & VKD3D_RESOURCE_SIMULTANEOUS_ACCESS)
if (resource->flags & (VKD3D_RESOURCE_LINEAR_TILING | VKD3D_RESOURCE_SIMULTANEOUS_ACCESS))
return VK_IMAGE_LAYOUT_GENERAL;
/* Anything generic read-related uses common layout since we get implicit promotion and decay. */