tgsi: new comments, assertion for executing TGSI_OPCODE_CAL
[mesa.git] / src / gallium / auxiliary / tgsi / tgsi_exec.c
index a098a82be63607b10b5e8c90f899ba18122434ac..fde99b9e4949a2227adb67f6d9441b6d6e7d35ce 100644 (file)
@@ -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;