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

Intel HD Graphics does not support "#line" directive #278

Closed
ghost opened this issue Nov 24, 2016 · 6 comments
Closed

Intel HD Graphics does not support "#line" directive #278

ghost opened this issue Nov 24, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 24, 2016

I getting error with "GOOGLE" extensions and "#line" directives in Intel HD Graphics. Nvidia just warnings with this extensions, but parse "#line" directive. AMD not tested, I have no this GPU. Compiled with "-E" flag. How to disable these directives and bake code?

@dneto0
Copy link
Collaborator

dneto0 commented Nov 25, 2016

Please provide details on how to reproduce the issue. It's not clear what's being reported.

The -E flag produces preprocessed output. It is not meant to be given to a driver, but just to help you debug macro definitions and #include directives.
To generate code, use -c instead. (If you only have a single source file you can drop the -c flag.)

@ghost
Copy link
Author

ghost commented Nov 25, 2016

I don't want SPIR-V code at now. I want process includes.
No, my SPIR-V never will works.

You can try
https://github.com/acterhd/phantom-tracer
https://github.com/acterhd/phantomGL

@ghost
Copy link
Author

ghost commented Nov 25, 2016

I tried SPIRV, but after link program got error in nvoglv64.dll

@dneto0
Copy link
Collaborator

dneto0 commented Nov 25, 2016

Vulkan drivers only have to accept SPIR-V. I'm going to guess you're trying to provide GLSL to an OpenGL driver.
The preprocessed code is not meant to be given to the driver. In particular, the #line directives in Shaderc's output use file names since we do file-based includes. But GLSL #line directives use a shader string number instead of file names. So if you do want to use Shaderc like this you'll have to strip out #line lines, and maybe more. It's outside the scope of this project.

@dneto0
Copy link
Collaborator

dneto0 commented Nov 25, 2016

I don't want SPIR-V code at now. I want process includes.
No, my SPIR-V never will works.

Shaderc is for generating SPIR-V. If all you want is to process includes, you can just use GCC with -E. It's about the same. You'll have to strip out #line for that too since GCC also uses file-based #line directives.

@dneto0
Copy link
Collaborator

dneto0 commented Dec 8, 2016

This is not a Shaderc issue. The output of the preprocessor is being given to a driver, when the driver never promised it would accept such input.
Closing.

@dneto0 dneto0 closed this as completed Dec 8, 2016
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