Commit 1aafca6a authored by Dylan Baker's avatar Dylan Baker
Browse files move file generation up in loop

This moves the directory name generation and existence checking/creation
out of two loops, and allowing for more reuse.
Signed-off-by: default avatarDylan Baker <>
acked-by: Matt Turner's avatarMatt Turner <>
parent 8d287c50
......@@ -117,20 +117,20 @@ def main():
"""Main function."""
for api, requirement in REQUIREMENTS.iteritems():
lod = 'Lod' if api == 'glsl-4.00' else 'LOD'
dirname = os.path.join("spec", api.lower(), "compiler",
if not os.path.exists(dirname):
for sampler_type, coord_type in SAMPLER_TYPE_TO_COORD_TYPE.iteritems():
for execution_stage in ("vs", "fs"):
file_extension = 'frag' if execution_stage == 'fs' else 'vert'
filename = os.path.join(
"spec", api.lower(), "compiler", "built-in-functions",
"textureQuery{0}-{1}.{2}".format(lod, sampler_type,
dirname = os.path.dirname(filename)
if not os.path.exists(dirname):
version = requirement['version']
extensions = [requirement['extension']] if requirement['extension'] else []
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment