summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-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;
}