summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_state_rss.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-10 08:29:27 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-10 08:29:27 +0000
commit155fbcb0ed85c6452cbedd2317f201100fe698ab (patch)
tree15e8a2662b1341bd07cebb9cd3624bc4ed42d020 /src/gallium/drivers/svga/svga_state_rss.c
parent9a8342ebcd83a2022b3c9b9539c5b15ac56d6440 (diff)
parenteeaa0861bfc98a06ceec269801271b7453c4fcbd (diff)
Merge commit 'origin/master' into gallium-sw-api-2
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_rss.c')
-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 107cc403b4..b7195d246b 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -191,15 +191,24 @@ static int emit_rss( struct svga_context *svga,
EMIT_RS( svga, svga->curr.stencil_ref.ref_value[0], STENCILREF, fail );
}
- 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 );