diff options
author | Brian Paul <[email protected]> | 2009-03-19 09:26:20 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-03-19 09:26:20 -0600 |
commit | 214132adfee555a26b64b2dd359afa6b09e845f5 (patch) | |
tree | 763fed1622560be962372f64a7f472b3c2167aae /src/mesa/shader/slang/slang_emit.c | |
parent | 264c3d218aa2fd8d06b0e91c1079e43e58d3ee7e (diff) |
glsl: when debug pragma is on, emit comments about function calls/inlines
BTW, the debug pragma syntax is "#pragma debug(on)"
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 94d0c084aaf..1b1edb44609 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -2194,6 +2194,12 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) return NULL; } + if (n->Comment) { + inst = new_instruction(emitInfo, OPCODE_NOP); + inst->Comment = _mesa_strdup(n->Comment); + inst = NULL; + } + switch (n->Opcode) { case IR_SEQ: /* sequence of two sub-trees */ |