include surface.offset in address calculations
[mesa.git] / src / mesa / pipe / softpipe / sp_state_blend.c
index 1fd7a44105b952197ee74026cf5a607ec0874f44..8bc22b0efc04c8443cf97560c93e091d184d71ef 100644 (file)
@@ -31,8 +31,6 @@
 
 #include "sp_context.h"
 #include "sp_state.h"
-#include "sp_draw.h"
-
 
 
 void softpipe_set_blend_state( struct pipe_context *pipe,
@@ -42,6 +40,54 @@ 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;
 }