MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / choose_blendable_format

Function choose_blendable_format

framework/common/vk_common.cpp:117–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117VkFormat choose_blendable_format(VkPhysicalDevice physical_device, const std::vector<VkFormat> &format_priority_list)
118{
119 for (const auto &format : format_priority_list)
120 {
121 VkFormatProperties properties;
122 vkGetPhysicalDeviceFormatProperties(physical_device, format, &properties);
123 if (properties.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT)
124 {
125 return format;
126 }
127 }
128
129 throw std::runtime_error("No suitable blendable format could be determined");
130}
131
132void make_filters_valid(VkPhysicalDevice physical_device,
133 VkFormat format,

Calls

no outgoing calls

Tested by

no test coverage detected