summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_pc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-03-05 22:24:57 +0100
committerChristoph Bumiller <[email protected]>2011-03-13 13:23:54 +0100
commitf10b2021c12bea46d81517f5d5383b2fc0788c10 (patch)
tree9db61edcafe3c495c5420d3ea4f4b72674945c3c /src/gallium/drivers/nvc0/nvc0_pc.c
parentdedc81e1dced8768334c300d630b4683fd8a1ba2 (diff)
nvc0: update/fix supported instruction src modifiers
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_pc.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_pc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_pc.c b/src/gallium/drivers/nvc0/nvc0_pc.c
index f51d289e8cd..bd85a7f1ffd 100644
--- a/src/gallium/drivers/nvc0/nvc0_pc.c
+++ b/src/gallium/drivers/nvc0/nvc0_pc.c
@@ -25,6 +25,14 @@
#include "nvc0_pc.h"
#include "nvc0_program.h"
+uint8_t
+nvc0_ir_reverse_cc(uint8_t cc)
+{
+ static const uint8_t cc_swapped[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
+
+ return cc_swapped[cc & 7] | (cc & ~7);
+}
+
boolean
nvc0_insn_can_load(struct nv_instruction *nvi, int s,
struct nv_instruction *ld)