Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.08k stars 513 forks source link

15_hello_triangle.cpp does not draw anything on the screen on MacOS #191

Closed nelson-xia closed 3 years ago

nelson-xia commented 4 years ago

My Environment: OS: MacOS 10.14.6 SDK: vulkansdk-macos-1.2.141.2 vert.spv from 09_shader_base.vert frag.spv from 09_shader_base.frag

when I run the same codes on Linux, the colorful triangle is drawn correctly.

jjpepper commented 3 years ago

I'm running it on windows10 and see a black screen too.
I've got these two validation errors:

validation layer: Validation Error: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0x83d4ee000000000b, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Vertex shader consumes input at location 0 but not provided
validation layer: Validation Error: [ UNASSIGNED-CoreValidation-Shader-InputNotProduced ] Object 0: handle = 0x83d4ee000000000b, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x23e43bb7 | Vertex shader consumes input at location 1 but not provided
Overv commented 3 years ago

I cannot reproduce this problem on either Arch Linux or Windows 10 (NVIDIA GTX 1070 with latest drivers) and it seems like a strange error given that the shader doesn't have any inputs. Make sure that you've really compiled the right source file to the right output files.