From f4f4f3647f30c9f401bd4b04eb38869e400b70f1 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 20 Dec 2022 02:12:44 +0100 Subject: [PATCH] [d3d11] Do not create storage image views with swizzle This happens when a game uses A8_UNORM UAVs. Vulkan doesn't allow this, and it's not meaningful for stores anyway, we'd need shader emulation. --- src/d3d11/d3d11_view_uav.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_view_uav.cpp b/src/d3d11/d3d11_view_uav.cpp index 562626acd..51a7ceddd 100644 --- a/src/d3d11/d3d11_view_uav.cpp +++ b/src/d3d11/d3d11_view_uav.cpp @@ -59,9 +59,11 @@ namespace dxvk { DxvkImageViewCreateInfo viewInfo; viewInfo.format = formatInfo.Format; viewInfo.aspect = formatInfo.Aspect; - viewInfo.swizzle = formatInfo.Swizzle; viewInfo.usage = VK_IMAGE_USAGE_STORAGE_BIT; - + + if (!util::isIdentityMapping(formatInfo.Swizzle)) + Logger::warn(str::format("UAV format ", pDesc->Format, " has non-identity swizzle, but UAV swizzles are not supported")); + switch (pDesc->ViewDimension) { case D3D11_UAV_DIMENSION_TEXTURE1D: viewInfo.type = VK_IMAGE_VIEW_TYPE_1D;