Closed pzgulyas closed 5 years ago
(I would also have a sub-request. Would it be possible to exclude the leading spaces (tabs) in the line from the red underlining? This would match more of how this underlining works in VS.)
Hi, I can confirm this behavior. Compiling with both the official glslangValidator and glslc does not matter to the extension because it uses the current graphics cards driver to compile. For my system (INTEL 530 driver) for instance this snipped raises:
'Texture' : syntax error syntax error
But the raised errors most probably will change depending on the driver version. The intend of this extension is to check if the shader works on the current hardware. Checking if the shader code works on the glslLang and glslc compiler is currently not supported.
Ah, thanks, I wasn't aware of that it can be compiled with the driver too, although it sounds logical. :-) Wouldn't it be possible to add an option of the compiler used?
Yes this is possible, but I'm not sure when I have the time to implement it.
I added support for an external glsllang compatible compiler. Does this resolve your issue?
Installed product versions
Description
Red underlining occurs at a valid syntax accepted by glslangValidator.exe.
Steps to recreate
Write the following lines into a file eg. Shader.frag:
Current behavior
The sampler line can be made accepted by adding
But this is implicitly added by glslang, so in a live code there is no need to explicitly add this line. And the underlining of the texture2D line still remains.