mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 22:54:16 +01:00
[dxvk] Add format definition for VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
This commit is contained in:
parent
0f5e126735
commit
1d6da6f83e
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
const std::array<DxvkFormatInfo, 151> g_formatInfos = {{
|
const std::array<DxvkFormatInfo, 152> g_formatInfos = {{
|
||||||
// VK_FORMAT_UNDEFINED
|
// VK_FORMAT_UNDEFINED
|
||||||
{ },
|
{ },
|
||||||
|
|
||||||
@ -550,13 +550,20 @@ namespace dxvk {
|
|||||||
|
|
||||||
// VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT
|
// VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT
|
||||||
{ 2, VK_IMAGE_ASPECT_COLOR_BIT },
|
{ 2, VK_IMAGE_ASPECT_COLOR_BIT },
|
||||||
|
|
||||||
|
// VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
|
||||||
|
{ 6, VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT,
|
||||||
|
DxvkFormatFlag::MultiPlane, VkExtent3D { 1, 1, 1 },
|
||||||
|
{ DxvkPlaneFormatInfo { 1, { 1, 1 } },
|
||||||
|
DxvkPlaneFormatInfo { 2, { 2, 2 } } } },
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
const std::array<std::pair<VkFormat, VkFormat>, 3> g_formatGroups = {{
|
const std::array<std::pair<VkFormat, VkFormat>, 4> g_formatGroups = {{
|
||||||
{ VK_FORMAT_UNDEFINED, VK_FORMAT_BC7_SRGB_BLOCK },
|
{ VK_FORMAT_UNDEFINED, VK_FORMAT_BC7_SRGB_BLOCK },
|
||||||
{ VK_FORMAT_G8B8G8R8_422_UNORM_KHR, VK_FORMAT_B8G8R8G8_422_UNORM_KHR },
|
{ VK_FORMAT_G8B8G8R8_422_UNORM_KHR, VK_FORMAT_B8G8R8G8_422_UNORM_KHR },
|
||||||
{ VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT },
|
{ VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT },
|
||||||
|
{ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, VK_FORMAT_G8_B8R8_2PLANE_420_UNORM },
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,10 +9,22 @@ namespace dxvk {
|
|||||||
SampledUInt = 1, ///< Sampled type is an unsigned integer type
|
SampledUInt = 1, ///< Sampled type is an unsigned integer type
|
||||||
SampledSInt = 2, ///< Sampled type is a signed integer type
|
SampledSInt = 2, ///< Sampled type is a signed integer type
|
||||||
ColorSpaceSrgb = 3, ///< Non-linear SRGB color format
|
ColorSpaceSrgb = 3, ///< Non-linear SRGB color format
|
||||||
|
MultiPlane = 4, ///< Multi-plane format
|
||||||
};
|
};
|
||||||
|
|
||||||
using DxvkFormatFlags = Flags<DxvkFormatFlag>;
|
using DxvkFormatFlags = Flags<DxvkFormatFlag>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Planar format info
|
||||||
|
*/
|
||||||
|
struct DxvkPlaneFormatInfo {
|
||||||
|
/// Byte size of a pixel in the current plane
|
||||||
|
VkDeviceSize elementSize = 0;
|
||||||
|
/// Number of image pixels covered by a
|
||||||
|
/// single pixel in the current plane
|
||||||
|
VkExtent2D blockSize = { 1, 1 };
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Format info structure
|
* \brief Format info structure
|
||||||
*
|
*
|
||||||
@ -33,6 +45,9 @@ namespace dxvk {
|
|||||||
/// Size, in pixels, of a compressed block. For
|
/// Size, in pixels, of a compressed block. For
|
||||||
/// non-block formats, all these values are 1.
|
/// non-block formats, all these values are 1.
|
||||||
VkExtent3D blockSize = { 1, 1, 1 };
|
VkExtent3D blockSize = { 1, 1, 1 };
|
||||||
|
|
||||||
|
/// Plane info for multi-planar formats
|
||||||
|
std::array<DxvkPlaneFormatInfo, 3> planes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user