- This topic has 4 replies, 2 voices, and was last updated 6 years, 12 months ago by kruseborn.
-
AuthorPosts
-
2017-04-04 at 12:09 pm #1208
VkBool32 presentSupport; vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, i, windowSurface, &presentSupport);
Sometimes
vkGetPhysicalDeviceSurfaceSupportKHR
returnspresentSupport
astrue
and sometimes it returns it asfalse
. However, even if the return value isfalse
, everything gets render correctly and shows up on screen.2017-04-04 at 1:46 pm #1209It’s hard to see how that is happening. The logic is pretty simple for returning that value.
Are you encountering this on iOS or OS X?
Is there any pattern to when it returns one value or the other?
Are you able to provide us with instructions or sample code in order to reproduce the issue?
…Bill
2017-04-13 at 6:23 am #1212I am encountering this on OS X, I usually solve it by restarting the computer. However, the application still works even though presentSupport does not return a positive value.
static void findQueueFamilies() { // Check queue families uint32_t queueFamilyCount = 0; vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, nullptr); assert(queueFamilyCount != 0); std::vector<VkQueueFamilyProperties> queueFamilies(queueFamilyCount); vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, queueFamilies.data()); bool foundGraphicsQueueFamily = false; bool foundPresentQueueFamily = false; for (uint32_t i = 0; i < queueFamilyCount; i++) { VkBool32 presentSupport; vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, i, windowSurface, &presentSupport); if (queueFamilies[i].queueCount > 0 && queueFamilies[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) { vkContext.graphicsQueueFamilyIndex = i; foundGraphicsQueueFamily = true; if (presentSupport) { vkContext.presentQueueFamilyIndex = i; foundPresentQueueFamily = true; break; } } if (!foundPresentQueueFamily && presentSupport) { vkContext.presentQueueFamilyIndex = i; foundPresentQueueFamily = true; } } assert(foundGraphicsQueueFamily && foundPresentQueueFamily); }
2017-04-19 at 9:40 am #1216I have not been able to replicate this on a MacBook 2014 running Sierra 10.12.4.
The
presentSupport
always comes back astrue
for either the discrete or integrated GPU.Normally, the only reason why that value would come back as
false
should be if the GPU reports that it is running headless (with no display attached)…which should never happen on a MacBook.The fact that restarting your computer resets this issue indicates that it might be an issue within Apple’s Metal drivers on your particular platform. What Mac and OS X version are you using?
…Bill
2017-04-26 at 3:05 am #1230I am using a Mac Pro but the screens are connected to a kvm switch because I am sharing the screens with a windows computer. I have now tested running it without the kvm switch and I have not seen the error anymore, so that is probably it, thanks:)
-
AuthorPosts
- The forum ‘MoltenVK Support’ is closed to new topics and replies.