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/enable.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/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 5fc8bdac63c..573643b419b 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -425,6 +425,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) _mesa_flush_vertices_for_blend_adv(ctx, newEnabled, ctx->Color._AdvancedBlendMode); ctx->Color.BlendEnabled = newEnabled; + _mesa_update_allow_draw_out_of_order(ctx); } } break; @@ -499,6 +500,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, ctx->DriverFlags.NewDepth ? 0 : _NEW_DEPTH); ctx->NewDriverState |= ctx->DriverFlags.NewDepth; ctx->Depth.Test = state; + _mesa_update_allow_draw_out_of_order(ctx); break; case GL_DEBUG_OUTPUT: case GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB: @@ -604,6 +606,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, ctx->DriverFlags.NewLogicOp ? 0 : _NEW_COLOR); ctx->NewDriverState |= ctx->DriverFlags.NewLogicOp; ctx->Color.ColorLogicOpEnabled = state; + _mesa_update_allow_draw_out_of_order(ctx); break; case GL_MAP1_COLOR_4: if (ctx->API != API_OPENGL_COMPAT) @@ -840,6 +843,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) FLUSH_VERTICES(ctx, ctx->DriverFlags.NewStencil ? 0 : _NEW_STENCIL); ctx->NewDriverState |= ctx->DriverFlags.NewStencil; ctx->Stencil.Enabled = state; + _mesa_update_allow_draw_out_of_order(ctx); break; case GL_TEXTURE_1D: if (ctx->API != API_OPENGL_COMPAT) @@ -1349,6 +1353,7 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap, _mesa_flush_vertices_for_blend_adv(ctx, enabled, ctx->Color._AdvancedBlendMode); ctx->Color.BlendEnabled = enabled; + _mesa_update_allow_draw_out_of_order(ctx); } break; case GL_SCISSOR_TEST: |