summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2008-07-03 22:18:38 +0200
committerPatrice Mandin <[email protected]>2008-07-03 22:18:38 +0200
commitf1d24c1d27255e4ff5ba451e6d58558f9ccdc801 (patch)
tree63b936bcc2a6943b546be66c24a2d75126ed0aa1 /src/gallium/drivers/nv30
parentc66f376e271427799f777c39bc9221df7c961f77 (diff)
nv30: Emit scissor state using state objects
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h1
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c5
-rw-r--r--src/gallium/drivers/nv30/nv30_state_emit.c1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index b8a26712a8b..2a48903e32a 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -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;
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 8121e62fb92..f2413a3372c 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -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
diff --git a/src/gallium/drivers/nv30/nv30_state_emit.c b/src/gallium/drivers/nv30/nv30_state_emit.c
index 83bb3408a5a..f45a340b5d6 100644
--- a/src/gallium/drivers/nv30/nv30_state_emit.c
+++ b/src/gallium/drivers/nv30/nv30_state_emit.c
@@ -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,