summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-08-25 16:19:56 +0200
committerNicolai Hähnle <[email protected]>2017-09-04 13:50:54 +0200
commit097cfe9fdebd74b728a8baf48715224d360ddb6d (patch)
tree6bad1a029ae0466f38f7bc7c78e4211983ee9a70 /src/gallium/drivers/radeon
parent55df3d228679b5e57a1b13fbd9124977f548a66a (diff)
radeonsi: fix ARB_transform_feedback_overflow_query on <= VI
The result written by the shader workaround needs to be written back, or the CP may read stale data. Fixes: 78476cfe071a ("radeonsi: enable ARB_transform_feedback_overflow_query") Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h5
-rw-r--r--src/gallium/drivers/radeon/r600_query.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index d76d4a13841..9805088bd8f 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -454,6 +454,11 @@ struct r600_common_screen {
*/
unsigned cp_to_L2;
+ /* Context flags to set so that all writes from earlier jobs
+ * that end in L2 are seen by CP.
+ */
+ unsigned L2_to_cp;
+
/* Context flags to set so that all writes from earlier
* compute jobs are seen by L2 clients.
*/
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index eaff39c830d..f937612bc1f 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -1833,6 +1833,10 @@ static void r600_render_condition(struct pipe_context *ctx,
ctx, query, true, PIPE_QUERY_TYPE_U64, 0,
&rquery->workaround_buf->b.b, rquery->workaround_offset);
+ /* Settings this in the render cond atom is too late,
+ * so set it here. */
+ rctx->flags |= rctx->screen->barrier_flags.L2_to_cp;
+
atom->num_dw = 5;
rctx->render_cond_force_off = old_force_off;