summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-07-27 13:13:55 -0700
committerEric Anholt <[email protected]>2018-07-29 19:25:39 -0700
commit0a3f653180996e4ca44586e6974ded9ba6bc8ecc (patch)
tree2c7d02eb7581df699e2587c8d44aa3b9b6f936ce /src/gallium
parent34cefa7fe01aadf977a9b7a0164f1cb3d5db4fa4 (diff)
v3d: Block bin on render when doing vertex texturing.
The kernel by default serializes the BCL on previous BCLs submitted on this FD, but not RCLs. For now this fix is conservative and blocks on last RCL if any vertex texturing is done, which fails to get bin/render overlap if there was an intermediate job that doesn't draw to the BCL's buffer. I've dropped a perf_debug() in here to note that as a potential future improvement. Fixes intermittent failures in KHR-GLES3.copy_tex_image_conversions.required.*
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/v3d/v3dx_draw.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index 9c533a46255..af079bd0d5a 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -425,6 +425,20 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
struct v3d_job *job = v3d_get_job_for_fbo(v3d);
+ /* If vertex texturing depends on the output of rendering, we need to
+ * ensure that that rendering is complete before we run a coordinate
+ * shader that depends on it.
+ *
+ * Given that doing that is unusual, for now we just block the binner
+ * on the last submitted render, rather than tracking the last
+ * rendering to each texture's BO.
+ */
+ if (v3d->verttex.num_textures) {
+ perf_debug("Blocking binner on last render "
+ "due to vertex texturing.\n");
+ job->submit.in_sync_bcl = v3d->out_sync;
+ }
+
/* Get space to emit our draw call into the BCL, using a branch to
* jump to a new BO if necessary.
*/