Closed spfuetzner closed 3 years ago
Hopefully this works as expected...
I'm afraid not. The following is now in the log:
[09.30 11:23:16.197] Using external compiler 'C:\VulkanSDK\1.2.148.1\Bin\glslangValidator.exe' with arguments '-C -r -w --target-env vulkan1.1 --target-env vulkan1.2' on temporal shader file 'C:\Users\kiba\AppData\Local\Temp\shader.frag'
[09.30 11:23:26.204] External compiler did take more than 10 seconds to finish. Aborting!
[09.30 11:23:26.236] Dumping shader log:
Usage: glslangValidator [option]... [file]...
'file' can end in .<stage> for auto-stage classification, where <stage> is:
.conf to provide a config file that replaces the default configuration
(see -c option below for generating a template)
.vert for a vertex shader
This is followed by the complete description as it is displayed when glslangValidator is started without parameters.
Thanks for the quick reply. Too many quotes in my code... -> Update
Fixed! Also using environment variables now works. Thank you!
One small problem is still left. In the "Message" tab of the Error List window there is always one message:
Could not parse line 'C:\Users\kiba\AppData\Local\Temp\shader.frag'
The log has no such warning.
Even if there is no error in the code? For me this line only shows up, if I have errors. For example: Here the extension is reporting which lines it could not parse (all lines without error/warnings). If I remember correctly the line with only the filename was produced by glslangvalidator on the error output stream, while the log was on the standard output stream (or vice versa). Other shader compiler put there log onto the error output stream. I have to parse both to support most shader compilers. That could be the reason why you do not see this line in the log.
Only with the external glslangValidator compiler, but then even for the simplest shader:
#version 460
void main() {}
It prints the message for line 1 in my shader. But it's not a big problem, most of the time informational messages are disabled anyway in the Error list.
Currently my parser handles each line individually, which makes him simple (modeless) and robust in terms of additional lines without usable error information, like preambles or stats at the end. If I start to filter lines I think the parsing will become more error prone to changes in the shader compiler outputs. So I would argue for keeping the status quo.
Can I close this issue?
Can I close this issue?
Sure. And thanks!
Thanks!
It would be nice if you could use environment variables in the file path of the external compiler.
The external compiler is often used to support the Vulkan and Google include extensions and the required glslangValidator is usually installed with the LunarG Vulkan SDK. Unfortunately, the version number is in the path, so the option in the GLSL extension has to be adjusted with every update.
Possible spellings could be $(EnvVar) or %EnvVar%: