nvc0/ir: only try to check for zero LOD if we aren't already forcing it
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 Jan 2017 02:06:40 +0000 (21:06 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 Jan 2017 02:08:42 +0000 (21:08 -0500)
There's a levelZero flag which forces texturing to pick level zero (and
not consume an explicit LOD argument). This is set for MS targets, but
could also be set for any other incoming instruction. As that is what
determines whether a LOD argument is present, check that rather than the
more indirect isMS logic.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index ff253af69972ea7b81e686d3b372f9e00352a1a8..95de87c03b3ae22111ea9c836b2cfe93bc864881 100644 (file)
@@ -118,7 +118,7 @@ NVC0LegalizeSSA::handleFTZ(Instruction *i)
 void
 NVC0LegalizeSSA::handleTEXLOD(TexInstruction *i)
 {
-   if (i->tex.target.isMS())
+   if (i->tex.levelZero)
       return;
 
    ImmediateValue lod;