Problems running vulkan-tutorial.com "Drawing_a_triangle" tutorial

I’m glad you found the problem.
As a side note, I would recommend not “polluting” the SDK with files that belong to your project. The shader source files (.vert/.frag) should live in your project source directory and the compiled files (.spv) should live in your build directory or your source directory - sometimes the two are the same which is something I personally think should be avoided as well.

1 Like

So, I assume I have to change the .spv file output to this?

C:\VulkanSDK\1.2.162.1\Bin32\glslc.exe shader.vert -o C:/“myFolder”/vert.spv
C:\VulkanSDK\1.2.162.1\Bin32\glslc.exe shader.vert -o C:/“myFolderPath”/shader.spv
pause

Perhaps, later on when I can actually get a hang of it.

In the tutorial phase, Vulkan has a tendency to throw errors, loader searches for unknown registries, show white screens, throw vector out of range errors, etc

Based on Google searches, some of these errors that I brought up are over 4 years-old.

This tells me that no one on the Vulkan team sought to remove the cause of the error.

To the Vulkan team, they like Vulkan the way it is, changing it might confuse them more.

Ignore the previous post.

The error was meant to happen.

Also, thanks for the help Carstenn.

Some weird problems from page 251-254.

You will get a blank screen after you run the program on Release.

Plus, there will be arithmetic overflow errrors for

vertex.pos =
{
attrib.vertices[3 * index.vertex_index + 0],
attrib.vertices[3 * index.vertex_index + 1],
attrib.vertices[3 * index.vertex_index + 2]
};

This is with the code from https://vulkan-tutorial.com/code/27_model_loading.cpp

I found the issue.

For some strange reason, the vector subscript error is due to a missing slashes in viking_room.obj

It works after you add the slashes in the correct place.

Okay so for anyone still having troubles with the above error, open RegEDIT by typing “regedit” in the window search tab, and go to “HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ExplicitLayers”. Then, you can delete every keys without any problems (theses are just overlays made by Steam, GOG, … so you can freely delete them).
That worked for me, hopes it will work for you !

May I ask why does the error with the overlay layers occur in the first place?

The solution for me was close to what @xam4lor said, but a little different. my GOG registry key was at

  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ImplicitLayers

Deleting this key immediately fixed the error.

@arkedrem the error is caused by GOG. When GOG installed itself it added this implicit layer, which is always loaded by Vulkan. However, when we uninstalled GOG, it did not properly uninstall this implicit layer, leaving it in the registry. Thus, when Vulkan tries to load all of the implicit layers, the GOG one doesn’t exist even though the registry says it should be there, hence the error.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.