summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2019-07-04 12:22:40 +0200
committerIago Toral Quiroga <[email protected]>2019-07-12 09:16:38 +0200
commit7c1d70891150c9960b1bb2464b53a95f4645037c (patch)
tree57015afdcfc6e4affb1700444bd7a3c38ebd7a83 /src/gallium/drivers/v3d
parent47d7c80dc788a7354a706d3fe0862a1c21ecb566 (diff)
v3d: acquire scoreboard lock before first tlb read
Until now we have always been emitting our scoreboard locks on the last thread switch to improve parallelism. We did this by emitting our last thread switch right before our tlb writes at the very end of the program, where we know that we are outside control flow. Unfortunately, this strategy is not valid when we have tlb color reads too, as these will happen before this point in the program and can happen inside control flow. To fix this we always emit a thread switch before the first tlb load and if we see additional thread switches after that point, we change the strategy to lock on the first thread switch. v2: change the solution so it is expected to work in more scenarios (Eric). Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r--src/gallium/drivers/v3d/v3dx_draw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index 0d23ac6bb2d..744d0c9c211 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -373,6 +373,8 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
v3d->prog.fs->prog_data.fs->uses_center_w;
#if V3D_VERSION >= 40
+ shader.do_scoreboard_wait_on_first_thread_switch =
+ v3d->prog.fs->prog_data.fs->lock_scoreboard_on_first_thrsw;
shader.disable_implicit_point_line_varyings =
!v3d->prog.fs->prog_data.fs->uses_implicit_point_line_varyings;
#endif