Mesa (master): tgsi: new comments, assertion for executing TGSI_OPCODE_CAL

Brian Paul brianp at kemper.freedesktop.org
Fri Jun 19 17:21:39 UTC 2015


Module: Mesa
Branch: master
Commit: 12c1c0706d4356819cfbaa15c3d71402a42e3539
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=12c1c0706d4356819cfbaa15c3d71402a42e3539

Author: Brian Paul <brianp at vmware.com>
Date:   Sat Jun 13 07:58:53 2015 -0600

tgsi: new comments, assertion for executing TGSI_OPCODE_CAL

---

 src/gallium/auxiliary/tgsi/tgsi_exec.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index a098a82..fde99b9 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;
 




More information about the mesa-commit mailing list