Mesa (main): v3dv: only clear BCL barrier state if we don't have pending graphics barriers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 31 06:30:22 UTC 2022
Module: Mesa
Branch: main
Commit: eccc0e6a0b57c0ae018c94868ffdfd8b8b5428c6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eccc0e6a0b57c0ae018c94868ffdfd8b8b5428c6
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon May 30 08:04:04 2022 +0200
v3dv: only clear BCL barrier state if we don't have pending graphics barriers
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16743>
---
src/broadcom/vulkan/v3dv_cmd_buffer.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c
index e761289eaaa..feea0b6b82b 100644
--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c
+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c
@@ -589,14 +589,13 @@ v3dv_cmd_buffer_finish_job(struct v3dv_cmd_buffer *cmd_buffer)
if (!job)
return;
- /* If a job is serialized it means it consumed a barrier. If the barrier
- * had the BCL sync flag and the job actually required to apply it, then
- * it would have done so and cleared it, but if the flag was not applied
- * because the job's binning shaders didn't require it, we want to clear
- * that state before we start a new job or record a new pipeline barrier
- * (we always finish the current job before processing a pipeline barrier).
- */
- if (job->serialize) {
+ /* Always clear BCL state after a job has been finished if we don't have
+ * a pending graphics barrier that could consume it (BCL barriers only
+ * apply to graphics jobs). This can happen if the application recorded
+ * a barrier involving geometry stages but none of the draw calls in the
+ * job actually required a binning sync.
+ */
+ if (!(cmd_buffer->state.barrier.active_mask & V3DV_BARRIER_GRAPHICS_BIT)) {
cmd_buffer->state.barrier.bcl_barrier_buffer_access = 0;
cmd_buffer->state.barrier.bcl_barrier_image_access = 0;
}
More information about the mesa-commit
mailing list