mesa: remove FLUSH_CURRENT calls that have no effect

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
This commit is contained in:
Marek Olšák 2020-01-22 19:11:22 -05:00 committed by Marge Bot
parent c7c8fe1cc1
commit 27dada7ce9
5 changed files with 1 additions and 11 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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) {

View file

@ -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",

View file

@ -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);