summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-21 12:06:17 -0600
committerBrian Paul <brianp@vmware.com>2011-09-22 08:26:40 -0600
commit4465efc3bf8d755a9afb7a4bb5382e2f5bf113e1 (patch)
tree4856a584350aec274e60838251195983b2dee6f4 /src/gallium/auxiliary/draw/draw_context.c
parenta5c0fb51c6b1d5f7e6ea8f089da921719ad1b6c4 (diff)
draw: add support for guard-band clipping
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c6
1 files changed, 5 insertions, 1 deletions
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);
}