From: Connor Abbott <[email protected]> Right now, if you try to put something like:
in a shader, the C preprocessor will try to interpret that line and barf. Now glsl_scraper.py will strip out ///, so you can do something like: ///#extension GL_foo : enable and it'll be ignored when compiling the file itself. Yes, this is a hack, but I couldn't think of anything better... I'm open to suggestions. Signed-off-by: Connor Abbott <[email protected]> --- misc/glsl_scraper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/glsl_scraper.py b/misc/glsl_scraper.py index efb08ac..d07c581 100644 --- a/misc/glsl_scraper.py +++ b/misc/glsl_scraper.py @@ -28,7 +28,7 @@ class Shader: self.line = line def glsl_source(self): - return dedent(self.stream.getvalue()) + return dedent(self.stream.getvalue()).replace('///', '') def __run_glslc(self, extra_args=[]): stage_flag = '-fshader-stage=' -- 2.9.4 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
