Jacajack / vscode-glsl-linter

GLSL linter for Code
5 stars 1 forks source link

Is this still working with glslangValidator v14? #7

Open urbanstarship opened 5 months ago

urbanstarship commented 5 months ago

I've installed this on an M1 MacBook, and I'm sure I've put in the correct path to the glslangValidator binary. I'm not getting any result. Does this not work any more with the current GLSL reference compiler?

Jacajack commented 5 months ago

I've just compiled glslang 14.0.0 and it seems to be working fine with the extension, at least on my end. The command line interface does not appear to have changed.

Could you please share your extension settings in JSON form?

urbanstarship commented 5 months ago

Nothing unusual...

{ "extensions.ignoreRecommendations": true, "glsl-linter.validatorPath": "/usr/local/bin/glslangValidator", "glsl-linter.fileExtensions": { ".fs.glsl": "frag", ".vs.glsl": "vert", ".tes.glsl": "tese", ".tcs.glsl": "tesc", ".gs.glsl": "geom" } }

Jacajack commented 5 months ago

That looks fine to me. And what extension does your file have?

urbanstarship commented 5 months ago

.frag. I'm just starting to explore GLSL, so it really was just an initial test file to get going.

urbanstarship commented 5 months ago

I've checked the installation of the dependency in Terminal like so:

% glslangValidator -v
Glslang Version: 11:14.0.0 ESSL Version: OpenGL ES GLSL 3.20 glslang Khronos. 14.0.0 GLSL Version: 4.60 glslang Khronos. 14.0.0 SPIR-V Version 0x00010600, Revision 1 GLSL.std.450 Version 100, Revision 1 Khronos Tool ID 8 SPIR-V Generator Version 11 GL_KHR_vulkan_glsl version 100 ARB_GL_gl_spirv version 100

% which glslangValidator /usr/local/bin/glslangValidator

So I'm pretty sure that side is working...

Jacajack commented 5 months ago

The configuration you're using expects fragment shaders with .fs.glsl extension. Could you please add a ".frag": "frag" pair in the settings or rename your file accordingly? Same goes for other shader types

urbanstarship commented 5 months ago

I tried both methods, still no results. I've also been restarting VS Coce every time.

Jacajack commented 5 months ago

One last thing comes to my mind - does your VSCode recognize your file as GLSL? You can check that in the bottom right corner - it should say "GLSL". Linting won't happen if language is not recognized correctly.

If not, please try to force setting language mode and see if the extension works. Please also see this.

urbanstarship commented 5 months ago

It does say GLSL in the corner, yes.

Other things I've tried: I've tried all 3 versions of VS Code (ARM, Intel and Universal) on my Apple Silicon machine, but no difference. I also pulled out my old 2015 Intel MacBook, charged it up, and installed everything on there. Only difference there was glslang kept crashing constantly (a system error dialog would pop up)...perhaps version 14 won't run on that old OS so I'd have to hunt for an older one that will...but it was telling me that your extension was attempting to run glslang.

urbanstarship commented 5 months ago

I've rolled back to glslang version 7.11 on my 2015 MacBook, and that got rid of the crashes with the system error, but still no results from GLSL Linter. I wanted to check if it had something to do with Apple Silicon, but it appears not. Any other ideas of what to check? It's tricky when there are no errors being thrown up.

Jacajack commented 5 months ago

Sorry for my late response, I've been away for a while.

I don't think the issue could be related to the hardware. If the glslangValidator works on its own, then it should work via the extension as well.

You could try opening the developer tools in VSCode (Developer: Toggle Developer Tools) and examine the console for any errors coming from the extension. You should see the moment the extension activates in the log:

image

It could also be that glslangValidator returns different exit codes on OSX. Unfortunately I don't have any OSX machine to try that, but I could try to update the extension and slightly improve error handling to see if this gets us anywhere. Frankly, I don't have any better ideas at this point.