summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-05-21 15:41:03 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2016-05-22 11:58:22 -0400
commit035b1097db339fb605964da62d01553a2bc25061 (patch)
tree6536d63290f0e570acf05b8d5223f5f975c7ffb1
parentbdc9c20df08d724b1eb3d507660f71ff47b9fc7b (diff)
downloadexternal_mesa3d-035b1097db339fb605964da62d01553a2bc25061.zip
external_mesa3d-035b1097db339fb605964da62d01553a2bc25061.tar.gz
external_mesa3d-035b1097db339fb605964da62d01553a2bc25061.tar.bz2
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>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
index dc0667f..9b4bf82 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -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();
}