From cbf51a7a2547bd618ff455c517ed828d574f8c76 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 20 Mar 2024 13:30:31 +0100 Subject: [PATCH] [d3d11] Enable copy usage for typeless images as necessary --- src/d3d11/d3d11_texture.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index b75908e1..4bf43989 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -214,9 +214,12 @@ namespace dxvk { // For some formats, we need to enable sampled and/or // render target capabilities if available, but these // should in no way affect the default image layout - imageInfo.usage |= EnableMetaCopyUsage(imageInfo.format, imageInfo.tiling); imageInfo.usage |= EnableMetaPackUsage(imageInfo.format, m_desc.CPUAccessFlags); - + imageInfo.usage |= EnableMetaCopyUsage(imageInfo.format, imageInfo.tiling); + + for (uint32_t i = 0; i < imageInfo.viewFormatCount; i++) + imageInfo.usage |= EnableMetaCopyUsage(imageInfo.viewFormats[i], imageInfo.tiling); + // Check if we can actually create the image if (!CheckImageSupport(&imageInfo, imageInfo.tiling)) { throw DxvkError(str::format(