Handle fixup of flat location specifiers

This commit is contained in:
Kovid Goyal 2026-07-01 15:56:54 +05:30
parent 28bd195499
commit 16e4459fae
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -377,6 +377,8 @@ def fixup_opengl_code(glsl_code: str) -> tuple[str, dict[str, Any]]:
line = '// ' + line
elif line.startswith('layout(location =') or line.startswith('layout(binding ='):
line = '// ' + line
elif line.startswith('flat layout(location ='):
line = 'flat'
elif line: # ))))
words = line.split()
if 'uniform' in words and line.startswith('layout('): # )