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 4a6c1d2..57cc991 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 3edfb08..e67a701 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 9a39545..541ad0d 100644 (file)
@@ -3,6 +3,7 @@
 
 static struct nv30_state_entry *render_states[] = {
        &nv30_state_framebuffer,
+       &nv30_state_blend_colour,
        NULL
 };