Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions renderer/src/shaders/minify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down