glthread: don't bind/unbind uploaded indexbuf, pass it to glDraw directly
authorMarek Olšák <marek.olsak@amd.com>
Sun, 18 Dec 2022 22:45:01 +0000 (17:45 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 18 Feb 2023 14:31:41 +0000 (09:31 -0500)
commita078374b101f4cccf5495fc45352601e85d1ef78
tree1bdcf2e4b56651c50be90e4bd85f51ba5706c786
parent5c0c0dc5cd012e6f719e74b31266b85f4678714b
glthread: don't bind/unbind uploaded indexbuf, pass it to glDraw directly

DrawElementsUserBuf is changed to mean the same thing as
glDrawElementsInstancedBaseVertexBaseInstance, but "gl_buffer_object *
index_buffer" is passed via a parameter instead of using the bound
GL_ELEMENT_ARRAY_BUFFER.

This skips binding and unbinding the index buffer around every draw
where glthread uploads indices.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20624>
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/draw.c
src/mesa/main/glthread_draw.c