mesa: remove Driver.NewArrayObject
[mesa.git] / src / mesa / main / arrayobj.c
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
5 * (C) Copyright IBM Corporation 2006
6 * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
22 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
23 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 * OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 /**
29 * \file arrayobj.c
30 *
31 * Implementation of Vertex Array Objects (VAOs), from OpenGL 3.1+,
32 * the GL_ARB_vertex_array_object extension, or the older
33 * GL_APPLE_vertex_array_object extension.
34 *
35 * \todo
36 * The code in this file borrows a lot from bufferobj.c. There's a certain
37 * amount of cruft left over from that origin that may be unnecessary.
38 *
39 * \author Ian Romanick <idr@us.ibm.com>
40 * \author Brian Paul
41 */
42
43
44 #include "glheader.h"
45 #include "hash.h"
46 #include "image.h"
47 #include "imports.h"
48 #include "context.h"
49 #include "bufferobj.h"
50 #include "arrayobj.h"
51 #include "macros.h"
52 #include "mtypes.h"
53 #include "varray.h"
54 #include "main/dispatch.h"
55
56
57 /**
58 * Look up the array object for the given ID.
59 *
60 * \returns
61 * Either a pointer to the array object with the specified ID or \c NULL for
62 * a non-existent ID. The spec defines ID 0 as being technically
63 * non-existent.
64 */
65
66 struct gl_vertex_array_object *
67 _mesa_lookup_vao(struct gl_context *ctx, GLuint id)
68 {
69 if (id == 0)
70 return NULL;
71 else
72 return (struct gl_vertex_array_object *)
73 _mesa_HashLookup(ctx->Array.Objects, id);
74 }
75
76
77 /**
78 * Looks up the array object for the given ID.
79 *
80 * Unlike _mesa_lookup_vao, this function generates a GL_INVALID_OPERATION
81 * error if the array object does not exist. It also returns the default
82 * array object when ctx is a compatibility profile context and id is zero.
83 */
84 struct gl_vertex_array_object *
85 _mesa_lookup_vao_err(struct gl_context *ctx, GLuint id, const char *caller)
86 {
87 /* The ARB_direct_state_access specification says:
88 *
89 * "<vaobj> is [compatibility profile:
90 * zero, indicating the default vertex array object, or]
91 * the name of the vertex array object."
92 */
93 if (id == 0) {
94 if (ctx->API == API_OPENGL_CORE) {
95 _mesa_error(ctx, GL_INVALID_OPERATION,
96 "%s(zero is not valid vaobj name in a core profile "
97 "context)", caller);
98 return NULL;
99 }
100
101 return ctx->Array.DefaultVAO;
102 } else {
103 struct gl_vertex_array_object *vao;
104
105 if (ctx->Array.LastLookedUpVAO &&
106 ctx->Array.LastLookedUpVAO->Name == id) {
107 vao = ctx->Array.LastLookedUpVAO;
108 } else {
109 vao = (struct gl_vertex_array_object *)
110 _mesa_HashLookup(ctx->Array.Objects, id);
111
112 /* The ARB_direct_state_access specification says:
113 *
114 * "An INVALID_OPERATION error is generated if <vaobj> is not
115 * [compatibility profile: zero or] the name of an existing
116 * vertex array object."
117 */
118 if (!vao || !vao->EverBound) {
119 _mesa_error(ctx, GL_INVALID_OPERATION,
120 "%s(non-existent vaobj=%u)", caller, id);
121 return NULL;
122 }
123
124 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, vao);
125 }
126
127 return vao;
128 }
129 }
130
131
132 /**
133 * For all the vertex binding points in the array object, unbind any pointers
134 * to any buffer objects (VBOs).
135 * This is done just prior to array object destruction.
136 */
137 static void
138 unbind_array_object_vbos(struct gl_context *ctx, struct gl_vertex_array_object *obj)
139 {
140 GLuint i;
141
142 for (i = 0; i < ARRAY_SIZE(obj->VertexBinding); i++)
143 _mesa_reference_buffer_object(ctx, &obj->VertexBinding[i].BufferObj, NULL);
144
145 for (i = 0; i < ARRAY_SIZE(obj->_VertexAttrib); i++)
146 _mesa_reference_buffer_object(ctx, &obj->_VertexAttrib[i].BufferObj, NULL);
147 }
148
149
150 /**
151 * Allocate and initialize a new vertex array object.
152 *
153 * This function is intended to be called via
154 */
155 struct gl_vertex_array_object *
156 _mesa_new_vao(struct gl_context *ctx, GLuint name)
157 {
158 struct gl_vertex_array_object *obj = CALLOC_STRUCT(gl_vertex_array_object);
159 if (obj)
160 _mesa_initialize_vao(ctx, obj, name);
161 return obj;
162 }
163
164
165 /**
166 * Delete an array object.
167 *
168 * This function is intended to be called via
169 * \c dd_function_table::DeleteArrayObject.
170 */
171 void
172 _mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj)
173 {
174 unbind_array_object_vbos(ctx, obj);
175 _mesa_reference_buffer_object(ctx, &obj->IndexBufferObj, NULL);
176 mtx_destroy(&obj->Mutex);
177 free(obj->Label);
178 free(obj);
179 }
180
181
182 /**
183 * Set ptr to vao w/ reference counting.
184 * Note: this should only be called from the _mesa_reference_vao()
185 * inline function.
186 */
187 void
188 _mesa_reference_vao_(struct gl_context *ctx,
189 struct gl_vertex_array_object **ptr,
190 struct gl_vertex_array_object *vao)
191 {
192 assert(*ptr != vao);
193
194 if (*ptr) {
195 /* Unreference the old array object */
196 GLboolean deleteFlag = GL_FALSE;
197 struct gl_vertex_array_object *oldObj = *ptr;
198
199 mtx_lock(&oldObj->Mutex);
200 assert(oldObj->RefCount > 0);
201 oldObj->RefCount--;
202 deleteFlag = (oldObj->RefCount == 0);
203 mtx_unlock(&oldObj->Mutex);
204
205 if (deleteFlag) {
206 assert(ctx->Driver.DeleteArrayObject);
207 ctx->Driver.DeleteArrayObject(ctx, oldObj);
208 }
209
210 *ptr = NULL;
211 }
212 assert(!*ptr);
213
214 if (vao) {
215 /* reference new array object */
216 mtx_lock(&vao->Mutex);
217 if (vao->RefCount == 0) {
218 /* this array's being deleted (look just above) */
219 /* Not sure this can every really happen. Warn if it does. */
220 _mesa_problem(NULL, "referencing deleted array object");
221 *ptr = NULL;
222 }
223 else {
224 vao->RefCount++;
225 *ptr = vao;
226 }
227 mtx_unlock(&vao->Mutex);
228 }
229 }
230
231
232
233 static void
234 init_array(struct gl_context *ctx,
235 struct gl_vertex_array_object *obj, GLuint index, GLint size, GLint type)
236 {
237 struct gl_vertex_attrib_array *array = &obj->VertexAttrib[index];
238 struct gl_vertex_buffer_binding *binding = &obj->VertexBinding[index];
239
240 array->Size = size;
241 array->Type = type;
242 array->Format = GL_RGBA; /* only significant for GL_EXT_vertex_array_bgra */
243 array->Stride = 0;
244 array->Ptr = NULL;
245 array->RelativeOffset = 0;
246 array->Enabled = GL_FALSE;
247 array->Normalized = GL_FALSE;
248 array->Integer = GL_FALSE;
249 array->Doubles = GL_FALSE;
250 array->_ElementSize = size * _mesa_sizeof_type(type);
251 array->VertexBinding = index;
252
253 binding->Offset = 0;
254 binding->Stride = array->_ElementSize;
255 binding->BufferObj = NULL;
256 binding->_BoundArrays = BITFIELD64_BIT(index);
257
258 /* Vertex array buffers */
259 _mesa_reference_buffer_object(ctx, &binding->BufferObj,
260 ctx->Shared->NullBufferObj);
261 }
262
263
264 /**
265 * Initialize a gl_vertex_array_object's arrays.
266 */
267 void
268 _mesa_initialize_vao(struct gl_context *ctx,
269 struct gl_vertex_array_object *obj,
270 GLuint name)
271 {
272 GLuint i;
273
274 obj->Name = name;
275
276 mtx_init(&obj->Mutex, mtx_plain);
277 obj->RefCount = 1;
278
279 /* Init the individual arrays */
280 for (i = 0; i < ARRAY_SIZE(obj->VertexAttrib); i++) {
281 switch (i) {
282 case VERT_ATTRIB_WEIGHT:
283 init_array(ctx, obj, VERT_ATTRIB_WEIGHT, 1, GL_FLOAT);
284 break;
285 case VERT_ATTRIB_NORMAL:
286 init_array(ctx, obj, VERT_ATTRIB_NORMAL, 3, GL_FLOAT);
287 break;
288 case VERT_ATTRIB_COLOR1:
289 init_array(ctx, obj, VERT_ATTRIB_COLOR1, 3, GL_FLOAT);
290 break;
291 case VERT_ATTRIB_FOG:
292 init_array(ctx, obj, VERT_ATTRIB_FOG, 1, GL_FLOAT);
293 break;
294 case VERT_ATTRIB_COLOR_INDEX:
295 init_array(ctx, obj, VERT_ATTRIB_COLOR_INDEX, 1, GL_FLOAT);
296 break;
297 case VERT_ATTRIB_EDGEFLAG:
298 init_array(ctx, obj, VERT_ATTRIB_EDGEFLAG, 1, GL_BOOL);
299 break;
300 case VERT_ATTRIB_POINT_SIZE:
301 init_array(ctx, obj, VERT_ATTRIB_POINT_SIZE, 1, GL_FLOAT);
302 break;
303 default:
304 init_array(ctx, obj, i, 4, GL_FLOAT);
305 break;
306 }
307 }
308
309 _mesa_reference_buffer_object(ctx, &obj->IndexBufferObj,
310 ctx->Shared->NullBufferObj);
311 }
312
313
314 /**
315 * Add the given array object to the array object pool.
316 */
317 static void
318 save_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj )
319 {
320 if (obj->Name > 0) {
321 /* insert into hash table */
322 _mesa_HashInsert(ctx->Array.Objects, obj->Name, obj);
323 }
324 }
325
326
327 /**
328 * Remove the given array object from the array object pool.
329 * Do not deallocate the array object though.
330 */
331 static void
332 remove_array_object( struct gl_context *ctx, struct gl_vertex_array_object *obj )
333 {
334 if (obj->Name > 0) {
335 /* remove from hash table */
336 _mesa_HashRemove(ctx->Array.Objects, obj->Name);
337 }
338 }
339
340
341 /**
342 * Updates the derived gl_client_arrays when a gl_vertex_attrib_array
343 * or a gl_vertex_buffer_binding has changed.
344 */
345 void
346 _mesa_update_vao_client_arrays(struct gl_context *ctx,
347 struct gl_vertex_array_object *vao)
348 {
349 GLbitfield64 arrays = vao->NewArrays;
350
351 while (arrays) {
352 struct gl_client_array *client_array;
353 struct gl_vertex_attrib_array *attrib_array;
354 struct gl_vertex_buffer_binding *buffer_binding;
355
356 GLint attrib = ffsll(arrays) - 1;
357 arrays ^= BITFIELD64_BIT(attrib);
358
359 attrib_array = &vao->VertexAttrib[attrib];
360 buffer_binding = &vao->VertexBinding[attrib_array->VertexBinding];
361 client_array = &vao->_VertexAttrib[attrib];
362
363 _mesa_update_client_array(ctx, client_array, attrib_array,
364 buffer_binding);
365 }
366 }
367
368
369 /**********************************************************************/
370 /* API Functions */
371 /**********************************************************************/
372
373
374 /**
375 * Helper for _mesa_BindVertexArray() and _mesa_BindVertexArrayAPPLE().
376 * \param genRequired specifies behavour when id was not generated with
377 * glGenVertexArrays().
378 */
379 static void
380 bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired)
381 {
382 struct gl_vertex_array_object * const oldObj = ctx->Array.VAO;
383 struct gl_vertex_array_object *newObj = NULL;
384
385 assert(oldObj != NULL);
386
387 if ( oldObj->Name == id )
388 return; /* rebinding the same array object- no change */
389
390 /*
391 * Get pointer to new array object (newObj)
392 */
393 if (id == 0) {
394 /* The spec says there is no array object named 0, but we use
395 * one internally because it simplifies things.
396 */
397 newObj = ctx->Array.DefaultVAO;
398 }
399 else {
400 /* non-default array object */
401 newObj = _mesa_lookup_vao(ctx, id);
402 if (!newObj) {
403 if (genRequired) {
404 _mesa_error(ctx, GL_INVALID_OPERATION,
405 "glBindVertexArray(non-gen name)");
406 return;
407 }
408
409 /* For APPLE version, generate a new array object now */
410 newObj = _mesa_new_vao(ctx, id);
411 if (!newObj) {
412 _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE");
413 return;
414 }
415
416 save_array_object(ctx, newObj);
417 }
418
419 if (!newObj->EverBound) {
420 /* The "Interactions with APPLE_vertex_array_object" section of the
421 * GL_ARB_vertex_array_object spec says:
422 *
423 * "The first bind call, either BindVertexArray or
424 * BindVertexArrayAPPLE, determines the semantic of the object."
425 */
426 newObj->ARBsemantics = genRequired;
427 newObj->EverBound = GL_TRUE;
428 }
429 }
430
431 if (ctx->Array.DrawMethod == DRAW_ARRAYS) {
432 /* The _DrawArrays pointer is pointing at the VAO being unbound and
433 * that VAO may be in the process of being deleted. If it's not going
434 * to be deleted, this will have no effect, because the pointer needs
435 * to be updated by the VBO module anyway.
436 *
437 * Before the VBO module can update the pointer, we have to set it
438 * to NULL for drivers not to set up arrays which are not bound,
439 * or to prevent a crash if the VAO being unbound is going to be
440 * deleted.
441 */
442 ctx->Array._DrawArrays = NULL;
443 ctx->Array.DrawMethod = DRAW_NONE;
444 }
445
446 ctx->NewState |= _NEW_ARRAY;
447 _mesa_reference_vao(ctx, &ctx->Array.VAO, newObj);
448
449 /* Pass BindVertexArray call to device driver */
450 if (ctx->Driver.BindArrayObject && newObj)
451 ctx->Driver.BindArrayObject(ctx, newObj);
452 }
453
454
455 /**
456 * ARB version of glBindVertexArray()
457 * This function behaves differently from glBindVertexArrayAPPLE() in
458 * that this function requires all ids to have been previously generated
459 * by glGenVertexArrays[APPLE]().
460 */
461 void GLAPIENTRY
462 _mesa_BindVertexArray( GLuint id )
463 {
464 GET_CURRENT_CONTEXT(ctx);
465 bind_vertex_array(ctx, id, GL_TRUE);
466 }
467
468
469 /**
470 * Bind a new array.
471 *
472 * \todo
473 * The binding could be done more efficiently by comparing the non-NULL
474 * pointers in the old and new objects. The only arrays that are "dirty" are
475 * the ones that are non-NULL in either object.
476 */
477 void GLAPIENTRY
478 _mesa_BindVertexArrayAPPLE( GLuint id )
479 {
480 GET_CURRENT_CONTEXT(ctx);
481 bind_vertex_array(ctx, id, GL_FALSE);
482 }
483
484
485 /**
486 * Delete a set of array objects.
487 *
488 * \param n Number of array objects to delete.
489 * \param ids Array of \c n array object IDs.
490 */
491 void GLAPIENTRY
492 _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids)
493 {
494 GET_CURRENT_CONTEXT(ctx);
495 GLsizei i;
496
497 if (n < 0) {
498 _mesa_error(ctx, GL_INVALID_VALUE, "glDeleteVertexArray(n)");
499 return;
500 }
501
502 for (i = 0; i < n; i++) {
503 struct gl_vertex_array_object *obj = _mesa_lookup_vao(ctx, ids[i]);
504
505 if ( obj != NULL ) {
506 assert( obj->Name == ids[i] );
507
508 /* If the array object is currently bound, the spec says "the binding
509 * for that object reverts to zero and the default vertex array
510 * becomes current."
511 */
512 if ( obj == ctx->Array.VAO ) {
513 _mesa_BindVertexArray(0);
514 }
515
516 /* The ID is immediately freed for re-use */
517 remove_array_object(ctx, obj);
518
519 if (ctx->Array.LastLookedUpVAO == obj)
520 _mesa_reference_vao(ctx, &ctx->Array.LastLookedUpVAO, NULL);
521
522 /* Unreference the array object.
523 * If refcount hits zero, the object will be deleted.
524 */
525 _mesa_reference_vao(ctx, &obj, NULL);
526 }
527 }
528 }
529
530
531 /**
532 * Generate a set of unique array object IDs and store them in \c arrays.
533 * Helper for _mesa_GenVertexArrays[APPLE]() and _mesa_CreateVertexArrays()
534 * below.
535 *
536 * \param n Number of IDs to generate.
537 * \param arrays Array of \c n locations to store the IDs.
538 * \param create Indicates that the objects should also be created.
539 * \param func The name of the GL entry point.
540 */
541 static void
542 gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays,
543 bool create, const char *func)
544 {
545 GLuint first;
546 GLint i;
547
548 if (n < 0) {
549 _mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", func);
550 return;
551 }
552
553 if (!arrays) {
554 return;
555 }
556
557 first = _mesa_HashFindFreeKeyBlock(ctx->Array.Objects, n);
558
559 /* For the sake of simplicity we create the array objects in both
560 * the Gen* and Create* cases. The only difference is the value of
561 * EverBound, which is set to true in the Create* case.
562 */
563 for (i = 0; i < n; i++) {
564 struct gl_vertex_array_object *obj;
565 GLuint name = first + i;
566
567 obj = _mesa_new_vao(ctx, name);
568 if (!obj) {
569 _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func);
570 return;
571 }
572 obj->EverBound = create;
573 save_array_object(ctx, obj);
574 arrays[i] = first + i;
575 }
576 }
577
578
579 /**
580 * ARB version of glGenVertexArrays()
581 * All arrays will be required to live in VBOs.
582 */
583 void GLAPIENTRY
584 _mesa_GenVertexArrays(GLsizei n, GLuint *arrays)
585 {
586 GET_CURRENT_CONTEXT(ctx);
587 gen_vertex_arrays(ctx, n, arrays, false, "glGenVertexArrays");
588 }
589
590
591 /**
592 * APPLE version of glGenVertexArraysAPPLE()
593 * Arrays may live in VBOs or ordinary memory.
594 */
595 void GLAPIENTRY
596 _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays)
597 {
598 GET_CURRENT_CONTEXT(ctx);
599 gen_vertex_arrays(ctx, n, arrays, false, "glGenVertexArraysAPPLE");
600 }
601
602
603 /**
604 * ARB_direct_state_access
605 * Generates ID's and creates the array objects.
606 */
607 void GLAPIENTRY
608 _mesa_CreateVertexArrays(GLsizei n, GLuint *arrays)
609 {
610 GET_CURRENT_CONTEXT(ctx);
611 gen_vertex_arrays(ctx, n, arrays, true, "glCreateVertexArrays");
612 }
613
614
615 /**
616 * Determine if ID is the name of an array object.
617 *
618 * \param id ID of the potential array object.
619 * \return \c GL_TRUE if \c id is the name of a array object,
620 * \c GL_FALSE otherwise.
621 */
622 GLboolean GLAPIENTRY
623 _mesa_IsVertexArray( GLuint id )
624 {
625 struct gl_vertex_array_object * obj;
626 GET_CURRENT_CONTEXT(ctx);
627 ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
628
629 if (id == 0)
630 return GL_FALSE;
631
632 obj = _mesa_lookup_vao(ctx, id);
633 if (obj == NULL)
634 return GL_FALSE;
635
636 return obj->EverBound;
637 }
638
639
640 /**
641 * Sets the element array buffer binding of a vertex array object.
642 *
643 * This is the ARB_direct_state_access equivalent of
644 * glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer).
645 */
646 void GLAPIENTRY
647 _mesa_VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
648 {
649 GET_CURRENT_CONTEXT(ctx);
650 struct gl_vertex_array_object *vao;
651 struct gl_buffer_object *bufObj;
652
653 ASSERT_OUTSIDE_BEGIN_END(ctx);
654
655 /* The GL_ARB_direct_state_access specification says:
656 *
657 * "An INVALID_OPERATION error is generated by VertexArrayElementBuffer
658 * if <vaobj> is not [compatibility profile: zero or] the name of an
659 * existing vertex array object."
660 */
661 vao =_mesa_lookup_vao_err(ctx, vaobj, "glVertexArrayElementBuffer");
662 if (!vao)
663 return;
664
665 /* The GL_ARB_direct_state_access specification says:
666 *
667 * "An INVALID_OPERATION error is generated if <buffer> is not zero or
668 * the name of an existing buffer object."
669 */
670 if (buffer != 0)
671 bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
672 "glVertexArrayElementBuffer");
673 else
674 bufObj = ctx->Shared->NullBufferObj;
675
676 if (bufObj)
677 _mesa_reference_buffer_object(ctx, &vao->IndexBufferObj, bufObj);
678 }
679
680
681 void GLAPIENTRY
682 _mesa_GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
683 {
684 GET_CURRENT_CONTEXT(ctx);
685 struct gl_vertex_array_object *vao;
686
687 ASSERT_OUTSIDE_BEGIN_END(ctx);
688
689 /* The GL_ARB_direct_state_access specification says:
690 *
691 * "An INVALID_OPERATION error is generated if <vaobj> is not
692 * [compatibility profile: zero or] the name of an existing
693 * vertex array object."
694 */
695 vao =_mesa_lookup_vao_err(ctx, vaobj, "glGetVertexArrayiv");
696 if (!vao)
697 return;
698
699 /* The GL_ARB_direct_state_access specification says:
700 *
701 * "An INVALID_ENUM error is generated if <pname> is not
702 * ELEMENT_ARRAY_BUFFER_BINDING."
703 */
704 if (pname != GL_ELEMENT_ARRAY_BUFFER_BINDING) {
705 _mesa_error(ctx, GL_INVALID_ENUM,
706 "glGetVertexArrayiv(pname != "
707 "GL_ELEMENT_ARRAY_BUFFER_BINDING)");
708 return;
709 }
710
711 param[0] = vao->IndexBufferObj->Name;
712 }