|
|
|
@ -94,11 +94,11 @@ struct FormatTuple {
|
|
|
|
|
static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_format_tuples = {{
|
|
|
|
|
{GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // ABGR8U
|
|
|
|
|
{GL_RGBA8, GL_RGBA, GL_BYTE, ComponentType::SNorm, false}, // ABGR8S
|
|
|
|
|
{GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, ComponentType::UNorm, false}, // B5G6R5
|
|
|
|
|
{GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, ComponentType::UNorm, false}, // B5G6R5U
|
|
|
|
|
{GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, ComponentType::UNorm,
|
|
|
|
|
false}, // A2B10G10R10
|
|
|
|
|
{GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, ComponentType::UNorm, false}, // A1B5G5R5
|
|
|
|
|
{GL_R8, GL_RED, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // R8
|
|
|
|
|
false}, // A2B10G10R10U
|
|
|
|
|
{GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, ComponentType::UNorm, false}, // A1B5G5R5U
|
|
|
|
|
{GL_R8, GL_RED, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // R8U
|
|
|
|
|
{GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE, ComponentType::UInt, false}, // R8UI
|
|
|
|
|
{GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT, ComponentType::Float, false}, // RGBA16F
|
|
|
|
|
{GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT, ComponentType::UNorm, false}, // RGBA16U
|
|
|
|
@ -126,7 +126,7 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form
|
|
|
|
|
{GL_RG32F, GL_RG, GL_FLOAT, ComponentType::Float, false}, // RG32F
|
|
|
|
|
{GL_R32F, GL_RED, GL_FLOAT, ComponentType::Float, false}, // R32F
|
|
|
|
|
{GL_R16F, GL_RED, GL_HALF_FLOAT, ComponentType::Float, false}, // R16F
|
|
|
|
|
{GL_R16, GL_RED, GL_UNSIGNED_SHORT, ComponentType::UNorm, false}, // R16UNORM
|
|
|
|
|
{GL_R16, GL_RED, GL_UNSIGNED_SHORT, ComponentType::UNorm, false}, // R16U
|
|
|
|
|
{GL_R16_SNORM, GL_RED, GL_SHORT, ComponentType::SNorm, false}, // R16S
|
|
|
|
|
{GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT, ComponentType::UInt, false}, // R16UI
|
|
|
|
|
{GL_R16I, GL_RED_INTEGER, GL_SHORT, ComponentType::SInt, false}, // R16I
|
|
|
|
@ -243,10 +243,10 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU
|
|
|
|
|
// clang-format off
|
|
|
|
|
MortonCopy<true, PixelFormat::ABGR8U>,
|
|
|
|
|
MortonCopy<true, PixelFormat::ABGR8S>,
|
|
|
|
|
MortonCopy<true, PixelFormat::B5G6R5>,
|
|
|
|
|
MortonCopy<true, PixelFormat::A2B10G10R10>,
|
|
|
|
|
MortonCopy<true, PixelFormat::A1B5G5R5>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R8>,
|
|
|
|
|
MortonCopy<true, PixelFormat::B5G6R5U>,
|
|
|
|
|
MortonCopy<true, PixelFormat::A2B10G10R10U>,
|
|
|
|
|
MortonCopy<true, PixelFormat::A1B5G5R5U>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R8U>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R8UI>,
|
|
|
|
|
MortonCopy<true, PixelFormat::RGBA16F>,
|
|
|
|
|
MortonCopy<true, PixelFormat::RGBA16U>,
|
|
|
|
@ -268,7 +268,7 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU
|
|
|
|
|
MortonCopy<true, PixelFormat::RG32F>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R32F>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R16F>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R16UNORM>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R16U>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R16S>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R16UI>,
|
|
|
|
|
MortonCopy<true, PixelFormat::R16I>,
|
|
|
|
@ -297,10 +297,10 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU
|
|
|
|
|
// clang-format off
|
|
|
|
|
MortonCopy<false, PixelFormat::ABGR8U>,
|
|
|
|
|
MortonCopy<false, PixelFormat::ABGR8S>,
|
|
|
|
|
MortonCopy<false, PixelFormat::B5G6R5>,
|
|
|
|
|
MortonCopy<false, PixelFormat::A2B10G10R10>,
|
|
|
|
|
MortonCopy<false, PixelFormat::A1B5G5R5>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R8>,
|
|
|
|
|
MortonCopy<false, PixelFormat::B5G6R5U>,
|
|
|
|
|
MortonCopy<false, PixelFormat::A2B10G10R10U>,
|
|
|
|
|
MortonCopy<false, PixelFormat::A1B5G5R5U>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R8U>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R8UI>,
|
|
|
|
|
MortonCopy<false, PixelFormat::RGBA16F>,
|
|
|
|
|
MortonCopy<false, PixelFormat::RGBA16U>,
|
|
|
|
@ -324,7 +324,7 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU
|
|
|
|
|
MortonCopy<false, PixelFormat::RG32F>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R32F>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R16F>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R16UNORM>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R16U>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R16S>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R16UI>,
|
|
|
|
|
MortonCopy<false, PixelFormat::R16I>,
|
|
|
|
|