diff options
Diffstat (limited to 'tools/glsl_preproc/templates/glsl_block.c.j2')
-rw-r--r-- | tools/glsl_preproc/templates/glsl_block.c.j2 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/glsl_preproc/templates/glsl_block.c.j2 b/tools/glsl_preproc/templates/glsl_block.c.j2 new file mode 100644 index 0000000..aa8372d --- /dev/null +++ b/tools/glsl_preproc/templates/glsl_block.c.j2 @@ -0,0 +1,17 @@ +#line {{ block.linenr }} +{% if block.refs %} + pl_str_append_asprintf_c(alloc, buf, + {% for line in block.lines %} + {{ line.fmtstr }}{{ ',' if loop.last }} + {% endfor %} + {% for ref in block.refs %} + {{ ref }}{{ ',' if not loop.last }} + {% endfor %} + ); +{% else %} + pl_str_append(alloc, buf, pl_str0( + {% for line in block.lines %} + {{ line.rawstr }} + {% endfor %} + )); +{% endif %} |