diff options
author | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2011-10-13 13:53:39 +0200 |
---|---|---|
committer | Christoph Bumiller <e0425955@student.tuwien.ac.at> | 2011-10-21 23:00:37 +0200 |
commit | c43b2f6a30dc9d42cb3b19c9396002b6c18a493e (patch) | |
tree | 774c8f7f0829c6b004353233e612492a1e552707 | |
parent | b5f2c0505fd4f66422e034b041cdf0bc3dc46e99 (diff) |
nvc0/ir: handle levelZero modifier in TEX emission
-rw-r--r-- | src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp | 10 |
1 files changed, 9 insertions, 1 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 dd8e2505ba2..bf597538bb3 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp @@ -952,13 +952,21 @@ CodeEmitterNVC0::emitTEX(const TexInstruction *i) case OP_TEX: code[1] = 0x80000000; break; case OP_TXB: code[1] = 0x84000000; break; case OP_TXL: code[1] = 0x86000000; break; - case OP_TXF: code[1] = 0x92000000; break; + case OP_TXF: code[1] = 0x90000000; break; case OP_TXG: code[1] = 0xa0000000; break; case OP_TXD: code[1] = 0xe0000000; break; default: assert(!"invalid texture op"); break; } + if (i->op == OP_TXF) { + if (!i->tex.levelZero) + code[1] |= 0x02000000; + } else + if (i->tex.levelZero) { + code[1] |= 0x02000000; + } + defId(i->def[0], 14); srcId(i->src[0], 20); |