glthread: work around GL_INVALID_OPERATION with OpenGL ES 1.x draws

GLES1 only has (Multi)Draw{Array,Elements}, but glthread converts them
to the more complicated versions and then calls them through the dispatch,
which generated GL_INVALID_OPERATION.

Luckily, we can export them with the Internal prefix, so they are unlikely
to be used by apps by accident.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18223>
This commit is contained in:
Marek Olšák 2022-08-23 16:59:18 -04:00 committed by Marge Bot
parent 907bd11ca8
commit 7c1f8b63ad

View file

@ -12863,6 +12863,50 @@
</category>
<category name="GL_MESA_internal_functions">
<!-- These functions exist because glthread converts all draws to these
and then calls them through the dispatch table, so this is a workaround
for the GL_INVALID_OPERATION errors with OpenGL ES 1.x. -->
<function name="InternalDrawArraysInstancedBaseInstance" es1="1.0"
alias="DrawArraysInstancedBaseInstance">
<param name="mode" type="GLenum"/>
<param name="first" type="GLint"/>
<param name="count" type="GLsizei"/>
<param name="instancecount" type="GLsizei"/>
<param name="baseinstance" type="GLuint"/>
</function>
<function name="InternalDrawElementsInstancedBaseVertexBaseInstance" es1="1.0"
alias="DrawElementsInstancedBaseVertexBaseInstance">
<param name="mode" type="GLenum"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
<param name="indices" type="const GLvoid *"/>
<param name="instancecount" type="GLsizei"/>
<param name="basevertex" type="GLint"/>
<param name="baseinstance" type="GLuint"/>
</function>
<function name="InternalDrawRangeElementsBaseVertex" es1="1.0"
alias="DrawRangeElementsBaseVertex">
<param name="mode" type="GLenum"/>
<param name="start" type="GLuint"/>
<param name="end" type="GLuint"/>
<param name="count" type="GLsizei"/>
<param name="type" type="GLenum"/>
<param name="indices" type="const GLvoid *"/>
<param name="basevertex" type="GLint"/>
</function>
<function name="InternalMultiDrawElementsBaseVertex" es1="1.0"
alias="MultiDrawElementsBaseVertex">
<param name="mode" type="GLenum"/>
<param name="count" type="const GLsizei *"/>
<param name="type" type="GLenum"/>
<param name="indices" type="const GLvoid * const *"/>
<param name="primcount" type="GLsizei"/>
<param name="basevertex" type="const GLint *"/>
</function>
<!-- Internal function for glthread to implement BufferSubData as a GPU copy. -->
<function name="InternalBufferSubDataCopyMESA" es2="2.0">
<param name="srcBuffer" type="GLintptr"/> <!-- "struct gl_buffer_object *" really -->