Changeset 6a39266 in opengl-game for vulkan-utils.cpp
- Timestamp:
- Jan 3, 2021, 6:29:50 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 7f60b28
- Parents:
- 6493e43
- git-author:
- Dmitry Portnoy <dportnoy@…> (01/03/21 18:25:46)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (01/03/21 18:29:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-utils.cpp
r6493e43 r6a39266 60 60 } 61 61 62 // TODO: Change this to prefer one queue that supports both graphics and presentation 62 63 QueueFamilyIndices VulkanUtils::findQueueFamilies(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface) { 63 64 QueueFamilyIndices indices; … … 71 72 int i = 0; 72 73 for (const auto& queueFamily : queueFamilies) { 73 if (queueFamily.queueCount > 0 && queueFamily.queueFlags & VK_QUEUE_GRAPHICS_BIT) { 74 indices.graphicsFamily = i; 75 } 76 77 VkBool32 presentSupport = false; 78 vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, i, surface, &presentSupport); 79 80 if (queueFamily.queueCount > 0 && presentSupport) { 81 indices.presentFamily = i; 82 } 83 84 if (indices.isComplete()) { 85 break; 74 if (queueFamily.queueCount > 0) { 75 if (queueFamily.queueFlags & VK_QUEUE_GRAPHICS_BIT) { 76 indices.graphicsFamily = i; 77 } 78 79 VkBool32 presentSupport = false; 80 vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, i, surface, &presentSupport); 81 82 if (presentSupport) { 83 indices.presentFamily = i; 84 } 85 86 if (indices.isComplete()) { 87 break; 88 } 86 89 } 87 90
Note:
See TracChangeset
for help on using the changeset viewer.