summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_state_blend.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-09-25 13:58:41 -0600
committerBrian Paul <brianp@vmware.com>2010-09-25 14:25:40 -0600
commit2739692a6edaa0233bac188855457236897a34d5 (patch)
tree93758550dc9c923911c5096c31985ee552d84dd7 /src/gallium/drivers/softpipe/sp_state_blend.c
parent279b368dc34d8829bfd23b83af7f78e10e303f54 (diff)
softpipe: make blend/stencil/depth functions static
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_state_blend.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_state_blend.c59
1 files changed, 41 insertions, 18 deletions
diff --git a/src/gallium/drivers/softpipe/sp_state_blend.c b/src/gallium/drivers/softpipe/sp_state_blend.c
index 2a203f44e5..12863824b8 100644
--- a/src/gallium/drivers/softpipe/sp_state_blend.c
+++ b/src/gallium/drivers/softpipe/sp_state_blend.c
@@ -34,15 +34,17 @@
#include "sp_state.h"
-void *
+static void *
softpipe_create_blend_state(struct pipe_context *pipe,
const struct pipe_blend_state *blend)
{
return mem_dup(blend, sizeof(*blend));
}
-void softpipe_bind_blend_state( struct pipe_context *pipe,
- void *blend )
+
+static void
+softpipe_bind_blend_state(struct pipe_context *pipe,
+ void *blend)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -53,15 +55,18 @@ void softpipe_bind_blend_state( struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_BLEND;
}
-void softpipe_delete_blend_state(struct pipe_context *pipe,
- void *blend)
+
+static void
+softpipe_delete_blend_state(struct pipe_context *pipe,
+ void *blend)
{
FREE( blend );
}
-void softpipe_set_blend_color( struct pipe_context *pipe,
- const struct pipe_blend_color *blend_color )
+static void
+softpipe_set_blend_color(struct pipe_context *pipe,
+ const struct pipe_blend_color *blend_color)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -73,19 +78,15 @@ void softpipe_set_blend_color( struct pipe_context *pipe,
}
-/** XXX move someday? Or consolidate all these simple state setters
- * into one file.
- */
-
-
-void *
+static void *
softpipe_create_depth_stencil_state(struct pipe_context *pipe,
const struct pipe_depth_stencil_alpha_state *depth_stencil)
{
return mem_dup(depth_stencil, sizeof(*depth_stencil));
}
-void
+
+static void
softpipe_bind_depth_stencil_state(struct pipe_context *pipe,
void *depth_stencil)
{
@@ -96,14 +97,17 @@ softpipe_bind_depth_stencil_state(struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_DEPTH_STENCIL_ALPHA;
}
-void
+
+static void
softpipe_delete_depth_stencil_state(struct pipe_context *pipe, void *depth)
{
FREE( depth );
}
-void softpipe_set_stencil_ref( struct pipe_context *pipe,
- const struct pipe_stencil_ref *stencil_ref )
+
+static void
+softpipe_set_stencil_ref(struct pipe_context *pipe,
+ const struct pipe_stencil_ref *stencil_ref)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -112,9 +116,28 @@ void softpipe_set_stencil_ref( struct pipe_context *pipe,
softpipe->dirty |= SP_NEW_DEPTH_STENCIL_ALPHA;
}
-void
+
+static void
softpipe_set_sample_mask(struct pipe_context *pipe,
unsigned sample_mask)
{
}
+
+void
+softpipe_init_blend_funcs(struct pipe_context *pipe)
+{
+ pipe->create_blend_state = softpipe_create_blend_state;
+ pipe->bind_blend_state = softpipe_bind_blend_state;
+ pipe->delete_blend_state = softpipe_delete_blend_state;
+
+ pipe->set_blend_color = softpipe_set_blend_color;
+
+ pipe->create_depth_stencil_alpha_state = softpipe_create_depth_stencil_state;
+ pipe->bind_depth_stencil_alpha_state = softpipe_bind_depth_stencil_state;
+ pipe->delete_depth_stencil_alpha_state = softpipe_delete_depth_stencil_state;
+
+ pipe->set_stencil_ref = softpipe_set_stencil_ref;
+
+ pipe->set_sample_mask = softpipe_set_sample_mask;
+}