diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-07-03 17:19:30 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-07-03 17:19:30 -0600 |
commit | 284efcfc27aaeb447e0898ae3342e9fee20c584a (patch) | |
tree | 1609853cf29787ed45d129b17e2549a2e3501d93 /src/mesa/pipe | |
parent | d378a2c0b87dfc0bee0e8310312fec566148cb63 (diff) |
hook in state tracking for blend color
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/p_context.h | 3 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_context.c | 1 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_state.h | 3 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_state_blend.c | 11 |
4 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h index b87c42844c..e4115226e7 100644 --- a/src/mesa/pipe/p_context.h +++ b/src/mesa/pipe/p_context.h @@ -66,6 +66,9 @@ struct pipe_context { void (*set_blend_state)( struct pipe_context *, const struct pipe_blend_state * ); + void (*set_blend_color)( struct pipe_context *, + const struct pipe_blend_color * ); + void (*set_clip_state)( struct pipe_context *, const struct pipe_clip_state * ); diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 5bd652f3a3..6bd1d9f16e 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -67,6 +67,7 @@ struct pipe_context *softpipe_create( void ) softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; softpipe->pipe.set_alpha_test_state = softpipe_set_alpha_test_state; softpipe->pipe.set_blend_state = softpipe_set_blend_state; + softpipe->pipe.set_blend_color = softpipe_set_blend_color; softpipe->pipe.set_clip_state = softpipe_set_clip_state; softpipe->pipe.set_clear_color_state = softpipe_set_clear_color_state; softpipe->pipe.set_depth_state = softpipe_set_depth_test_state; diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h index 60c24885e4..38a212b79a 100644 --- a/src/mesa/pipe/softpipe/sp_state.h +++ b/src/mesa/pipe/softpipe/sp_state.h @@ -44,6 +44,9 @@ void softpipe_set_alpha_test_state( struct pipe_context *, void softpipe_set_blend_state( struct pipe_context *, const struct pipe_blend_state * ); +void softpipe_set_blend_color( struct pipe_context *pipe, + const struct pipe_blend_color *blend_color ); + void softpipe_set_clear_color_state( struct pipe_context *, const struct pipe_clear_color_state * ); diff --git a/src/mesa/pipe/softpipe/sp_state_blend.c b/src/mesa/pipe/softpipe/sp_state_blend.c index c364d8a319..6ca42e8a01 100644 --- a/src/mesa/pipe/softpipe/sp_state_blend.c +++ b/src/mesa/pipe/softpipe/sp_state_blend.c @@ -46,6 +46,17 @@ void softpipe_set_blend_state( struct pipe_context *pipe, } +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 |= G_NEW_BLEND; +} + + /** XXX move someday? Or consolidate all these simple state setters * into one file. */ |