diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-10-13 19:10:40 +0100 |
---|---|---|
committer | Rhys Perry <pendingchaos02@gmail.com> | 2020-11-03 16:17:25 +0000 |
commit | daa7d2dc7c64760590666bf52acf9b3f4abe3bde (patch) | |
tree | 899186204f811023bb81c292337392470776575e | |
parent | ae2fae4af1a4a5fc8b2fe1feae5d4604b918f147 (diff) |
glsl_scraper: silence warnings about multi-line comments
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
-rw-r--r-- | misc/glsl_scraper.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/glsl_scraper.py b/misc/glsl_scraper.py index 716578d..a18fe31 100644 --- a/misc/glsl_scraper.py +++ b/misc/glsl_scraper.py @@ -104,11 +104,16 @@ class Shader: def _dump_glsl_code(self, f): # Dump GLSL code for reference. Use // instead of /* */ # comments so we don't need to escape the GLSL code. + # We also ask the compiler to not complain about multi-line comments + # that are created if a line of the GLSL ends in "\" + f.write('#pragma GCC diagnostic push //"warning: multi-line comment"\n') + f.write('#pragma GCC diagnostic ignored "-Wcomment"\n') f.write('// GLSL code:\n') f.write('//') for line in self.glsl.splitlines(): f.write('\n// {0}'.format(line)) f.write('\n\n') + f.write('#pragma GCC diagnostic pop\n') def _dump_spirv_code(self, f, var_name): f.write('/* SPIR-V Assembly:\n') |