Remove Vulkan to Skyline Format Conversion Function

The function `GetFormat` was seemingly no longer required due to us never converting from a Vulkan format to a Skyline format, most conversions only went from Skyline to Vulkan and were generally lossy due to certain formats being missing in Vulkan and approximated using channel swizzles. As a result of this, it was pointless to maintain and has now been removed.
This commit is contained in:
PixelyIon 2021-11-12 14:12:25 +05:30
parent e8656a362f
commit 69e7d8b574

View File

@ -42,62 +42,4 @@ namespace skyline::gpu::format {
constexpr Format R16G16B16A16Float{sizeof(u16) * 4, vkf::eR16G16B16A16Sfloat};
/**
* @brief Converts a Vulkan format to a Skyline format
*/
constexpr gpu::texture::Format GetFormat(vk::Format format) {
switch (format) {
case vk::Format::eR8G8B8A8Unorm:
return R8G8B8A8Unorm;
case vk::Format::eR5G6B5UnormPack16:
return R5G6B5Unorm;
case vk::Format::eA2B10G10R10UnormPack32:
return A2B10G10R10Unorm;
case vk::Format::eA8B8G8R8SrgbPack32:
return A8B8G8R8Srgb;
case vk::Format::eA8B8G8R8SnormPack32:
return A8B8G8R8Snorm;
case vk::Format::eR16G16Unorm:
return R16G16Unorm;
case vk::Format::eR16G16Snorm:
return R16G16Snorm;
case vk::Format::eR16G16Sint:
return R16G16Sint;
case vk::Format::eR16G16Uint:
return R16G16Uint;
case vk::Format::eR16G16Sfloat:
return R16G16Float;
case vk::Format::eB10G11R11UfloatPack32:
return B10G11R11Float;
case vk::Format::eR32Sfloat:
return format::R32Float;
case vk::Format::eR16Unorm:
return R16Unorm;
case vk::Format::eR16Sfloat:
return R16Float;
case vk::Format::eR8G8Unorm:
return R8G8Unorm;
case vk::Format::eR8G8Snorm:
return R8G8Snorm;
case vk::Format::eR8Unorm:
return R8Unorm;
case vk::Format::eR8Snorm:
return R8Snorm;
case vk::Format::eR8Sint:
return R8Sint;
case vk::Format::eR8Uint:
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:
return R16G16B16A16Float;
default:
throw exception("Vulkan format not supported: '{}'", vk::to_string(format));
}
}
}