Implement R16G16B16A16Snorm/R16G16B16A16Sint RT Formats

Utilized in "The Touryst"
This commit is contained in:
PixelyIon 2021-10-27 22:44:31 +05:30
parent df64ff5d14
commit a0921f8261
3 changed files with 14 additions and 0 deletions

View File

@ -98,6 +98,10 @@ namespace skyline::gpu::interconnect {
return format::R32B32G32A32Float;
case maxwell3d::RenderTarget::ColorFormat::R16G16B16A16Unorm:
return format::R16G16B16A16Unorm;
case maxwell3d::RenderTarget::ColorFormat::R16G16B16A16Snorm:
return format::R16G16B16A16Snorm;
case maxwell3d::RenderTarget::ColorFormat::R16G16B16A16Sint:
return format::R16G16B16A16Sint;
case maxwell3d::RenderTarget::ColorFormat::R16G16B16A16Uint:
return format::R16G16B16A16Uint;
case maxwell3d::RenderTarget::ColorFormat::R16G16B16A16Float:
@ -206,6 +210,8 @@ namespace skyline::gpu::interconnect {
renderTarget.guest.mappings.assign(mappings.begin(), mappings.end());
}
renderTarget.guest.type = static_cast<texture::TextureType>(renderTarget.guest.dimensions.GetType());
renderTarget.view = gpu.texture.FindOrCreate(renderTarget.guest);
return &renderTarget.view.value();
}

View File

@ -33,6 +33,8 @@ namespace skyline::gpu::format {
.green = swc::Blue,
}};
constexpr Format R16G16B16A16Unorm{sizeof(u16) * 4, vkf::eR16G16B16A16Unorm};
constexpr Format R16G16B16A16Snorm{sizeof(u16) * 4, vkf::eR16G16B16A16Snorm};
constexpr Format R16G16B16A16Sint{sizeof(u16) * 4, vkf::eR16G16B16A16Sint};
constexpr Format R16G16B16A16Uint{sizeof(u16) * 4, vkf::eR16G16B16A16Uint};
constexpr Format R16G16B16A16Float{sizeof(u16) * 4, vkf::eR16G16B16A16Sfloat};
@ -77,6 +79,10 @@ namespace skyline::gpu::format {
return R8Uint;
case vk::Format::eR16G16B16A16Unorm:
return R16G16B16A16Unorm;
case vk::Format::eR16G16B16A16Snorm:
return R16G16B16A16Unorm;
case vk::Format::eR16G16B16A16Sint:
return R16G16B16A16Unorm;
case vk::Format::eR16G16B16A16Uint:
return R16G16B16A16Uint;
case vk::Format::eR16G16B16A16Sfloat:

View File

@ -44,6 +44,8 @@ namespace skyline::soc::gm20b::engine::maxwell3d::type {
None = 0x0,
R32B32G32A32Float = 0xC0,
R16G16B16A16Unorm = 0xC6,
R16G16B16A16Snorm = 0xC7,
R16G16B16A16Sint = 0xC8,
R16G16B16A16Uint = 0xC9,
R16G16B16A16Float = 0xCA,
A2B10G10R10Unorm = 0xD1,