Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank Window with integrated GPU with Vulkan #1634

Open
wanderon opened this issue Jan 31, 2020 · 3 comments
Open

Blank Window with integrated GPU with Vulkan #1634

wanderon opened this issue Jan 31, 2020 · 3 comments

Comments

@wanderon
Copy link

@wanderon wanderon commented Jan 31, 2020

OS and version: MacOS 10.14.6
Release or commit: GLFW 3.3.2
Error messages: NONE
monitors output: Blank Window using integrated GPU
Hardware: late 2018 MacBook Pro, UHD Graphics 630, AMD Radeon Pro 560X

get black window when running Vulkan Tutorial code to draw triangle Using integrated GPU.
tutorial page: https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Rendering_and_presentation
c++ code link: https://vulkan-tutorial.com/code/15_hello_triangle.cpp

Modified code above to allow selection of GPU. triangle draws with discrete (AMD) GPU selected. Blank black window with integrated GPU selected. The LunarG 'cube' sample
works with both GPUs on my machine

See attached project
VulkanTesting.zip

@lnihlen

This comment has been minimized.

Copy link

@lnihlen lnihlen commented Feb 3, 2020

Having a similar problem with my glfw Vulkan program, except for me the situation is reversed, the Integrated GPU is rendering fine but the Discrete GPU is only offering up a black screen.

OS and version: MacOS 10.15.2
Release or commit: GLFW 3.3.2
Error messages: NONE
monitors output: Blank Window using Discrete GPU
Hardware: MacBook Pro (16-inch 2019), AMD Radeon Pro 5500M, Intel UHD Graphics 630.

I'm working on a macOS port of my program, originally developed in Linux, but one thing interesting I noticed is that the VkPhysicalDeviceProperties field returned by both the discrete and integrated GPU have the same value in place for the pipelineCacheUUID field. This is the only mac I've run my code on so far, so apologies if I'm reporting something unremarkable, but it did seem odd, particularly given the vendor and device IDs returned in the same struct are different.

I'll try out a build of the Vulkan Tutorial soon and see if I have the same results there.

@ByunghoonKim

This comment has been minimized.

Copy link
Contributor

@ByunghoonKim ByunghoonKim commented Feb 4, 2020

I cannot tell whether @lnihlen's observation on pipelineCacheUUID is related to @wanderon's original problem.

Allow me, however, to add the following.
The stated pipelineCacheUUID issue is not something which glfw library could resolve. It is a problem of misleading Vulkan specification and requires Vulkan 1.1 to resolve if you need unique device id's across process or VkInstance's. Please refer to the resolution of the first issue of VK_KHR_external_memory.

VkPhysicalDeviceProperties::pipelineCacheUUID is not sufficient for this purpose because despite its description in the specification, it need only identify a unique pipeline cache format in practice. Multiple devices may be able to use the same pipeline cache data, and hence it would be desirable for all of them to have the same pipeline cache UUID.

On macOS, glfw loads libvulkan.1.dylib, which in turn loads libMoltenVK.dylib, which currently supports only Vulkan 1.0. Hence, no VK_KHR_external_memory support with glfw.

@lnihlen

This comment has been minimized.

Copy link

@lnihlen lnihlen commented Feb 5, 2020

Ah, thanks for clarifying that @ByunghoonKim. Makes sense. Others reading this issue, kindly disregard my observation about duplicate UUIDs.

For my own part on this issue I haven't made much progress. I did observe that the swapchain is reliably switching frames at 60Hz on the display, and I can set the background color of the screen in the render pass of my primary command buffer. But none of the draw commands, contained within secondary buffers, seem to render on the discrete GPU.

So my (comparatively uninformed) opinion is that the issue has something to do with command buffer setup. I'm going to work on exploring the options offered to the MVKConfiguration structure, but to access that will require I spend some time to set up my project compilation/installation setup on MacOS a bit more. More when I have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.