diff options
author | Mathias Fröhlich <[email protected]> | 2014-10-25 10:17:04 +0200 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2014-10-30 07:52:00 +0100 |
commit | 2c2ada67206326911a36368015b9501a023bbac8 (patch) | |
tree | b14341643a611d297f1c94f51a72fd81ef540911 /src/mesa/state_tracker | |
parent | 600066af93fe60abbfff5be82527b529e1e44916 (diff) |
mesa/gallium: Signal _NEW_TRANSFORM from glClipControl.
This removes the need for the gallium rasterizer state
to listen to viewport changes.
Thanks to Marek Olšák <[email protected]>.
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Mathias Froehlich <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 50209788bcd..606f19a18ef 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -72,7 +72,7 @@ static void update_raster_state( struct st_context *st ) { raster->front_ccw = (ctx->Polygon.FrontFace == GL_CCW); - /* _NEW_VIEWPORT */ + /* _NEW_TRANSFORM */ if (ctx->Transform.ClipOrigin == GL_UPPER_LEFT) { raster->front_ccw ^= 1; } @@ -246,13 +246,10 @@ static void update_raster_state( struct st_context *st ) raster->half_pixel_center = 1; if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) raster->bottom_edge_rule = 1; - /* _NEW_VIEWPORT */ + /* _NEW_TRANSFORM */ if (ctx->Transform.ClipOrigin == GL_UPPER_LEFT) raster->bottom_edge_rule ^= 1; - /* _NEW_VIEWPORT */ - raster->clip_halfz = (ctx->Transform.ClipDepthMode == GL_ZERO_TO_ONE); - /* ST_NEW_RASTERIZER */ raster->rasterizer_discard = ctx->RasterDiscard; @@ -267,6 +264,7 @@ static void update_raster_state( struct st_context *st ) /* _NEW_TRANSFORM */ raster->depth_clip = !ctx->Transform.DepthClamp; raster->clip_plane_enable = ctx->Transform.ClipPlanesEnabled; + raster->clip_halfz = (ctx->Transform.ClipDepthMode == GL_ZERO_TO_ONE); cso_set_rasterizer(st->cso_context, raster); } @@ -283,8 +281,7 @@ const struct st_tracked_state st_update_rasterizer = { _NEW_PROGRAM | _NEW_SCISSOR | _NEW_FRAG_CLAMP | - _NEW_TRANSFORM | - _NEW_VIEWPORT), /* mesa state dependencies*/ + _NEW_TRANSFORM), /* mesa state dependencies*/ (ST_NEW_VERTEX_PROGRAM | ST_NEW_RASTERIZER), /* state tracker dependencies */ }, |