summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-06-13 07:58:53 -0600
committerBrian Paul <[email protected]>2015-06-19 08:45:00 -0600
commit12c1c0706d4356819cfbaa15c3d71402a42e3539 (patch)
tree4789d8c2cb88c8319039586c531d2d0018145e9b
parent2ce2b80c6fd7ba5effbdf86ca3affe10a9c70492 (diff)
tgsi: new comments, assertion for executing TGSI_OPCODE_CAL
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index a098a82be63..fde99b9e494 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -4401,8 +4401,12 @@ exec_instruction(
mach->BreakStack[mach->BreakStackTop++] = mach->BreakType;
mach->FuncStack[mach->FuncStackTop++] = mach->FuncMask;
- /* Finally, jump to the subroutine */
+ /* Finally, jump to the subroutine. The label is a pointer
+ * (an instruction number) to the BGNSUB instruction.
+ */
*pc = inst->Label.Label;
+ assert(mach->Instructions[*pc].Instruction.Opcode
+ == TGSI_OPCODE_BGNSUB);
}
break;