From 4465efc3bf8d755a9afb7a4bb5382e2f5bf113e1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 21 Sep 2011 12:06:17 -0600 Subject: draw: add support for guard-band clipping --- src/gallium/auxiliary/draw/draw_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gallium/auxiliary/draw/draw_context.c') diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index f8196bb476f..b8f8623ee5d 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -220,6 +220,8 @@ void draw_set_mrd(struct draw_context *draw, double mrd) static void update_clip_flags( struct draw_context *draw ) { draw->clip_xy = !draw->driver.bypass_clip_xy; + draw->guard_band_xy = (!draw->driver.bypass_clip_xy && + draw->driver.guard_band_xy); draw->clip_z = (!draw->driver.bypass_clip_z && !draw->depth_clamp); draw->clip_user = (draw->nr_planes > 6); @@ -251,12 +253,14 @@ void draw_set_rasterizer_state( struct draw_context *draw, */ void draw_set_driver_clipping( struct draw_context *draw, boolean bypass_clip_xy, - boolean bypass_clip_z ) + boolean bypass_clip_z, + boolean guard_band_xy) { draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); draw->driver.bypass_clip_xy = bypass_clip_xy; draw->driver.bypass_clip_z = bypass_clip_z; + draw->driver.guard_band_xy = guard_band_xy; update_clip_flags(draw); } -- cgit v1.2.3