summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_blend.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-10-09 13:41:33 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-10-09 13:41:33 +0100
commitd904ed88c1d957f662497343de7dc3e9fa743e47 (patch)
tree1825d9f1a7210c8ec6a9c1627880bffeb6015e4b /src/gallium/drivers/llvmpipe/lp_state_blend.c
parent00ffef383c62ca6cd0d5687539dc45fecfbefeec (diff)
llvmpipe: Pass state to setup.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_blend.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_blend.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c
index 3f03bd0057..48afe5f524 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c
@@ -67,17 +67,16 @@ void llvmpipe_set_blend_color( struct pipe_context *pipe,
const struct pipe_blend_color *blend_color )
{
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
- unsigned i, j;
+
+ if(!blend_color)
+ return;
+
+ if(memcmp(&llvmpipe->blend_color, blend_color, sizeof *blend_color) == 0)
+ return;
memcpy(&llvmpipe->blend_color, blend_color, sizeof *blend_color);
- if(!llvmpipe->jit_context.blend_color)
- llvmpipe->jit_context.blend_color = align_malloc(4 * 16, 16);
- for (i = 0; i < 4; ++i) {
- uint8_t c = float_to_ubyte(blend_color->color[i]);
- for (j = 0; j < 16; ++j)
- llvmpipe->jit_context.blend_color[i*4 + j] = c;
- }
+ llvmpipe->dirty |= LP_NEW_BLEND_COLOR;
}
@@ -101,9 +100,6 @@ llvmpipe_bind_depth_stencil_state(struct pipe_context *pipe,
llvmpipe->depth_stencil = (const struct pipe_depth_stencil_alpha_state *)depth_stencil;
- if(llvmpipe->depth_stencil)
- llvmpipe->jit_context.alpha_ref_value = llvmpipe->depth_stencil->alpha.ref_value;
-
llvmpipe->dirty |= LP_NEW_DEPTH_STENCIL_ALPHA;
}