summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c13
-rw-r--r--src/gallium/drivers/softpipe/sp_state.h36
-rw-r--r--src/gallium/drivers/softpipe/sp_state_sampler.c41
3 files changed, 31 insertions, 59 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index e8daa81d119..e7b6fc445d9 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -229,12 +229,7 @@ softpipe_create_context( struct pipe_screen *screen,
/* state setters */
softpipe_init_blend_funcs(&softpipe->pipe);
-
- softpipe->pipe.create_sampler_state = softpipe_create_sampler_state;
- softpipe->pipe.bind_fragment_sampler_states = softpipe_bind_sampler_states;
- softpipe->pipe.bind_vertex_sampler_states = softpipe_bind_vertex_sampler_states;
- softpipe->pipe.bind_geometry_sampler_states = softpipe_bind_geometry_sampler_states;
- softpipe->pipe.delete_sampler_state = softpipe_delete_sampler_state;
+ softpipe_init_sampler_funcs(&softpipe->pipe);
softpipe->pipe.create_rasterizer_state = softpipe_create_rasterizer_state;
softpipe->pipe.bind_rasterizer_state = softpipe_bind_rasterizer_state;
@@ -254,11 +249,7 @@ softpipe_create_context( struct pipe_screen *screen,
softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state;
softpipe->pipe.set_polygon_stipple = softpipe_set_polygon_stipple;
softpipe->pipe.set_scissor_state = softpipe_set_scissor_state;
- softpipe->pipe.set_fragment_sampler_views = softpipe_set_sampler_views;
- softpipe->pipe.set_vertex_sampler_views = softpipe_set_vertex_sampler_views;
- softpipe->pipe.set_geometry_sampler_views = softpipe_set_geometry_sampler_views;
- softpipe->pipe.create_sampler_view = softpipe_create_sampler_view;
- softpipe->pipe.sampler_view_destroy = softpipe_sampler_view_destroy;
+
softpipe->pipe.set_viewport_state = softpipe_set_viewport_state;
softpipe->pipe.set_stream_output_buffers = softpipe_set_stream_output_buffers;
softpipe->pipe.set_vertex_buffers = softpipe_set_vertex_buffers;
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index 1326f49fe99..8d4efb1c661 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -118,19 +118,9 @@ struct sp_so_state {
void
softpipe_init_blend_funcs(struct pipe_context *pipe);
-void *
-softpipe_create_sampler_state(struct pipe_context *,
- const struct pipe_sampler_state *);
-void softpipe_bind_sampler_states(struct pipe_context *, unsigned, void **);
-void
-softpipe_bind_vertex_sampler_states(struct pipe_context *,
- unsigned num_samplers,
- void **samplers);
void
-softpipe_bind_geometry_sampler_states(struct pipe_context *,
- unsigned num_samplers,
- void **samplers);
-void softpipe_delete_sampler_state(struct pipe_context *, void *);
+softpipe_init_sampler_funcs(struct pipe_context *pipe);
+
void *
softpipe_create_rasterizer_state(struct pipe_context *,
@@ -159,28 +149,6 @@ void softpipe_set_polygon_stipple( struct pipe_context *,
void softpipe_set_scissor_state( struct pipe_context *,
const struct pipe_scissor_state * );
-void softpipe_set_sampler_views( struct pipe_context *,
- unsigned num,
- struct pipe_sampler_view ** );
-
-void
-softpipe_set_vertex_sampler_views(struct pipe_context *,
- unsigned num,
- struct pipe_sampler_view **);
-
-void
-softpipe_set_geometry_sampler_views(struct pipe_context *,
- unsigned num,
- struct pipe_sampler_view **);
-
-struct pipe_sampler_view *
-softpipe_create_sampler_view(struct pipe_context *pipe,
- struct pipe_resource *texture,
- const struct pipe_sampler_view *templ);
-
-void
-softpipe_sampler_view_destroy(struct pipe_context *pipe,
- struct pipe_sampler_view *view);
void softpipe_set_viewport_state( struct pipe_context *,
const struct pipe_viewport_state * );
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index 1be5136f0ea..aedb5bb19b3 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -54,7 +54,7 @@ static struct sp_sampler *sp_sampler( struct pipe_sampler_state *sampler )
}
-void *
+static void *
softpipe_create_sampler_state(struct pipe_context *pipe,
const struct pipe_sampler_state *sampler)
{
@@ -67,7 +67,7 @@ softpipe_create_sampler_state(struct pipe_context *pipe,
}
-void
+static void
softpipe_bind_sampler_states(struct pipe_context *pipe,
unsigned num, void **sampler)
{
@@ -94,7 +94,7 @@ softpipe_bind_sampler_states(struct pipe_context *pipe,
}
-void
+static void
softpipe_bind_vertex_sampler_states(struct pipe_context *pipe,
unsigned num_samplers,
void **samplers)
@@ -125,7 +125,7 @@ softpipe_bind_vertex_sampler_states(struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_SAMPLER;
}
-void
+static void
softpipe_bind_geometry_sampler_states(struct pipe_context *pipe,
unsigned num_samplers,
void **samplers)
@@ -153,7 +153,7 @@ softpipe_bind_geometry_sampler_states(struct pipe_context *pipe,
}
-struct pipe_sampler_view *
+static struct pipe_sampler_view *
softpipe_create_sampler_view(struct pipe_context *pipe,
struct pipe_resource *resource,
const struct pipe_sampler_view *templ)
@@ -172,7 +172,7 @@ softpipe_create_sampler_view(struct pipe_context *pipe,
}
-void
+static void
softpipe_sampler_view_destroy(struct pipe_context *pipe,
struct pipe_sampler_view *view)
{
@@ -181,7 +181,7 @@ softpipe_sampler_view_destroy(struct pipe_context *pipe,
}
-void
+static void
softpipe_set_sampler_views(struct pipe_context *pipe,
unsigned num,
struct pipe_sampler_view **views)
@@ -211,7 +211,7 @@ softpipe_set_sampler_views(struct pipe_context *pipe,
}
-void
+static void
softpipe_set_vertex_sampler_views(struct pipe_context *pipe,
unsigned num,
struct pipe_sampler_view **views)
@@ -245,7 +245,8 @@ softpipe_set_vertex_sampler_views(struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_TEXTURE;
}
-void
+
+static void
softpipe_set_geometry_sampler_views(struct pipe_context *pipe,
unsigned num,
struct pipe_sampler_view **views)
@@ -327,8 +328,6 @@ get_sampler_varient( unsigned unit,
}
-
-
void
softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
{
@@ -403,9 +402,7 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
}
}
-
-
-void
+static void
softpipe_delete_sampler_state(struct pipe_context *pipe,
void *sampler)
{
@@ -421,4 +418,20 @@ softpipe_delete_sampler_state(struct pipe_context *pipe,
}
+void
+softpipe_init_sampler_funcs(struct pipe_context *pipe)
+{
+ pipe->create_sampler_state = softpipe_create_sampler_state;
+ pipe->bind_fragment_sampler_states = softpipe_bind_sampler_states;
+ pipe->bind_vertex_sampler_states = softpipe_bind_vertex_sampler_states;
+ pipe->bind_geometry_sampler_states = softpipe_bind_geometry_sampler_states;
+ pipe->delete_sampler_state = softpipe_delete_sampler_state;
+
+ pipe->set_fragment_sampler_views = softpipe_set_sampler_views;
+ pipe->set_vertex_sampler_views = softpipe_set_vertex_sampler_views;
+ pipe->set_geometry_sampler_views = softpipe_set_geometry_sampler_views;
+
+ pipe->create_sampler_view = softpipe_create_sampler_view;
+ pipe->sampler_view_destroy = softpipe_sampler_view_destroy;
+}