diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-03-11 21:31:31 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-12 13:18:47 -0500 |
commit | 3252f1e301d27a63fbdd7e662d9742af9119ed8d (patch) | |
tree | b0aac2cff51bdc1923a7187d4ede2943967aa185 /gsk/gen-gsk-gresources-xml.py | |
parent | 7f292d34bd1841df1ea214037d0549b256f315da (diff) | |
download | gtk+-3252f1e301d27a63fbdd7e662d9742af9119ed8d.tar.gz |
gsk: Give ngl its own shader sources
We may want to change the interface between the
shaders and the renderer for ngl, and therefore,
sharing the shaders between gl and ngl will not
be practical, going forward.
Diffstat (limited to 'gsk/gen-gsk-gresources-xml.py')
-rw-r--r-- | gsk/gen-gsk-gresources-xml.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gsk/gen-gsk-gresources-xml.py b/gsk/gen-gsk-gresources-xml.py index 5db5044b09..16a2c4042a 100644 --- a/gsk/gen-gsk-gresources-xml.py +++ b/gsk/gen-gsk-gresources-xml.py @@ -20,13 +20,17 @@ def replace_if_changed(new, old): else: os.remove(new) -source_shaders = [] +gl_source_shaders = [] +ngl_source_shaders = [] vulkan_compiled_shaders = [] vulkan_shaders = [] for f in sys.argv[2:]: if f.endswith('.glsl'): - source_shaders.append(f) + if f.startswith('ngl'): + ngl_source_shaders.append(f); + else: + gl_source_shaders.append(f) elif f.endswith('.spv'): vulkan_compiled_shaders.append(f) elif f.endswith('.frag') or f.endswith('.vert'): @@ -40,11 +44,16 @@ xml = '''<?xml version='1.0' encoding='UTF-8'?> ''' -for f in source_shaders: +for f in gl_source_shaders: xml += ' <file alias=\'glsl/{0}\'>resources/glsl/{0}</file>\n'.format(os.path.basename(f)) xml += '\n' +for f in ngl_source_shaders: + xml += ' <file alias=\'ngl/{0}\'>ngl/resources/{0}</file>\n'.format(os.path.basename(f)) + +xml += '\n' + for f in vulkan_compiled_shaders: xml += ' <file alias=\'vulkan/{0}\'>resources/vulkan/{0}</file>\n'.format(os.path.basename(f)) |