mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
video_core: Implement RGBA16_SINT render target
This commit is contained in:
parent
977d6c46f3
commit
95c0f5afe5
7 changed files with 13 additions and 0 deletions
|
@ -43,6 +43,7 @@ enum class RenderTargetFormat : u32 {
|
|||
RGBA32_UINT = 0xC2,
|
||||
RGBA16_UNORM = 0xC6,
|
||||
RGBA16_SNORM = 0xC7,
|
||||
RGBA16_SINT = 0xC8,
|
||||
RGBA16_UINT = 0xC9,
|
||||
RGBA16_FLOAT = 0xCA,
|
||||
RG32_FLOAT = 0xCB,
|
||||
|
|
|
@ -55,6 +55,7 @@ static constexpr ConversionArray morton_to_linear_fns = {
|
|||
MortonCopy<true, PixelFormat::RGBA16F>,
|
||||
MortonCopy<true, PixelFormat::RGBA16U>,
|
||||
MortonCopy<true, PixelFormat::RGBA16S>,
|
||||
MortonCopy<true, PixelFormat::RGBA16I>,
|
||||
MortonCopy<true, PixelFormat::RGBA16UI>,
|
||||
MortonCopy<true, PixelFormat::R11FG11FB10F>,
|
||||
MortonCopy<true, PixelFormat::RGBA32UI>,
|
||||
|
@ -142,6 +143,7 @@ static constexpr ConversionArray linear_to_morton_fns = {
|
|||
MortonCopy<false, PixelFormat::R8UI>,
|
||||
MortonCopy<false, PixelFormat::RGBA16F>,
|
||||
MortonCopy<false, PixelFormat::RGBA16S>,
|
||||
MortonCopy<false, PixelFormat::RGBA16I>,
|
||||
MortonCopy<false, PixelFormat::RGBA16U>,
|
||||
MortonCopy<false, PixelFormat::RGBA16UI>,
|
||||
MortonCopy<false, PixelFormat::R11FG11FB10F>,
|
||||
|
|
|
@ -55,6 +55,7 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format
|
|||
{GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT}, // RGBA16F
|
||||
{GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT}, // RGBA16U
|
||||
{GL_RGBA16_SNORM, GL_RGBA, GL_SHORT}, // RGBA16S
|
||||
{GL_RGBA16I, GL_RGBA_INTEGER, GL_SHORT}, // RGBA16I
|
||||
{GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT}, // RGBA16UI
|
||||
{GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV}, // R11FG11FB10F
|
||||
{GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT}, // RGBA32UI
|
||||
|
|
|
@ -131,6 +131,7 @@ struct FormatTuple {
|
|||
{VK_FORMAT_R16G16B16A16_SFLOAT, Attachable | Storage}, // RGBA16F
|
||||
{VK_FORMAT_R16G16B16A16_UNORM, Attachable | Storage}, // RGBA16U
|
||||
{VK_FORMAT_R16G16B16A16_SNORM, Attachable | Storage}, // RGBA16S
|
||||
{VK_FORMAT_R16G16B16A16_SINT, Attachable | Storage}, // RGBA16I
|
||||
{VK_FORMAT_R16G16B16A16_UINT, Attachable | Storage}, // RGBA16UI
|
||||
{VK_FORMAT_B10G11R11_UFLOAT_PACK32, Attachable | Storage}, // R11FG11FB10F
|
||||
{VK_FORMAT_R32G32B32A32_UINT, Attachable | Storage}, // RGBA32UI
|
||||
|
|
|
@ -87,6 +87,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(
|
|||
VK_FORMAT_R32G32_SFLOAT,
|
||||
VK_FORMAT_R32G32_SINT,
|
||||
VK_FORMAT_R32G32_UINT,
|
||||
VK_FORMAT_R16G16B16A16_SINT,
|
||||
VK_FORMAT_R16G16B16A16_UINT,
|
||||
VK_FORMAT_R16G16B16A16_SNORM,
|
||||
VK_FORMAT_R16G16B16A16_UNORM,
|
||||
|
|
|
@ -100,6 +100,8 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format)
|
|||
return PixelFormat::RGBA16U;
|
||||
case Tegra::RenderTargetFormat::RGBA16_SNORM:
|
||||
return PixelFormat::RGBA16S;
|
||||
case Tegra::RenderTargetFormat::RGBA16_SINT:
|
||||
return PixelFormat::RGBA16I;
|
||||
case Tegra::RenderTargetFormat::RGBA16_UINT:
|
||||
return PixelFormat::RGBA16UI;
|
||||
case Tegra::RenderTargetFormat::RGBA16_FLOAT:
|
||||
|
|
|
@ -29,6 +29,7 @@ enum class PixelFormat {
|
|||
RGBA16F,
|
||||
RGBA16U,
|
||||
RGBA16S,
|
||||
RGBA16I,
|
||||
RGBA16UI,
|
||||
R11FG11FB10F,
|
||||
RGBA32UI,
|
||||
|
@ -149,6 +150,7 @@ constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{
|
|||
0, // RGBA16F
|
||||
0, // RGBA16U
|
||||
0, // RGBA16S
|
||||
0, // RGBA16I
|
||||
0, // RGBA16UI
|
||||
0, // R11FG11FB10F
|
||||
0, // RGBA32UI
|
||||
|
@ -253,6 +255,7 @@ constexpr std::array<u32, MaxPixelFormat> block_width_table = {{
|
|||
1, // RGBA16F
|
||||
1, // RGBA16U
|
||||
1, // RGBA16S
|
||||
1, // RGBA16I
|
||||
1, // RGBA16UI
|
||||
1, // R11FG11FB10F
|
||||
1, // RGBA32UI
|
||||
|
@ -349,6 +352,7 @@ constexpr std::array<u32, MaxPixelFormat> block_height_table = {{
|
|||
1, // RGBA16F
|
||||
1, // RGBA16U
|
||||
1, // RGBA16S
|
||||
1, // RGBA16I
|
||||
1, // RGBA16UI
|
||||
1, // R11FG11FB10F
|
||||
1, // RGBA32UI
|
||||
|
@ -445,6 +449,7 @@ constexpr std::array<u32, MaxPixelFormat> bpp_table = {{
|
|||
64, // RGBA16F
|
||||
64, // RGBA16U
|
||||
64, // RGBA16S
|
||||
64, // RGBA16I
|
||||
64, // RGBA16UI
|
||||
32, // R11FG11FB10F
|
||||
128, // RGBA32UI
|
||||
|
|
Loading…
Reference in a new issue