Mesa (master): tgsi: Implement BREAKC in interpreter.

Michał Król michal at kemper.freedesktop.org
Tue Dec 22 15:11:53 UTC 2009


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

Author: Michal Krol <michal at vmware.com>
Date:   Tue Dec 22 11:58:45 2009 +0100

tgsi: Implement BREAKC in interpreter.

---

 src/gallium/auxiliary/tgsi/tgsi_exec.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 7173586..123117c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -3246,6 +3246,25 @@ exec_instruction(
    case TGSI_OPCODE_NOP:
       break;
 
+   case TGSI_OPCODE_BREAKC:
+      FETCH(&r[0], 0, CHAN_X);
+      /* update CondMask */
+      if (r[0].u[0] && (mach->ExecMask & 0x1)) {
+         mach->LoopMask &= ~0x1;
+      }
+      if (r[0].u[1] && (mach->ExecMask & 0x2)) {
+         mach->LoopMask &= ~0x2;
+      }
+      if (r[0].u[2] && (mach->ExecMask & 0x4)) {
+         mach->LoopMask &= ~0x4;
+      }
+      if (r[0].u[3] && (mach->ExecMask & 0x8)) {
+         mach->LoopMask &= ~0x8;
+      }
+      /* Todo: if mach->LoopMask == 0, jump to end of loop */
+      UPDATE_EXEC_MASK(mach);
+      break;
+
    default:
       assert( 0 );
    }




More information about the mesa-commit mailing list