summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-03-11 17:34:05 +0100
committerChristoph Bumiller <[email protected]>2013-03-12 12:55:37 +0100
commit18fdfbdc32f204d6728c1ad57a693b1a6ad0aec9 (patch)
tree9e285392b5bef18d55c7c2cf60d05dff4da37cc6 /src/gallium/drivers/nvc0
parent9db7e09cb4db2bbd11edf40c77d3becad649fc53 (diff)
nv50/ir: add CCTL (cache control) op
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp
index 64207d71aac..ba2f73be9c2 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp
@@ -82,6 +82,7 @@ private:
void emitMOV(const Instruction *);
void emitATOM(const Instruction *);
void emitMEMBAR(const Instruction *);
+ void emitCCTL(const Instruction *);
void emitINTERP(const Instruction *);
void emitPFETCH(const Instruction *);
@@ -1886,6 +1887,27 @@ CodeEmitterNVC0::emitMEMBAR(const Instruction *i)
}
void
+CodeEmitterNVC0::emitCCTL(const Instruction *i)
+{
+ code[0] = 0x00000005 | (i->subOp << 5);
+
+ if (i->src(0).getFile() == FILE_MEMORY_GLOBAL) {
+ code[1] = 0x98000000;
+ srcAddr32(i->src(0), 28, 2);
+ } else {
+ code[1] = 0xd0000000;
+ setAddress24(i->src(0));
+ }
+ if (uses64bitAddress(i))
+ code[1] |= 1 << 26;
+ srcId(i->src(0).getIndirect(0), 20);
+
+ emitPredicate(i);
+
+ defId(i, 0, 14);
+}
+
+void
CodeEmitterNVC0::emitSUCLAMPMode(uint16_t subOp)
{
uint8_t m;
@@ -2348,6 +2370,9 @@ CodeEmitterNVC0::emitInstruction(Instruction *insn)
case OP_MEMBAR:
emitMEMBAR(insn);
break;
+ case OP_CCTL:
+ emitCCTL(insn);
+ break;
case OP_VSHL:
emitVSHL(insn);
break;