From 7ecc22ccaaa2626f2e68fa208d3a8d70d6cf2180 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 31 Mar 2022 18:04:24 +0200 Subject: [PATCH] dzn: Force sampleCounts to 1 for bgra4 images Those are not expected to be used as render-target, and Vulkan mandates that such formats get their sampleCounts set to VK_SAMPLE_COUNT_1_BIT. Reviewed-by: Erik Faye-Lund Part-of: --- src/microsoft/vulkan/dzn_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/microsoft/vulkan/dzn_device.cpp b/src/microsoft/vulkan/dzn_device.cpp index 03c4195a5aa..215707fc2af 100644 --- a/src/microsoft/vulkan/dzn_device.cpp +++ b/src/microsoft/vulkan/dzn_device.cpp @@ -789,7 +789,7 @@ dzn_physical_device_get_image_format_properties(dzn_physical_device *pdev, if (info->tiling != VK_IMAGE_TILING_LINEAR && info->type == VK_IMAGE_TYPE_2D && !(info->flags & VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT) && - rt_or_ds_cap && + rt_or_ds_cap && !is_bgra4 && !(info->usage & VK_IMAGE_USAGE_STORAGE_BIT)) { for (uint32_t s = VK_SAMPLE_COUNT_2_BIT; s < VK_SAMPLE_COUNT_64_BIT; s <<= 1) { D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS ms_info = {