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

Parser crashes for shaders which attempt to override keywords such as lowp / highp #190

Open
bitsauce opened this issue Feb 29, 2024 · 0 comments
Labels

Comments

@bitsauce
Copy link

Describe the bug

I have come across a shader that causes a crash in the GLSL parser of this plugin, which makes it impossible to edit the shader (when I write a value it just reverts the keypress immediately). This shader is a bit unconventional in that it will attempt to remove the lowp and highp based on compiler defines. While this shader is probably not ideal (or maybe not even valid GLSL), it still breaks the editor which is a bit troublesome.

To Reproduce

#ifdef USE_LOWP_HIGHP
#define lowp
#define highp
#endif

void main()
{
#ifdef SOME_DEFINE
	lowp vec4 value = vec4(0, 0, 0, 0);
#endif
}

This is a minimal repro case I found for this issue. It also seems that the lowp/highp keywords have to be used inside a define themselves for this bug to trigger.

Expected behavior
The plugin continue working as if the keywords were un-overridden.

Versions

  • IDE: CLion 2024.1 EAP (also tested with regular CLion)
  • Plugin: 1.24
@bitsauce bitsauce added the bug label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant