From: Brian Paul Date: Wed, 28 Apr 2010 20:09:32 +0000 (-0600) Subject: llvmpipe: make clip-related functions static, clean-up initializations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2176cad7dc478db3a329521a13d5537a8d99aedc;p=mesa.git llvmpipe: make clip-related functions static, clean-up initializations --- diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 73d2ac0bf61..a5d8c9167cb 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -112,18 +112,14 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe->pipe.bind_vs_state = llvmpipe_bind_vs_state; llvmpipe->pipe.delete_vs_state = llvmpipe_delete_vs_state; - llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state; llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer; llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state; - llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple; - llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state; - - llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state; llvmpipe->pipe.clear = llvmpipe_clear; llvmpipe->pipe.flush = llvmpipe_flush; llvmpipe_init_blend_funcs(llvmpipe); + llvmpipe_init_clip_funcs(llvmpipe); llvmpipe_init_draw_funcs(llvmpipe); llvmpipe_init_sampler_funcs(llvmpipe); llvmpipe_init_query_funcs( llvmpipe ); diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index 23d71c1213c..ce7ea41dca1 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -131,9 +131,6 @@ void llvmpipe_delete_rasterizer_state(struct pipe_context *, void *); void llvmpipe_set_framebuffer_state( struct pipe_context *, const struct pipe_framebuffer_state * ); -void llvmpipe_set_clip_state( struct pipe_context *, - const struct pipe_clip_state * ); - void llvmpipe_set_constant_buffer(struct pipe_context *, uint shader, uint index, struct pipe_resource *buf); @@ -147,15 +144,6 @@ void *llvmpipe_create_vs_state(struct pipe_context *, void llvmpipe_bind_vs_state(struct pipe_context *, void *); void llvmpipe_delete_vs_state(struct pipe_context *, void *); -void llvmpipe_set_polygon_stipple( struct pipe_context *, - const struct pipe_poly_stipple * ); - -void llvmpipe_set_scissor_state( struct pipe_context *, - const struct pipe_scissor_state * ); - -void llvmpipe_set_viewport_state( struct pipe_context *, - const struct pipe_viewport_state * ); - void llvmpipe_update_fs(struct llvmpipe_context *lp); void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe ); @@ -180,4 +168,8 @@ llvmpipe_init_vertex_funcs(struct llvmpipe_context *llvmpipe); void llvmpipe_init_draw_funcs(struct llvmpipe_context *llvmpipe); +void +llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe); + + #endif diff --git a/src/gallium/drivers/llvmpipe/lp_state_clip.c b/src/gallium/drivers/llvmpipe/lp_state_clip.c index df68f27acc9..32ae079cc15 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_clip.c +++ b/src/gallium/drivers/llvmpipe/lp_state_clip.c @@ -32,8 +32,9 @@ #include "draw/draw_context.h" -void llvmpipe_set_clip_state( struct pipe_context *pipe, - const struct pipe_clip_state *clip ) +static void +llvmpipe_set_clip_state(struct pipe_context *pipe, + const struct pipe_clip_state *clip) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -42,8 +43,9 @@ void llvmpipe_set_clip_state( struct pipe_context *pipe, } -void llvmpipe_set_viewport_state( struct pipe_context *pipe, - const struct pipe_viewport_state *viewport ) +static void +llvmpipe_set_viewport_state(struct pipe_context *pipe, + const struct pipe_viewport_state *viewport) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -55,8 +57,9 @@ void llvmpipe_set_viewport_state( struct pipe_context *pipe, } -void llvmpipe_set_scissor_state( struct pipe_context *pipe, - const struct pipe_scissor_state *scissor ) +static void +llvmpipe_set_scissor_state(struct pipe_context *pipe, + const struct pipe_scissor_state *scissor) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -67,8 +70,9 @@ void llvmpipe_set_scissor_state( struct pipe_context *pipe, } -void llvmpipe_set_polygon_stipple( struct pipe_context *pipe, - const struct pipe_poly_stipple *stipple ) +static void +llvmpipe_set_polygon_stipple(struct pipe_context *pipe, + const struct pipe_poly_stipple *stipple) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -77,3 +81,14 @@ void llvmpipe_set_polygon_stipple( struct pipe_context *pipe, llvmpipe->poly_stipple = *stipple; /* struct copy */ llvmpipe->dirty |= LP_NEW_STIPPLE; } + + + +void +llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state; + llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple; + llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state; + llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state; +}