From: Christoph Bumiller Date: Thu, 13 Oct 2011 11:53:39 +0000 (+0200) Subject: nvc0/ir: handle levelZero modifier in TEX emission X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c43b2f6a30dc9d42cb3b19c9396002b6c18a493e;p=mesa.git nvc0/ir: handle levelZero modifier in TEX emission --- 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);