mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Use VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT if available
This commit is contained in:
parent
397daa0432
commit
cb7f1dc966
@ -518,12 +518,10 @@ namespace dxvk {
|
||||
// DXGI_FORMAT_A8P8
|
||||
{ }, // Unsupported
|
||||
// DXGI_FORMAT_B4G4R4A4_UNORM
|
||||
{ VK_FORMAT_B4G4R4A4_UNORM_PACK16,
|
||||
{ VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT,
|
||||
VK_FORMAT_UNDEFINED,
|
||||
VK_FORMAT_UNDEFINED,
|
||||
VK_IMAGE_ASPECT_COLOR_BIT, 0,
|
||||
{ VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_R,
|
||||
VK_COMPONENT_SWIZZLE_A, VK_COMPONENT_SWIZZLE_B }},
|
||||
VK_IMAGE_ASPECT_COLOR_BIT },
|
||||
// DXGI_FORMAT_P208
|
||||
{ }, // Unsupported
|
||||
// DXGI_FORMAT_V208
|
||||
@ -842,6 +840,12 @@ 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);
|
||||
}
|
||||
|
||||
if (!adapter->features().ext4444Formats.formatA4R4G4B4) {
|
||||
RemapColorFormat(DXGI_FORMAT_B4G4R4A4_UNORM, VK_FORMAT_B4G4R4A4_UNORM_PACK16,
|
||||
{ VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_R,
|
||||
VK_COMPONENT_SWIZZLE_A, VK_COMPONENT_SWIZZLE_B });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -941,4 +945,13 @@ namespace dxvk {
|
||||
m_dxgiFormats[uint32_t(Format)].FormatDepth = Target;
|
||||
}
|
||||
|
||||
|
||||
void DXGIVkFormatTable::RemapColorFormat(
|
||||
DXGI_FORMAT Format,
|
||||
VkFormat Target,
|
||||
VkComponentMapping Swizzle) {
|
||||
m_dxgiFormats[uint32_t(Format)].FormatColor = Target;
|
||||
m_dxgiFormats[uint32_t(Format)].Swizzle = Swizzle;
|
||||
}
|
||||
|
||||
}
|
@ -163,6 +163,11 @@ namespace dxvk {
|
||||
DXGI_FORMAT Format,
|
||||
VkFormat Target);
|
||||
|
||||
void RemapColorFormat(
|
||||
DXGI_FORMAT Format,
|
||||
VkFormat Target,
|
||||
VkComponentMapping Swizzle);
|
||||
|
||||
};
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user