summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-11-06 08:54:01 +0000
committerKeith Whitwell <[email protected]>2009-11-06 08:54:01 +0000
commit0e80e4ea7576733ede13f156a1dce644b1e6df89 (patch)
tree01729a1339c381c32135b78d638e8ef269e3ed97 /src/gallium/drivers
parent018e2250b860df75485d1c7741dfa010c39ae6f1 (diff)
i965g: make sure blend color packet header is initialized
We will emit this packet at startup (dirty == ~0), even if we haven't had the state tracker call into brw_set_blend_color() yet. This way is a little more efficient also.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i965/brw_pipe_blend.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/i965/brw_pipe_blend.c b/src/gallium/drivers/i965/brw_pipe_blend.c
index 872151222d5..b759a910b63 100644
--- a/src/gallium/drivers/i965/brw_pipe_blend.c
+++ b/src/gallium/drivers/i965/brw_pipe_blend.c
@@ -177,9 +177,6 @@ static void brw_set_blend_color(struct pipe_context *pipe,
struct brw_context *brw = brw_context(pipe);
struct brw_blend_constant_color *bcc = &brw->curr.bcc;
- memset(bcc, 0, sizeof(*bcc));
- bcc->header.opcode = CMD_BLEND_CONSTANT_COLOR;
- bcc->header.length = sizeof(*bcc)/4-2;
bcc->blend_constant_color[0] = blend_color->color[0];
bcc->blend_constant_color[1] = blend_color->color[1];
bcc->blend_constant_color[2] = blend_color->color[2];
@@ -195,6 +192,15 @@ void brw_pipe_blend_init( struct brw_context *brw )
brw->base.create_blend_state = brw_create_blend_state;
brw->base.bind_blend_state = brw_bind_blend_state;
brw->base.delete_blend_state = brw_delete_blend_state;
+
+ {
+ struct brw_blend_constant_color *bcc = &brw->curr.bcc;
+
+ memset(bcc, 0, sizeof(*bcc));
+ bcc->header.opcode = CMD_BLEND_CONSTANT_COLOR;
+ bcc->header.length = sizeof(*bcc)/4-2;
+ }
+
}
void brw_pipe_blend_cleanup( struct brw_context *brw )