Skip to content
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

glangValidator crash while compiling and linking shaders #2495

Closed
FilippoLeon opened this issue Dec 31, 2020 · 8 comments
Closed

glangValidator crash while compiling and linking shaders #2495

FilippoLeon opened this issue Dec 31, 2020 · 8 comments

Comments

@FilippoLeon
Copy link

FilippoLeon commented Dec 31, 2020

I can reproduce a crash while compiling and linking with glangValidator vesion "10:11.0.0" (included in lunar sdk 1.2.162.0) and with a direct checkout from master. Could not reproduce with the one from 1.2.154.1 (glangValidator -v returns the same version somehow). When compiling from C++, the crash happens deep inside "glslang::GlslangToSpv".

glslangValidator.exe a.vs b.vs c.vs -V -S vert -o a.spv

I've put the three sources here:
https://gist.github.com/FilippoLeon/27ad5da7cbda1cdfd27ef35ad2d32df7

(I tried to strip down as much as possible to the point where removing a few variable just stops the crash)

@greg-lunarg
Copy link
Contributor

Thanks. Looking at it now...

@johnkslang
Copy link
Member

There are some known issues in play regarding linking together variables from multiple compilation units into the same stage for downstream consumption. I'm failing to find the active issue right now, but want to before anyone spends too much time debugging the AST -> SPIR-V step before realizing the AST itself might have been linked incorrectly.

@johnkslang
Copy link
Member

I couldn't find the issue because it's just the PR #2458. I think it should be completed first, unless you see this is definitely independent.

@ShchchowAMD
Copy link
Contributor

Meeting some regression when change id system to 64bit during testing, will update this week (I'd also try to fix this issue).

@ShchchowAMD
Copy link
Contributor

@FilippoLeon would you mind to try again with #2458 PR please? Local test observed no crash now with case attached here.

@FilippoLeon
Copy link
Author

Yes, it is working also with a complete version of the shader posted above. Thank you.

@greg-lunarg
Copy link
Contributor

Fixed by #2458.

@greg-lunarg
Copy link
Contributor

#2458 Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants