summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r--src/mesa/shader/slang/slang_emit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 6c80c1e015a..909948968a4 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -769,14 +769,16 @@ _slang_new_codegen_context(void)
GLboolean
_slang_emit_code(slang_ir_node *n, slang_gen_context *gc,
- struct gl_program *prog)
+ struct gl_program *prog, GLboolean withEnd)
{
GLboolean success;
if (emit(gc, n, prog)) {
/* finish up by addeing the END opcode to program */
- struct prog_instruction *inst;
- inst = new_instruction(prog, OPCODE_END);
+ if (withEnd) {
+ struct prog_instruction *inst;
+ inst = new_instruction(prog, OPCODE_END);
+ }
success = GL_TRUE;
}
else {