diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2016-02-28 20:44:47 +0100 |
---|---|---|
committer | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2016-02-28 23:58:11 +0100 |
commit | 07ed003faf3199a3e95852e7a34763aeaf76503d (patch) | |
tree | 1b6cf92b018ab198418f933d124dd4ba17eaaf15 /src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | |
parent | b3efa0a59e02e20ccd9ed51c6e503d020f619043 (diff) | |
download | external_mesa3d-07ed003faf3199a3e95852e7a34763aeaf76503d.zip external_mesa3d-07ed003faf3199a3e95852e7a34763aeaf76503d.tar.gz external_mesa3d-07ed003faf3199a3e95852e7a34763aeaf76503d.tar.bz2 |
nv50/ir: emit VOTE instruction
Changes from v2:
- add missing NOT modifier for GK110/GM107
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index 90c6a610..b6b3ec7 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -128,6 +128,8 @@ private: void emitFlow(const Instruction *); + void emitVOTE(const Instruction *); + inline void defId(const ValueDef&, const int pos); inline void srcId(const ValueRef&, const int pos); inline void srcId(const ValueRef *, const int pos); @@ -1371,6 +1373,24 @@ CodeEmitterGK110::emitFlow(const Instruction *i) } void +CodeEmitterGK110::emitVOTE(const Instruction *i) +{ + assert(i->src(0).getFile() == FILE_PREDICATE && + i->def(1).getFile() == FILE_PREDICATE); + + code[0] = 0x00000002; + code[1] = 0x86c00000 | (i->subOp << 19); + + emitPredicate(i); + + defId(i->def(0), 2); + defId(i->def(1), 48); + if (i->src(0).mod == Modifier(NV50_IR_MOD_NOT)) + code[0] |= 1 << 45; + srcId(i->src(0), 42); +} + +void CodeEmitterGK110::emitAFETCH(const Instruction *i) { uint32_t offset = i->src(0).get()->reg.data.offset & 0x7ff; @@ -2080,6 +2100,9 @@ CodeEmitterGK110::emitInstruction(Instruction *insn) case OP_CCTL: emitCCTL(insn); break; + case OP_VOTE: + emitVOTE(insn); + break; case OP_PHI: case OP_UNION: case OP_CONSTRAINT: |