nv30: Emit blend color state using state objects
authorPatrice Mandin <pmandin@caramail.com>
Thu, 3 Jul 2008 19:11:07 +0000 (21:11 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Thu, 3 Jul 2008 19:11:07 +0000 (21:11 +0200)
src/gallium/drivers/nv30/nv30_context.h
src/gallium/drivers/nv30/nv30_state.c
src/gallium/drivers/nv30/nv30_state_emit.c

index 4a6c1d2f47ba200c57a6efe1fd996eb55fa23b03..57cc991cd7aecce0e9480cbc7ad4eee52a2e16a1 100644 (file)
@@ -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 */
index 3edfb0874dabbc6649e1cfd781f08d1f07b0855e..e67a701809af7aa26330748ee87b485e351cebe1 100644 (file)
@@ -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
index 9a3954594a751ccff9f495e16d6eb593e808319f..541ad0da3e876aea1f6481ebc954d989e1cf463a 100644 (file)
@@ -3,6 +3,7 @@
 
 static struct nv30_state_entry *render_states[] = {
        &nv30_state_framebuffer,
+       &nv30_state_blend_colour,
        NULL
 };