From 738f4d81580e74733f618c57bc50b41a2d3b06bc Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 6 Jun 2021 14:51:19 -0400 Subject: [PATCH] mesa: also flush after compute dispatch when debug flag enabled This makes MESA_DEBUG=flush also flush after compute dispatches. Signed-off-by: Ilia Mirkin Acked-by: Emma Anholt Part-of: --- src/mesa/main/compute.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index bcf2aaa78f5..dc05cb37002 100644 --- a/src/mesa/main/compute.c +++ b/src/mesa/main/compute.c @@ -298,6 +298,9 @@ dispatch_compute(GLuint num_groups_x, GLuint num_groups_y, return; ctx->Driver.DispatchCompute(ctx, num_groups); + + if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) + _mesa_flush(ctx); } void GLAPIENTRY @@ -329,6 +332,9 @@ dispatch_compute_indirect(GLintptr indirect, bool no_error) return; ctx->Driver.DispatchComputeIndirect(ctx, indirect); + + if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) + _mesa_flush(ctx); } extern void GLAPIENTRY @@ -369,6 +375,9 @@ dispatch_compute_group_size(GLuint num_groups_x, GLuint num_groups_y, return; ctx->Driver.DispatchComputeGroupSize(ctx, num_groups, group_size); + + if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) + _mesa_flush(ctx); } void GLAPIENTRY