llvmpipe: make shader-related functions static, clean-up initializations
This commit is contained in:
@@ -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 );
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user