-
Notifications
You must be signed in to change notification settings - Fork 172
Getting validation raised because SPIRV prodces a decoration of clipdistance that isn't used #858
Comments
This has come up before and I believe glslang was going to address this. Assigning to Chris to make sure that was the resolution. |
Funny, I posted it to the GLSLang folks and they thought it was a validation issue. |
Can you post the bug link for their side here? |
The immediate solution is to explicitly redeclare the gl_PerVertex block to have the subset of members that you want. |
SPIRV folks say it's fine, GLSL compiler is outputting them. In order for the messages to go away I had to hack up GLSLang. |
@dankbaker in the interim, include a redeclaration like so:
As for the issue, it looks like we shouldn't be producing this error unless you actually touch the clipdistance member. Unfortunately, that message isn't produced by the layer, it comes out of the validator within SPIRV-Tools. |
Raised a bug in the validator project where this needs to be fixed. |
The rule was relaxed in the validator as of July 7, but only for the Vulkan 1.0 context, and remains strict in the "universal SPIR-V" target environments. (See the SPIRV-Tools bug for details commit hashes). If using the validator API, you must use it with a context created with SPV_ENV_VULKAN_1_0.
|
After further discussion on KhronosGroup/SPIRV-Tools#365 we'll change the validator to allow these cases to pass with any environment. |
@dankbaker I've confirmed that this works using master, and it looks like everything required made it into the 1.0.21.1 SDK. Are you still seeing spurious errors? |
Latests SDK doesn't seem to generate the error, so looks good! |
This vertex shader, after compilation in glsllang, will cause a validation message (error) because it declares the clipdistance as a decoration but doesn't use it but the device doesn't support it. All shaders generated from glslang will have this problem because it always adds this decoration.
The text was updated successfully, but these errors were encountered: