mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
ir_to_mesa: Don't emit a duplicate return at the end of a function.
It was harmless, but ugly.
This commit is contained in:
parent
0e19922558
commit
806cb9f952
1 changed files with 6 additions and 2 deletions
|
|
@ -2350,8 +2350,12 @@ get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
|
|||
|
||||
visit_exec_list(&entry->sig->body, &v);
|
||||
|
||||
entry->bgn_inst = v.ir_to_mesa_emit_op0(NULL, OPCODE_RET);
|
||||
entry->bgn_inst = v.ir_to_mesa_emit_op0(NULL, OPCODE_ENDSUB);
|
||||
ir_to_mesa_instruction *last;
|
||||
last = (ir_to_mesa_instruction *)v.instructions.get_tail();
|
||||
if (last->op != OPCODE_RET)
|
||||
v.ir_to_mesa_emit_op0(NULL, OPCODE_RET);
|
||||
|
||||
v.ir_to_mesa_emit_op0(NULL, OPCODE_ENDSUB);
|
||||
progress = GL_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue