summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-09 19:14:34 +0100
committerMichal Krol <michal@vmware.com>2010-03-09 19:19:56 +0100
commit7941d31ee6ef151c08e2e9cf288dde564fd9b576 (patch)
tree1a7b8f21aa5da947d9baea4b6eac919c30544e36
parent842351dd7640fe6b71819e8c39fbbe99a55b3bfc (diff)
svga: Don't do culling while the software pipeline is active.
It does it for us, and additionally introduces potentially back-facing triangles.
-rw-r--r--src/gallium/drivers/svga/svga_state_rss.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c
index aa21069719..e81c3c6335 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -192,15 +192,24 @@ static int emit_rss( struct svga_context *svga,
}
- if (dirty & SVGA_NEW_RAST)
+ if (dirty & (SVGA_NEW_RAST | SVGA_NEW_NEED_PIPELINE))
{
const struct svga_rasterizer_state *curr = svga->curr.rast;
+ unsigned cullmode = curr->cullmode;
/* Shademode: still need to rearrange index list to move
* flat-shading PV first vertex.
*/
EMIT_RS( svga, curr->shademode, SHADEMODE, fail );
- EMIT_RS( svga, curr->cullmode, CULLMODE, fail );
+
+ /* Don't do culling while the software pipeline is active. It
+ * does it for us, and additionally introduces potentially
+ * back-facing triangles.
+ */
+ if (svga->state.sw.need_pipeline)
+ cullmode = SVGA3D_FACE_NONE;
+
+ EMIT_RS( svga, cullmode, CULLMODE, fail );
EMIT_RS( svga, curr->scissortestenable, SCISSORTESTENABLE, fail );
EMIT_RS( svga, curr->multisampleantialias, MULTISAMPLEANTIALIAS, fail );
EMIT_RS( svga, curr->lastpixel, LASTPIXEL, fail );