danielscherzer / GLSL

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

External compiler "not found using GPU" #63

Closed fridenmf closed 4 years ago

fridenmf commented 4 years ago

Installed product versions

Description

Output shows the following error: External compiler '‪G:/compilers/vulkan/bin/glslangValidator.exe' not found using GPU

Steps to recreate

  1. Install extension
  2. Tools -> Options -> GLSL language integration, set "External compiler executable file path (without quotes)" to ‪G:/compilers/vulkan/bin/glslangValidator.exe (the path to your compiler)
  3. Note how the Output tab in Visual Studio shows the error: External compiler '‪G:/compilers/vulkan/bin/glslangValidator.exe' not found using GPU

Current behavior

According to the readme the external compiler is needed when using Vulkan, and after setting the external compiler causes the above error to show up, followed by errors that it can't parse things like buffer bindings:

layout(std430, binding = 5) buffer readonly BufferData { mat4 viewProj; } bufferData;

with errors:

0(28) : error C0000: syntax error, unexpected identifier, expecting "::" at token "BufferData"

Expected behavior

It should not show the error describing it can't find the external compiler, and it should be able to parse buffer bindings used in Vulkan.

danielscherzer commented 4 years ago

Thanks for your feedback! This works for me.

I use File.Exists from the .net framework to test for the existance of the given file. If I understand the documentation for File.Exists correctly either ‪G:/compilers/vulkan/bin/glslangValidator.exe does not exists or Visual Studio has no reading permissions for this file. Does the problem persists if you use \instead of /? What happens if you move the compiler file to a different drive and or folder? For my setup it worked in all these cases...

fridenmf commented 4 years ago

Using \ instead of / prints this message instead: External compiler '‪‪G:\compilers\vulkan\bin\glslangValidator.exe' not found using GPU

Moving glslangValidator.exe to C:/temp/ seems to work. The folder on G has full read access as the user I'm opening Visual Studio with and it's possible to use glslangValidator.exe from post build scripts so the extension should have access to it as well.

It would be super if it can be fixed in the extension as I don't want to be depending on that files needs to be on specific drives.

danielscherzer commented 4 years ago

I published a new version that omitts the test for existance. Does the new version now work for your path?

fridenmf commented 4 years ago

Now it works, thanks for the help!

danielscherzer commented 4 years ago

Happy to help!