From 5b9e4c1faa41494d83a878fe621ee16f11bce2ab Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 11 Mar 2018 00:06:44 +0100 Subject: [PATCH] [d3d11] Fix image tiling Fixes bug introduced in d3e89b20dda226dc142aae1b83cc9c90e09f1a5e, which applies linear tiling to the wrong kind of images. --- src/d3d11/d3d11_texture.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index 2e53bc2c..af5d4b95 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -143,13 +143,13 @@ namespace dxvk { if (CPUAccessFlags != 0) { pImageInfo->stages |= VK_PIPELINE_STAGE_HOST_BIT; - if (CPUAccessFlags & D3D11_CPU_ACCESS_WRITE) { + if (CPUAccessFlags & D3D11_CPU_ACCESS_WRITE) pImageInfo->access |= VK_ACCESS_HOST_WRITE_BIT; + + if (CPUAccessFlags & D3D11_CPU_ACCESS_READ) { + pImageInfo->access |= VK_ACCESS_HOST_READ_BIT; pImageInfo->tiling = VK_IMAGE_TILING_LINEAR; } - - if (CPUAccessFlags & D3D11_CPU_ACCESS_READ) - pImageInfo->access |= VK_ACCESS_HOST_READ_BIT; } if (MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)