diff options
author | Marek Olšák <[email protected]> | 2020-01-30 18:56:22 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-03-26 03:08:34 -0400 |
commit | 8c053e5faded7b57fdd117ed86d572e0104c06bf (patch) | |
tree | 915f58e02c3ec2a0a267854655a9c9b289717204 /src/mesa/main/depth.c | |
parent | 0c6a667d9394c7bf0f5adef4320fd912653950af (diff) |
mesa: allow out-of-order drawing to optimize immediate mode if it's safe
This increases performance by 11-13% in Viewperf11/Catia - first scene.
Set allow_draw_out_of_order=true to enable this.
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
Diffstat (limited to 'src/mesa/main/depth.c')
-rw-r--r-- | src/mesa/main/depth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c index 930f5e816f9..27bd4958253 100644 --- a/src/mesa/main/depth.c +++ b/src/mesa/main/depth.c @@ -30,6 +30,7 @@ #include "enums.h" #include "macros.h" #include "mtypes.h" +#include "state.h" /**********************************************************************/ @@ -83,6 +84,7 @@ depth_func(struct gl_context *ctx, GLenum func, bool no_error) FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH); ctx->NewDriverState |= ctx->DriverFlags.NewDepth; ctx->Depth.Func = func; + _mesa_update_allow_draw_out_of_order(ctx); if (ctx->Driver.DepthFunc) ctx->Driver.DepthFunc(ctx, func); @@ -128,6 +130,7 @@ _mesa_DepthMask( GLboolean flag ) FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH); ctx->NewDriverState |= ctx->DriverFlags.NewDepth; ctx->Depth.Mask = flag; + _mesa_update_allow_draw_out_of_order(ctx); if (ctx->Driver.DepthMask) ctx->Driver.DepthMask( ctx, flag ); |