2 * Mesa 3-D graphics library
4 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
27 #include "api_validate.h"
28 #include "bufferobj.h"
34 #include "transformfeedback.h"
39 * \return number of bytes in array [count] of type.
42 index_bytes(GLenum type
, GLsizei count
)
44 if (type
== GL_UNSIGNED_INT
) {
45 return count
* sizeof(GLuint
);
47 else if (type
== GL_UNSIGNED_BYTE
) {
48 return count
* sizeof(GLubyte
);
51 ASSERT(type
== GL_UNSIGNED_SHORT
);
52 return count
* sizeof(GLushort
);
58 * Check if OK to draw arrays/elements.
61 check_valid_to_render(struct gl_context
*ctx
, const char *function
)
63 if (!_mesa_valid_to_render(ctx
, function
)) {
69 /* For ES2, we can draw if we have a vertex program/shader). */
70 if (!ctx
->VertexProgram
._Current
)
75 /* For OpenGL ES, only draw if we have vertex positions
77 if (!ctx
->Array
.VAO
->VertexAttrib
[VERT_ATTRIB_POS
].Enabled
)
82 /* Section 10.4 (Drawing Commands Using Vertex Arrays) of the OpenGL 4.5
83 * Core Profile spec says:
85 * "An INVALID_OPERATION error is generated if no vertex array
86 * object is bound (see section 10.3.1)."
88 if (ctx
->Array
.VAO
== ctx
->Array
.DefaultVAO
) {
89 _mesa_error(ctx
, GL_INVALID_OPERATION
, "%s(no VAO bound)", function
);
93 case API_OPENGL_COMPAT
:
95 const struct gl_shader_program
*vsProg
=
96 ctx
->_Shader
->CurrentProgram
[MESA_SHADER_VERTEX
];
97 GLboolean haveVertexShader
= (vsProg
&& vsProg
->LinkStatus
);
98 GLboolean haveVertexProgram
= ctx
->VertexProgram
._Enabled
;
99 if (haveVertexShader
|| haveVertexProgram
) {
100 /* Draw regardless of whether or not we have any vertex arrays.
101 * (Ex: could draw a point using a constant vertex pos)
106 /* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic
109 return (ctx
->Array
.VAO
->VertexAttrib
[VERT_ATTRIB_POS
].Enabled
||
110 ctx
->Array
.VAO
->VertexAttrib
[VERT_ATTRIB_GENERIC0
].Enabled
);
116 unreachable("Invalid API value in check_valid_to_render()");
124 * Is 'mode' a valid value for glBegin(), glDrawArrays(), glDrawElements(),
125 * etc? The set of legal values depends on whether geometry shaders/programs
127 * Note: This may be called during display list compilation.
130 _mesa_is_valid_prim_mode(struct gl_context
*ctx
, GLenum mode
)
138 case GL_TRIANGLE_STRIP
:
139 case GL_TRIANGLE_FAN
:
144 return (ctx
->API
== API_OPENGL_COMPAT
);
145 case GL_LINES_ADJACENCY
:
146 case GL_LINE_STRIP_ADJACENCY
:
147 case GL_TRIANGLES_ADJACENCY
:
148 case GL_TRIANGLE_STRIP_ADJACENCY
:
149 return _mesa_has_geometry_shaders(ctx
);
157 * Is 'mode' a valid value for glBegin(), glDrawArrays(), glDrawElements(),
158 * etc? Also, do additional checking related to transformation feedback.
159 * Note: this function cannot be called during glNewList(GL_COMPILE) because
160 * this code depends on current transform feedback state.
163 _mesa_valid_prim_mode(struct gl_context
*ctx
, GLenum mode
, const char *name
)
165 bool valid_enum
= _mesa_is_valid_prim_mode(ctx
, mode
);
168 _mesa_error(ctx
, GL_INVALID_ENUM
, "%s(mode=%x)", name
, mode
);
172 /* From the ARB_geometry_shader4 spec:
174 * The error INVALID_OPERATION is generated if Begin, or any command that
175 * implicitly calls Begin, is called when a geometry shader is active and:
177 * * the input primitive type of the current geometry shader is
178 * POINTS and <mode> is not POINTS,
180 * * the input primitive type of the current geometry shader is
181 * LINES and <mode> is not LINES, LINE_STRIP, or LINE_LOOP,
183 * * the input primitive type of the current geometry shader is
184 * TRIANGLES and <mode> is not TRIANGLES, TRIANGLE_STRIP or
187 * * the input primitive type of the current geometry shader is
188 * LINES_ADJACENCY_ARB and <mode> is not LINES_ADJACENCY_ARB or
189 * LINE_STRIP_ADJACENCY_ARB, or
191 * * the input primitive type of the current geometry shader is
192 * TRIANGLES_ADJACENCY_ARB and <mode> is not
193 * TRIANGLES_ADJACENCY_ARB or TRIANGLE_STRIP_ADJACENCY_ARB.
196 if (ctx
->_Shader
->CurrentProgram
[MESA_SHADER_GEOMETRY
]) {
197 const GLenum geom_mode
=
198 ctx
->_Shader
->CurrentProgram
[MESA_SHADER_GEOMETRY
]->Geom
.InputType
;
201 valid_enum
= (geom_mode
== GL_POINTS
);
206 valid_enum
= (geom_mode
== GL_LINES
);
209 case GL_TRIANGLE_STRIP
:
210 case GL_TRIANGLE_FAN
:
211 valid_enum
= (geom_mode
== GL_TRIANGLES
);
218 case GL_LINES_ADJACENCY
:
219 case GL_LINE_STRIP_ADJACENCY
:
220 valid_enum
= (geom_mode
== GL_LINES_ADJACENCY
);
222 case GL_TRIANGLES_ADJACENCY
:
223 case GL_TRIANGLE_STRIP_ADJACENCY
:
224 valid_enum
= (geom_mode
== GL_TRIANGLES_ADJACENCY
);
231 _mesa_error(ctx
, GL_INVALID_OPERATION
,
232 "%s(mode=%s vs geometry shader input %s)",
234 _mesa_lookup_prim_by_nr(mode
),
235 _mesa_lookup_prim_by_nr(geom_mode
));
240 /* From the GL_EXT_transform_feedback spec:
242 * "The error INVALID_OPERATION is generated if Begin, or any command
243 * that performs an explicit Begin, is called when:
245 * * a geometry shader is not active and <mode> does not match the
246 * allowed begin modes for the current transform feedback state as
247 * given by table X.1.
249 * * a geometry shader is active and the output primitive type of the
250 * geometry shader does not match the allowed begin modes for the
251 * current transform feedback state as given by table X.1.
254 if (_mesa_is_xfb_active_and_unpaused(ctx
)) {
255 GLboolean pass
= GL_TRUE
;
257 if(ctx
->_Shader
->CurrentProgram
[MESA_SHADER_GEOMETRY
]) {
258 switch (ctx
->_Shader
->CurrentProgram
[MESA_SHADER_GEOMETRY
]->Geom
.OutputType
) {
260 pass
= ctx
->TransformFeedback
.Mode
== GL_POINTS
;
263 pass
= ctx
->TransformFeedback
.Mode
== GL_LINES
;
265 case GL_TRIANGLE_STRIP
:
266 pass
= ctx
->TransformFeedback
.Mode
== GL_TRIANGLES
;
275 pass
= ctx
->TransformFeedback
.Mode
== GL_POINTS
;
280 pass
= ctx
->TransformFeedback
.Mode
== GL_LINES
;
283 pass
= ctx
->TransformFeedback
.Mode
== GL_TRIANGLES
;
288 _mesa_error(ctx
, GL_INVALID_OPERATION
,
289 "%s(mode=%s vs transform feedback %s)",
291 _mesa_lookup_prim_by_nr(mode
),
292 _mesa_lookup_prim_by_nr(ctx
->TransformFeedback
.Mode
));
301 * Verify that the element type is valid.
303 * Generates \c GL_INVALID_ENUM and returns \c false if it is not.
306 valid_elements_type(struct gl_context
*ctx
, GLenum type
, const char *name
)
309 case GL_UNSIGNED_BYTE
:
310 case GL_UNSIGNED_SHORT
:
311 case GL_UNSIGNED_INT
:
315 _mesa_error(ctx
, GL_INVALID_ENUM
, "%s(type = %s)", name
,
316 _mesa_lookup_enum_by_nr(type
));
322 validate_DrawElements_common(struct gl_context
*ctx
,
323 GLenum mode
, GLsizei count
, GLenum type
,
324 const GLvoid
*indices
,
327 /* From the GLES3 specification, section 2.14.2 (Transform Feedback
328 * Primitive Capture):
330 * The error INVALID_OPERATION is also generated by DrawElements,
331 * DrawElementsInstanced, and DrawRangeElements while transform feedback
332 * is active and not paused, regardless of mode.
334 if (_mesa_is_gles3(ctx
) && _mesa_is_xfb_active_and_unpaused(ctx
)) {
335 _mesa_error(ctx
, GL_INVALID_OPERATION
,
336 "%s(transform feedback active)", caller
);
341 _mesa_error(ctx
, GL_INVALID_VALUE
, "%s(count)", caller
);
345 if (!_mesa_valid_prim_mode(ctx
, mode
, caller
)) {
349 if (!valid_elements_type(ctx
, type
, caller
))
352 if (!check_valid_to_render(ctx
, caller
))
355 /* Vertex buffer object tests */
356 if (_mesa_is_bufferobj(ctx
->Array
.VAO
->IndexBufferObj
)) {
357 /* use indices in the buffer object */
358 /* make sure count doesn't go outside buffer bounds */
359 if (index_bytes(type
, count
) > ctx
->Array
.VAO
->IndexBufferObj
->Size
) {
360 _mesa_warning(ctx
, "%s index out of buffer bounds", caller
);
365 /* not using a VBO */
377 * Error checking for glDrawElements(). Includes parameter checking
378 * and VBO bounds checking.
379 * \return GL_TRUE if OK to render, GL_FALSE if error found
382 _mesa_validate_DrawElements(struct gl_context
*ctx
,
383 GLenum mode
, GLsizei count
, GLenum type
,
384 const GLvoid
*indices
)
386 FLUSH_CURRENT(ctx
, 0);
388 return validate_DrawElements_common(ctx
, mode
, count
, type
, indices
,
394 * Error checking for glMultiDrawElements(). Includes parameter checking
395 * and VBO bounds checking.
396 * \return GL_TRUE if OK to render, GL_FALSE if error found
399 _mesa_validate_MultiDrawElements(struct gl_context
*ctx
,
400 GLenum mode
, const GLsizei
*count
,
401 GLenum type
, const GLvoid
* const *indices
,
406 FLUSH_CURRENT(ctx
, 0);
408 for (i
= 0; i
< primcount
; i
++) {
410 _mesa_error(ctx
, GL_INVALID_VALUE
,
411 "glMultiDrawElements(count)" );
416 if (!_mesa_valid_prim_mode(ctx
, mode
, "glMultiDrawElements")) {
420 if (!valid_elements_type(ctx
, type
, "glMultiDrawElements"))
423 if (!check_valid_to_render(ctx
, "glMultiDrawElements"))
426 /* Vertex buffer object tests */
427 if (_mesa_is_bufferobj(ctx
->Array
.VAO
->IndexBufferObj
)) {
428 /* use indices in the buffer object */
429 /* make sure count doesn't go outside buffer bounds */
430 for (i
= 0; i
< primcount
; i
++) {
431 if (index_bytes(type
, count
[i
]) >
432 ctx
->Array
.VAO
->IndexBufferObj
->Size
) {
434 "glMultiDrawElements index out of buffer bounds");
440 /* not using a VBO */
441 for (i
= 0; i
< primcount
; i
++) {
452 * Error checking for glDrawRangeElements(). Includes parameter checking
453 * and VBO bounds checking.
454 * \return GL_TRUE if OK to render, GL_FALSE if error found
457 _mesa_validate_DrawRangeElements(struct gl_context
*ctx
, GLenum mode
,
458 GLuint start
, GLuint end
,
459 GLsizei count
, GLenum type
,
460 const GLvoid
*indices
)
462 FLUSH_CURRENT(ctx
, 0);
465 _mesa_error(ctx
, GL_INVALID_VALUE
, "glDrawRangeElements(end<start)");
469 return validate_DrawElements_common(ctx
, mode
, count
, type
, indices
,
470 "glDrawRangeElements");
475 * Called from the tnl module to error check the function parameters and
476 * verify that we really can draw something.
477 * \return GL_TRUE if OK to render, GL_FALSE if error found
480 _mesa_validate_DrawArrays(struct gl_context
*ctx
, GLenum mode
, GLsizei count
)
482 struct gl_transform_feedback_object
*xfb_obj
483 = ctx
->TransformFeedback
.CurrentObject
;
484 FLUSH_CURRENT(ctx
, 0);
487 _mesa_error(ctx
, GL_INVALID_VALUE
, "glDrawArrays(count)" );
491 if (!_mesa_valid_prim_mode(ctx
, mode
, "glDrawArrays")) {
495 if (!check_valid_to_render(ctx
, "glDrawArrays"))
498 /* From the GLES3 specification, section 2.14.2 (Transform Feedback
499 * Primitive Capture):
501 * The error INVALID_OPERATION is generated by DrawArrays and
502 * DrawArraysInstanced if recording the vertices of a primitive to the
503 * buffer objects being used for transform feedback purposes would result
504 * in either exceeding the limits of any buffer object’s size, or in
505 * exceeding the end position offset + size − 1, as set by
508 * This is in contrast to the behaviour of desktop GL, where the extra
509 * primitives are silently dropped from the transform feedback buffer.
511 if (_mesa_is_gles3(ctx
) && _mesa_is_xfb_active_and_unpaused(ctx
)) {
512 size_t prim_count
= vbo_count_tessellated_primitives(mode
, count
, 1);
513 if (xfb_obj
->GlesRemainingPrims
< prim_count
) {
514 _mesa_error(ctx
, GL_INVALID_OPERATION
,
515 "glDrawArrays(exceeds transform feedback size)");
518 xfb_obj
->GlesRemainingPrims
-= prim_count
;
529 _mesa_validate_DrawArraysInstanced(struct gl_context
*ctx
, GLenum mode
, GLint first
,
530 GLsizei count
, GLsizei numInstances
)
532 struct gl_transform_feedback_object
*xfb_obj
533 = ctx
->TransformFeedback
.CurrentObject
;
534 FLUSH_CURRENT(ctx
, 0);
537 _mesa_error(ctx
, GL_INVALID_VALUE
,
538 "glDrawArraysInstanced(count=%d)", count
);
543 _mesa_error(ctx
, GL_INVALID_VALUE
,
544 "glDrawArraysInstanced(start=%d)", first
);
548 if (!_mesa_valid_prim_mode(ctx
, mode
, "glDrawArraysInstanced")) {
552 if (numInstances
<= 0) {
553 if (numInstances
< 0)
554 _mesa_error(ctx
, GL_INVALID_VALUE
,
555 "glDrawArraysInstanced(numInstances=%d)", numInstances
);
559 if (!check_valid_to_render(ctx
, "glDrawArraysInstanced(invalid to render)"))
562 /* From the GLES3 specification, section 2.14.2 (Transform Feedback
563 * Primitive Capture):
565 * The error INVALID_OPERATION is generated by DrawArrays and
566 * DrawArraysInstanced if recording the vertices of a primitive to the
567 * buffer objects being used for transform feedback purposes would result
568 * in either exceeding the limits of any buffer object’s size, or in
569 * exceeding the end position offset + size − 1, as set by
572 * This is in contrast to the behaviour of desktop GL, where the extra
573 * primitives are silently dropped from the transform feedback buffer.
575 if (_mesa_is_gles3(ctx
) && _mesa_is_xfb_active_and_unpaused(ctx
)) {
577 = vbo_count_tessellated_primitives(mode
, count
, numInstances
);
578 if (xfb_obj
->GlesRemainingPrims
< prim_count
) {
579 _mesa_error(ctx
, GL_INVALID_OPERATION
,
580 "glDrawArraysInstanced(exceeds transform feedback size)");
583 xfb_obj
->GlesRemainingPrims
-= prim_count
;
594 _mesa_validate_DrawElementsInstanced(struct gl_context
*ctx
,
595 GLenum mode
, GLsizei count
, GLenum type
,
596 const GLvoid
*indices
, GLsizei numInstances
)
598 FLUSH_CURRENT(ctx
, 0);
600 if (numInstances
< 0) {
601 _mesa_error(ctx
, GL_INVALID_VALUE
,
602 "glDrawElementsInstanced(numInstances=%d)", numInstances
);
606 return validate_DrawElements_common(ctx
, mode
, count
, type
, indices
,
607 "glDrawElementsInstanced")
608 && (numInstances
> 0);
613 _mesa_validate_DrawTransformFeedback(struct gl_context
*ctx
,
615 struct gl_transform_feedback_object
*obj
,
617 GLsizei numInstances
)
619 FLUSH_CURRENT(ctx
, 0);
621 if (!_mesa_valid_prim_mode(ctx
, mode
, "glDrawTransformFeedback*(mode)")) {
626 _mesa_error(ctx
, GL_INVALID_VALUE
, "glDrawTransformFeedback*(name)");
630 if (stream
>= ctx
->Const
.MaxVertexStreams
) {
631 _mesa_error(ctx
, GL_INVALID_VALUE
,
632 "glDrawTransformFeedbackStream*(index>=MaxVertexStream)");
636 if (!obj
->EndedAnytime
) {
637 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glDrawTransformFeedback*");
641 if (numInstances
<= 0) {
642 if (numInstances
< 0)
643 _mesa_error(ctx
, GL_INVALID_VALUE
,
644 "glDrawTransformFeedback*Instanced(numInstances=%d)",
649 if (!check_valid_to_render(ctx
, "glDrawTransformFeedback*")) {
657 valid_draw_indirect(struct gl_context
*ctx
,
658 GLenum mode
, const GLvoid
*indirect
,
659 GLsizei size
, const char *name
)
661 const GLsizeiptr end
= (GLsizeiptr
)indirect
+ size
;
663 if (!_mesa_valid_prim_mode(ctx
, mode
, name
))
667 /* From the ARB_draw_indirect specification:
668 * "An INVALID_OPERATION error is generated [...] if <indirect> is no
671 if ((GLsizeiptr
)indirect
& (sizeof(GLuint
) - 1)) {
672 _mesa_error(ctx
, GL_INVALID_OPERATION
,
673 "%s(indirect is not aligned)", name
);
677 if (!_mesa_is_bufferobj(ctx
->DrawIndirectBuffer
)) {
678 _mesa_error(ctx
, GL_INVALID_OPERATION
,
679 "%s: no buffer bound to DRAW_INDIRECT_BUFFER", name
);
683 if (_mesa_check_disallowed_mapping(ctx
->DrawIndirectBuffer
)) {
684 _mesa_error(ctx
, GL_INVALID_OPERATION
,
685 "%s(DRAW_INDIRECT_BUFFER is mapped)", name
);
689 /* From the ARB_draw_indirect specification:
690 * "An INVALID_OPERATION error is generated if the commands source data
691 * beyond the end of the buffer object [...]"
693 if (ctx
->DrawIndirectBuffer
->Size
< end
) {
694 _mesa_error(ctx
, GL_INVALID_OPERATION
,
695 "%s(DRAW_INDIRECT_BUFFER too small)", name
);
699 if (!check_valid_to_render(ctx
, name
))
705 static inline GLboolean
706 valid_draw_indirect_elements(struct gl_context
*ctx
,
707 GLenum mode
, GLenum type
, const GLvoid
*indirect
,
708 GLsizeiptr size
, const char *name
)
710 if (!valid_elements_type(ctx
, type
, name
))
714 * Unlike regular DrawElementsInstancedBaseVertex commands, the indices
715 * may not come from a client array and must come from an index buffer.
716 * If no element array buffer is bound, an INVALID_OPERATION error is
719 if (!_mesa_is_bufferobj(ctx
->Array
.VAO
->IndexBufferObj
)) {
720 _mesa_error(ctx
, GL_INVALID_OPERATION
,
721 "%s(no buffer bound to GL_ELEMENT_ARRAY_BUFFER)", name
);
725 return valid_draw_indirect(ctx
, mode
, indirect
, size
, name
);
728 static inline GLboolean
729 valid_draw_indirect_multi(struct gl_context
*ctx
,
730 GLsizei primcount
, GLsizei stride
,
734 /* From the ARB_multi_draw_indirect specification:
735 * "INVALID_VALUE is generated by MultiDrawArraysIndirect or
736 * MultiDrawElementsIndirect if <primcount> is negative."
738 * "<primcount> must be positive, otherwise an INVALID_VALUE error will
742 _mesa_error(ctx
, GL_INVALID_VALUE
, "%s(primcount < 0)", name
);
747 /* From the ARB_multi_draw_indirect specification:
748 * "<stride> must be a multiple of four, otherwise an INVALID_VALUE
749 * error is generated."
752 _mesa_error(ctx
, GL_INVALID_VALUE
, "%s(stride %% 4)", name
);
760 _mesa_validate_DrawArraysIndirect(struct gl_context
*ctx
,
762 const GLvoid
*indirect
)
764 const unsigned drawArraysNumParams
= 4;
766 FLUSH_CURRENT(ctx
, 0);
768 return valid_draw_indirect(ctx
, mode
,
769 indirect
, drawArraysNumParams
* sizeof(GLuint
),
770 "glDrawArraysIndirect");
774 _mesa_validate_DrawElementsIndirect(struct gl_context
*ctx
,
775 GLenum mode
, GLenum type
,
776 const GLvoid
*indirect
)
778 const unsigned drawElementsNumParams
= 5;
780 FLUSH_CURRENT(ctx
, 0);
782 return valid_draw_indirect_elements(ctx
, mode
, type
,
783 indirect
, drawElementsNumParams
* sizeof(GLuint
),
784 "glDrawElementsIndirect");
788 _mesa_validate_MultiDrawArraysIndirect(struct gl_context
*ctx
,
790 const GLvoid
*indirect
,
791 GLsizei primcount
, GLsizei stride
)
794 const unsigned drawArraysNumParams
= 4;
796 FLUSH_CURRENT(ctx
, 0);
798 /* caller has converted stride==0 to drawArraysNumParams * sizeof(GLuint) */
801 if (!valid_draw_indirect_multi(ctx
, primcount
, stride
,
802 "glMultiDrawArraysIndirect"))
805 /* number of bytes of the indirect buffer which will be read */
807 ? (primcount
- 1) * stride
+ drawArraysNumParams
* sizeof(GLuint
)
810 if (!valid_draw_indirect(ctx
, mode
, indirect
, size
,
811 "glMultiDrawArraysIndirect"))
818 _mesa_validate_MultiDrawElementsIndirect(struct gl_context
*ctx
,
819 GLenum mode
, GLenum type
,
820 const GLvoid
*indirect
,
821 GLsizei primcount
, GLsizei stride
)
824 const unsigned drawElementsNumParams
= 5;
826 FLUSH_CURRENT(ctx
, 0);
828 /* caller has converted stride==0 to drawElementsNumParams * sizeof(GLuint) */
831 if (!valid_draw_indirect_multi(ctx
, primcount
, stride
,
832 "glMultiDrawElementsIndirect"))
835 /* number of bytes of the indirect buffer which will be read */
837 ? (primcount
- 1) * stride
+ drawElementsNumParams
* sizeof(GLuint
)
840 if (!valid_draw_indirect_elements(ctx
, mode
, type
,
842 "glMultiDrawElementsIndirect"))