mesa/st: add support for semaphore object signal/wait v4
[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 *
9 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the "Software"),
13 * to deal in the Software without restriction, including without limitation
14 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 * and/or sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 * 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_bitmap_atlas;
39 struct gl_buffer_object;
40 struct gl_context;
41 struct gl_display_list;
42 struct gl_framebuffer;
43 struct gl_image_unit;
44 struct gl_pixelstore_attrib;
45 struct gl_program;
46 struct gl_renderbuffer;
47 struct gl_renderbuffer_attachment;
48 struct gl_shader;
49 struct gl_shader_program;
50 struct gl_texture_image;
51 struct gl_texture_object;
52 struct gl_memory_info;
53 struct util_queue_monitoring;
54
55 /* GL_ARB_vertex_buffer_object */
56 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
57 * NULL) if buffer is unavailable for immediate mapping.
58 *
59 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
60 * would require more book-keeping in the driver than seems necessary
61 * at this point.
62 *
63 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
64 * want to provoke the driver to throw away the old storage, we will
65 * respect the contents of already referenced data.
66 */
67 #define MESA_MAP_NOWAIT_BIT 0x4000
68
69
70 /**
71 * Device driver function table.
72 * Core Mesa uses these function pointers to call into device drivers.
73 * Most of these functions directly correspond to OpenGL state commands.
74 * Core Mesa will call these functions after error checking has been done
75 * so that the drivers don't have to worry about error testing.
76 *
77 * Vertex transformation/clipping/lighting is patched into the T&L module.
78 * Rasterization functions are patched into the swrast module.
79 *
80 * Note: when new functions are added here, the drivers/common/driverfuncs.c
81 * file should be updated too!!!
82 */
83 struct dd_function_table {
84 /**
85 * Return a string as needed by glGetString().
86 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
87 * returned.
88 */
89 const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
90
91 /**
92 * Notify the driver after Mesa has made some internal state changes.
93 *
94 * This is in addition to any state change callbacks Mesa may already have
95 * made.
96 */
97 void (*UpdateState)(struct gl_context *ctx);
98
99 /**
100 * This is called whenever glFinish() is called.
101 */
102 void (*Finish)( struct gl_context *ctx );
103
104 /**
105 * This is called whenever glFlush() is called.
106 */
107 void (*Flush)( struct gl_context *ctx );
108
109 /**
110 * Clear the color/depth/stencil/accum buffer(s).
111 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
112 * renderbuffers need to be cleared.
113 */
114 void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
115
116 /**
117 * Execute glRasterPos, updating the ctx->Current.Raster fields
118 */
119 void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
120
121 /**
122 * \name Image-related functions
123 */
124 /*@{*/
125
126 /**
127 * Called by glDrawPixels().
128 * \p unpack describes how to unpack the source image data.
129 */
130 void (*DrawPixels)( struct gl_context *ctx,
131 GLint x, GLint y, GLsizei width, GLsizei height,
132 GLenum format, GLenum type,
133 const struct gl_pixelstore_attrib *unpack,
134 const GLvoid *pixels );
135
136 /**
137 * Called by glReadPixels().
138 */
139 void (*ReadPixels)( struct gl_context *ctx,
140 GLint x, GLint y, GLsizei width, GLsizei height,
141 GLenum format, GLenum type,
142 const struct gl_pixelstore_attrib *unpack,
143 GLvoid *dest );
144
145 /**
146 * Called by glCopyPixels().
147 */
148 void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
149 GLsizei width, GLsizei height,
150 GLint dstx, GLint dsty, GLenum type );
151
152 /**
153 * Called by glBitmap().
154 */
155 void (*Bitmap)( struct gl_context *ctx,
156 GLint x, GLint y, GLsizei width, GLsizei height,
157 const struct gl_pixelstore_attrib *unpack,
158 const GLubyte *bitmap );
159
160 /**
161 * Called by display list code for optimized glCallLists/glBitmap rendering
162 * The driver must support texture rectangles of width 1024 or more.
163 */
164 void (*DrawAtlasBitmaps)(struct gl_context *ctx,
165 const struct gl_bitmap_atlas *atlas,
166 GLuint count, const GLubyte *ids);
167 /*@}*/
168
169
170 /**
171 * \name Texture image functions
172 */
173 /*@{*/
174
175 /**
176 * Choose actual hardware texture format given the texture target, the
177 * user-provided source image format and type and the desired internal
178 * format. In some cases, srcFormat and srcType can be GL_NONE.
179 * Note: target may be GL_TEXTURE_CUBE_MAP, but never
180 * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
181 * Called by glTexImage(), etc.
182 */
183 mesa_format (*ChooseTextureFormat)(struct gl_context *ctx,
184 GLenum target, GLint internalFormat,
185 GLenum srcFormat, GLenum srcType );
186
187 /**
188 * Queries different driver parameters for a particular target and format.
189 * Since ARB_internalformat_query2 introduced several new query parameters
190 * over ARB_internalformat_query, having one driver hook for each parameter
191 * is no longer feasible. So this is the generic entry-point for calls
192 * to glGetInternalFormativ and glGetInternalFormati64v, after Mesa has
193 * checked errors and default values.
194 *
195 * \param ctx GL context
196 * \param target GL target enum
197 * \param internalFormat GL format enum
198 * \param pname GL enum that specifies the info to query.
199 * \param params Buffer to hold the result of the query.
200 */
201 void (*QueryInternalFormat)(struct gl_context *ctx,
202 GLenum target,
203 GLenum internalFormat,
204 GLenum pname,
205 GLint *params);
206
207 /**
208 * Called by glTexImage[123]D() and glCopyTexImage[12]D()
209 * Allocate texture memory and copy the user's image to the buffer.
210 * The gl_texture_image fields, etc. will be fully initialized.
211 * The parameters are the same as glTexImage3D(), plus:
212 * \param dims 1, 2, or 3 indicating glTexImage1/2/3D()
213 * \param packing describes how to unpack the source data.
214 * \param texImage is the destination texture image.
215 */
216 void (*TexImage)(struct gl_context *ctx, GLuint dims,
217 struct gl_texture_image *texImage,
218 GLenum format, GLenum type, const GLvoid *pixels,
219 const struct gl_pixelstore_attrib *packing);
220
221 /**
222 * Called by glTexSubImage[123]D().
223 * Replace a subset of the target texture with new texel data.
224 */
225 void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
226 struct gl_texture_image *texImage,
227 GLint xoffset, GLint yoffset, GLint zoffset,
228 GLsizei width, GLsizei height, GLint depth,
229 GLenum format, GLenum type,
230 const GLvoid *pixels,
231 const struct gl_pixelstore_attrib *packing);
232
233
234 /**
235 * Called by glGetTexImage(), glGetTextureSubImage().
236 */
237 void (*GetTexSubImage)(struct gl_context *ctx,
238 GLint xoffset, GLint yoffset, GLint zoffset,
239 GLsizei width, GLsizei height, GLsizei depth,
240 GLenum format, GLenum type, GLvoid *pixels,
241 struct gl_texture_image *texImage);
242
243 /**
244 * Called by glClearTex[Sub]Image
245 *
246 * Clears a rectangular region of the image to a given value. The
247 * clearValue argument is either NULL or points to a single texel to use as
248 * the clear value in the same internal format as the texture image. If it
249 * is NULL then the texture should be cleared to zeroes.
250 */
251 void (*ClearTexSubImage)(struct gl_context *ctx,
252 struct gl_texture_image *texImage,
253 GLint xoffset, GLint yoffset, GLint zoffset,
254 GLsizei width, GLsizei height, GLsizei depth,
255 const GLvoid *clearValue);
256
257 /**
258 * Called by glCopyTex[Sub]Image[123]D().
259 *
260 * This function should copy a rectangular region in the rb to a single
261 * destination slice, specified by @slice. In the case of 1D array
262 * textures (where one GL call can potentially affect multiple destination
263 * slices), core mesa takes care of calling this function multiple times,
264 * once for each scanline to be copied.
265 */
266 void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
267 struct gl_texture_image *texImage,
268 GLint xoffset, GLint yoffset, GLint slice,
269 struct gl_renderbuffer *rb,
270 GLint x, GLint y,
271 GLsizei width, GLsizei height);
272 /**
273 * Called by glCopyImageSubData().
274 *
275 * This function should copy one 2-D slice from src_teximage or
276 * src_renderbuffer to dst_teximage or dst_renderbuffer. Either the
277 * teximage or renderbuffer pointer will be non-null to indicate which
278 * is the real src/dst.
279 *
280 * If one of the textures is 3-D or is a 1-D or 2-D array
281 * texture, this function will be called multiple times: once for each
282 * slice. If one of the textures is a cube map, this function will be
283 * called once for each face to be copied.
284 */
285 void (*CopyImageSubData)(struct gl_context *ctx,
286 struct gl_texture_image *src_teximage,
287 struct gl_renderbuffer *src_renderbuffer,
288 int src_x, int src_y, int src_z,
289 struct gl_texture_image *dst_teximage,
290 struct gl_renderbuffer *dst_renderbuffer,
291 int dst_x, int dst_y, int dst_z,
292 int src_width, int src_height);
293
294 /**
295 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
296 * Note that if the texture is a cube map, the <target> parameter will
297 * indicate which cube face to generate (GL_POSITIVE/NEGATIVE_X/Y/Z).
298 * texObj->BaseLevel is the level from which to generate the remaining
299 * mipmap levels.
300 */
301 void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
302 struct gl_texture_object *texObj);
303
304 /**
305 * Called by glTexImage, glCompressedTexImage, glCopyTexImage
306 * and glTexStorage to check if the dimensions of the texture image
307 * are too large.
308 * \param target any GL_PROXY_TEXTURE_x target
309 * \return GL_TRUE if the image is OK, GL_FALSE if too large
310 */
311 GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
312 GLuint numLevels, GLint level,
313 mesa_format format, GLuint numSamples,
314 GLint width, GLint height,
315 GLint depth);
316 /*@}*/
317
318
319 /**
320 * \name Compressed texture functions
321 */
322 /*@{*/
323
324 /**
325 * Called by glCompressedTexImage[123]D().
326 */
327 void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
328 struct gl_texture_image *texImage,
329 GLsizei imageSize, const GLvoid *data);
330
331 /**
332 * Called by glCompressedTexSubImage[123]D().
333 */
334 void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
335 struct gl_texture_image *texImage,
336 GLint xoffset, GLint yoffset, GLint zoffset,
337 GLsizei width, GLsizei height, GLsizei depth,
338 GLenum format,
339 GLsizei imageSize, const GLvoid *data);
340 /*@}*/
341
342 /**
343 * \name Texture object / image functions
344 */
345 /*@{*/
346
347 /**
348 * Called by glBindTexture() and glBindTextures().
349 */
350 void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
351 GLenum target, struct gl_texture_object *tObj );
352
353 /**
354 * Called to allocate a new texture object. Drivers will usually
355 * allocate/return a subclass of gl_texture_object.
356 */
357 struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
358 GLuint name, GLenum target);
359 /**
360 * Called to delete/free a texture object. Drivers should free the
361 * object and any image data it contains.
362 */
363 void (*DeleteTexture)(struct gl_context *ctx,
364 struct gl_texture_object *texObj);
365
366 /** Called to allocate a new texture image object. */
367 struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
368
369 /** Called to free a texture image object returned by NewTextureImage() */
370 void (*DeleteTextureImage)(struct gl_context *ctx,
371 struct gl_texture_image *);
372
373 /** Called to allocate memory for a single texture image */
374 GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
375 struct gl_texture_image *texImage);
376
377 /** Free the memory for a single texture image */
378 void (*FreeTextureImageBuffer)(struct gl_context *ctx,
379 struct gl_texture_image *texImage);
380
381 /** Map a slice of a texture image into user space.
382 * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
383 * indicates the 1D array index.
384 * \param texImage the texture image
385 * \param slice the 3D image slice or array texture slice
386 * \param x, y, w, h region of interest
387 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
388 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
389 * \param mapOut returns start of mapping of region of interest
390 * \param rowStrideOut returns row stride (in bytes). In the case of a
391 * compressed texture, this is the byte stride between one row of blocks
392 * and another.
393 */
394 void (*MapTextureImage)(struct gl_context *ctx,
395 struct gl_texture_image *texImage,
396 GLuint slice,
397 GLuint x, GLuint y, GLuint w, GLuint h,
398 GLbitfield mode,
399 GLubyte **mapOut, GLint *rowStrideOut);
400
401 void (*UnmapTextureImage)(struct gl_context *ctx,
402 struct gl_texture_image *texImage,
403 GLuint slice);
404
405 /** For GL_ARB_texture_storage. Allocate memory for whole mipmap stack.
406 * All the gl_texture_images in the texture object will have their
407 * dimensions, format, etc. initialized already.
408 */
409 GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
410 struct gl_texture_object *texObj,
411 GLsizei levels, GLsizei width,
412 GLsizei height, GLsizei depth);
413
414 /** Called as part of glTextureView to add views to origTexObj */
415 GLboolean (*TextureView)(struct gl_context *ctx,
416 struct gl_texture_object *texObj,
417 struct gl_texture_object *origTexObj);
418
419 /**
420 * Map a renderbuffer into user space.
421 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
422 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
423 */
424 void (*MapRenderbuffer)(struct gl_context *ctx,
425 struct gl_renderbuffer *rb,
426 GLuint x, GLuint y, GLuint w, GLuint h,
427 GLbitfield mode,
428 GLubyte **mapOut, GLint *rowStrideOut);
429
430 void (*UnmapRenderbuffer)(struct gl_context *ctx,
431 struct gl_renderbuffer *rb);
432
433 /**
434 * Optional driver entrypoint that binds a non-texture renderbuffer's
435 * contents to a texture image.
436 */
437 GLboolean (*BindRenderbufferTexImage)(struct gl_context *ctx,
438 struct gl_renderbuffer *rb,
439 struct gl_texture_image *texImage);
440 /*@}*/
441
442
443 /**
444 * \name Vertex/fragment program functions
445 */
446 /*@{*/
447 /** Allocate a new program */
448 struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target,
449 GLuint id, bool is_arb_asm);
450 /** Delete a program */
451 void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
452 /**
453 * Allocate a program to associate with the new ATI fragment shader (optional)
454 */
455 struct gl_program * (*NewATIfs)(struct gl_context *ctx,
456 struct ati_fragment_shader *curProg);
457 /**
458 * Notify driver that a program string (and GPU code) has been specified
459 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
460 * supported by the driver.
461 */
462 GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
463 struct gl_program *prog);
464
465 /**
466 * Notify driver that the sampler uniforms for the current program have
467 * changed. On some drivers, this may require shader recompiles.
468 */
469 void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
470 struct gl_program *prog);
471
472 /** Query if program can be loaded onto hardware */
473 GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
474 struct gl_program *prog);
475
476 /*@}*/
477
478 /**
479 * \name GLSL shader/program functions.
480 */
481 /*@{*/
482 /**
483 * Called when a shader program is linked.
484 *
485 * This gives drivers an opportunity to clone the IR and make their
486 * own transformations on it for the purposes of code generation.
487 */
488 GLboolean (*LinkShader)(struct gl_context *ctx,
489 struct gl_shader_program *shader);
490 /*@}*/
491
492 /**
493 * \name State-changing functions.
494 *
495 * \note drawing functions are above.
496 *
497 * These functions are called by their corresponding OpenGL API functions.
498 * They are \e also called by the gl_PopAttrib() function!!!
499 * May add more functions like these to the device driver in the future.
500 */
501 /*@{*/
502 /** Specify the alpha test function */
503 void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
504 /** Set the blend color */
505 void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
506 /** Set the blend equation */
507 void (*BlendEquationSeparate)(struct gl_context *ctx,
508 GLenum modeRGB, GLenum modeA);
509 /** Specify pixel arithmetic */
510 void (*BlendFuncSeparate)(struct gl_context *ctx,
511 GLenum sfactorRGB, GLenum dfactorRGB,
512 GLenum sfactorA, GLenum dfactorA);
513 /** Specify a plane against which all geometry is clipped */
514 void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
515 /** Enable and disable writing of frame buffer color components */
516 void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
517 GLboolean bmask, GLboolean amask );
518 /** Cause a material color to track the current color */
519 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
520 /** Specify whether front- or back-facing facets can be culled */
521 void (*CullFace)(struct gl_context *ctx, GLenum mode);
522 /** Define front- and back-facing polygons */
523 void (*FrontFace)(struct gl_context *ctx, GLenum mode);
524 /** Specify the value used for depth buffer comparisons */
525 void (*DepthFunc)(struct gl_context *ctx, GLenum func);
526 /** Enable or disable writing into the depth buffer */
527 void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
528 /** Specify mapping of depth values from NDC to window coordinates */
529 void (*DepthRange)(struct gl_context *ctx);
530 /** Specify the current buffer for writing */
531 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
532 /** Specify the buffers for writing for fragment programs*/
533 void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
534 /** Enable or disable server-side gl capabilities */
535 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
536 /** Specify fog parameters */
537 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
538 /** Set light source parameters.
539 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
540 * been transformed to eye-space.
541 */
542 void (*Lightfv)(struct gl_context *ctx, GLenum light,
543 GLenum pname, const GLfloat *params );
544 /** Set the lighting model parameters */
545 void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
546 const GLfloat *params);
547 /** Specify the line stipple pattern */
548 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
549 /** Specify the width of rasterized lines */
550 void (*LineWidth)(struct gl_context *ctx, GLfloat width);
551 /** Specify a logical pixel operation for color index rendering */
552 void (*LogicOpcode)(struct gl_context *ctx, enum gl_logicop_mode opcode);
553 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
554 const GLfloat *params);
555 /** Specify the diameter of rasterized points */
556 void (*PointSize)(struct gl_context *ctx, GLfloat size);
557 /** Select a polygon rasterization mode */
558 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
559 /** Set the scale and units used to calculate depth values */
560 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp);
561 /** Set the polygon stippling pattern */
562 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
563 /* Specifies the current buffer for reading */
564 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
565 /** Set rasterization mode */
566 void (*RenderMode)(struct gl_context *ctx, GLenum mode );
567 /** Define the scissor box */
568 void (*Scissor)(struct gl_context *ctx);
569 /** Select flat or smooth shading */
570 void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
571 /** OpenGL 2.0 two-sided StencilFunc */
572 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
573 GLint ref, GLuint mask);
574 /** OpenGL 2.0 two-sided StencilMask */
575 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
576 /** OpenGL 2.0 two-sided StencilOp */
577 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
578 GLenum zfail, GLenum zpass);
579 /** Control the generation of texture coordinates */
580 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
581 const GLfloat *params);
582 /** Set texture environment parameters */
583 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
584 const GLfloat *param);
585 /** Set texture parameter (callee gets param value from the texObj) */
586 void (*TexParameter)(struct gl_context *ctx,
587 struct gl_texture_object *texObj, GLenum pname);
588 /** Set the viewport */
589 void (*Viewport)(struct gl_context *ctx);
590 /*@}*/
591
592
593 /**
594 * \name Vertex/pixel buffer object functions
595 */
596 /*@{*/
597 struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
598 GLuint buffer);
599
600 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
601
602 GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
603 GLsizeiptrARB size, const GLvoid *data, GLenum usage,
604 GLenum storageFlags, struct gl_buffer_object *obj);
605
606 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
607 GLsizeiptrARB size, const GLvoid *data,
608 struct gl_buffer_object *obj );
609
610 void (*GetBufferSubData)( struct gl_context *ctx,
611 GLintptrARB offset, GLsizeiptrARB size,
612 GLvoid *data, struct gl_buffer_object *obj );
613
614 void (*ClearBufferSubData)( struct gl_context *ctx,
615 GLintptr offset, GLsizeiptr size,
616 const GLvoid *clearValue,
617 GLsizeiptr clearValueSize,
618 struct gl_buffer_object *obj );
619
620 void (*CopyBufferSubData)( struct gl_context *ctx,
621 struct gl_buffer_object *src,
622 struct gl_buffer_object *dst,
623 GLintptr readOffset, GLintptr writeOffset,
624 GLsizeiptr size );
625
626 void (*InvalidateBufferSubData)( struct gl_context *ctx,
627 struct gl_buffer_object *obj,
628 GLintptr offset,
629 GLsizeiptr length );
630
631 /* Returns pointer to the start of the mapped range.
632 * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
633 */
634 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
635 GLsizeiptr length, GLbitfield access,
636 struct gl_buffer_object *obj,
637 gl_map_buffer_index index);
638
639 void (*FlushMappedBufferRange)(struct gl_context *ctx,
640 GLintptr offset, GLsizeiptr length,
641 struct gl_buffer_object *obj,
642 gl_map_buffer_index index);
643
644 GLboolean (*UnmapBuffer)( struct gl_context *ctx,
645 struct gl_buffer_object *obj,
646 gl_map_buffer_index index);
647 /*@}*/
648
649 /**
650 * \name Functions for GL_APPLE_object_purgeable
651 */
652 /*@{*/
653 /* variations on ObjectPurgeable */
654 GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
655 struct gl_buffer_object *obj, GLenum option);
656 GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
657 struct gl_renderbuffer *obj, GLenum option);
658 GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
659 struct gl_texture_object *obj,
660 GLenum option);
661
662 /* variations on ObjectUnpurgeable */
663 GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
664 struct gl_buffer_object *obj,
665 GLenum option);
666 GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
667 struct gl_renderbuffer *obj,
668 GLenum option);
669 GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
670 struct gl_texture_object *obj,
671 GLenum option);
672 /*@}*/
673
674 /**
675 * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
676 */
677 /*@{*/
678 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
679 GLuint name);
680 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
681 GLuint name);
682 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
683 struct gl_framebuffer *drawFb,
684 struct gl_framebuffer *readFb);
685 void (*FramebufferRenderbuffer)(struct gl_context *ctx,
686 struct gl_framebuffer *fb,
687 GLenum attachment,
688 struct gl_renderbuffer *rb);
689 void (*RenderTexture)(struct gl_context *ctx,
690 struct gl_framebuffer *fb,
691 struct gl_renderbuffer_attachment *att);
692 void (*FinishRenderTexture)(struct gl_context *ctx,
693 struct gl_renderbuffer *rb);
694 void (*ValidateFramebuffer)(struct gl_context *ctx,
695 struct gl_framebuffer *fb);
696 /*@}*/
697 void (*BlitFramebuffer)(struct gl_context *ctx,
698 struct gl_framebuffer *readFb,
699 struct gl_framebuffer *drawFb,
700 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
701 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
702 GLbitfield mask, GLenum filter);
703 void (*DiscardFramebuffer)(struct gl_context *ctx,
704 GLenum target, GLsizei numAttachments,
705 const GLenum *attachments);
706
707 /**
708 * \name Query objects
709 */
710 /*@{*/
711 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
712 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
713 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
714 void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
715 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
716 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
717 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
718 /*
719 * \pname the value requested to be written (GL_QUERY_RESULT, etc)
720 * \ptype the type of the value requested to be written:
721 * GL_UNSIGNED_INT, GL_UNSIGNED_INT64_ARB,
722 * GL_INT, GL_INT64_ARB
723 */
724 void (*StoreQueryResult)(struct gl_context *ctx, struct gl_query_object *q,
725 struct gl_buffer_object *buf, intptr_t offset,
726 GLenum pname, GLenum ptype);
727 /*@}*/
728
729 /**
730 * \name Performance monitors
731 */
732 /*@{*/
733 void (*InitPerfMonitorGroups)(struct gl_context *ctx);
734 struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
735 void (*DeletePerfMonitor)(struct gl_context *ctx,
736 struct gl_perf_monitor_object *m);
737 GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
738 struct gl_perf_monitor_object *m);
739
740 /** Stop an active performance monitor, discarding results. */
741 void (*ResetPerfMonitor)(struct gl_context *ctx,
742 struct gl_perf_monitor_object *m);
743 void (*EndPerfMonitor)(struct gl_context *ctx,
744 struct gl_perf_monitor_object *m);
745 GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
746 struct gl_perf_monitor_object *m);
747 void (*GetPerfMonitorResult)(struct gl_context *ctx,
748 struct gl_perf_monitor_object *m,
749 GLsizei dataSize,
750 GLuint *data,
751 GLint *bytesWritten);
752 /*@}*/
753
754 /**
755 * \name Performance Query objects
756 */
757 /*@{*/
758 unsigned (*InitPerfQueryInfo)(struct gl_context *ctx);
759 void (*GetPerfQueryInfo)(struct gl_context *ctx,
760 unsigned queryIndex,
761 const char **name,
762 GLuint *dataSize,
763 GLuint *numCounters,
764 GLuint *numActive);
765 void (*GetPerfCounterInfo)(struct gl_context *ctx,
766 unsigned queryIndex,
767 unsigned counterIndex,
768 const char **name,
769 const char **desc,
770 GLuint *offset,
771 GLuint *data_size,
772 GLuint *type_enum,
773 GLuint *data_type_enum,
774 GLuint64 *raw_max);
775 struct gl_perf_query_object * (*NewPerfQueryObject)(struct gl_context *ctx,
776 unsigned queryIndex);
777 void (*DeletePerfQuery)(struct gl_context *ctx,
778 struct gl_perf_query_object *obj);
779 bool (*BeginPerfQuery)(struct gl_context *ctx,
780 struct gl_perf_query_object *obj);
781 void (*EndPerfQuery)(struct gl_context *ctx,
782 struct gl_perf_query_object *obj);
783 void (*WaitPerfQuery)(struct gl_context *ctx,
784 struct gl_perf_query_object *obj);
785 bool (*IsPerfQueryReady)(struct gl_context *ctx,
786 struct gl_perf_query_object *obj);
787 void (*GetPerfQueryData)(struct gl_context *ctx,
788 struct gl_perf_query_object *obj,
789 GLsizei dataSize,
790 GLuint *data,
791 GLuint *bytesWritten);
792 /*@}*/
793
794
795 /**
796 * \name GREMEDY debug/marker functions
797 */
798 /*@{*/
799 void (*EmitStringMarker)(struct gl_context *ctx, const GLchar *string, GLsizei len);
800 /*@}*/
801
802 /**
803 * \name Support for multiple T&L engines
804 */
805 /*@{*/
806
807 /**
808 * Set by the driver-supplied T&L engine.
809 *
810 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
811 */
812 GLuint CurrentExecPrimitive;
813
814 /**
815 * Current glBegin state of an in-progress compilation. May be
816 * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
817 * or PRIM_UNKNOWN.
818 */
819 GLuint CurrentSavePrimitive;
820
821
822 #define FLUSH_STORED_VERTICES 0x1
823 #define FLUSH_UPDATE_CURRENT 0x2
824 /**
825 * Set by the driver-supplied T&L engine whenever vertices are buffered
826 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
827 * is not updated. A bitmask of the FLUSH_x values above.
828 *
829 * The dd_function_table::FlushVertices call below may be used to resolve
830 * these conditions.
831 */
832 GLbitfield NeedFlush;
833
834 /** Need to call vbo_save_SaveFlushVertices() upon state change? */
835 GLboolean SaveNeedFlush;
836
837 /**
838 * Notify driver that the special derived value _NeedEyeCoords has
839 * changed.
840 */
841 void (*LightingSpaceChange)( struct gl_context *ctx );
842
843 /**@}*/
844
845 /**
846 * \name GL_ARB_sync interfaces
847 */
848 /*@{*/
849 struct gl_sync_object * (*NewSyncObject)(struct gl_context *);
850 void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
851 GLenum, GLbitfield);
852 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
853 void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
854 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
855 GLbitfield, GLuint64);
856 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
857 GLbitfield, GLuint64);
858 /*@}*/
859
860 /** GL_NV_conditional_render */
861 void (*BeginConditionalRender)(struct gl_context *ctx,
862 struct gl_query_object *q,
863 GLenum mode);
864 void (*EndConditionalRender)(struct gl_context *ctx,
865 struct gl_query_object *q);
866
867 /**
868 * \name GL_OES_draw_texture interface
869 */
870 /*@{*/
871 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
872 GLfloat width, GLfloat height);
873 /*@}*/
874
875 /**
876 * \name GL_OES_EGL_image interface
877 */
878 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
879 struct gl_texture_object *texObj,
880 struct gl_texture_image *texImage,
881 GLeglImageOES image_handle);
882 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
883 struct gl_renderbuffer *rb,
884 void *image_handle);
885
886 /**
887 * \name GL_EXT_transform_feedback interface
888 */
889 struct gl_transform_feedback_object *
890 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
891 void (*DeleteTransformFeedback)(struct gl_context *ctx,
892 struct gl_transform_feedback_object *obj);
893 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
894 struct gl_transform_feedback_object *obj);
895 void (*EndTransformFeedback)(struct gl_context *ctx,
896 struct gl_transform_feedback_object *obj);
897 void (*PauseTransformFeedback)(struct gl_context *ctx,
898 struct gl_transform_feedback_object *obj);
899 void (*ResumeTransformFeedback)(struct gl_context *ctx,
900 struct gl_transform_feedback_object *obj);
901
902 /**
903 * Return the number of vertices written to a stream during the last
904 * Begin/EndTransformFeedback block.
905 */
906 GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
907 struct gl_transform_feedback_object *obj,
908 GLuint stream);
909
910 /**
911 * \name GL_NV_texture_barrier interface
912 */
913 void (*TextureBarrier)(struct gl_context *ctx);
914
915 /**
916 * \name GL_ARB_sampler_objects
917 */
918 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
919 GLuint name);
920
921 /**
922 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
923 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
924 */
925 uint64_t (*GetTimestamp)(struct gl_context *ctx);
926
927 /**
928 * \name GL_ARB_texture_multisample
929 */
930 void (*GetSamplePosition)(struct gl_context *ctx,
931 struct gl_framebuffer *fb,
932 GLuint index,
933 GLfloat *outValue);
934
935 /**
936 * \name NV_vdpau_interop interface
937 */
938 void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
939 GLenum access, GLboolean output,
940 struct gl_texture_object *texObj,
941 struct gl_texture_image *texImage,
942 const GLvoid *vdpSurface, GLuint index);
943 void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
944 GLenum access, GLboolean output,
945 struct gl_texture_object *texObj,
946 struct gl_texture_image *texImage,
947 const GLvoid *vdpSurface, GLuint index);
948
949 /**
950 * Query reset status for GL_ARB_robustness
951 *
952 * Per \c glGetGraphicsResetStatusARB, this function should return a
953 * non-zero value once after a reset. If a reset is non-atomic, the
954 * non-zero status should be returned for the duration of the reset.
955 */
956 GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
957
958 /**
959 * \name GL_ARB_shader_image_load_store interface.
960 */
961 /** @{ */
962 void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
963 /** @} */
964
965 /**
966 * GL_MESA_shader_framebuffer_fetch_non_coherent rendering barrier.
967 *
968 * On return from this function any framebuffer contents written by
969 * previous draw commands are guaranteed to be visible from subsequent
970 * fragment shader invocations using the
971 * MESA_shader_framebuffer_fetch_non_coherent interface.
972 */
973 /** @{ */
974 void (*BlendBarrier)(struct gl_context *ctx);
975 /** @} */
976
977 /**
978 * \name GL_ARB_compute_shader interface
979 */
980 /*@{*/
981 void (*DispatchCompute)(struct gl_context *ctx, const GLuint *num_groups);
982 void (*DispatchComputeIndirect)(struct gl_context *ctx, GLintptr indirect);
983 /*@}*/
984
985 /**
986 * \name GL_ARB_compute_variable_group_size interface
987 */
988 /*@{*/
989 void (*DispatchComputeGroupSize)(struct gl_context *ctx,
990 const GLuint *num_groups,
991 const GLuint *group_size);
992 /*@}*/
993
994 /**
995 * Query information about memory. Device memory is e.g. VRAM. Staging
996 * memory is e.g. GART. All sizes are in kilobytes.
997 */
998 void (*QueryMemoryInfo)(struct gl_context *ctx,
999 struct gl_memory_info *info);
1000
1001 /**
1002 * Indicate that this thread is being used by Mesa as a background drawing
1003 * thread for the given GL context.
1004 *
1005 * If this function is called more than once from any given thread, each
1006 * subsequent call overrides the context that was passed in the previous
1007 * call. Mesa takes advantage of this to re-use a background thread to
1008 * perform drawing on behalf of multiple contexts.
1009 *
1010 * Mesa may sometimes call this function from a non-background thread
1011 * (i.e. a thread that has already been bound to a context using
1012 * __DriverAPIRec::MakeCurrent()); when this happens, ctx will be equal to
1013 * the context that is bound to this thread.
1014 *
1015 * Mesa will only call this function if GL multithreading is enabled.
1016 */
1017 void (*SetBackgroundContext)(struct gl_context *ctx,
1018 struct util_queue_monitoring *queue_info);
1019
1020 /**
1021 * \name GL_ARB_sparse_buffer interface
1022 */
1023 /*@{*/
1024 void (*BufferPageCommitment)(struct gl_context *ctx,
1025 struct gl_buffer_object *bufferObj,
1026 GLintptr offset, GLsizeiptr size,
1027 GLboolean commit);
1028 /*@}*/
1029
1030 /**
1031 * \name GL_ARB_bindless_texture interface
1032 */
1033 /*@{*/
1034 GLuint64 (*NewTextureHandle)(struct gl_context *ctx,
1035 struct gl_texture_object *texObj,
1036 struct gl_sampler_object *sampObj);
1037 void (*DeleteTextureHandle)(struct gl_context *ctx, GLuint64 handle);
1038 void (*MakeTextureHandleResident)(struct gl_context *ctx, GLuint64 handle,
1039 bool resident);
1040 GLuint64 (*NewImageHandle)(struct gl_context *ctx,
1041 struct gl_image_unit *imgObj);
1042 void (*DeleteImageHandle)(struct gl_context *ctx, GLuint64 handle);
1043 void (*MakeImageHandleResident)(struct gl_context *ctx, GLuint64 handle,
1044 GLenum access, bool resident);
1045 /*@}*/
1046
1047
1048 /**
1049 * \name GL_EXT_external_objects interface
1050 */
1051 /*@{*/
1052 /**
1053 * Called to allocate a new memory object. Drivers will usually
1054 * allocate/return a subclass of gl_memory_object.
1055 */
1056 struct gl_memory_object * (*NewMemoryObject)(struct gl_context *ctx,
1057 GLuint name);
1058 /**
1059 * Called to delete/free a memory object. Drivers should free the
1060 * object and any image data it contains.
1061 */
1062 void (*DeleteMemoryObject)(struct gl_context *ctx,
1063 struct gl_memory_object *memObj);
1064
1065 /**
1066 * Set the given memory object as the texture's storage.
1067 */
1068 GLboolean (*SetTextureStorageForMemoryObject)(struct gl_context *ctx,
1069 struct gl_texture_object *tex_obj,
1070 struct gl_memory_object *mem_obj,
1071 GLsizei levels, GLsizei width,
1072 GLsizei height, GLsizei depth,
1073 GLuint64 offset);
1074
1075 /**
1076 * Use a memory object as the backing data for a buffer object
1077 */
1078 GLboolean (*BufferDataMem)(struct gl_context *ctx,
1079 GLenum target,
1080 GLsizeiptrARB size,
1081 struct gl_memory_object *memObj,
1082 GLuint64 offset,
1083 GLenum usage,
1084 struct gl_buffer_object *bufObj);
1085
1086 /**
1087 * Fill uuid with an unique identifier for this driver
1088 *
1089 * uuid must point to GL_UUID_SIZE_EXT bytes of available memory
1090 */
1091 void (*GetDriverUuid)(struct gl_context *ctx, char *uuid);
1092
1093 /**
1094 * Fill uuid with an unique identifier for the device associated
1095 * to this driver
1096 *
1097 * uuid must point to GL_UUID_SIZE_EXT bytes of available memory
1098 */
1099 void (*GetDeviceUuid)(struct gl_context *ctx, char *uuid);
1100
1101 /*@}*/
1102
1103 /**
1104 * \name GL_EXT_external_objects_fd interface
1105 */
1106 /*@{*/
1107 /**
1108 * Called to import a memory object. The caller relinquishes ownership
1109 * of fd after the call returns.
1110 *
1111 * Accessing fd after ImportMemoryObjectFd returns results in undefined
1112 * behaviour. This is consistent with EXT_external_object_fd.
1113 */
1114 void (*ImportMemoryObjectFd)(struct gl_context *ctx,
1115 struct gl_memory_object *memObj,
1116 GLuint64 size,
1117 int fd);
1118 /*@}*/
1119
1120 /**
1121 * \name GL_ARB_get_program_binary
1122 */
1123 /*@{*/
1124 /**
1125 * Calls to retrieve/store a binary serialized copy of the current program.
1126 */
1127 void (*GetProgramBinaryDriverSHA1)(struct gl_context *ctx, uint8_t *sha1);
1128
1129 void (*ProgramBinarySerializeDriverBlob)(struct gl_context *ctx,
1130 struct gl_program *prog);
1131
1132 void (*ProgramBinaryDeserializeDriverBlob)(struct gl_context *ctx,
1133 struct gl_shader_program *shProg,
1134 struct gl_program *prog);
1135 /*@}*/
1136
1137 /**
1138 * \name GL_EXT_semaphore interface
1139 */
1140 /*@{*/
1141 /**
1142 * Called to allocate a new semaphore object. Drivers will usually
1143 * allocate/return a subclass of gl_semaphore_object.
1144 */
1145 struct gl_semaphore_object * (*NewSemaphoreObject)(struct gl_context *ctx,
1146 GLuint name);
1147 /**
1148 * Called to delete/free a semaphore object. Drivers should free the
1149 * object and any associated resources.
1150 */
1151 void (*DeleteSemaphoreObject)(struct gl_context *ctx,
1152 struct gl_semaphore_object *semObj);
1153
1154 /**
1155 * Introduce an operation to wait for the semaphore object in the GL
1156 * server's command stream
1157 */
1158 void (*ServerWaitSemaphoreObject)(struct gl_context *ctx,
1159 struct gl_semaphore_object *semObj,
1160 GLuint numBufferBarriers,
1161 struct gl_buffer_object **bufObjs,
1162 GLuint numTextureBarriers,
1163 struct gl_texture_object **texObjs,
1164 const GLenum *srcLayouts);
1165
1166 /**
1167 * Introduce an operation to signal the semaphore object in the GL
1168 * server's command stream
1169 */
1170 void (*ServerSignalSemaphoreObject)(struct gl_context *ctx,
1171 struct gl_semaphore_object *semObj,
1172 GLuint numBufferBarriers,
1173 struct gl_buffer_object **bufObjs,
1174 GLuint numTextureBarriers,
1175 struct gl_texture_object **texObjs,
1176 const GLenum *dstLayouts);
1177 /*@}*/
1178
1179 /**
1180 * \name GL_EXT_semaphore_fd interface
1181 */
1182 /*@{*/
1183 /**
1184 * Called to import a semaphore object. The caller relinquishes ownership
1185 * of fd after the call returns.
1186 *
1187 * Accessing fd after ImportSemaphoreFd returns results in undefined
1188 * behaviour. This is consistent with EXT_semaphore_fd.
1189 */
1190 void (*ImportSemaphoreFd)(struct gl_context *ctx,
1191 struct gl_semaphore_object *semObj,
1192 int fd);
1193 /*@}*/
1194 };
1195
1196
1197 /**
1198 * Per-vertex functions.
1199 *
1200 * These are the functions which can appear between glBegin and glEnd.
1201 * Depending on whether we're inside or outside a glBegin/End pair
1202 * and whether we're in immediate mode or building a display list, these
1203 * functions behave differently. This structure allows us to switch
1204 * between those modes more easily.
1205 *
1206 * Generally, these pointers point to functions in the VBO module.
1207 */
1208 typedef struct {
1209 void (GLAPIENTRYP ArrayElement)( GLint );
1210 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
1211 void (GLAPIENTRYP Color3fv)( const GLfloat * );
1212 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1213 void (GLAPIENTRYP Color4fv)( const GLfloat * );
1214 void (GLAPIENTRYP EdgeFlag)( GLboolean );
1215 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
1216 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
1217 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
1218 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
1219 void (GLAPIENTRYP EvalPoint1)( GLint );
1220 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
1221 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
1222 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
1223 void (GLAPIENTRYP Indexf)( GLfloat );
1224 void (GLAPIENTRYP Indexfv)( const GLfloat * );
1225 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
1226 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
1227 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
1228 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
1229 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
1230 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
1231 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
1232 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
1233 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
1234 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
1235 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
1236 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
1237 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
1238 void (GLAPIENTRYP TexCoord1f)( GLfloat );
1239 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
1240 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
1241 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
1242 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
1243 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
1244 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1245 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
1246 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
1247 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
1248 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
1249 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
1250 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1251 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
1252 void (GLAPIENTRYP CallList)( GLuint );
1253 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
1254 void (GLAPIENTRYP Begin)( GLenum );
1255 void (GLAPIENTRYP End)( void );
1256 void (GLAPIENTRYP PrimitiveRestartNV)( void );
1257 /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
1258 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
1259 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
1260 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
1261 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
1262 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1263 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
1264 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1265 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
1266 /* GL_ARB_vertex_program */
1267 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
1268 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
1269 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
1270 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
1271 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1272 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
1273 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1274 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
1275
1276 /* GL_EXT_gpu_shader4 / GL 3.0 */
1277 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
1278 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
1279 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
1280 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
1281 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
1282 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
1283 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
1284
1285 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
1286 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
1287 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
1288 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1289 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
1290 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
1291 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
1292
1293 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1294 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1295 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1296
1297 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1298 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1299
1300 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1301 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1302
1303 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1304 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1305
1306 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1307 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1308
1309 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1310 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1311
1312 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1313 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1314
1315 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1316 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1317 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1318 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1319 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1320 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1321 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1322 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1323
1324 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1325 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1326
1327 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1328 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1329
1330 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1331 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1332
1333 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1334 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1335
1336 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1337 GLboolean normalized, GLuint value);
1338 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1339 GLboolean normalized, GLuint value);
1340 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1341 GLboolean normalized, GLuint value);
1342 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1343 GLboolean normalized, GLuint value);
1344 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1345 GLboolean normalized,
1346 const GLuint *value);
1347 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1348 GLboolean normalized,
1349 const GLuint *value);
1350 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1351 GLboolean normalized,
1352 const GLuint *value);
1353 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1354 GLboolean normalized,
1355 const GLuint *value);
1356
1357 /* GL_ARB_vertex_attrib_64bit / GL 4.1 */
1358 void (GLAPIENTRYP VertexAttribL1d)( GLuint index, GLdouble x);
1359 void (GLAPIENTRYP VertexAttribL2d)( GLuint index, GLdouble x, GLdouble y);
1360 void (GLAPIENTRYP VertexAttribL3d)( GLuint index, GLdouble x, GLdouble y, GLdouble z);
1361 void (GLAPIENTRYP VertexAttribL4d)( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1362
1363
1364 void (GLAPIENTRYP VertexAttribL1dv)( GLuint index, const GLdouble *v);
1365 void (GLAPIENTRYP VertexAttribL2dv)( GLuint index, const GLdouble *v);
1366 void (GLAPIENTRYP VertexAttribL3dv)( GLuint index, const GLdouble *v);
1367 void (GLAPIENTRYP VertexAttribL4dv)( GLuint index, const GLdouble *v);
1368
1369 void (GLAPIENTRYP VertexAttribL1ui64ARB)( GLuint index, GLuint64EXT x);
1370 void (GLAPIENTRYP VertexAttribL1ui64vARB)( GLuint index, const GLuint64EXT *v);
1371 } GLvertexformat;
1372
1373
1374 #endif /* DD_INCLUDED */