Changeset 6fc24c7 in opengl-game for vulkan-utils.cpp
- Timestamp:
- Sep 27, 2019, 7:58:33 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 0e09340
- Parents:
- f94eea9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-utils.cpp
rf94eea9 r6fc24c7 192 192 return imageView; 193 193 } 194 195 VkFormat VulkanUtils::findSupportedFormat(VkPhysicalDevice physicalDevice, const vector<VkFormat>& candidates, 196 VkImageTiling tiling, VkFormatFeatureFlags features) { 197 for (VkFormat format : candidates) { 198 VkFormatProperties props; 199 vkGetPhysicalDeviceFormatProperties(physicalDevice, format, &props); 200 201 if (tiling == VK_IMAGE_TILING_LINEAR && 202 (props.linearTilingFeatures & features) == features) { 203 return format; 204 } else if (tiling == VK_IMAGE_TILING_OPTIMAL && 205 (props.optimalTilingFeatures & features) == features) { 206 return format; 207 } 208 } 209 210 throw runtime_error("failed to find supported format!"); 211 }
Note:
See TracChangeset
for help on using the changeset viewer.