From c43b2f6a30dc9d42cb3b19c9396002b6c18a493e Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Thu, 13 Oct 2011 13:53:39 +0200 Subject: [PATCH] nvc0/ir: handle levelZero modifier in TEX emission --- src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- 2.30.2