wlroots/render/gles2/shaders
Simon Ser 89c9ef6692 render/gles2: skip glslang check when shaders are unchanged
Currently, the glslang check is run every time ninja is invoked,
even with an up-to-date build directory when GLSL shaders haven't
been modified. This is due to glslang not creating any output
file: the _check file never exists so ninja keeps trying to
generate it by running the command.

Unfortunately Meson doesn't support running commands with no
outputs [1]. Create an empty output file to fix this by setting
`capture: true`.

This doesn't work out-of-the-box, because glslang prints messages
to stdout, and provides no way to change this [2]. As a result,
shader errors are not surfaced back to the user - they end up in
the _check file. Workaround this with a thin wrapper which
redirects stdout to stderr when invoking glslang.

[1]: https://github.com/mesonbuild/meson/issues/11506
[2]: https://github.com/KhronosGroup/glslang/pull/4138
2026-01-05 09:59:58 -05:00
..
check.sh render/gles2: skip glslang check when shaders are unchanged 2026-01-05 09:59:58 -05:00
common.vert renderer/gles2: Compute texture coordinates based off of vertex positions 2023-05-28 14:53:34 -04:00
embed.sh render/gles2: move shaders to individual files 2022-10-28 11:46:06 +00:00
meson.build render/gles2: skip glslang check when shaders are unchanged 2026-01-05 09:59:58 -05:00
quad.frag render/gles2: default to highp if available 2023-02-02 22:54:13 +01:00
tex_external.frag render/gles2: default to highp if available 2023-02-02 22:54:13 +01:00
tex_rgba.frag render/gles2: default to highp if available 2023-02-02 22:54:13 +01:00
tex_rgbx.frag render/gles2: default to highp if available 2023-02-02 22:54:13 +01:00