From 27dada7ce90315d47184c51879a3f67e99f2bab2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 22 Jan 2020 19:11:22 -0500 Subject: [PATCH] mesa: remove FLUSH_CURRENT calls that have no effect MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Mathias Fröhlich Part-of: --- src/mesa/main/clear.c | 5 ----- src/mesa/main/context.c | 2 -- src/mesa/main/externalobjects.c | 2 -- src/mesa/main/readpix.c | 1 - src/mesa/state_tracker/st_manager.c | 2 +- 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index c12983f8dcd..fda4df59528 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -144,7 +144,6 @@ static ALWAYS_INLINE void clear(struct gl_context *ctx, GLbitfield mask, bool no_error) { FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (!no_error) { if (mask & ~(GL_COLOR_BUFFER_BIT | @@ -344,7 +343,6 @@ clear_bufferiv(struct gl_context *ctx, GLenum buffer, GLint drawbuffer, const GLint *value, bool no_error) { FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (ctx->NewState) { _mesa_update_state( ctx ); @@ -464,7 +462,6 @@ clear_bufferuiv(struct gl_context *ctx, GLenum buffer, GLint drawbuffer, const GLuint *value, bool no_error) { FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (ctx->NewState) { _mesa_update_state( ctx ); @@ -553,7 +550,6 @@ clear_bufferfv(struct gl_context *ctx, GLenum buffer, GLint drawbuffer, const GLfloat *value, bool no_error) { FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (ctx->NewState) { _mesa_update_state( ctx ); @@ -671,7 +667,6 @@ clear_bufferfi(struct gl_context *ctx, GLenum buffer, GLint drawbuffer, GLbitfield mask = 0; FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (!no_error) { if (buffer != GL_DEPTH_STENCIL) { diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index db34c941329..a88f3c2722c 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1874,7 +1874,6 @@ void _mesa_flush(struct gl_context *ctx) { FLUSH_VERTICES( ctx, 0 ); - FLUSH_CURRENT( ctx, 0 ); if (ctx->Driver.Flush) { ctx->Driver.Flush(ctx); } @@ -1895,7 +1894,6 @@ _mesa_Finish(void) ASSERT_OUTSIDE_BEGIN_END(ctx); FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (ctx->Driver.Finish) { ctx->Driver.Finish(ctx); diff --git a/src/mesa/main/externalobjects.c b/src/mesa/main/externalobjects.c index 56bf817a6e6..987aca2bd28 100644 --- a/src/mesa/main/externalobjects.c +++ b/src/mesa/main/externalobjects.c @@ -734,7 +734,6 @@ _mesa_WaitSemaphoreEXT(GLuint semaphore, return; FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); bufObjs = malloc(sizeof(struct gl_buffer_object *) * numBufferBarriers); if (!bufObjs) { @@ -795,7 +794,6 @@ _mesa_SignalSemaphoreEXT(GLuint semaphore, return; FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); bufObjs = malloc(sizeof(struct gl_buffer_object *) * numBufferBarriers); if (!bufObjs) { diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 556c860d393..6b3685dd82b 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -1035,7 +1035,6 @@ read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GET_CURRENT_CONTEXT(ctx); FLUSH_VERTICES(ctx, 0); - FLUSH_CURRENT(ctx, 0); if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glReadPixels(%d, %d, %s, %s, %p)\n", diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index c3688c4818e..f3954039feb 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -662,7 +662,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags, pipe_flags |= PIPE_FLUSH_FENCE_FD; FLUSH_VERTICES(st->ctx, 0); - FLUSH_CURRENT(st->ctx, 0); + /* Notify the caller that we're ready to flush */ if (before_flush_cb) before_flush_cb(args); -- 2.30.2