nvc0/ir: return 0 for gl_TessCoord.z for non-triangles modes
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 May 2016 19:41:03 +0000 (15:41 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 22 May 2016 15:58:22 +0000 (11:58 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index dc0667fb6a90957e56947c0f2a43fee0a40d8b49..9b4bf8230fa23bcfc71653f9f5bc8157cfd4382b 100644 (file)
@@ -2264,6 +2264,10 @@ NVC0LoweringPass::readTessCoord(LValue *dst, int c)
       y = dst;
    } else {
       assert(c == 2);
+      if (prog->driver->prop.tp.domain != PIPE_PRIM_TRIANGLES) {
+         bld.mkMov(dst, bld.loadImm(NULL, 0));
+         return;
+      }
       x = bld.getSSA();
       y = bld.getSSA();
    }