Implement R16G16{Unorm/Sint/Uint} RT Formats

Utilized in "The Touryst"
This commit is contained in:
PixelyIon 2021-10-29 20:21:58 +05:30
parent afebf77544
commit 9f5ab13858
3 changed files with 18 additions and 0 deletions

View File

@ -114,8 +114,14 @@ namespace skyline::gpu::interconnect {
return format::A8B8G8R8Srgb; return format::A8B8G8R8Srgb;
case maxwell3d::RenderTarget::ColorFormat::A8B8G8R8Snorm: case maxwell3d::RenderTarget::ColorFormat::A8B8G8R8Snorm:
return format::A8B8G8R8Snorm; return format::A8B8G8R8Snorm;
case maxwell3d::RenderTarget::ColorFormat::R16G16Unorm:
return format::R16G16Unorm;
case maxwell3d::RenderTarget::ColorFormat::R16G16Snorm: case maxwell3d::RenderTarget::ColorFormat::R16G16Snorm:
return format::R16G16Snorm; return format::R16G16Snorm;
case maxwell3d::RenderTarget::ColorFormat::R16G16Sint:
return format::R16G16Sint;
case maxwell3d::RenderTarget::ColorFormat::R16G16Uint:
return format::R16G16Uint;
case maxwell3d::RenderTarget::ColorFormat::R16G16Float: case maxwell3d::RenderTarget::ColorFormat::R16G16Float:
return format::R16G16Float; return format::R16G16Float;
case maxwell3d::RenderTarget::ColorFormat::B10G11R11Float: case maxwell3d::RenderTarget::ColorFormat::B10G11R11Float:

View File

@ -16,7 +16,10 @@ namespace skyline::gpu::format {
constexpr Format A2B10G10R10Unorm{sizeof(u32), vkf::eA2B10G10R10UnormPack32}; constexpr Format A2B10G10R10Unorm{sizeof(u32), vkf::eA2B10G10R10UnormPack32};
constexpr Format A8B8G8R8Srgb{sizeof(u32), vkf::eA8B8G8R8SrgbPack32}; constexpr Format A8B8G8R8Srgb{sizeof(u32), vkf::eA8B8G8R8SrgbPack32};
constexpr Format A8B8G8R8Snorm{sizeof(u32), vkf::eA8B8G8R8SnormPack32}; constexpr Format A8B8G8R8Snorm{sizeof(u32), vkf::eA8B8G8R8SnormPack32};
constexpr Format R16G16Unorm{sizeof(u32), vkf::eR16G16Unorm};
constexpr Format R16G16Snorm{sizeof(u32), vkf::eR16G16Snorm}; constexpr Format R16G16Snorm{sizeof(u32), vkf::eR16G16Snorm};
constexpr Format R16G16Sint{sizeof(u32), vkf::eR16G16Sint};
constexpr Format R16G16Uint{sizeof(u32), vkf::eR16G16Uint};
constexpr Format R16G16Float{sizeof(u32), vkf::eR16G16Sfloat}; constexpr Format R16G16Float{sizeof(u32), vkf::eR16G16Sfloat};
constexpr Format B10G11R11Float{sizeof(u32), vkf::eB10G11R11UfloatPack32}; constexpr Format B10G11R11Float{sizeof(u32), vkf::eB10G11R11UfloatPack32};
constexpr Format R32Float{sizeof(u32), vkf::eR32Sfloat}; constexpr Format R32Float{sizeof(u32), vkf::eR32Sfloat};
@ -53,8 +56,14 @@ namespace skyline::gpu::format {
return A8B8G8R8Srgb; return A8B8G8R8Srgb;
case vk::Format::eA8B8G8R8SnormPack32: case vk::Format::eA8B8G8R8SnormPack32:
return A8B8G8R8Snorm; return A8B8G8R8Snorm;
case vk::Format::eR16G16Unorm:
return R16G16Unorm;
case vk::Format::eR16G16Snorm: case vk::Format::eR16G16Snorm:
return R16G16Snorm; return R16G16Snorm;
case vk::Format::eR16G16Sint:
return R16G16Sint;
case vk::Format::eR16G16Uint:
return R16G16Uint;
case vk::Format::eR16G16Sfloat: case vk::Format::eR16G16Sfloat:
return R16G16Float; return R16G16Float;
case vk::Format::eB10G11R11UfloatPack32: case vk::Format::eB10G11R11UfloatPack32:

View File

@ -52,7 +52,10 @@ namespace skyline::soc::gm20b::engine::maxwell3d::type {
R8G8B8A8Unorm = 0xD5, R8G8B8A8Unorm = 0xD5,
A8B8G8R8Srgb = 0xD6, A8B8G8R8Srgb = 0xD6,
A8B8G8R8Snorm = 0xD7, A8B8G8R8Snorm = 0xD7,
R16G16Unorm = 0xDA,
R16G16Snorm = 0xDB, R16G16Snorm = 0xDB,
R16G16Sint = 0xDC,
R16G16Uint = 0xDD,
R16G16Float = 0xDE, R16G16Float = 0xDE,
B10G11R11Float = 0xE0, B10G11R11Float = 0xE0,
R32Float = 0xE5, R32Float = 0xE5,