Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: SPIR-V requires location for user input/output #34

Open
no-more-secrets opened this issue May 21, 2023 · 3 comments
Open

Error: SPIR-V requires location for user input/output #34

no-more-secrets opened this issue May 21, 2023 · 3 comments

Comments

@no-more-secrets
Copy link

no-more-secrets commented May 21, 2023

I have a GLSL fragment shader that the OpenGL drivers compile fine, but glslls gives errors like the following:

#version 330 core
...
flat out int frag_type;     ■ 'location' : SPIR-V requires location for user input/output

i.e., on all of the inputs in my fragment shader (and the outputs in my vertex shader) I get those error messages about SPIR-V that I don't understand. Am I doing something wrong in how I'm running glslls?

Setup: I'm using Neovim with builtin LSP client + nvim-lspconfig with default setup settings to run glslls.

@no-more-secrets
Copy link
Author

I also tried passing the --target-env=opengl flag, but it doesn't seem to help.

@mixnam
Copy link
Contributor

mixnam commented Jul 17, 2023

@no-more-secrets I created draft PR, that solved this problem for me.
But I don't have exp in c++, and might did smth wrong. Anyway I would appreciate if you tried to test my fixes and provided some feedback if fixes work for you as well.

lsp setup

require 'lspconfig'.glslls.setup {
    cmd = { 'glslls', '--stdin', '--target-env', 'opengl' },
}

@no-more-secrets
Copy link
Author

@mixnam Thanks, I built your branch and it works for me and fixes the problem! Hopefully it will get merged @svenstaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants