glthread: use GLenum16 for enums, but clamp it to 0xffff to get correct errors
authorMarek Olšák <marek.olsak@amd.com>
Sun, 21 Aug 2022 19:49:53 +0000 (15:49 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Sep 2022 22:58:16 +0000 (22:58 +0000)
commitcd30f044ae558caad7a547892edf1f6c9a2bfc7f
treec530897f43592d338fb9ed64990f7aa8d8679d2d
parentb7ba29cbf67c1db93e203a82a71bc264447463cd
glthread: use GLenum16 for enums, but clamp it to 0xffff to get correct errors

0xffff is an invalid enum.

This was initially implemented without clamping and then reverted because
of the concern that we would randomly get correct enums and not report
errors if we just dropped the high bits.

This packs calls better in glthread_batch.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18828>
src/mapi/glapi/gen/gl_marshal.py
src/mesa/main/glthread.h
src/mesa/main/glthread_draw.c
src/mesa/main/glthread_marshal.h