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

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('): # )