From c7c8fe1cc1a972e59885cc14778dbf5a520f48dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 22 Jan 2020 19:09:23 -0500 Subject: [PATCH] mesa: fix incorrect uses of FLUSH_CURRENT MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit FLUSH_CURRENT is used to copy attributes from the vbo module to Current.Attrib. It flushes vertices too, but that's a side effect, not the intent. Reviewed-by: Mathias Fröhlich Part-of: --- src/mesa/main/compute.c | 6 +++--- src/mesa/main/context.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/compute.c b/src/mesa/main/compute.c index cbd166b1095..84ae7562c30 100644 --- a/src/mesa/main/compute.c +++ b/src/mesa/main/compute.c @@ -250,7 +250,7 @@ dispatch_compute(GLuint num_groups_x, GLuint num_groups_y, GET_CURRENT_CONTEXT(ctx); const GLuint num_groups[3] = { num_groups_x, num_groups_y, num_groups_z }; - FLUSH_CURRENT(ctx, 0); + FLUSH_VERTICES(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glDispatchCompute(%d, %d, %d)\n", @@ -285,7 +285,7 @@ dispatch_compute_indirect(GLintptr indirect, bool no_error) { GET_CURRENT_CONTEXT(ctx); - FLUSH_CURRENT(ctx, 0); + FLUSH_VERTICES(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glDispatchComputeIndirect(%ld)\n", (long) indirect); @@ -318,7 +318,7 @@ dispatch_compute_group_size(GLuint num_groups_x, GLuint num_groups_y, const GLuint num_groups[3] = { num_groups_x, num_groups_y, num_groups_z }; const GLuint group_size[3] = { group_size_x, group_size_y, group_size_z }; - FLUSH_CURRENT(ctx, 0); + FLUSH_VERTICES(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index a5bf99a266d..db34c941329 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -181,7 +181,7 @@ _mesa_notifySwapBuffers(struct gl_context *ctx) { if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS) _mesa_debug(ctx, "SwapBuffers\n"); - FLUSH_CURRENT( ctx, 0 ); + FLUSH_VERTICES(ctx, 0); if (ctx->Driver.Flush) { ctx->Driver.Flush(ctx); } -- 2.30.2