summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2008-07-03 21:11:07 +0200
committerPatrice Mandin <[email protected]>2008-07-03 21:11:07 +0200
commit52cf7a6c1ccc987859834b640a5ec0a62f84134a (patch)
tree78f662137171d27ebc45d3e63104e32efb95b8b3 /src/gallium/drivers/nv30
parent36488ed052a18f7eafef1d1c5c18b20ad508b2b7 (diff)
nv30: Emit blend color state using state objects
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h1
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c7
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c1
3 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index 4a6c1d2f47b..57cc991cd7a 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -212,6 +212,7 @@ extern void nv30_fragtex_bind(struct nv30_context *);
extern boolean nv30_state_validate(struct nv30_context *nv30);
extern void nv30_emit_hw_state(struct nv30_context *nv30);
extern void nv30_state_tex_update(struct nv30_context *nv30);
+extern struct nv30_state_entry nv30_state_blend_colour;
extern struct nv30_state_entry nv30_state_framebuffer;
/* nv30_vbo.c */
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 3edfb0874da..e67a701809a 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -531,11 +531,8 @@ nv30_set_blend_color(struct pipe_context *pipe,
{
struct nv30_context *nv30 = nv30_context(pipe);
- BEGIN_RING(rankine, NV34TCL_BLEND_COLOR, 1);
- OUT_RING ((float_to_ubyte(bcol->color[3]) << 24) |
- (float_to_ubyte(bcol->color[0]) << 16) |
- (float_to_ubyte(bcol->color[1]) << 8) |
- (float_to_ubyte(bcol->color[2]) << 0));
+ nv30->blend_colour = *bcol;
+ nv30->dirty |= NV30_NEW_BCOL;
}
static void
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index 9a3954594a7..541ad0da3e8 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -3,6 +3,7 @@
static struct nv30_state_entry *render_states[] = {
&nv30_state_framebuffer,
+ &nv30_state_blend_colour,
NULL
};