summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2019-06-19 10:28:12 +0200
committerIago Toral Quiroga <[email protected]>2019-06-21 08:06:13 +0200
commit4d8f82946b22396c90ca102a44de7bdebd8838d6 (patch)
tree446019cab208623fe280f260dc259ca0bf759860 /src/gallium
parenteb44dcc219fe1b224a548341c51337e810942455 (diff)
v3d: flush jobs writing to vertex buffers used in the current draw call
This can happen when any of our vertex buffers was written by a previous transform feedback draw. Fixes the following piglit tests: spec/ext_transform_feedback/position-render-bufferbase spec/ext_transform_feedback/position-render-bufferbase-discard spec/ext_transform_feedback/position-render-bufferoffset spec/ext_transform_feedback/position-render-bufferoffset-discard spec/ext_transform_feedback/position-render-bufferrange spec/ext_transform_feedback/position-render-bufferrange-discard Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/v3d/v3dx_draw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index 98f630766ca..fe07231d474 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -177,6 +177,15 @@ v3d_predraw_check_stage_inputs(struct pipe_context *pctx,
v3d_flush_jobs_writing_resource(v3d, view->base.resource);
}
+
+ /* Flush writes to our vertex buffers (i.e. from transform feedback) */
+ if (s == PIPE_SHADER_VERTEX) {
+ foreach_bit(i, v3d->vertexbuf.enabled_mask) {
+ struct pipe_vertex_buffer *vb = &v3d->vertexbuf.vb[i];
+
+ v3d_flush_jobs_writing_resource(v3d, vb->buffer.resource);
+ }
+ }
}
static void