diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2011-03-05 22:24:57 +0100 |
---|---|---|
committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2011-03-13 13:23:54 +0100 |
commit | f10b2021c12bea46d81517f5d5383b2fc0788c10 (patch) | |
tree | 9db61edcafe3c495c5420d3ea4f4b72674945c3c /src/gallium/drivers/nvc0/nvc0_pc_optimize.c | |
parent | dedc81e1dced8768334c300d630b4683fd8a1ba2 (diff) |
nvc0: update/fix supported instruction src modifiers
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_pc_optimize.c')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_pc_optimize.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c index c5a7367a5f..f7bf1680d0 100644 --- a/src/gallium/drivers/nvc0/nvc0_pc_optimize.c +++ b/src/gallium/drivers/nvc0/nvc0_pc_optimize.c @@ -240,8 +240,6 @@ is_immd32_load(struct nv_instruction *nvi) static INLINE void check_swap_src_0_1(struct nv_instruction *nvi) { - static const uint8_t cc_swapped[8] = { 0, 4, 2, 6, 1, 5, 3, 7 }; - struct nv_ref *src0 = nvi->src[0]; struct nv_ref *src1 = nvi->src[1]; @@ -270,7 +268,7 @@ check_swap_src_0_1(struct nv_instruction *nvi) if (nvi->src[0] != src0) { if (NV_BASEOP(nvi->opcode) == NV_OP_SET) - nvi->set_cond = (nvi->set_cond & ~7) | cc_swapped[nvi->set_cond & 7]; + nvi->set_cond = nvc0_ir_reverse_cc(nvi->set_cond); else if (NV_BASEOP(nvi->opcode) == NV_OP_SLCT) nvi->set_cond = NV_CC_INVERSE(nvi->set_cond); @@ -363,7 +361,7 @@ nv_pass_lower_mods(struct nv_pass *ctx, struct nv_basic_block *b) mod = 0; } - if ((nv_op_supported_src_mods(nvi->opcode) & mod) != mod) + if ((nv_op_supported_src_mods(nvi->opcode, j) & mod) != mod) continue; nv_reference(ctx->pc, nvi, j, mi->src[0]->value); |