mesa: set CurrentServerDispatch too when glBegin/End
authorQiang Yu <yuq825@gmail.com>
Sat, 14 May 2022 03:34:41 +0000 (11:34 +0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 6 Jun 2022 18:23:49 +0000 (18:23 +0000)
commit8373248cf01f8e631f11346f97b864a3a37ead9d
tree6b0fa447c6e3fcde79e389c18179e3b1f5e4ff0b
parent90b34c91840aac88e439ab2654f4dfd8f3b27da0
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>
src/mesa/vbo/vbo_exec_api.c