mesa: precompute all valid primitive types at context creation
authorMarek Olšák <marek.olsak@amd.com>
Sat, 16 Jan 2021 12:58:17 +0000 (07:58 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 15 Feb 2021 19:29:09 +0000 (19:29 +0000)
commitf6913fb366ae52523a1236025575c3d6ccecba1c
treec4e9a4a9723c2b275d52121c0ae782712d92dc4a
parentfc7842952342fd1281526940fe999fe6363f3b59
mesa: precompute all valid primitive types at context creation

New variable gl_context::MaxValidPrimMask is set at context creation
and determines the valid primitive types for that context.

The Max prefix indicates that the mask doesn't mask out primitives
disallowed by current states and shaders.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
src/mesa/main/draw_validate.c
src/mesa/main/draw_validate.h
src/mesa/main/mtypes.h
src/mesa/main/version.c