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

Vulkano nightly build failed due to Shaderc compilation #1423

Closed
Eliah-Lakhin opened this issue Oct 8, 2020 · 6 comments
Closed

Vulkano nightly build failed due to Shaderc compilation #1423

Eliah-Lakhin opened this issue Oct 8, 2020 · 6 comments

Comments

@Eliah-Lakhin
Copy link
Contributor

Eliah-Lakhin commented Oct 8, 2020

Due to a Travis report Vulkano master build is failing for Nightly Rust on Linux: https://travis-ci.org/github/vulkano-rs/vulkano/jobs/733905213 .

The error log showing glsl compilation error on this line of the Shader-Include example: https://github.com/vulkano-rs/vulkano/blob/master/examples/src/bin/shader-include/main.rs#L62

Shaderc error messages are:

   = help: message: 3 compilation errors:
           shader.glsl:8: error: '#line' : must by followed by an integral literal
           shader.glsl: error: shader.glsl:-1: '#line' : unexpected tokens following directive
           0:0: error: '' :  syntax error, unexpected RETURN

I investigated the code, and didn't find any issues in implementation. This is an example that was implemented long time ago and it worked well so far. Also, I don't see any changes in Vulkano-shaders subproject that may cause this error.

After some debugging of Vulkano-shaders I managed to figure out that the error message is coming from the shaderc-rs entry function: https://github.com/vulkano-rs/vulkano/blob/master/vulkano-shaders/src/codegen.rs#L184

And, what's more important, it happening in the Rust Nightly only. I managed to reproduce this bug, and can confirm that it relevant to Rust Nightly and irrelevant to Rust Stable. The parameter values passing to shaderc's "compile_into_spirv" function exactly the same in Stable and Nightly. So, my suspicion is the bug somewhere in the Shaderc-rs crate(or maybe even in the shaderc itself).

I also can confirm that the issue with includes appearing in my personal project too which is using includes extensively. And in Nightly build only too.

This is the minimal example of glsl code causing this error:

#version 450
#include <common.glsl>

No matter what's inside "common.glsl". If "common.glsl" was properly resolved Shaderc throughs the error mentioned above(about the #line directive that is not even used in the snippet).


My suggestion to admins(@AustinJ235) is to turn off Travis CI nightly build for a while since it blocking incoming PRs reviews and merging. I can't do it myself, I don't have access to Travis.

And I will write a message to Shaderc-rs developers to help me investigating the bug.

@Eliah-Lakhin
Copy link
Contributor Author

Related Shaderc-rs conversation: google/shaderc-rs#86

@AustinJ235
Copy link
Member

AustinJ235 commented Oct 8, 2020 via email

@Eliah-Lakhin
Copy link
Contributor Author

Eliah-Lakhin commented Oct 8, 2020

@AustinJ235 Yes, but I can't merge even my own PRs if they don's pass tests: #1422 And there is a git hook that prevents pushing to master directly.

Eliah-Lakhin added a commit to Eliah-Lakhin/vulkano that referenced this issue Oct 8, 2020
Eliah-Lakhin added a commit to Eliah-Lakhin/vulkano that referenced this issue Oct 8, 2020
Eliah-Lakhin added a commit to Eliah-Lakhin/vulkano that referenced this issue Oct 8, 2020
@Eliah-Lakhin
Copy link
Contributor Author

ok, I think I figured out how to modify Travis from PR's feature branch. It passed Travis tests https://travis-ci.org/github/vulkano-rs/vulkano/builds/734112201 but seems like it tested irrelevant commit to the PR #1424 Something is broken on the Travis side(or maybe I'm doing something wrong). To ensure this is not an accident I tried to push dummy commits to the branch and even recreated the PR from the fresh branch, but no luck.

Eliah-Lakhin added a commit that referenced this issue Oct 25, 2020
…ld job (#1424)

Changelog entry for PR #1410; Nightly build temporary disabled until #1423 resolved
@Rua
Copy link
Contributor

Rua commented May 14, 2022

Is this still an issue?

@AustinJ235
Copy link
Member

Travis CI is no longer, so no.

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

3 participants