summaryrefslogtreecommitdiffstats
path: root/tools/glsl_preproc/templates/glsl_block.c.j2
blob: aa8372d192acebb44078f2ba18b7ee5393426f31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 %}