danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
257 stars 28 forks source link

External Compiler Doesn't work? #91

Closed oceanusxiv closed 2 years ago

oceanusxiv commented 2 years ago

Installed product versions

Description

External compiler always fails. I'm pretty sure the glsl validator exe actually works, since the log file actually shows that the exe is executed, just not properly. I actually suspect it's because the file path is not properly escaped in the invocation. If there are whitespaces in the directory then this would fail?

Steps to recreate

  1. Use %VULKAN_SDK%\Bin\glslangValidator.exe
  2. Try live compilation.

Current behavior

Here's the output from the log file.

[09.16 22:55:26.529] Auto detecting shader type to 'glslCompute' 
[09.16 22:55:26.530] Using external compiler 'C:\VulkanSDK\1.2.189.2\Bin\glslangValidator.exe' with arguments '' on temporal shader file 'C:\Users\Eric Fang\AppData\Local\Temp\shader.comp' 
[09.16 22:55:36.532] External compiler did take more than 10 seconds to finish. Aborting! 
[09.16 22:55:36.573] Dumping shader log:
Usage: glslangValidator [option]... [file]...

'file' can end in .<stage> for auto-stage classification, where <stage> is:

You can see the space in the shader file path that I suspect is causing the issue?

Expected behavior

It should just work.

danielscherzer commented 2 years ago

Can I close this issue?