Mesa (master): tgsi/exec: split out setting up masks to separate function

Dave Airlie airlied at kemper.freedesktop.org
Tue Apr 26 23:01:37 UTC 2016


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Apr 26 14:24:53 2016 +1000

tgsi/exec: split out setting up masks to separate function

This is just a cleanup that will make later changes easier
to make.

Acked-by: Roland Scheidegger <sroland at vmware.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/auxiliary/tgsi/tgsi_exec.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 99606ab..f1d0d63 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -5650,16 +5650,9 @@ exec_instruction(
    }
 }
 
-
-/**
- * Run TGSI interpreter.
- * \return bitmask of "alive" quad components
- */
-uint
-tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
+static void
+tgsi_exec_machine_setup_masks(struct tgsi_exec_machine *mach)
 {
-   uint i;
-   int pc = 0;
    uint default_mask = 0xf;
 
    mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] = 0;
@@ -5688,7 +5681,19 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
    assert(mach->SwitchStackTop == 0);
    assert(mach->BreakStackTop == 0);
    assert(mach->CallStackTop == 0);
+}
+
+/**
+ * Run TGSI interpreter.
+ * \return bitmask of "alive" quad components
+ */
+uint
+tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
+{
+   uint i;
+   int pc = 0;
 
+   tgsi_exec_machine_setup_masks(mach);
 
    /* execute declarations (interpolants) */
    for (i = 0; i < mach->NumDeclarations; i++) {




More information about the mesa-commit mailing list