#include "sp_context.h"
#include "sp_state.h"
-#include "sp_draw.h"
-
void softpipe_set_blend_state( struct pipe_context *pipe,
softpipe->blend = *blend;
- softpipe->dirty |= G_NEW_BLEND;
+ softpipe->dirty |= SP_NEW_BLEND;
+}
+
+
+void softpipe_set_blend_color( struct pipe_context *pipe,
+ const struct pipe_blend_color *blend_color )
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ softpipe->blend_color = *blend_color;
+
+ softpipe->dirty |= SP_NEW_BLEND;
+}
+
+
+/** XXX move someday? Or consolidate all these simple state setters
+ * into one file.
+ */
+void
+softpipe_set_depth_test_state(struct pipe_context *pipe,
+ const struct pipe_depth_state *depth)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ softpipe->depth_test = *depth;
+
+ softpipe->dirty |= SP_NEW_DEPTH_TEST;
+}
+
+void
+softpipe_set_alpha_test_state(struct pipe_context *pipe,
+ const struct pipe_alpha_test_state *alpha)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ softpipe->alpha_test = *alpha;
+
+ softpipe->dirty |= SP_NEW_ALPHA_TEST;
+}
+
+void
+softpipe_set_stencil_state(struct pipe_context *pipe,
+ const struct pipe_stencil_state *stencil)
+{
+ struct softpipe_context *softpipe = softpipe_context(pipe);
+
+ softpipe->stencil = *stencil;
+
+ softpipe->dirty |= SP_NEW_STENCIL;
}