mesa/es: Remove redundant light pname and light validation
[mesa.git] / src / mesa / main / dd.h
1 /**
2 * \file dd.h
3 * Device driver interfaces.
4 */
5
6 /*
7 * Mesa 3-D graphics library
8 * Version: 6.5.2
9 *
10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 */
29
30
31 #ifndef DD_INCLUDED
32 #define DD_INCLUDED
33
34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
35
36 #include "glheader.h"
37
38 struct gl_buffer_object;
39 struct gl_context;
40 struct gl_display_list;
41 struct gl_framebuffer;
42 struct gl_pixelstore_attrib;
43 struct gl_program;
44 struct gl_renderbuffer;
45 struct gl_renderbuffer_attachment;
46 struct gl_shader;
47 struct gl_shader_program;
48 struct gl_texture_image;
49 struct gl_texture_object;
50
51 /* GL_ARB_vertex_buffer_object */
52 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
53 * NULL) if buffer is unavailable for immediate mapping.
54 *
55 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
56 * would require more book-keeping in the driver than seems necessary
57 * at this point.
58 *
59 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
60 * want to provoke the driver to throw away the old storage, we will
61 * respect the contents of already referenced data.
62 */
63 #define MESA_MAP_NOWAIT_BIT 0x0040
64
65
66 /**
67 * Device driver function table.
68 * Core Mesa uses these function pointers to call into device drivers.
69 * Most of these functions directly correspond to OpenGL state commands.
70 * Core Mesa will call these functions after error checking has been done
71 * so that the drivers don't have to worry about error testing.
72 *
73 * Vertex transformation/clipping/lighting is patched into the T&L module.
74 * Rasterization functions are patched into the swrast module.
75 *
76 * Note: when new functions are added here, the drivers/common/driverfuncs.c
77 * file should be updated too!!!
78 */
79 struct dd_function_table {
80 /**
81 * Return a string as needed by glGetString().
82 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
83 * returned.
84 */
85 const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
86
87 /**
88 * Notify the driver after Mesa has made some internal state changes.
89 *
90 * This is in addition to any state change callbacks Mesa may already have
91 * made.
92 */
93 void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
94
95 /**
96 * Get the width and height of the named buffer/window.
97 *
98 * Mesa uses this to determine when the driver's window size has changed.
99 * XXX OBSOLETE: this function will be removed in the future.
100 */
101 void (*GetBufferSize)( struct gl_framebuffer *buffer,
102 GLuint *width, GLuint *height );
103
104 /**
105 * Resize the given framebuffer to the given size.
106 * XXX OBSOLETE: this function will be removed in the future.
107 */
108 void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
109 GLuint width, GLuint height);
110
111 /**
112 * Called whenever an error is generated.
113 * __struct gl_contextRec::ErrorValue contains the error value.
114 */
115 void (*Error)( struct gl_context *ctx );
116
117 /**
118 * This is called whenever glFinish() is called.
119 */
120 void (*Finish)( struct gl_context *ctx );
121
122 /**
123 * This is called whenever glFlush() is called.
124 */
125 void (*Flush)( struct gl_context *ctx );
126
127 /**
128 * Clear the color/depth/stencil/accum buffer(s).
129 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
130 * renderbuffers need to be cleared.
131 */
132 void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
133
134 /**
135 * Execute glAccum command.
136 */
137 void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
138
139
140 /**
141 * Execute glRasterPos, updating the ctx->Current.Raster fields
142 */
143 void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
144
145 /**
146 * \name Image-related functions
147 */
148 /*@{*/
149
150 /**
151 * Called by glDrawPixels().
152 * \p unpack describes how to unpack the source image data.
153 */
154 void (*DrawPixels)( struct gl_context *ctx,
155 GLint x, GLint y, GLsizei width, GLsizei height,
156 GLenum format, GLenum type,
157 const struct gl_pixelstore_attrib *unpack,
158 const GLvoid *pixels );
159
160 /**
161 * Called by glReadPixels().
162 */
163 void (*ReadPixels)( struct gl_context *ctx,
164 GLint x, GLint y, GLsizei width, GLsizei height,
165 GLenum format, GLenum type,
166 const struct gl_pixelstore_attrib *unpack,
167 GLvoid *dest );
168
169 /**
170 * Called by glCopyPixels().
171 */
172 void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
173 GLsizei width, GLsizei height,
174 GLint dstx, GLint dsty, GLenum type );
175
176 /**
177 * Called by glBitmap().
178 */
179 void (*Bitmap)( struct gl_context *ctx,
180 GLint x, GLint y, GLsizei width, GLsizei height,
181 const struct gl_pixelstore_attrib *unpack,
182 const GLubyte *bitmap );
183 /*@}*/
184
185
186 /**
187 * \name Texture image functions
188 */
189 /*@{*/
190
191 /**
192 * Choose actual hardware texture format given the user-provided source
193 * image format and type and the desired internal format. In some
194 * cases, srcFormat and srcType can be GL_NONE.
195 * Called by glTexImage(), etc.
196 */
197 gl_format (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat,
198 GLenum srcFormat, GLenum srcType );
199
200 /**
201 * Called by glTexImage[123]D() and glCopyTexImage[12]D()
202 * Allocate texture memory and copy the user's image to the buffer.
203 * The gl_texture_image fields, etc. will be fully initialized.
204 * The parameters are the same as glTexImage3D(), plus:
205 * \param dims 1, 2, or 3 indicating glTexImage1/2/3D()
206 * \param packing describes how to unpack the source data.
207 * \param texImage is the destination texture image.
208 */
209 void (*TexImage)(struct gl_context *ctx, GLuint dims,
210 struct gl_texture_image *texImage,
211 GLenum format, GLenum type, const GLvoid *pixels,
212 const struct gl_pixelstore_attrib *packing);
213
214 /**
215 * Called by glTexSubImage[123]D().
216 * Replace a subset of the target texture with new texel data.
217 */
218 void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
219 struct gl_texture_image *texImage,
220 GLint xoffset, GLint yoffset, GLint zoffset,
221 GLsizei width, GLsizei height, GLint depth,
222 GLenum format, GLenum type,
223 const GLvoid *pixels,
224 const struct gl_pixelstore_attrib *packing);
225
226
227 /**
228 * Called by glGetTexImage().
229 */
230 void (*GetTexImage)( struct gl_context *ctx,
231 GLenum format, GLenum type, GLvoid *pixels,
232 struct gl_texture_image *texImage );
233
234 /**
235 * Called by glCopyTex[Sub]Image[123]D().
236 */
237 void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
238 struct gl_texture_image *texImage,
239 GLint xoffset, GLint yoffset, GLint zoffset,
240 struct gl_renderbuffer *rb,
241 GLint x, GLint y,
242 GLsizei width, GLsizei height);
243
244 /**
245 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
246 */
247 void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
248 struct gl_texture_object *texObj);
249
250 /**
251 * Called by glTexImage[123]D when user specifies a proxy texture
252 * target.
253 *
254 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
255 */
256 GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
257 GLint level, GLint internalFormat,
258 GLenum format, GLenum type,
259 GLint width, GLint height,
260 GLint depth, GLint border);
261 /*@}*/
262
263
264 /**
265 * \name Compressed texture functions
266 */
267 /*@{*/
268
269 /**
270 * Called by glCompressedTexImage[123]D().
271 */
272 void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
273 struct gl_texture_image *texImage,
274 GLsizei imageSize, const GLvoid *data);
275
276 /**
277 * Called by glCompressedTexSubImage[123]D().
278 */
279 void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
280 struct gl_texture_image *texImage,
281 GLint xoffset, GLint yoffset, GLint zoffset,
282 GLsizei width, GLint height, GLint depth,
283 GLenum format,
284 GLsizei imageSize, const GLvoid *data);
285
286 /**
287 * Called by glGetCompressedTexImage.
288 */
289 void (*GetCompressedTexImage)(struct gl_context *ctx,
290 struct gl_texture_image *texImage,
291 GLvoid *data);
292 /*@}*/
293
294 /**
295 * \name Texture object / image functions
296 */
297 /*@{*/
298
299 /**
300 * Called by glBindTexture().
301 */
302 void (*BindTexture)( struct gl_context *ctx, GLenum target,
303 struct gl_texture_object *tObj );
304
305 /**
306 * Called to allocate a new texture object. Drivers will usually
307 * allocate/return a subclass of gl_texture_object.
308 */
309 struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
310 GLuint name, GLenum target);
311 /**
312 * Called to delete/free a texture object. Drivers should free the
313 * object and any image data it contains.
314 */
315 void (*DeleteTexture)(struct gl_context *ctx,
316 struct gl_texture_object *texObj);
317
318 /** Called to allocate a new texture image object. */
319 struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
320
321 /** Called to free a texture image object returned by NewTextureImage() */
322 void (*DeleteTextureImage)(struct gl_context *ctx,
323 struct gl_texture_image *);
324
325 /** Called to allocate memory for a single texture image */
326 GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
327 struct gl_texture_image *texImage);
328
329 /** Free the memory for a single texture image */
330 void (*FreeTextureImageBuffer)(struct gl_context *ctx,
331 struct gl_texture_image *texImage);
332
333 /** Map a slice of a texture image into user space.
334 * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
335 * indicates the 1D array index.
336 * \param texImage the texture image
337 * \param slice the 3D image slice or array texture slice
338 * \param x, y, w, h region of interest
339 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
340 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
341 * \param mapOut returns start of mapping of region of interest
342 * \param rowStrideOut returns row stride (in bytes)
343 */
344 void (*MapTextureImage)(struct gl_context *ctx,
345 struct gl_texture_image *texImage,
346 GLuint slice,
347 GLuint x, GLuint y, GLuint w, GLuint h,
348 GLbitfield mode,
349 GLubyte **mapOut, GLint *rowStrideOut);
350
351 void (*UnmapTextureImage)(struct gl_context *ctx,
352 struct gl_texture_image *texImage,
353 GLuint slice);
354
355 /** For GL_ARB_texture_storage. Allocate memory for whole mipmap stack.
356 * All the gl_texture_images in the texture object will have their
357 * dimensions, format, etc. initialized already.
358 */
359 GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
360 struct gl_texture_object *texObj,
361 GLsizei levels, GLsizei width,
362 GLsizei height, GLsizei depth);
363
364 /**
365 * Map a renderbuffer into user space.
366 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
367 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
368 */
369 void (*MapRenderbuffer)(struct gl_context *ctx,
370 struct gl_renderbuffer *rb,
371 GLuint x, GLuint y, GLuint w, GLuint h,
372 GLbitfield mode,
373 GLubyte **mapOut, GLint *rowStrideOut);
374
375 void (*UnmapRenderbuffer)(struct gl_context *ctx,
376 struct gl_renderbuffer *rb);
377
378 /*@}*/
379
380
381 /**
382 * \name Vertex/fragment program functions
383 */
384 /*@{*/
385 /** Bind a vertex/fragment program */
386 void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog);
387 /** Allocate a new program */
388 struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id);
389 /** Delete a program */
390 void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
391 /**
392 * Notify driver that a program string (and GPU code) has been specified
393 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
394 * supported by the driver.
395 */
396 GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
397 struct gl_program *prog);
398
399 /** Query if program can be loaded onto hardware */
400 GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
401 struct gl_program *prog);
402
403 /*@}*/
404
405 /**
406 * \name GLSL shader/program functions.
407 */
408 /*@{*/
409 /**
410 * Called when a shader program is linked.
411 *
412 * This gives drivers an opportunity to clone the IR and make their
413 * own transformations on it for the purposes of code generation.
414 */
415 GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader);
416 /*@}*/
417
418 /**
419 * \name State-changing functions.
420 *
421 * \note drawing functions are above.
422 *
423 * These functions are called by their corresponding OpenGL API functions.
424 * They are \e also called by the gl_PopAttrib() function!!!
425 * May add more functions like these to the device driver in the future.
426 */
427 /*@{*/
428 /** Specify the alpha test function */
429 void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
430 /** Set the blend color */
431 void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
432 /** Set the blend equation */
433 void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA);
434 void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
435 GLenum modeRGB, GLenum modeA);
436 /** Specify pixel arithmetic */
437 void (*BlendFuncSeparate)(struct gl_context *ctx,
438 GLenum sfactorRGB, GLenum dfactorRGB,
439 GLenum sfactorA, GLenum dfactorA);
440 void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
441 GLenum sfactorRGB, GLenum dfactorRGB,
442 GLenum sfactorA, GLenum dfactorA);
443 /** Specify a plane against which all geometry is clipped */
444 void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation );
445 /** Enable and disable writing of frame buffer color components */
446 void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
447 GLboolean bmask, GLboolean amask );
448 void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
449 GLboolean gmask, GLboolean bmask, GLboolean amask);
450 /** Cause a material color to track the current color */
451 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
452 /** Specify whether front- or back-facing facets can be culled */
453 void (*CullFace)(struct gl_context *ctx, GLenum mode);
454 /** Define front- and back-facing polygons */
455 void (*FrontFace)(struct gl_context *ctx, GLenum mode);
456 /** Specify the value used for depth buffer comparisons */
457 void (*DepthFunc)(struct gl_context *ctx, GLenum func);
458 /** Enable or disable writing into the depth buffer */
459 void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
460 /** Specify mapping of depth values from NDC to window coordinates */
461 void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval);
462 /** Specify the current buffer for writing */
463 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
464 /** Specify the buffers for writing for fragment programs*/
465 void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers );
466 /** Enable or disable server-side gl capabilities */
467 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
468 /** Specify fog parameters */
469 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
470 /** Specify implementation-specific hints */
471 void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
472 /** Set light source parameters.
473 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
474 * been transformed to eye-space.
475 */
476 void (*Lightfv)(struct gl_context *ctx, GLenum light,
477 GLenum pname, const GLfloat *params );
478 /** Set the lighting model parameters */
479 void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
480 /** Specify the line stipple pattern */
481 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
482 /** Specify the width of rasterized lines */
483 void (*LineWidth)(struct gl_context *ctx, GLfloat width);
484 /** Specify a logical pixel operation for color index rendering */
485 void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
486 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
487 const GLfloat *params);
488 /** Specify the diameter of rasterized points */
489 void (*PointSize)(struct gl_context *ctx, GLfloat size);
490 /** Select a polygon rasterization mode */
491 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
492 /** Set the scale and units used to calculate depth values */
493 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units);
494 /** Set the polygon stippling pattern */
495 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
496 /* Specifies the current buffer for reading */
497 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
498 /** Set rasterization mode */
499 void (*RenderMode)(struct gl_context *ctx, GLenum mode );
500 /** Define the scissor box */
501 void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
502 /** Select flat or smooth shading */
503 void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
504 /** OpenGL 2.0 two-sided StencilFunc */
505 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
506 GLint ref, GLuint mask);
507 /** OpenGL 2.0 two-sided StencilMask */
508 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
509 /** OpenGL 2.0 two-sided StencilOp */
510 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
511 GLenum zfail, GLenum zpass);
512 /** Control the generation of texture coordinates */
513 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
514 const GLfloat *params);
515 /** Set texture environment parameters */
516 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
517 const GLfloat *param);
518 /** Set texture parameters */
519 void (*TexParameter)(struct gl_context *ctx, GLenum target,
520 struct gl_texture_object *texObj,
521 GLenum pname, const GLfloat *params);
522 /** Set the viewport */
523 void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
524 /*@}*/
525
526
527 /**
528 * \name Vertex/pixel buffer object functions
529 */
530 /*@{*/
531 void (*BindBuffer)( struct gl_context *ctx, GLenum target,
532 struct gl_buffer_object *obj );
533
534 struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer,
535 GLenum target );
536
537 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
538
539 GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size,
540 const GLvoid *data, GLenum usage,
541 struct gl_buffer_object *obj );
542
543 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
544 GLsizeiptrARB size, const GLvoid *data,
545 struct gl_buffer_object *obj );
546
547 void (*GetBufferSubData)( struct gl_context *ctx,
548 GLintptrARB offset, GLsizeiptrARB size,
549 GLvoid *data, struct gl_buffer_object *obj );
550
551 void (*CopyBufferSubData)( struct gl_context *ctx,
552 struct gl_buffer_object *src,
553 struct gl_buffer_object *dst,
554 GLintptr readOffset, GLintptr writeOffset,
555 GLsizeiptr size );
556
557 /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
558 */
559 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
560 GLsizeiptr length, GLbitfield access,
561 struct gl_buffer_object *obj);
562
563 void (*FlushMappedBufferRange)(struct gl_context *ctx,
564 GLintptr offset, GLsizeiptr length,
565 struct gl_buffer_object *obj);
566
567 GLboolean (*UnmapBuffer)( struct gl_context *ctx,
568 struct gl_buffer_object *obj );
569 /*@}*/
570
571 /**
572 * \name Functions for GL_APPLE_object_purgeable
573 */
574 /*@{*/
575 /* variations on ObjectPurgeable */
576 GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
577 GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
578 GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
579
580 /* variations on ObjectUnpurgeable */
581 GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option );
582 GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option );
583 GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option );
584 /*@}*/
585
586 /**
587 * \name Functions for GL_EXT_framebuffer_{object,blit}.
588 */
589 /*@{*/
590 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name);
591 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name);
592 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
593 struct gl_framebuffer *drawFb,
594 struct gl_framebuffer *readFb);
595 void (*FramebufferRenderbuffer)(struct gl_context *ctx,
596 struct gl_framebuffer *fb,
597 GLenum attachment,
598 struct gl_renderbuffer *rb);
599 void (*RenderTexture)(struct gl_context *ctx,
600 struct gl_framebuffer *fb,
601 struct gl_renderbuffer_attachment *att);
602 void (*FinishRenderTexture)(struct gl_context *ctx,
603 struct gl_renderbuffer_attachment *att);
604 void (*ValidateFramebuffer)(struct gl_context *ctx,
605 struct gl_framebuffer *fb);
606 /*@}*/
607 void (*BlitFramebuffer)(struct gl_context *ctx,
608 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
609 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
610 GLbitfield mask, GLenum filter);
611
612 /**
613 * \name Query objects
614 */
615 /*@{*/
616 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
617 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
618 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
619 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
620 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
621 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
622 /*@}*/
623
624
625 /**
626 * \name Vertex Array objects
627 */
628 /*@{*/
629 struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
630 void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
631 void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj);
632 /*@}*/
633
634 /**
635 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
636 */
637 /*@{*/
638 struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type);
639 void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
640 struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name);
641 void (*DeleteShaderProgram)(struct gl_context *ctx,
642 struct gl_shader_program *shProg);
643 void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
644 /*@}*/
645
646
647 /**
648 * \name Support for multiple T&L engines
649 */
650 /*@{*/
651
652 /**
653 * Set by the driver-supplied T&L engine.
654 *
655 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
656 */
657 GLuint CurrentExecPrimitive;
658
659 /**
660 * Current state of an in-progress compilation.
661 *
662 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
663 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
664 */
665 GLuint CurrentSavePrimitive;
666
667
668 #define FLUSH_STORED_VERTICES 0x1
669 #define FLUSH_UPDATE_CURRENT 0x2
670 /**
671 * Set by the driver-supplied T&L engine whenever vertices are buffered
672 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not
673 * updated.
674 *
675 * The dd_function_table::FlushVertices call below may be used to resolve
676 * these conditions.
677 */
678 GLuint NeedFlush;
679 GLuint SaveNeedFlush;
680
681
682 /* Called prior to any of the GLvertexformat functions being
683 * called. Paired with Driver.FlushVertices().
684 */
685 void (*BeginVertices)( struct gl_context *ctx );
686
687 /**
688 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
689 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
690 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
691 * __struct gl_contextRec::Current and gl_light_attrib::Material
692 *
693 * Note that the default T&L engine never clears the
694 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
695 */
696 void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
697 void (*SaveFlushVertices)( struct gl_context *ctx );
698
699 /**
700 * \brief Hook for drivers to prepare for a glBegin/glEnd block
701 *
702 * This hook is called in vbo_exec_Begin() before any action, including
703 * state updates, occurs.
704 */
705 void (*PrepareExecBegin)( struct gl_context *ctx );
706
707 /**
708 * Give the driver the opportunity to hook in its own vtxfmt for
709 * compiling optimized display lists. This is called on each valid
710 * glBegin() during list compilation.
711 */
712 GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
713
714 /**
715 * Notify driver that the special derived value _NeedEyeCoords has
716 * changed.
717 */
718 void (*LightingSpaceChange)( struct gl_context *ctx );
719
720 /**
721 * Called by glNewList().
722 *
723 * Let the T&L component know what is going on with display lists
724 * in time to make changes to dispatch tables, etc.
725 */
726 void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
727 /**
728 * Called by glEndList().
729 *
730 * \sa dd_function_table::NewList.
731 */
732 void (*EndList)( struct gl_context *ctx );
733
734 /**
735 * Called by glCallList(s).
736 *
737 * Notify the T&L component before and after calling a display list.
738 */
739 void (*BeginCallList)( struct gl_context *ctx,
740 struct gl_display_list *dlist );
741 /**
742 * Called by glEndCallList().
743 *
744 * \sa dd_function_table::BeginCallList.
745 */
746 void (*EndCallList)( struct gl_context *ctx );
747
748 /**@}*/
749
750 /**
751 * \name GL_ARB_sync interfaces
752 */
753 /*@{*/
754 struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
755 void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield);
756 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
757 void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
758 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
759 GLbitfield, GLuint64);
760 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
761 GLbitfield, GLuint64);
762 /*@}*/
763
764 /** GL_NV_conditional_render */
765 void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q,
766 GLenum mode);
767 void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q);
768
769 /**
770 * \name GL_OES_draw_texture interface
771 */
772 /*@{*/
773 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
774 GLfloat width, GLfloat height);
775 /*@}*/
776
777 /**
778 * \name GL_OES_EGL_image interface
779 */
780 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
781 struct gl_texture_object *texObj,
782 struct gl_texture_image *texImage,
783 GLeglImageOES image_handle);
784 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
785 struct gl_renderbuffer *rb,
786 void *image_handle);
787
788 /**
789 * \name GL_EXT_transform_feedback interface
790 */
791 struct gl_transform_feedback_object *
792 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
793 void (*DeleteTransformFeedback)(struct gl_context *ctx,
794 struct gl_transform_feedback_object *obj);
795 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
796 struct gl_transform_feedback_object *obj);
797 void (*EndTransformFeedback)(struct gl_context *ctx,
798 struct gl_transform_feedback_object *obj);
799 void (*PauseTransformFeedback)(struct gl_context *ctx,
800 struct gl_transform_feedback_object *obj);
801 void (*ResumeTransformFeedback)(struct gl_context *ctx,
802 struct gl_transform_feedback_object *obj);
803
804 /**
805 * \name GL_NV_texture_barrier interface
806 */
807 void (*TextureBarrier)(struct gl_context *ctx);
808
809 /**
810 * \name GL_ARB_sampler_objects
811 */
812 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
813 GLuint name);
814 void (*DeleteSamplerObject)(struct gl_context *ctx,
815 struct gl_sampler_object *samp);
816
817 /**
818 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
819 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
820 */
821 uint64_t (*GetTimestamp)(struct gl_context *ctx);
822 };
823
824
825 /**
826 * Transform/Clip/Lighting interface
827 *
828 * Drivers present a reduced set of the functions possible in
829 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
830 * remaining functions to map down to these entry points.
831 *
832 * These are the initial values to be installed into dispatch by
833 * mesa. If the T&L driver wants to modify the dispatch table
834 * while installed, it must do so itself. It would be possible for
835 * the vertexformat to install its own initial values for these
836 * functions, but this way there is an obvious list of what is
837 * expected of the driver.
838 *
839 * If the driver wants to hook in entry points other than those
840 * listed, it must restore them to their original values in
841 * the disable() callback, below.
842 */
843 typedef struct {
844 /**
845 * \name Vertex
846 */
847 /*@{*/
848 void (GLAPIENTRYP ArrayElement)( GLint );
849 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
850 void (GLAPIENTRYP Color3fv)( const GLfloat * );
851 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
852 void (GLAPIENTRYP Color4fv)( const GLfloat * );
853 void (GLAPIENTRYP EdgeFlag)( GLboolean );
854 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
855 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
856 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
857 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
858 void (GLAPIENTRYP EvalPoint1)( GLint );
859 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
860 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
861 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
862 void (GLAPIENTRYP Indexf)( GLfloat );
863 void (GLAPIENTRYP Indexfv)( const GLfloat * );
864 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
865 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
866 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
867 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
868 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
869 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
870 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
871 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
872 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
873 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
874 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
875 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
876 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
877 void (GLAPIENTRYP TexCoord1f)( GLfloat );
878 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
879 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
880 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
881 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
882 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
883 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
884 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
885 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
886 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
887 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
888 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
889 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
890 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
891 void (GLAPIENTRYP CallList)( GLuint );
892 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
893 void (GLAPIENTRYP Begin)( GLenum );
894 void (GLAPIENTRYP End)( void );
895 void (GLAPIENTRYP PrimitiveRestartNV)( void );
896 /* GL_NV_vertex_program */
897 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
898 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
899 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
900 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
901 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
902 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
903 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
904 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
905 /* GL_ARB_vertex_program */
906 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
907 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
908 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
909 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
910 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
911 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
912 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
913 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
914
915 /* GL_EXT_gpu_shader4 / GL 3.0 */
916 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
917 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
918 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
919 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
920 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
921 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
922 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
923
924 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
925 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
926 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
927 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
928 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
929 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
930 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
931
932 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
933 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
934 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
935
936 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
937 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
938
939 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
940 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
941
942 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
943 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
944
945 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
946 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
947
948 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
949 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
950
951 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
952 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
953
954 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
955 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
956 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
957 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
958 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
959 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
960 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
961 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
962
963 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
964 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
965
966 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
967 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
968
969 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
970 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
971
972 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
973 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
974
975 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
976 GLboolean normalized, GLuint value);
977 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
978 GLboolean normalized, GLuint value);
979 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
980 GLboolean normalized, GLuint value);
981 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
982 GLboolean normalized, GLuint value);
983 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
984 GLboolean normalized,
985 const GLuint *value);
986 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
987 GLboolean normalized,
988 const GLuint *value);
989 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
990 GLboolean normalized,
991 const GLuint *value);
992 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
993 GLboolean normalized,
994 const GLuint *value);
995
996 /*@}*/
997
998 void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
999
1000 /**
1001 * \name Array
1002 */
1003 /*@{*/
1004 void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
1005 void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
1006 const GLvoid *indices );
1007 void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
1008 GLuint end, GLsizei count,
1009 GLenum type, const GLvoid *indices );
1010 void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count,
1011 GLenum type,
1012 const GLvoid **indices,
1013 GLsizei primcount);
1014 void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
1015 GLenum type,
1016 const GLvoid *indices,
1017 GLint basevertex );
1018 void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
1019 GLuint end, GLsizei count,
1020 GLenum type,
1021 const GLvoid *indices,
1022 GLint basevertex);
1023 void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
1024 const GLsizei *count,
1025 GLenum type,
1026 const GLvoid * const *indices,
1027 GLsizei primcount,
1028 const GLint *basevertex);
1029 void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first,
1030 GLsizei count, GLsizei primcount);
1031 void (GLAPIENTRYP DrawArraysInstancedBaseInstance)(GLenum mode, GLint first,
1032 GLsizei count, GLsizei primcount,
1033 GLuint baseinstance);
1034 void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count,
1035 GLenum type, const GLvoid *indices,
1036 GLsizei primcount);
1037 void (GLAPIENTRYP DrawElementsInstancedBaseInstance)(GLenum mode, GLsizei count,
1038 GLenum type, const GLvoid *indices,
1039 GLsizei primcount, GLuint baseinstance);
1040 void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count,
1041 GLenum type, const GLvoid *indices,
1042 GLsizei primcount, GLint basevertex);
1043 void (GLAPIENTRYP DrawElementsInstancedBaseVertexBaseInstance)(GLenum mode, GLsizei count,
1044 GLenum type, const GLvoid *indices,
1045 GLsizei primcount, GLint basevertex,
1046 GLuint baseinstance);
1047 void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint name);
1048 void (GLAPIENTRYP DrawTransformFeedbackStream)(GLenum mode, GLuint name,
1049 GLuint stream);
1050 void (GLAPIENTRYP DrawTransformFeedbackInstanced)(GLenum mode, GLuint name,
1051 GLsizei primcount);
1052 void (GLAPIENTRYP DrawTransformFeedbackStreamInstanced)(GLenum mode,
1053 GLuint name,
1054 GLuint stream,
1055 GLsizei primcount);
1056 /*@}*/
1057
1058 /**
1059 * \name Eval
1060 *
1061 * If you don't support eval, fallback to the default vertex format
1062 * on receiving an eval call and use the pipeline mechanism to
1063 * provide partial T&L acceleration.
1064 *
1065 * Mesa will provide a set of helper functions to do eval within
1066 * accelerated vertex formats, eventually...
1067 */
1068 /*@{*/
1069 void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
1070 void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
1071 /*@}*/
1072
1073 } GLvertexformat;
1074
1075
1076 #endif /* DD_INCLUDED */