diff --git a/renderer/src/shaders/minify.py b/renderer/src/shaders/minify.py index c01fade10..49fd7e8d0 100644 --- a/renderer/src/shaders/minify.py +++ b/renderer/src/shaders/minify.py @@ -481,6 +481,10 @@ def emit_tokens_to_rewritten_glsl(self, out, *, preserve_exported_switches, call out.write('\n') elif needs_whitespace and lasttoken_needs_whitespace: out.write(' ') + elif tok.type == "ID" and lasttoken.type == "OP" and lasttoken.value == ")": + # Mesa can reject minified GLSL macro calls when the next + # identifier is directly adjacent, e.g. OUT(float2)foo. + out.write(' ') # is_newline will be false once we output the token (unless this value otherwise gets # updated).