nvc0/ir: return 0 for gl_TessCoord.z for non-triangles modes

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>
This commit is contained in:
Ilia Mirkin 2016-05-21 15:41:03 -04:00
parent bdc9c20df0
commit 035b1097db

View 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();
}