summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi/exec/tgsi_exec.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-09-28 21:04:34 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-09-28 21:04:34 -0600
commitfc38c827716d333c92017348add1e80ea78af948 (patch)
tree00ef162ad6c114b462c972895c08872f9cbc5b7f /src/mesa/pipe/tgsi/exec/tgsi_exec.h
parentae7f200788947cdde15b279ea3a4558f6abd9922 (diff)
Initial implementation of IF/ELSE/ENDIF using conditional masking.
mach->CondMask controls writing to each of the 4 components in a quad. mach->CondMaskStack handles nested conditionals. Only a few of the micro ops (add/sub/mul/store) have been updated to obey CondMask at this time.
Diffstat (limited to 'src/mesa/pipe/tgsi/exec/tgsi_exec.h')
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.h b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
index d50f786029..f87d6e8862 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.h
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
@@ -120,6 +120,10 @@ struct tgsi_exec_cond_stack
unsigned Index; /* into States[] */
};
+
+#define TGSI_EXEC_MAX_COND_NESTING 10
+
+
struct tgsi_exec_machine
{
/*
@@ -152,9 +156,15 @@ struct tgsi_exec_machine
/* FRAGMENT processor only. */
const struct tgsi_interp_coef *InterpCoefs;
- struct tgsi_exec_cond_stack CondStack;
+ /* Conditional execution mask */
+ uint CondMask;
+
+ /* Condition mask stack (for nested conditionals) */
+ uint condStack[TGSI_EXEC_MAX_COND_NESTING];
+ int CondStackTop;
};
+
void
tgsi_exec_machine_init(
struct tgsi_exec_machine *mach,