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

Reserved GLSL word in Gizmos shader #879

Closed
tomas7770 opened this issue Jan 8, 2024 · 0 comments · Fixed by #902
Closed

Reserved GLSL word in Gizmos shader #879

tomas7770 opened this issue Jan 8, 2024 · 0 comments · Fixed by #902
Labels

Comments

@tomas7770
Copy link
Contributor

Description

Gizmos ID pipeline's pixel shader uses the GLSL reserved word "output" as the name of an out variable. On certain GPUs, this causes a shader compile error resulting in a crash, when using the Gizmos plugin.

Gizmos sample output:

[20:13:04.151] [dispatcher.cpp:153 compileChain] info: Call chain completed successfully!
[20:13:04.152] [dispatcher.cpp:153 compileChain] info: Call chain completed successfully!
[20:13:04.153] [file.cpp:124 mount] info: Mounted archive at '""/"settings.json"'
[20:13:04.397] [ogl_render_device.cpp:2307 createShaderStage] error: Could not compile shader: "Fragment shader failed to compile with the following errors:
ERROR: 0:6: error(#133) Reserved word: output
ERROR: 0:6: error(#132) Syntax error: "output" parse error
ERROR: error(#273) 2 compilation errors.  No code generated

"

Reproduce

Steps to reproduce the behavior:

  1. Open something that uses the Gizmos plugin, e.g. Gizmos sample
  2. On some GPUs, everything works well. On others, a shader compile error occurs.

Additional context

Tested on a laptop with Ryzen 7 5800H + RTX 3050, Windows 11. The error occurs only when using the integrated GPU.

Solution

Changing the variable name to something else (that's not reserved) should do the trick.

@tomas7770 tomas7770 added A-Engine C-Crash D-Trivial Can be done in 30 minutes S-Triage Issues whose priority still has to be figured out B-Gizmos labels Jan 8, 2024
@tomas7770 tomas7770 linked a pull request Jan 27, 2024 that will close this issue
4 tasks
@RiscadoA RiscadoA added S-Triage Issues whose priority still has to be figured out and removed S-Triage Issues whose priority still has to be figured out labels Sep 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

Successfully merging a pull request may close this issue.

2 participants