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

Includes issue with Rust Nightly #86

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

Includes issue with Rust Nightly #86

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

Comments

@Eliah-Lakhin
Copy link

Eliah-Lakhin commented Oct 8, 2020

In Vulkano project(that is using shaderc-rs under the hood) we faced a false-positive glsl error happening with includes feature on Rust Nightly build("rustc 1.49.0-nightly (91a79fb29 2020-10-07)").

This is a minimal reproducible example:

#version 450
#include <common.glsl>

Error messages from the Compile::compile_into_spirv function are:

           shader.glsl:2: error: '#line' : must by followed by an integral literal
           shader.glsl:2: error: 'preprocessor evaluation' : bad expression
           shader.glsl:2: error: '#line' : unexpected tokens following directive

The "common.glsl" file is properly configured through the CompileOptions::set_include_callback function. Neither the snippet above nor "common.glsl" contain a "#line" directive. And this test example works fine with Rust Stable.

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

No branches or pull requests

1 participant