Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-09-07 04:58:39 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-09-07 04:58:39 +0300
commit5828f0e2b9b233b32f7b5edb54dc4e04014d3b55 (patch)
treea3117dc4693781ad590002a247ef44ef2d7090fc
parent80e075406b1b7d9d2508c9dc05e9745b3d3cf7e2 (diff)
Revert "[dxgi] Use VK_FORMAT_A8_UNORM if available"
This reverts commit 6a5ed02db33cd9b5b8166c1679b14f85c9648281. Native A8 breaks Crysis 2/3 Remastered for unknown reasons.
-rw-r--r--src/dxgi/dxgi_format.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/dxgi/dxgi_format.cpp b/src/dxgi/dxgi_format.cpp
index 996d3651..306f773e 100644
--- a/src/dxgi/dxgi_format.cpp
+++ b/src/dxgi/dxgi_format.cpp
@@ -318,10 +318,12 @@ namespace dxvk {
VK_FORMAT_R8_UINT,
VK_IMAGE_ASPECT_COLOR_BIT },
// DXGI_FORMAT_A8_UNORM
- { VK_FORMAT_A8_UNORM_KHR,
+ { VK_FORMAT_R8_UNORM,
VK_FORMAT_UNDEFINED,
- VK_FORMAT_R8_UINT,
- VK_IMAGE_ASPECT_COLOR_BIT, 0 },
+ VK_FORMAT_UNDEFINED,
+ VK_IMAGE_ASPECT_COLOR_BIT, 0,
+ { VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO,
+ VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_R }},
// DXGI_FORMAT_R1_UNORM
{ }, // Unsupported
// DXGI_FORMAT_R9G9B9E5_SHAREDEXP
@@ -858,16 +860,6 @@ namespace dxvk {
RemapDepthFormat(DXGI_FORMAT_X24_TYPELESS_G8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT);
RemapDepthFormat(DXGI_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT);
}
-
- // Map A8_UNORM to R8_UNORM with appropriate swizzles if necessary
- if (!CheckImageFormatSupport(device, VK_FORMAT_A8_UNORM_KHR,
- VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT |
- VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT |
- VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT)) {
- RemapColorFormat(DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM,
- { VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO,
- VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_R });
- }
}