diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_context.c | 11 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state.h | 19 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 20 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_vs.c | 16 |
4 files changed, 37 insertions, 29 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index a5d8c9167cb..8159daaae68 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -104,15 +104,6 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe->pipe.bind_rasterizer_state = llvmpipe_bind_rasterizer_state; llvmpipe->pipe.delete_rasterizer_state = llvmpipe_delete_rasterizer_state; - llvmpipe->pipe.create_fs_state = llvmpipe_create_fs_state; - llvmpipe->pipe.bind_fs_state = llvmpipe_bind_fs_state; - llvmpipe->pipe.delete_fs_state = llvmpipe_delete_fs_state; - - llvmpipe->pipe.create_vs_state = llvmpipe_create_vs_state; - llvmpipe->pipe.bind_vs_state = llvmpipe_bind_vs_state; - llvmpipe->pipe.delete_vs_state = llvmpipe_delete_vs_state; - - llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer; llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state; llvmpipe->pipe.clear = llvmpipe_clear; @@ -124,6 +115,8 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe_init_sampler_funcs(llvmpipe); llvmpipe_init_query_funcs( llvmpipe ); llvmpipe_init_vertex_funcs(llvmpipe); + llvmpipe_init_fs_funcs(llvmpipe); + llvmpipe_init_vs_funcs(llvmpipe); llvmpipe_init_context_resource_funcs( &llvmpipe->pipe ); /* diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index ce7ea41dca1..4493c238a2d 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -131,19 +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_constant_buffer(struct pipe_context *, - uint shader, uint index, - struct pipe_resource *buf); - -void *llvmpipe_create_fs_state(struct pipe_context *, - const struct pipe_shader_state *); -void llvmpipe_bind_fs_state(struct pipe_context *, void *); -void llvmpipe_delete_fs_state(struct pipe_context *, void *); -void *llvmpipe_create_vs_state(struct pipe_context *, - const struct pipe_shader_state *); -void llvmpipe_bind_vs_state(struct pipe_context *, void *); -void llvmpipe_delete_vs_state(struct pipe_context *, void *); - void llvmpipe_update_fs(struct llvmpipe_context *lp); void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe ); @@ -171,5 +158,11 @@ llvmpipe_init_draw_funcs(struct llvmpipe_context *llvmpipe); void llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe); +void +llvmpipe_init_fs_funcs(struct llvmpipe_context *llvmpipe); + +void +llvmpipe_init_vs_funcs(struct llvmpipe_context *llvmpipe); + #endif diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index adb26f7508a..965777b6411 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -950,7 +950,7 @@ generate_variant(struct llvmpipe_context *lp, } -void * +static void * llvmpipe_create_fs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { @@ -975,7 +975,7 @@ llvmpipe_create_fs_state(struct pipe_context *pipe, } -void +static void llvmpipe_bind_fs_state(struct pipe_context *pipe, void *fs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -991,7 +991,7 @@ llvmpipe_bind_fs_state(struct pipe_context *pipe, void *fs) } -void +static void llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -1034,7 +1034,7 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs) -void +static void llvmpipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, struct pipe_resource *constants) @@ -1182,3 +1182,15 @@ llvmpipe_update_fs(struct llvmpipe_context *lp) variant->jit_function[RAST_EDGE_TEST], opaque); } + + + +void +llvmpipe_init_fs_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_fs_state = llvmpipe_create_fs_state; + llvmpipe->pipe.bind_fs_state = llvmpipe_bind_fs_state; + llvmpipe->pipe.delete_fs_state = llvmpipe_delete_fs_state; + + llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_vs.c b/src/gallium/drivers/llvmpipe/lp_state_vs.c index 118feccc8e9..f2d88089906 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_vs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_vs.c @@ -38,7 +38,7 @@ #include "lp_state.h" -void * +static void * llvmpipe_create_vs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { @@ -76,7 +76,7 @@ fail: } -void +static void llvmpipe_bind_vs_state(struct pipe_context *pipe, void *_vs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -94,7 +94,7 @@ llvmpipe_bind_vs_state(struct pipe_context *pipe, void *_vs) } -void +static void llvmpipe_delete_vs_state(struct pipe_context *pipe, void *vs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -106,3 +106,13 @@ llvmpipe_delete_vs_state(struct pipe_context *pipe, void *vs) FREE( (void *)state->shader.tokens ); FREE( state ); } + + + +void +llvmpipe_init_vs_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_vs_state = llvmpipe_create_vs_state; + llvmpipe->pipe.bind_vs_state = llvmpipe_bind_vs_state; + llvmpipe->pipe.delete_vs_state = llvmpipe_delete_vs_state; +} |