add-SurfaceFormat (#365)
[Debug] <Critical> liverpool_to_vk.cpp:SurfaceFormat:395: Unreachable code! CUSA24620 Unknown data_format=7 and num_format=7 CUSA03082 Unknown data_format=2 and num_format=4 CUSA19345 Unknown data_format=34 and num_format=7 CUSA02411 Unknown data_format=1 and num_format=9 A duplicate was also removed.
This commit is contained in:
parent
7308864537
commit
cdff4af38d
|
@ -342,6 +342,7 @@ std::span<const vk::Format> GetAllFormats() {
|
||||||
vk::Format::eR16G16Unorm,
|
vk::Format::eR16G16Unorm,
|
||||||
vk::Format::eR16G16B16A16Sscaled,
|
vk::Format::eR16G16B16A16Sscaled,
|
||||||
vk::Format::eR16G16Sscaled,
|
vk::Format::eR16G16Sscaled,
|
||||||
|
vk::Format::eE5B9G9R9UfloatPack32,
|
||||||
};
|
};
|
||||||
return formats;
|
return formats;
|
||||||
}
|
}
|
||||||
|
@ -410,10 +411,6 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu
|
||||||
num_format == AmdGpu::NumberFormat::Unorm) {
|
num_format == AmdGpu::NumberFormat::Unorm) {
|
||||||
return vk::Format::eR16G16Unorm;
|
return vk::Format::eR16G16Unorm;
|
||||||
}
|
}
|
||||||
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 &&
|
if (data_format == AmdGpu::DataFormat::Format2_10_10_10 &&
|
||||||
num_format == AmdGpu::NumberFormat::Unorm) {
|
num_format == AmdGpu::NumberFormat::Unorm) {
|
||||||
return vk::Format::eA2B10G10R10UnormPack32;
|
return vk::Format::eA2B10G10R10UnormPack32;
|
||||||
|
@ -550,6 +547,20 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu
|
||||||
if (data_format == AmdGpu::DataFormat::Format8 && num_format == AmdGpu::NumberFormat::Srgb) {
|
if (data_format == AmdGpu::DataFormat::Format8 && num_format == AmdGpu::NumberFormat::Srgb) {
|
||||||
return vk::Format::eR8Srgb;
|
return vk::Format::eR8Srgb;
|
||||||
}
|
}
|
||||||
|
if (data_format == AmdGpu::DataFormat::Format11_11_10 &&
|
||||||
|
num_format == AmdGpu::NumberFormat::Float) {
|
||||||
|
return vk::Format::eB10G11R11UfloatPack32;
|
||||||
|
}
|
||||||
|
if (data_format == AmdGpu::DataFormat::Format16 && num_format == AmdGpu::NumberFormat::Uint) {
|
||||||
|
return vk::Format::eR16Uint;
|
||||||
|
}
|
||||||
|
if (data_format == AmdGpu::DataFormat::Format5_9_9_9 &&
|
||||||
|
num_format == AmdGpu::NumberFormat::Float) {
|
||||||
|
return vk::Format::eE5B9G9R9UfloatPack32;
|
||||||
|
}
|
||||||
|
if (data_format == AmdGpu::DataFormat::Format8 && num_format == AmdGpu::NumberFormat::Snorm) {
|
||||||
|
return vk::Format::eR8Snorm;
|
||||||
|
}
|
||||||
UNREACHABLE_MSG("Unknown data_format={} and num_format={}", u32(data_format), u32(num_format));
|
UNREACHABLE_MSG("Unknown data_format={} and num_format={}", u32(data_format), u32(num_format));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue