diff options
author | Qiang Yu <yuq825@gmail.com> | 2022-05-14 11:34:41 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-06 18:23:49 +0000 |
commit | 8373248cf01f8e631f11346f97b864a3a37ead9d (patch) | |
tree | 6b0fa447c6e3fcde79e389c18179e3b1f5e4ff0b | |
parent | 90b34c91840aac88e439ab2654f4dfd8f3b27da0 (diff) |
mesa: set CurrentServerDispatch too when glBegin/End
When glthread not enabled, CurrentClientDispatch and CurrentServerDispatch
should be same. This does not cause problems before because OutsideBeginEnd
and BeginEnd have same BeginEnd entries, so when
CurrentServerDispatch==OutsideBeginEnd
CurrentClientDispatch==BeginEnd
will call into same BeginEnd _mesa_* functions.
But we'll add another dispatch table to replace BeginEnd when HW GL_SELECT
mode, so this needs to be fixed. Otherwise some function like _mesa_Rectf
which always call with CurrentServerDispatch will go into wrong entries.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15765>
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 83c1a5eea37..806cd6c60f8 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -850,7 +850,7 @@ _mesa_Begin(GLenum mode) if (ctx->GLThread.enabled) { ctx->CurrentServerDispatch = ctx->Exec; } else if (ctx->CurrentClientDispatch == ctx->OutsideBeginEnd) { - ctx->CurrentClientDispatch = ctx->Exec; + ctx->CurrentClientDispatch = ctx->CurrentServerDispatch = ctx->Exec; _glapi_set_dispatch(ctx->CurrentClientDispatch); } else { assert(ctx->CurrentClientDispatch == ctx->Save); @@ -909,7 +909,7 @@ _mesa_End(void) if (ctx->GLThread.enabled) { ctx->CurrentServerDispatch = ctx->Exec; } else if (ctx->CurrentClientDispatch == ctx->BeginEnd) { - ctx->CurrentClientDispatch = ctx->Exec; + ctx->CurrentClientDispatch = ctx->CurrentServerDispatch = ctx->Exec; _glapi_set_dispatch(ctx->CurrentClientDispatch); } |