X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsvga%2Fsvga_state_rss.c;h=28f32793742edc55a595917c81c49e521b28f75b;hb=96620d2275894d1e021d403c0e40007c61269563;hp=b7195d246bc87c0b41b27aeb73b6948f964d69de;hpb=e5c7d1e1c8ccb493c63e33d017c28b5cf4a55829;p=mesa.git diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c index b7195d246bc..28f32793742 100644 --- a/src/gallium/drivers/svga/svga_state_rss.c +++ b/src/gallium/drivers/svga/svga_state_rss.c @@ -146,13 +146,13 @@ static int emit_rss( struct svga_context *svga, * then our definition of front face agrees with hardware. * Otherwise need to flip. */ - if (rast->templ.front_winding == PIPE_WINDING_CW) { - cw = 0; - ccw = 1; + if (rast->templ.front_ccw) { + ccw = 0; + cw = 1; } else { - cw = 1; - ccw = 0; + ccw = 1; + cw = 0; } /* Twoside stencil @@ -240,6 +240,11 @@ static int emit_rss( struct svga_context *svga, EMIT_RS_FLOAT( svga, bias, DEPTHBIAS, fail ); } + if (dirty & SVGA_NEW_CLIP) { + /* the number of clip planes is how many planes to enable */ + unsigned enabled = (1 << svga->curr.clip.nr) - 1; + EMIT_RS( svga, enabled, CLIPPLANEENABLE, fail ); + } if (queue.rs_count) { SVGA3dRenderState *rs; @@ -276,6 +281,7 @@ struct svga_tracked_state svga_hw_rss = (SVGA_NEW_BLEND | SVGA_NEW_BLEND_COLOR | + SVGA_NEW_CLIP | SVGA_NEW_DEPTH_STENCIL | SVGA_NEW_STENCIL_REF | SVGA_NEW_RAST |