summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_state_blend.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_state_blend.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_blend.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_blend.c b/src/mesa/pipe/softpipe/sp_state_blend.c
index b2e85d86cc..57f2df7923 100644
--- a/src/mesa/pipe/softpipe/sp_state_blend.c
+++ b/src/mesa/pipe/softpipe/sp_state_blend.c
@@ -30,17 +30,32 @@
#include "sp_context.h"
#include "sp_state.h"
+const struct pipe_blend_state *
+softpipe_create_blend_state(struct pipe_context *pipe,
+ const struct pipe_blend_state *blend)
+{
+ struct pipe_blend_state *new_blend = malloc(sizeof(struct pipe_blend_state));
+ memcpy(new_blend, blend, sizeof(struct pipe_blend_state));
+
+ return new_blend;
+}
-void softpipe_set_blend_state( struct pipe_context *pipe,
+void softpipe_bind_blend_state( struct pipe_context *pipe,
const struct pipe_blend_state *blend )
{
struct softpipe_context *softpipe = softpipe_context(pipe);
- softpipe->blend = *blend;
+ softpipe->blend = blend;
softpipe->dirty |= SP_NEW_BLEND;
}
+void softpipe_delete_blend_state(struct pipe_context *pipe,
+ const struct pipe_blend_state *blend )
+{
+ free(blend);
+}
+
void softpipe_set_blend_color( struct pipe_context *pipe,
const struct pipe_blend_color *blend_color )