From 035b1097db339fb605964da62d01553a2bc25061 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 21 May 2016 15:41:03 -0400 Subject: nvc0/ir: return 0 for gl_TessCoord.z for non-triangles modes Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset Cc: "11.1 11.2" --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium') 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 dc0667fb6a9..9b4bf8230fa 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(); } -- cgit v1.2.3