summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_pc.h
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-02-08 16:55:06 +0100
committerChristoph Bumiller <[email protected]>2011-02-09 16:05:00 +0100
commit0691530b7f01f3106f7b4d697cd7a42f86fa23d5 (patch)
treea19e65bedf90a5a1c7499866499b263cff1d0d44 /src/gallium/drivers/nvc0/nvc0_pc.h
parent0f776fea432052c00972ae1c6a0fbf76ec5e0b6c (diff)
nvc0: replace branching with predicated insns where feasible
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_pc.h')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.h b/src/gallium/drivers/nvc0/nvc0_pc.h
index 40d728aefc7..efa073a9201 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc.h
+++ b/src/gallium/drivers/nvc0/nvc0_pc.h
@@ -205,6 +205,10 @@
#define NV_CC_C 0x11
#define NV_CC_A 0x12
#define NV_CC_S 0x13
+#define NV_CC_INVERSE(cc) ((cc) ^ 0x7)
+/* for 1 bit predicates: */
+#define NV_CC_P 0
+#define NV_CC_NOT_P 1
#define NV_PC_MAX_INSTRUCTIONS 2048
#define NV_PC_MAX_VALUES (NV_PC_MAX_INSTRUCTIONS * 4)
@@ -260,12 +264,6 @@ nv_op_supported_src_mods(uint opcode)
return nvc0_op_info_table[opcode].mods;
}
-static INLINE boolean
-nv_op_predicateable(uint opcode)
-{
- return nvc0_op_info_table[opcode].predicate ? TRUE : FALSE;
-}
-
static INLINE uint
nv_type_order(ubyte type)
{
@@ -488,7 +486,7 @@ nv_alloc_instruction(struct nv_pc *pc, uint opcode)
assert(pc->num_instructions < NV_PC_MAX_INSTRUCTIONS);
insn->opcode = opcode;
- insn->cc = 0;
+ insn->cc = NV_CC_P;
insn->indirect = -1;
insn->predicate = -1;