summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-05-21 16:16:50 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2016-05-22 11:58:22 -0400
commit9f19ccff9c7fe375a9fff5cc54e5488f59f638a8 (patch)
tree19d90d9c56e0a62415e93cd8b20c6e3892c758cd
parentd6edae70901dba4b96358bfc467534466060ef0a (diff)
nvc0: fix setting of tess_mode in various situations
This fixes a lot of INVALID_VALUE errors reported by the card when running dEQP tests. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_program.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index 65f89dc380d..4177d8dc37c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -294,11 +294,21 @@ nvc0_tp_get_tess_mode(struct nvc0_program *tp, struct nv50_ir_prog_info *info)
return;
}
- if (info->prop.tp.winding > 0)
- tp->tp.tess_mode |= NVC0_3D_TESS_MODE_CW;
+ /* It seems like lines want the "CW" bit to indicate they're connected, and
+ * spit out errors in dmesg when the "CONNECTED" bit is set.
+ */
+ if (info->prop.tp.outputPrim != PIPE_PRIM_POINTS) {
+ if (info->prop.tp.domain == PIPE_PRIM_LINES)
+ tp->tp.tess_mode |= NVC0_3D_TESS_MODE_CW;
+ else
+ tp->tp.tess_mode |= NVC0_3D_TESS_MODE_CONNECTED;
+ }
- if (info->prop.tp.outputPrim != PIPE_PRIM_POINTS)
- tp->tp.tess_mode |= NVC0_3D_TESS_MODE_CONNECTED;
+ /* Winding only matters for triangles/quads, not lines. */
+ if (info->prop.tp.domain != PIPE_PRIM_LINES &&
+ info->prop.tp.outputPrim != PIPE_PRIM_POINTS &&
+ info->prop.tp.winding > 0)
+ tp->tp.tess_mode |= NVC0_3D_TESS_MODE_CW;
switch (info->prop.tp.partitioning) {
case PIPE_TESS_SPACING_EQUAL: