renderer_vulkan: more formats conversion

This commit is contained in:
psucien 2024-06-29 20:23:04 +02:00 committed by georgemoralis
parent 3663c60f3d
commit 9121ecf123
1 changed files with 14 additions and 0 deletions

View File

@ -325,6 +325,18 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu
num_format == AmdGpu::NumberFormat::Sint) { num_format == AmdGpu::NumberFormat::Sint) {
return vk::Format::eR16G16B16A16Sint; return vk::Format::eR16G16B16A16Sint;
} }
if (data_format == AmdGpu::DataFormat::Format16_16 &&
num_format == AmdGpu::NumberFormat::Float) {
return vk::Format::eR16G16Sfloat;
}
if (data_format == AmdGpu::DataFormat::Format10_11_11 &&
num_format == AmdGpu::NumberFormat::Float) {
return vk::Format::eB10G11R11UfloatPack32;
}
if (data_format == AmdGpu::DataFormat::Format2_10_10_10 &&
num_format == AmdGpu::NumberFormat::Unorm) {
return vk::Format::eA2B10G10R10UnormPack32;
}
if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Srgb) { if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Srgb) {
return vk::Format::eBc7SrgbBlock; return vk::Format::eBc7SrgbBlock;
} }
@ -490,6 +502,8 @@ vk::SampleCountFlagBits NumSamples(u32 num_samples) {
return vk::SampleCountFlagBits::e2; return vk::SampleCountFlagBits::e2;
case 4: case 4:
return vk::SampleCountFlagBits::e4; return vk::SampleCountFlagBits::e4;
case 8:
return vk::SampleCountFlagBits::e8;
default: default:
UNREACHABLE(); UNREACHABLE();
} }