diff options
author | Ilia Mirkin <[email protected]> | 2014-03-11 08:30:49 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-03-18 05:56:53 -0400 |
commit | 76554d2d1f3e017370a7ef1b3ea511f83cd83573 (patch) | |
tree | 80412d92a51b127a5ab230c76246d30c5294ff39 /src/gallium | |
parent | cb3dcb14300613a7628941ff4ba1ad4c52e9772b (diff) |
nv50/ir/gk110: implement partial txq support
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 28 |
1 files changed, 27 insertions, 1 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 6a24b0a2299..033104bff9b 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -1059,7 +1059,33 @@ CodeEmitterGK110::emitTEX(const TexInstruction *i) void CodeEmitterGK110::emitTXQ(const TexInstruction *i) { - emitNOP(i); // TODO + code[0] = 0x00000002; + code[1] = 0x75400001; + + switch (i->tex.query) { + case TXQ_DIMS: code[0] |= 0x01 << 25; break; + case TXQ_TYPE: code[0] |= 0x02 << 25; break; + case TXQ_SAMPLE_POSITION: code[0] |= 0x05 << 25; break; + case TXQ_FILTER: code[0] |= 0x10 << 25; break; + case TXQ_LOD: code[0] |= 0x12 << 25; break; + case TXQ_BORDER_COLOUR: code[0] |= 0x16 << 25; break; + default: + assert(!"invalid texture query"); + 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) + // ? + + defId(i->def(0), 2); + srcId(i->src(0), 10); + + emitPredicate(i); } void |