softpipe->pipe.priv = priv;
/* state setters */
- softpipe->pipe.create_blend_state = softpipe_create_blend_state;
- softpipe->pipe.bind_blend_state = softpipe_bind_blend_state;
- softpipe->pipe.delete_blend_state = softpipe_delete_blend_state;
+ 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_geometry_sampler_states = softpipe_bind_geometry_sampler_states;
softpipe->pipe.delete_sampler_state = softpipe_delete_sampler_state;
- softpipe->pipe.create_depth_stencil_alpha_state = softpipe_create_depth_stencil_state;
- softpipe->pipe.bind_depth_stencil_alpha_state = softpipe_bind_depth_stencil_state;
- softpipe->pipe.delete_depth_stencil_alpha_state = softpipe_delete_depth_stencil_state;
-
softpipe->pipe.create_rasterizer_state = softpipe_create_rasterizer_state;
softpipe->pipe.bind_rasterizer_state = softpipe_bind_rasterizer_state;
softpipe->pipe.delete_rasterizer_state = softpipe_delete_rasterizer_state;
softpipe->pipe.bind_stream_output_state = softpipe_bind_stream_output_state;
softpipe->pipe.delete_stream_output_state = softpipe_delete_stream_output_state;
- softpipe->pipe.set_blend_color = softpipe_set_blend_color;
- softpipe->pipe.set_stencil_ref = softpipe_set_stencil_ref;
softpipe->pipe.set_clip_state = softpipe_set_clip_state;
- softpipe->pipe.set_sample_mask = softpipe_set_sample_mask;
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;
};
-void *
-softpipe_create_blend_state(struct pipe_context *,
- const struct pipe_blend_state *);
-void softpipe_bind_blend_state(struct pipe_context *,
- void *);
-void softpipe_delete_blend_state(struct pipe_context *,
- void *);
+void
+softpipe_init_blend_funcs(struct pipe_context *pipe);
void *
softpipe_create_sampler_state(struct pipe_context *,
void **samplers);
void softpipe_delete_sampler_state(struct pipe_context *, void *);
-void *
-softpipe_create_depth_stencil_state(struct pipe_context *,
- const struct pipe_depth_stencil_alpha_state *);
-void softpipe_bind_depth_stencil_state(struct pipe_context *, void *);
-void softpipe_delete_depth_stencil_state(struct pipe_context *, void *);
-
void *
softpipe_create_rasterizer_state(struct pipe_context *,
const struct pipe_rasterizer_state *);
void softpipe_set_framebuffer_state( struct pipe_context *,
const struct pipe_framebuffer_state * );
-void softpipe_set_blend_color( struct pipe_context *pipe,
- const struct pipe_blend_color *blend_color );
-
-void softpipe_set_stencil_ref( struct pipe_context *pipe,
- const struct pipe_stencil_ref *stencil_ref );
-
void softpipe_set_clip_state( struct pipe_context *,
const struct pipe_clip_state * );
-void softpipe_set_sample_mask( struct pipe_context *,
- unsigned sample_mask );
-
void
softpipe_init_shader_funcs(struct pipe_context *pipe);
#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);
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);
}
-/** 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)
{
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);
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;
+}