-
Notifications
You must be signed in to change notification settings - Fork 0
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
Vulkan: missing validation layers: VK_LAYER_LUNARG_standard_validation #12
Comments
Two separate things going on here: (1) you don't have validation layers set up, and (2) it looks like there may be a spirv-cross bug. Let me address (2) first. MoltenVk works by translating each SPIR-V shader into Metal Shading Language, Apple's shading language. It does this using the spirv-cross tool. The resulting Metal Shading Langauge (MSL) code then gets compiled by Apple's downstream compiler. From this output:
it looks like the Metal compiler is rejecting the program that spirv-cross has produced, which is probably due to spirv-cross having generated an incorrect program. We should do some direct testing of spirv-cross to check that it produces valid code - not just for MSL, but for its other back-ends (GLSL and HLSL).
@vili-1 and @Jack-Clark would you be able to work together to set up some tooling for testing spirv-cross against these validators? Something like the following:
Similarly, naga can convert from SPIR-V into various formats - it would be great to use our fleshed examples to test that naga is generating valid code. |
Regarding (1): install the Lunar G Vulkan SDK somewhere. I'm not sure what you need to do on Mac to get validation layers working, but on Linux you source a .sh file and it sets up all the right environment variables - I'm sure there will be decent docs for Mac. |
Indeed, there's an environment setup .sh file which I've sourced into the shell, but no luck. There is no |
I compiled the amber above into MSL (see below), and used the which makes sense because _62 is initialised one line after. I corrected the file and it works :-) the The original metal file:
The corrected metal file:
|
Thanks. I assume you used spirv-cross to do the translation to MSL. Can you check whether this reproduces with the latest build of spirv-cross? (I believe it's straightforward to build using CMake.) If it does, can you file a spirv-cross issue? |
Yes, spirv-cross. Will check for newer versions.. |
Same problem with the latest version. @afd Shall I file the spirv-cross issue at https://github.com/KhronosGroup/SPIRV-Cross or GitLab? |
Please file it at https://github.com/KhronosGroup/SPIRV-Cross |
When I run the following command under MoltenVK (with option -- Disable validation layers) for the amber-file below, I get:
amber -d -t spv1.3 -v 1.1 test_0_2417849846392727996.amber
Without passing the
-d
option, then no error, however when I run it I get:Doing some digging I found at some forums that:
However couldn't find some more official statement about this. Running
vulkaninfo
I can see thatVK_LAYER_KHRONOS_validation
is in. @Jack-Clark did you get any output like this? @afd does this ring any bells?The text was updated successfully, but these errors were encountered: