nv30: Emit scissor state using state objects
authorPatrice Mandin <pmandin@caramail.com>
Thu, 3 Jul 2008 20:18:38 +0000 (22:18 +0200)
committerPatrice Mandin <pmandin@caramail.com>
Thu, 3 Jul 2008 20:18:38 +0000 (22:18 +0200)
src/gallium/drivers/nv30/nv30_context.h
src/gallium/drivers/nv30/nv30_state.c
src/gallium/drivers/nv30/nv30_state_emit.c

index b8a26712a8b184558fe144f813020c64918c80a7..2a48903e32a7c470a9fda1bee1321928b9c348cf 100644 (file)
@@ -211,6 +211,7 @@ 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_rasterizer;
+extern struct nv30_state_entry nv30_state_scissor;
 extern struct nv30_state_entry nv30_state_blend;
 extern struct nv30_state_entry nv30_state_blend_colour;
 extern struct nv30_state_entry nv30_state_zsa;
index 8121e62fb920ec0051fa3992d0082e54aa2a84ac..f2413a3372c5f9fd08bd5ccdf0eb5909444092b9 100644 (file)
@@ -607,9 +607,8 @@ nv30_set_scissor_state(struct pipe_context *pipe,
 {
        struct nv30_context *nv30 = nv30_context(pipe);
 
-       BEGIN_RING(rankine, NV34TCL_SCISSOR_HORIZ, 2);
-       OUT_RING  (((s->maxx - s->minx) << 16) | s->minx);
-       OUT_RING  (((s->maxy - s->miny) << 16) | s->miny);
+       nv30->scissor = *s;
+       nv30->dirty |= NV30_NEW_SCISSOR;
 }
 
 static void
index 83bb3408a5ae9e05a79bca71c061e75a222d6a85..f45a340b5d6ffff69d774ea9ad44a9e7903a5333 100644 (file)
@@ -4,6 +4,7 @@
 static struct nv30_state_entry *render_states[] = {
        &nv30_state_framebuffer,
        &nv30_state_rasterizer,
+       &nv30_state_scissor,
        &nv30_state_blend,
        &nv30_state_blend_colour,
        &nv30_state_zsa,