Skip to content

Fix GLSL compilation errors in vk_layer_validation_tests#342

Merged
lenny-lunarg merged 3 commits intoKhronosGroup:masterfrom
jeffbolznv:fix_glslang_extensions
Sep 24, 2018
Merged

Fix GLSL compilation errors in vk_layer_validation_tests#342
lenny-lunarg merged 3 commits intoKhronosGroup:masterfrom
jeffbolznv:fix_glslang_extensions

Conversation

@jeffbolznv
Copy link
Copy Markdown
Contributor

Fix compilation errors in vk_layer_validation_tests due to uninitialized garbage in glslang's builtin limits. This was caused in part by the structure size mismatching between the glslang library compile and the test framework compile, which is fixed by #defining NV_EXTENSIONS in cmake.

This happens when running a TOT validation layer against a glslang after the Turing extensions were merged yesterday.

I've talked with JohnK about possibly removing the ifdef from the structure definitions, but this gets things working in the meantime.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 21, 2018

CLA assistant check
All committers have signed the CLA.

@jeffbolznv
Copy link
Copy Markdown
Contributor Author

I didn't make this clear in the description, but basically all existing tests that use GLSL are broken by this structure mismatch, glslang gets an internal compiler error for all compiles, it's a really severe failure.

@jeffbolznv
Copy link
Copy Markdown
Contributor Author

I didn't realize this repo still points to an older glslang without the Turing changes, so fixing the NV_EXTENSIONS in validation is a codependent change with updating the glslang hashes.

At least, I assume that's why appveyor builds failed. My local setup follows the build instructions that suggest just fetching/building glslang manually.

@karl-lunarg
Copy link
Copy Markdown
Contributor

I didn't realize this repo still points to an older glslang without the Turing changes, so fixing the NV_EXTENSIONS in validation is a codependent change with updating the glslang hashes.

At least, I assume that's why appveyor builds failed. My local setup follows the build instructions that suggest just fetching/building glslang manually.

Yes, you discovered and fixed this just as I noticed the problem and was about to suggest the same fix.

We would need to bump this hash anyway to build the next SDK, which should/would happen today or soon.

I'll notify @shannon-lunarg and @greg-lunarg as well.

Copy link
Copy Markdown
Contributor

@karl-lunarg karl-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending CI pass.

…ized garbage in glslang's builtin limits. This was caused in part by the structure size mismatching between the glslang library compile and the test framework compile, which is fixed by #defining NV_EXTENSIONS in cmake.
@lenny-lunarg
Copy link
Copy Markdown
Contributor

A couple of us have managed to track down the origin of the test failures, so here's what's happening. The way android builds shaderc, it needs to get a build file that's located within shaderc's "Third-Party" directory. Recent glslang changes have reorganized the files that shaderc needs in order to build. However, even the latest shaderc commits do not have any change to the android build file that reflect this.

As a result, the way to fix this PR is to update shaderc with the new android build file, and then to update the android known_good.json in this repo to point at the new shaderc revision. Currently, @greg-lunarg is putting together a shaderc PR to solve things on that end. Once that PR has been merged, I'd be happy to make the remaining changes on this end.

@jeffbolznv
Copy link
Copy Markdown
Contributor Author

I will be out of the office all day Monday, so feel free to make any changes necessary to merge this in my absence.

Change-Id: I14d1083ed4dd7f92b424976fe190824d405c21aa
@lenny-lunarg
Copy link
Copy Markdown
Contributor

I just rebased this and added my own commit to the end, to update the other repos. This should pass CI, now. Assuming it does pass, I'm going to go ahead and merge this after CI is finished.

@lenny-lunarg
Copy link
Copy Markdown
Contributor

Technically, this is failing CI still, but the failure is now because LunarG/VulkanTools hasn't been updated yet. Android now passes. As such, I'm merging this.

@lenny-lunarg lenny-lunarg merged commit 2bb8fb8 into KhronosGroup:master Sep 24, 2018
@cnorthrop
Copy link
Copy Markdown
Contributor

Android is getting the following test failure:

E VkLayerValidationTest: GLSLtoSPV compilation failed

for the following test:

VkLayerTest.PSOPolygonModeInvalid

I'll work with with @greg-lunarg on next steps.

@jeffbolznv jeffbolznv deleted the fix_glslang_extensions branch September 25, 2018 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants