aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2010-03-04 10:55:50 +1000
committerBen Skeggs <[email protected]>2010-03-10 16:29:59 +1000
commit885d2eceb1517fa11be902ef826de3ba8620d085 (patch)
tree574aa3241e99f7a24ae0b281b87a646437931b1b /src/gallium
parent0e6af1fcaaca6be94a1a0aba287a569299e27295 (diff)
nv50: move magic 0x142c stuff to after state emission
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c9
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c10
2 files changed, 8 insertions, 11 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index 12e427d38b3..0f276053727 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -408,7 +408,8 @@ boolean
nv50_state_validate(struct nv50_context *nv50, unsigned wait_dwords)
{
struct nouveau_channel *chan = nv50->screen->base.channel;
- unsigned nr_relocs = 128, nr_dwords = wait_dwords + 128;
+ struct nouveau_grobj *tesla = nv50->screen->tesla;
+ unsigned nr_relocs = 128, nr_dwords = wait_dwords + 128 + 4;
int ret, i;
for (i = 0; i < validate_list_len; i++) {
@@ -466,6 +467,12 @@ nv50_state_validate(struct nv50_context *nv50, unsigned wait_dwords)
* still. This can cause all sorts of fun issues.
*/
nv50_state_flush_notify(chan);
+
+ /* No idea.. */
+ BEGIN_RING(chan, tesla, 0x142c, 1);
+ OUT_RING (chan, 0);
+ BEGIN_RING(chan, tesla, 0x142c, 1);
+ OUT_RING (chan, 0);
return TRUE;
}
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index 215dfb74fc2..c099afe212b 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -485,11 +485,6 @@ nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start,
return;
chan->flush_notify = nv50_state_flush_notify;
- BEGIN_RING(chan, tesla, 0x142c, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, tesla, 0x142c, 1);
- OUT_RING (chan, 0);
-
BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BEGIN, 1);
OUT_RING (chan, nv50_prim(mode));
@@ -692,11 +687,6 @@ nv50_draw_elements(struct pipe_context *pipe,
return;
chan->flush_notify = nv50_state_flush_notify;
- BEGIN_RING(chan, tesla, 0x142c, 1);
- OUT_RING (chan, 0);
- BEGIN_RING(chan, tesla, 0x142c, 1);
- OUT_RING (chan, 0);
-
BEGIN_RING(chan, tesla, NV50TCL_VERTEX_BEGIN, 1);
OUT_RING (chan, nv50_prim(mode));