summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_state_validate.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-03-03 14:55:54 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-03-10 16:29:59 +1000
commitc926ed0e76bdbf842170f9396856e9cedb6e718f (patch)
treead98df2e74f2ea3bdaee69b3ef9568905107158f /src/gallium/drivers/nv50/nv50_state_validate.c
parente1d015fe222a3f6f942426c39fb1a17188df8d57 (diff)
nv50: always emit dummy relocs for all still-referenced buffers
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_state_validate.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_state_validate.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
index b01a3d87de..12e427d38b 100644
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
@@ -405,10 +405,10 @@ nv50_state_flush_notify(struct nouveau_channel *chan)
}
boolean
-nv50_state_validate(struct nv50_context *nv50, unsigned nr_dwords)
+nv50_state_validate(struct nv50_context *nv50, unsigned wait_dwords)
{
struct nouveau_channel *chan = nv50->screen->base.channel;
- unsigned nr_relocs = 0;
+ unsigned nr_relocs = 128, nr_dwords = wait_dwords + 128;
int ret, i;
for (i = 0; i < validate_list_len; i++) {
@@ -460,6 +460,12 @@ nv50_state_validate(struct nv50_context *nv50, unsigned nr_dwords)
so_emit(chan, nv50->state.hw[i]);
}
+ /* Yes, really, we need to do this. If a buffer that is referenced
+ * on the hardware isn't part of changed state above, without doing
+ * this the kernel is given no clue that the buffer is being used
+ * still. This can cause all sorts of fun issues.
+ */
+ nv50_state_flush_notify(chan);
return TRUE;
}