tgsi: new comments, assertion for executing TGSI_OPCODE_CAL
authorBrian Paul <brianp@vmware.com>
Sat, 13 Jun 2015 13:58:53 +0000 (07:58 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 19 Jun 2015 14:45:00 +0000 (08:45 -0600)
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;