diff options
author | Marek Olšák <marek.olsak@amd.com> | 2021-06-12 12:20:06 -0400 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-06-17 02:24:22 +0000 |
commit | b7dc72380a474aeb3ff7179536727391116a3448 (patch) | |
tree | 0e91bb010ddc350e14890a6ba4920921b8d3f11c /src/mesa/main | |
parent | ee6929a77986f6933d6e9717f8f5ada379248db4 (diff) |
mesa: add gallium flush_flags param into ctx->Driver.Flush
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11341>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 8 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 2 | ||||
-rw-r--r-- | src/mesa/main/performance_query.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index aedb50eafe9..8f3f9fc287a 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -184,7 +184,7 @@ _mesa_notifySwapBuffers(struct gl_context *ctx) _mesa_debug(ctx, "SwapBuffers\n"); FLUSH_VERTICES(ctx, 0, 0); if (ctx->Driver.Flush) { - ctx->Driver.Flush(ctx); + ctx->Driver.Flush(ctx, 0); } } @@ -1634,7 +1634,9 @@ _mesa_make_current( struct gl_context *newCtx, curCtx != newCtx && curCtx->Const.ContextReleaseBehavior == GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH) { - _mesa_flush(curCtx); + FLUSH_VERTICES(curCtx, 0, 0); + if (curCtx->Driver.Flush) + curCtx->Driver.Flush(curCtx, 0); } /* Call this periodically to detect when the user has begun using @@ -1791,7 +1793,7 @@ _mesa_flush(struct gl_context *ctx) { FLUSH_VERTICES(ctx, 0, 0); if (ctx->Driver.Flush) { - ctx->Driver.Flush(ctx); + ctx->Driver.Flush(ctx, 0); } } diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 8db6848be95..da6d4a5e231 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -125,7 +125,7 @@ struct dd_function_table { /** * This is called whenever glFlush() is called. */ - void (*Flush)( struct gl_context *ctx ); + void (*Flush)(struct gl_context *ctx, unsigned gallium_flush_flags); /** * Clear the color/depth/stencil/accum buffer(s). diff --git a/src/mesa/main/performance_query.c b/src/mesa/main/performance_query.c index b3febdd57af..6698d508e16 100644 --- a/src/mesa/main/performance_query.c +++ b/src/mesa/main/performance_query.c @@ -641,7 +641,7 @@ _mesa_GetPerfQueryDataINTEL(GLuint queryHandle, GLuint flags, if (!obj->Ready) { if (flags == GL_PERFQUERY_FLUSH_INTEL) { - ctx->Driver.Flush(ctx); + ctx->Driver.Flush(ctx, 0); } else if (flags == GL_PERFQUERY_WAIT_INTEL) { ctx->Driver.WaitPerfQuery(ctx, obj); obj->Ready = true; |