Merge pull request #631 from Emulator-Team-2/Fix

Misc fixes
This commit is contained in:
georgemoralis 2024-08-28 22:26:50 +03:00 committed by GitHub
commit d2e4a200fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -296,6 +296,7 @@ std::span<const vk::Format> GetAllFormats() {
vk::Format::eB10G11R11UfloatPack32, vk::Format::eB10G11R11UfloatPack32,
vk::Format::eBc1RgbaSrgbBlock, vk::Format::eBc1RgbaSrgbBlock,
vk::Format::eBc1RgbaUnormBlock, vk::Format::eBc1RgbaUnormBlock,
vk::Format::eBc2SrgbBlock,
vk::Format::eBc2UnormBlock, vk::Format::eBc2UnormBlock,
vk::Format::eBc3SrgbBlock, vk::Format::eBc3SrgbBlock,
vk::Format::eBc3UnormBlock, vk::Format::eBc3UnormBlock,
@ -452,12 +453,18 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu
if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Unorm) { if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Unorm) {
return vk::Format::eR8G8Unorm; return vk::Format::eR8G8Unorm;
} }
if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Uint) {
return vk::Format::eR8G8Uint;
}
if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Snorm) { if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Snorm) {
return vk::Format::eR8G8Snorm; return vk::Format::eR8G8Snorm;
} }
if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Unorm) { if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Unorm) {
return vk::Format::eBc7UnormBlock; return vk::Format::eBc7UnormBlock;
} }
if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) {
return vk::Format::eBc2SrgbBlock;
}
if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Unorm) { if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Unorm) {
return vk::Format::eBc2UnormBlock; return vk::Format::eBc2UnormBlock;
} }