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-08-24 00:02:09 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-08-24 14:12:07 +0300
commita4f2a49a023ef0747b87bcde24d5f4c3f17546b5 (patch)
treea0180b5e922a38422b8dfb4cacd956790c1ba8a6
parentaa41a7a35121e6bf660e6e9a21ef54f13c433aa3 (diff)
[dxvk] Add description for new image formats
-rw-r--r--src/dxvk/dxvk_format.cpp12
-rw-r--r--src/dxvk/dxvk_format.h2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/dxvk/dxvk_format.cpp b/src/dxvk/dxvk_format.cpp
index 72c3da2c..674da9b3 100644
--- a/src/dxvk/dxvk_format.cpp
+++ b/src/dxvk/dxvk_format.cpp
@@ -6,6 +6,7 @@ namespace dxvk {
constexpr VkColorComponentFlags RGB = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT;
constexpr VkColorComponentFlags RG = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT;
constexpr VkColorComponentFlags R = VK_COLOR_COMPONENT_R_BIT;
+ constexpr VkColorComponentFlags A = VK_COLOR_COMPONENT_A_BIT;
const std::array<DxvkFormatInfo, DxvkFormatCount> g_formatInfos = {{
// VK_FORMAT_UNDEFINED
@@ -568,14 +569,21 @@ namespace dxvk {
DxvkFormatFlag::MultiPlane, VkExtent3D { 1, 1, 1 },
{ DxvkPlaneFormatInfo { 1, { 1, 1 } },
DxvkPlaneFormatInfo { 2, { 2, 2 } } } },
+
+ // VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR
+ { 2, RGBA, VK_IMAGE_ASPECT_COLOR_BIT },
+
+ // VK_FORMAT_A8_UNORM_KHR
+ { 1, A, VK_IMAGE_ASPECT_COLOR_BIT },
}};
- const std::array<std::pair<VkFormat, VkFormat>, 4> g_formatGroups = {{
+ const std::array<std::pair<VkFormat, VkFormat>, 5> g_formatGroups = {{
{ VK_FORMAT_UNDEFINED, VK_FORMAT_BC7_SRGB_BLOCK },
{ VK_FORMAT_G8B8G8R8_422_UNORM_KHR, VK_FORMAT_B8G8R8G8_422_UNORM_KHR },
{ VK_FORMAT_A4R4G4B4_UNORM_PACK16, VK_FORMAT_A4B4G4R4_UNORM_PACK16 },
- { VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM },
+ { VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM },
+ { VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR, VK_FORMAT_A8_UNORM_KHR },
}};
diff --git a/src/dxvk/dxvk_format.h b/src/dxvk/dxvk_format.h
index 97775b8b..127d9911 100644
--- a/src/dxvk/dxvk_format.h
+++ b/src/dxvk/dxvk_format.h
@@ -87,7 +87,7 @@ namespace dxvk {
};
/// Number of formats defined in lookup table
- constexpr size_t DxvkFormatCount = 153;
+ constexpr size_t DxvkFormatCount = 155;
/// Format lookup table
extern const std::array<DxvkFormatInfo, DxvkFormatCount> g_formatInfos;