Mesa (main): mesa: also flush after compute dispatch when debug flag enabled

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 9 18:32:26 UTC 2021


Module: Mesa
Branch: main
Commit: 738f4d81580e74733f618c57bc50b41a2d3b06bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=738f4d81580e74733f618c57bc50b41a2d3b06bc

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sun Jun  6 14:51:19 2021 -0400

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 <imirkin at alum.mit.edu>
Acked-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11205>

---

 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



More information about the mesa-commit mailing list