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

index ed7b0759ad4fa7915ad4571a061433aff2a3bd50..0ad1dc6f912a4a7a80c813f6fa5cb360c0543082 100644 (file)
@@ -215,6 +215,7 @@ extern struct nv30_state_entry nv30_state_stipple;
 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;
+extern struct nv30_state_entry nv30_state_viewport;
 extern struct nv30_state_entry nv30_state_framebuffer;
 
 /* nv30_vbo.c */
index 7109deae552abeb925749f6afdaa38dc51ac697b..e65c4b215d4121f013e134e1bc8160579458214b 100644 (file)
@@ -617,15 +617,9 @@ nv30_set_viewport_state(struct pipe_context *pipe,
 {
        struct nv30_context *nv30 = nv30_context(pipe);
 
-       BEGIN_RING(rankine, NV34TCL_VIEWPORT_TRANSLATE_X, 8);
-       OUT_RINGf (vpt->translate[0]);
-       OUT_RINGf (vpt->translate[1]);
-       OUT_RINGf (vpt->translate[2]);
-       OUT_RINGf (vpt->translate[3]);
-       OUT_RINGf (vpt->scale[0]);
-       OUT_RINGf (vpt->scale[1]);
-       OUT_RINGf (vpt->scale[2]);
-       OUT_RINGf (vpt->scale[3]);
+       nv30->viewport = *vpt;
+       nv30->dirty |= NV30_NEW_VIEWPORT;
+       /*nv30->draw_dirty |= NV30_NEW_VIEWPORT;*/
 }
 
 static void
index 4f9079184d48f475efdf10287f8dad2369d63b00..cb7f1a7c310dd069ccaacdbfe03573186e7e0d73 100644 (file)
@@ -9,6 +9,7 @@ static struct nv30_state_entry *render_states[] = {
        &nv30_state_blend,
        &nv30_state_blend_colour,
        &nv30_state_zsa,
+       &nv30_state_viewport,
        NULL
 };