/* With a little more work, llvmpipe will be able to turn this off and * do its own x/y clipping. * * Some hardware can turn off clipping altogether - in particular any * hardware with a TNL unit can do its own clipping, even if it is * relying on the draw module for some other reason. */ void draw_set_driver_clipping( struct draw_context *draw, boolean bypass_clip_xy, boolean bypass_clip_z ) { draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); draw->driver.bypass_clip_xy = bypass_clip_xy; draw->driver.bypass_clip_z = bypass_clip_z; update_clip_flags(draw); }
/** * Set the draw module's clipping state. */ void draw_set_clip_state( struct draw_context *draw, const struct pipe_clip_state *clip ) { draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); assert(clip->nr <= PIPE_MAX_CLIP_PLANES); memcpy(&draw->plane[6], clip->ucp, clip->nr * sizeof(clip->ucp[0])); draw->nr_planes = 6 + clip->nr; draw->depth_clamp = clip->depth_clamp; update_clip_flags(draw); }
/** * Register new primitive rasterization/rendering state. * This causes the drawing pipeline to be rebuilt. */ void draw_set_rasterizer_state( struct draw_context *draw, const struct pipe_rasterizer_state *raster, void *rast_handle ) { if (!draw->suspend_flushing) { draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); draw->rasterizer = raster; draw->rast_handle = rast_handle; update_clip_flags(draw); } }