summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/codegen
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-03-11 12:13:45 -0400
committerIlia Mirkin <[email protected]>2014-03-18 05:56:54 -0400
commitece734b3c195c870bbda342edf1807ca436bf83a (patch)
treec4a451a1ee741c073cf539b8528ef71decf51005 /src/gallium/drivers/nouveau/codegen
parent08505549ab938a6650024aab68f7713989c5c6fe (diff)
nv50/ir/gk110: fix setting texture for txd/txf/txq
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp17
1 files changed, 8 insertions, 9 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 c11aa798638..7d188c9245d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -952,7 +952,7 @@ void CodeEmitterGK110::emitTEXCSAA(const TexInstruction *i)
code[0] = 0x00000002;
code[1] = 0x76c00000;
- // code[1] |= i->tex.r << 9;
+ code[1] |= i->tex.r << 9;
// code[1] |= i->tex.s << (9 + 8);
if (i->tex.liveOnly)
@@ -995,17 +995,19 @@ CodeEmitterGK110::emitTEX(const TexInstruction *i)
case OP_TXD:
code[0] = 0x00000002;
code[1] = 0x76000000;
+ code[1] |= i->tex.r << 9;
break;
case OP_TXF:
code[0] = 0x00000002;
code[1] = 0x70000000;
+ code[1] |= i->tex.r << 13;
break;
default:
code[0] = 0x00000001;
code[1] = 0x60000000;
+ code[1] |= i->tex.r << 15;
break;
}
- code[1] |= i->tex.r << 15;
}
code[1] |= isNextIndependentTex(i) ? 0x1 : 0x2; // t : p mode
@@ -1084,13 +1086,10 @@ CodeEmitterGK110::emitTXQ(const TexInstruction *i)
break;
}
- // TODO:
- // code[1] |= i->tex.mask << 14;
- //
- // code[1] |= i->tex.r << 9;
- // code[1] |= i->tex.s << 2;
- // if (i->tex.sIndirectSrc >= 0 || i->tex.rIndirectSrc >= 0)
- // ?
+ code[1] |= i->tex.mask << 2;
+ code[1] |= i->tex.r << 9;
+ if (/*i->tex.sIndirectSrc >= 0 || */i->tex.rIndirectSrc >= 0)
+ code[1] |= 0x08000000;
defId(i->def(0), 2);
srcId(i->src(0), 10);