summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-07-03 22:42:30 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-07-03 22:42:30 +0200
commit568b477b9c118e5ace831b8ecf1811da1c0961cd (patch)
treef3ddb971f72ad30332766fc0bdc730e0ac888ca0 /src/gallium/drivers
parente7e231a5116aed9f1ca685a297032a3e3e6a2433 (diff)
nv30: Emit viewport state using state objects
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h1
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c12
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c1
3 files changed, 5 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index ed7b0759ad..0ad1dc6f91 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -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 */
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 7109deae55..e65c4b215d 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -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
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index 4f9079184d..cb7f1a7c31 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -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
};