mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 11:33:06 +00:00
vk_device: Let formats array type be deduced
This commit is contained in:
parent
a4c5e3e339
commit
f424b46036
|
@ -275,39 +275,39 @@ std::vector<vk::DeviceQueueCreateInfo> VKDevice::GetDeviceQueueCreateInfos() con
|
||||||
|
|
||||||
std::map<vk::Format, vk::FormatProperties> VKDevice::GetFormatProperties(
|
std::map<vk::Format, vk::FormatProperties> VKDevice::GetFormatProperties(
|
||||||
const vk::DispatchLoaderDynamic& dldi, vk::PhysicalDevice physical) {
|
const vk::DispatchLoaderDynamic& dldi, vk::PhysicalDevice physical) {
|
||||||
static constexpr std::array<vk::Format, 33> formats = {vk::Format::eA8B8G8R8UnormPack32,
|
static constexpr std::array formats{vk::Format::eA8B8G8R8UnormPack32,
|
||||||
vk::Format::eB5G6R5UnormPack16,
|
vk::Format::eB5G6R5UnormPack16,
|
||||||
vk::Format::eA2B10G10R10UnormPack32,
|
vk::Format::eA2B10G10R10UnormPack32,
|
||||||
vk::Format::eR32G32B32A32Sfloat,
|
vk::Format::eR32G32B32A32Sfloat,
|
||||||
vk::Format::eR16G16Unorm,
|
vk::Format::eR16G16Unorm,
|
||||||
vk::Format::eR16G16Snorm,
|
vk::Format::eR16G16Snorm,
|
||||||
vk::Format::eR8G8B8A8Srgb,
|
vk::Format::eR8G8B8A8Srgb,
|
||||||
vk::Format::eR8Unorm,
|
vk::Format::eR8Unorm,
|
||||||
vk::Format::eB10G11R11UfloatPack32,
|
vk::Format::eB10G11R11UfloatPack32,
|
||||||
vk::Format::eR32Sfloat,
|
vk::Format::eR32Sfloat,
|
||||||
vk::Format::eR16Sfloat,
|
vk::Format::eR16Sfloat,
|
||||||
vk::Format::eR16G16B16A16Sfloat,
|
vk::Format::eR16G16B16A16Sfloat,
|
||||||
vk::Format::eD32Sfloat,
|
vk::Format::eD32Sfloat,
|
||||||
vk::Format::eD16Unorm,
|
vk::Format::eD16Unorm,
|
||||||
vk::Format::eD16UnormS8Uint,
|
vk::Format::eD16UnormS8Uint,
|
||||||
vk::Format::eD24UnormS8Uint,
|
vk::Format::eD24UnormS8Uint,
|
||||||
vk::Format::eD32SfloatS8Uint,
|
vk::Format::eD32SfloatS8Uint,
|
||||||
vk::Format::eBc1RgbaUnormBlock,
|
vk::Format::eBc1RgbaUnormBlock,
|
||||||
vk::Format::eBc2UnormBlock,
|
vk::Format::eBc2UnormBlock,
|
||||||
vk::Format::eBc3UnormBlock,
|
vk::Format::eBc3UnormBlock,
|
||||||
vk::Format::eBc4UnormBlock,
|
vk::Format::eBc4UnormBlock,
|
||||||
vk::Format::eBc5UnormBlock,
|
vk::Format::eBc5UnormBlock,
|
||||||
vk::Format::eBc5SnormBlock,
|
vk::Format::eBc5SnormBlock,
|
||||||
vk::Format::eBc7UnormBlock,
|
vk::Format::eBc7UnormBlock,
|
||||||
vk::Format::eAstc4x4UnormBlock,
|
vk::Format::eAstc4x4UnormBlock,
|
||||||
vk::Format::eAstc4x4SrgbBlock,
|
vk::Format::eAstc4x4SrgbBlock,
|
||||||
vk::Format::eAstc8x8SrgbBlock,
|
vk::Format::eAstc8x8SrgbBlock,
|
||||||
vk::Format::eAstc8x6SrgbBlock,
|
vk::Format::eAstc8x6SrgbBlock,
|
||||||
vk::Format::eAstc5x4SrgbBlock,
|
vk::Format::eAstc5x4SrgbBlock,
|
||||||
vk::Format::eAstc5x5UnormBlock,
|
vk::Format::eAstc5x5UnormBlock,
|
||||||
vk::Format::eAstc5x5SrgbBlock,
|
vk::Format::eAstc5x5SrgbBlock,
|
||||||
vk::Format::eAstc10x8UnormBlock,
|
vk::Format::eAstc10x8UnormBlock,
|
||||||
vk::Format::eAstc10x8SrgbBlock};
|
vk::Format::eAstc10x8SrgbBlock};
|
||||||
std::map<vk::Format, vk::FormatProperties> format_properties;
|
std::map<vk::Format, vk::FormatProperties> format_properties;
|
||||||
for (const auto format : formats) {
|
for (const auto format : formats) {
|
||||||
format_properties.emplace(format, physical.getFormatProperties(format, dldi));
|
format_properties.emplace(format, physical.getFormatProperties(format, dldi));
|
||||||
|
|
Loading…
Reference in a new issue