mesa/glthread: add glthread "perf" counters and pass them to gallium HUD
[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 * Called by glGetCompressedTexImage.
343 */
344 void (*GetCompressedTexSubImage)(struct gl_context *ctx,
345 struct gl_texture_image *texImage,
346 GLint xoffset, GLint yoffset,
347 GLint zoffset, GLsizei width,
348 GLsizei height, GLsizei depth,
349 GLvoid *data);
350 /*@}*/
351
352 /**
353 * \name Texture object / image functions
354 */
355 /*@{*/
356
357 /**
358 * Called by glBindTexture() and glBindTextures().
359 */
360 void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
361 GLenum target, struct gl_texture_object *tObj );
362
363 /**
364 * Called to allocate a new texture object. Drivers will usually
365 * allocate/return a subclass of gl_texture_object.
366 */
367 struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
368 GLuint name, GLenum target);
369 /**
370 * Called to delete/free a texture object. Drivers should free the
371 * object and any image data it contains.
372 */
373 void (*DeleteTexture)(struct gl_context *ctx,
374 struct gl_texture_object *texObj);
375
376 /** Called to allocate a new texture image object. */
377 struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
378
379 /** Called to free a texture image object returned by NewTextureImage() */
380 void (*DeleteTextureImage)(struct gl_context *ctx,
381 struct gl_texture_image *);
382
383 /** Called to allocate memory for a single texture image */
384 GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
385 struct gl_texture_image *texImage);
386
387 /** Free the memory for a single texture image */
388 void (*FreeTextureImageBuffer)(struct gl_context *ctx,
389 struct gl_texture_image *texImage);
390
391 /** Map a slice of a texture image into user space.
392 * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
393 * indicates the 1D array index.
394 * \param texImage the texture image
395 * \param slice the 3D image slice or array texture slice
396 * \param x, y, w, h region of interest
397 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
398 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
399 * \param mapOut returns start of mapping of region of interest
400 * \param rowStrideOut returns row stride (in bytes). In the case of a
401 * compressed texture, this is the byte stride between one row of blocks
402 * and another.
403 */
404 void (*MapTextureImage)(struct gl_context *ctx,
405 struct gl_texture_image *texImage,
406 GLuint slice,
407 GLuint x, GLuint y, GLuint w, GLuint h,
408 GLbitfield mode,
409 GLubyte **mapOut, GLint *rowStrideOut);
410
411 void (*UnmapTextureImage)(struct gl_context *ctx,
412 struct gl_texture_image *texImage,
413 GLuint slice);
414
415 /** For GL_ARB_texture_storage. Allocate memory for whole mipmap stack.
416 * All the gl_texture_images in the texture object will have their
417 * dimensions, format, etc. initialized already.
418 */
419 GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
420 struct gl_texture_object *texObj,
421 GLsizei levels, GLsizei width,
422 GLsizei height, GLsizei depth);
423
424 /** Called as part of glTextureView to add views to origTexObj */
425 GLboolean (*TextureView)(struct gl_context *ctx,
426 struct gl_texture_object *texObj,
427 struct gl_texture_object *origTexObj);
428
429 /** Sets the given buffer object as the texture's storage. The given
430 * texture must have target GL_TEXTURE_1D, GL_TEXTURE_2D,
431 * GL_TEXTURE_RECTANGLE, and GL_TEXTURE_2D_ARRAY; have only a single
432 * mipmap level; be immutable; and must not have any assigned storage.
433 * The format and dimensions of the gl_texture_object will already be
434 * initialized.
435 *
436 * This function is used by the meta PBO texture upload path.
437 */
438 bool (*SetTextureStorageForBufferObject)(struct gl_context *ctx,
439 struct gl_texture_object *texObj,
440 struct gl_buffer_object *bufferObj,
441 uint32_t buffer_offset,
442 uint32_t row_stride,
443 bool read_only);
444
445 /**
446 * Map a renderbuffer into user space.
447 * \param mode bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
448 * GL_MAP_INVALIDATE_RANGE_BIT (if writing)
449 */
450 void (*MapRenderbuffer)(struct gl_context *ctx,
451 struct gl_renderbuffer *rb,
452 GLuint x, GLuint y, GLuint w, GLuint h,
453 GLbitfield mode,
454 GLubyte **mapOut, GLint *rowStrideOut);
455
456 void (*UnmapRenderbuffer)(struct gl_context *ctx,
457 struct gl_renderbuffer *rb);
458
459 /**
460 * Optional driver entrypoint that binds a non-texture renderbuffer's
461 * contents to a texture image.
462 */
463 GLboolean (*BindRenderbufferTexImage)(struct gl_context *ctx,
464 struct gl_renderbuffer *rb,
465 struct gl_texture_image *texImage);
466 /*@}*/
467
468
469 /**
470 * \name Vertex/fragment program functions
471 */
472 /*@{*/
473 /** Allocate a new program */
474 struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target,
475 GLuint id, bool is_arb_asm);
476 /** Delete a program */
477 void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
478 /**
479 * Allocate a program to associate with the new ATI fragment shader (optional)
480 */
481 struct gl_program * (*NewATIfs)(struct gl_context *ctx,
482 struct ati_fragment_shader *curProg);
483 /**
484 * Notify driver that a program string (and GPU code) has been specified
485 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
486 * supported by the driver.
487 */
488 GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
489 struct gl_program *prog);
490
491 /**
492 * Notify driver that the sampler uniforms for the current program have
493 * changed. On some drivers, this may require shader recompiles.
494 */
495 void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
496 struct gl_program *prog);
497
498 /** Query if program can be loaded onto hardware */
499 GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
500 struct gl_program *prog);
501
502 /*@}*/
503
504 /**
505 * \name GLSL shader/program functions.
506 */
507 /*@{*/
508 /**
509 * Called when a shader program is linked.
510 *
511 * This gives drivers an opportunity to clone the IR and make their
512 * own transformations on it for the purposes of code generation.
513 */
514 GLboolean (*LinkShader)(struct gl_context *ctx,
515 struct gl_shader_program *shader);
516 /*@}*/
517
518 /**
519 * \name State-changing functions.
520 *
521 * \note drawing functions are above.
522 *
523 * These functions are called by their corresponding OpenGL API functions.
524 * They are \e also called by the gl_PopAttrib() function!!!
525 * May add more functions like these to the device driver in the future.
526 */
527 /*@{*/
528 /** Specify the alpha test function */
529 void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
530 /** Set the blend color */
531 void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
532 /** Set the blend equation */
533 void (*BlendEquationSeparate)(struct gl_context *ctx,
534 GLenum modeRGB, GLenum modeA);
535 /** Specify pixel arithmetic */
536 void (*BlendFuncSeparate)(struct gl_context *ctx,
537 GLenum sfactorRGB, GLenum dfactorRGB,
538 GLenum sfactorA, GLenum dfactorA);
539 /** Specify a plane against which all geometry is clipped */
540 void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
541 /** Enable and disable writing of frame buffer color components */
542 void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
543 GLboolean bmask, GLboolean amask );
544 /** Cause a material color to track the current color */
545 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
546 /** Specify whether front- or back-facing facets can be culled */
547 void (*CullFace)(struct gl_context *ctx, GLenum mode);
548 /** Define front- and back-facing polygons */
549 void (*FrontFace)(struct gl_context *ctx, GLenum mode);
550 /** Specify the value used for depth buffer comparisons */
551 void (*DepthFunc)(struct gl_context *ctx, GLenum func);
552 /** Enable or disable writing into the depth buffer */
553 void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
554 /** Specify mapping of depth values from NDC to window coordinates */
555 void (*DepthRange)(struct gl_context *ctx);
556 /** Specify the current buffer for writing */
557 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
558 /** Specify the buffers for writing for fragment programs*/
559 void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
560 /** Enable or disable server-side gl capabilities */
561 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
562 /** Specify fog parameters */
563 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
564 /** Set light source parameters.
565 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
566 * been transformed to eye-space.
567 */
568 void (*Lightfv)(struct gl_context *ctx, GLenum light,
569 GLenum pname, const GLfloat *params );
570 /** Set the lighting model parameters */
571 void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
572 const GLfloat *params);
573 /** Specify the line stipple pattern */
574 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
575 /** Specify the width of rasterized lines */
576 void (*LineWidth)(struct gl_context *ctx, GLfloat width);
577 /** Specify a logical pixel operation for color index rendering */
578 void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
579 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
580 const GLfloat *params);
581 /** Specify the diameter of rasterized points */
582 void (*PointSize)(struct gl_context *ctx, GLfloat size);
583 /** Select a polygon rasterization mode */
584 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
585 /** Set the scale and units used to calculate depth values */
586 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp);
587 /** Set the polygon stippling pattern */
588 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
589 /* Specifies the current buffer for reading */
590 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
591 /** Set rasterization mode */
592 void (*RenderMode)(struct gl_context *ctx, GLenum mode );
593 /** Define the scissor box */
594 void (*Scissor)(struct gl_context *ctx);
595 /** Select flat or smooth shading */
596 void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
597 /** OpenGL 2.0 two-sided StencilFunc */
598 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
599 GLint ref, GLuint mask);
600 /** OpenGL 2.0 two-sided StencilMask */
601 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
602 /** OpenGL 2.0 two-sided StencilOp */
603 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
604 GLenum zfail, GLenum zpass);
605 /** Control the generation of texture coordinates */
606 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
607 const GLfloat *params);
608 /** Set texture environment parameters */
609 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
610 const GLfloat *param);
611 /** Set texture parameter (callee gets param value from the texObj) */
612 void (*TexParameter)(struct gl_context *ctx,
613 struct gl_texture_object *texObj, GLenum pname);
614 /** Set the viewport */
615 void (*Viewport)(struct gl_context *ctx);
616 /*@}*/
617
618
619 /**
620 * \name Vertex/pixel buffer object functions
621 */
622 /*@{*/
623 struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
624 GLuint buffer);
625
626 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
627
628 GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
629 GLsizeiptrARB size, const GLvoid *data, GLenum usage,
630 GLenum storageFlags, struct gl_buffer_object *obj);
631
632 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
633 GLsizeiptrARB size, const GLvoid *data,
634 struct gl_buffer_object *obj );
635
636 void (*GetBufferSubData)( struct gl_context *ctx,
637 GLintptrARB offset, GLsizeiptrARB size,
638 GLvoid *data, struct gl_buffer_object *obj );
639
640 void (*ClearBufferSubData)( struct gl_context *ctx,
641 GLintptr offset, GLsizeiptr size,
642 const GLvoid *clearValue,
643 GLsizeiptr clearValueSize,
644 struct gl_buffer_object *obj );
645
646 void (*CopyBufferSubData)( struct gl_context *ctx,
647 struct gl_buffer_object *src,
648 struct gl_buffer_object *dst,
649 GLintptr readOffset, GLintptr writeOffset,
650 GLsizeiptr size );
651
652 void (*InvalidateBufferSubData)( struct gl_context *ctx,
653 struct gl_buffer_object *obj,
654 GLintptr offset,
655 GLsizeiptr length );
656
657 /* Returns pointer to the start of the mapped range.
658 * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
659 */
660 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
661 GLsizeiptr length, GLbitfield access,
662 struct gl_buffer_object *obj,
663 gl_map_buffer_index index);
664
665 void (*FlushMappedBufferRange)(struct gl_context *ctx,
666 GLintptr offset, GLsizeiptr length,
667 struct gl_buffer_object *obj,
668 gl_map_buffer_index index);
669
670 GLboolean (*UnmapBuffer)( struct gl_context *ctx,
671 struct gl_buffer_object *obj,
672 gl_map_buffer_index index);
673 /*@}*/
674
675 /**
676 * \name Functions for GL_APPLE_object_purgeable
677 */
678 /*@{*/
679 /* variations on ObjectPurgeable */
680 GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
681 struct gl_buffer_object *obj, GLenum option);
682 GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
683 struct gl_renderbuffer *obj, GLenum option);
684 GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
685 struct gl_texture_object *obj,
686 GLenum option);
687
688 /* variations on ObjectUnpurgeable */
689 GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
690 struct gl_buffer_object *obj,
691 GLenum option);
692 GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
693 struct gl_renderbuffer *obj,
694 GLenum option);
695 GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
696 struct gl_texture_object *obj,
697 GLenum option);
698 /*@}*/
699
700 /**
701 * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
702 */
703 /*@{*/
704 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
705 GLuint name);
706 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
707 GLuint name);
708 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
709 struct gl_framebuffer *drawFb,
710 struct gl_framebuffer *readFb);
711 void (*FramebufferRenderbuffer)(struct gl_context *ctx,
712 struct gl_framebuffer *fb,
713 GLenum attachment,
714 struct gl_renderbuffer *rb);
715 void (*RenderTexture)(struct gl_context *ctx,
716 struct gl_framebuffer *fb,
717 struct gl_renderbuffer_attachment *att);
718 void (*FinishRenderTexture)(struct gl_context *ctx,
719 struct gl_renderbuffer *rb);
720 void (*ValidateFramebuffer)(struct gl_context *ctx,
721 struct gl_framebuffer *fb);
722 /*@}*/
723 void (*BlitFramebuffer)(struct gl_context *ctx,
724 struct gl_framebuffer *readFb,
725 struct gl_framebuffer *drawFb,
726 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
727 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
728 GLbitfield mask, GLenum filter);
729 void (*DiscardFramebuffer)(struct gl_context *ctx,
730 GLenum target, GLsizei numAttachments,
731 const GLenum *attachments);
732
733 /**
734 * \name Query objects
735 */
736 /*@{*/
737 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
738 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
739 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
740 void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
741 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
742 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
743 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
744 /*
745 * \pname the value requested to be written (GL_QUERY_RESULT, etc)
746 * \ptype the type of the value requested to be written:
747 * GL_UNSIGNED_INT, GL_UNSIGNED_INT64_ARB,
748 * GL_INT, GL_INT64_ARB
749 */
750 void (*StoreQueryResult)(struct gl_context *ctx, struct gl_query_object *q,
751 struct gl_buffer_object *buf, intptr_t offset,
752 GLenum pname, GLenum ptype);
753 /*@}*/
754
755 /**
756 * \name Performance monitors
757 */
758 /*@{*/
759 void (*InitPerfMonitorGroups)(struct gl_context *ctx);
760 struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
761 void (*DeletePerfMonitor)(struct gl_context *ctx,
762 struct gl_perf_monitor_object *m);
763 GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
764 struct gl_perf_monitor_object *m);
765
766 /** Stop an active performance monitor, discarding results. */
767 void (*ResetPerfMonitor)(struct gl_context *ctx,
768 struct gl_perf_monitor_object *m);
769 void (*EndPerfMonitor)(struct gl_context *ctx,
770 struct gl_perf_monitor_object *m);
771 GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
772 struct gl_perf_monitor_object *m);
773 void (*GetPerfMonitorResult)(struct gl_context *ctx,
774 struct gl_perf_monitor_object *m,
775 GLsizei dataSize,
776 GLuint *data,
777 GLint *bytesWritten);
778 /*@}*/
779
780 /**
781 * \name Performance Query objects
782 */
783 /*@{*/
784 unsigned (*InitPerfQueryInfo)(struct gl_context *ctx);
785 void (*GetPerfQueryInfo)(struct gl_context *ctx,
786 unsigned queryIndex,
787 const char **name,
788 GLuint *dataSize,
789 GLuint *numCounters,
790 GLuint *numActive);
791 void (*GetPerfCounterInfo)(struct gl_context *ctx,
792 unsigned queryIndex,
793 unsigned counterIndex,
794 const char **name,
795 const char **desc,
796 GLuint *offset,
797 GLuint *data_size,
798 GLuint *type_enum,
799 GLuint *data_type_enum,
800 GLuint64 *raw_max);
801 struct gl_perf_query_object * (*NewPerfQueryObject)(struct gl_context *ctx,
802 unsigned queryIndex);
803 void (*DeletePerfQuery)(struct gl_context *ctx,
804 struct gl_perf_query_object *obj);
805 bool (*BeginPerfQuery)(struct gl_context *ctx,
806 struct gl_perf_query_object *obj);
807 void (*EndPerfQuery)(struct gl_context *ctx,
808 struct gl_perf_query_object *obj);
809 void (*WaitPerfQuery)(struct gl_context *ctx,
810 struct gl_perf_query_object *obj);
811 bool (*IsPerfQueryReady)(struct gl_context *ctx,
812 struct gl_perf_query_object *obj);
813 void (*GetPerfQueryData)(struct gl_context *ctx,
814 struct gl_perf_query_object *obj,
815 GLsizei dataSize,
816 GLuint *data,
817 GLuint *bytesWritten);
818 /*@}*/
819
820
821 /**
822 * \name GREMEDY debug/marker functions
823 */
824 /*@{*/
825 void (*EmitStringMarker)(struct gl_context *ctx, const GLchar *string, GLsizei len);
826 /*@}*/
827
828 /**
829 * \name Support for multiple T&L engines
830 */
831 /*@{*/
832
833 /**
834 * Set by the driver-supplied T&L engine.
835 *
836 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
837 */
838 GLuint CurrentExecPrimitive;
839
840 /**
841 * Current glBegin state of an in-progress compilation. May be
842 * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
843 * or PRIM_UNKNOWN.
844 */
845 GLuint CurrentSavePrimitive;
846
847
848 #define FLUSH_STORED_VERTICES 0x1
849 #define FLUSH_UPDATE_CURRENT 0x2
850 /**
851 * Set by the driver-supplied T&L engine whenever vertices are buffered
852 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
853 * is not updated. A bitmask of the FLUSH_x values above.
854 *
855 * The dd_function_table::FlushVertices call below may be used to resolve
856 * these conditions.
857 */
858 GLbitfield NeedFlush;
859
860 /** Need to call vbo_save_SaveFlushVertices() upon state change? */
861 GLboolean SaveNeedFlush;
862
863 /**
864 * Notify driver that the special derived value _NeedEyeCoords has
865 * changed.
866 */
867 void (*LightingSpaceChange)( struct gl_context *ctx );
868
869 /**@}*/
870
871 /**
872 * \name GL_ARB_sync interfaces
873 */
874 /*@{*/
875 struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
876 void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
877 GLenum, GLbitfield);
878 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
879 void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
880 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
881 GLbitfield, GLuint64);
882 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
883 GLbitfield, GLuint64);
884 /*@}*/
885
886 /** GL_NV_conditional_render */
887 void (*BeginConditionalRender)(struct gl_context *ctx,
888 struct gl_query_object *q,
889 GLenum mode);
890 void (*EndConditionalRender)(struct gl_context *ctx,
891 struct gl_query_object *q);
892
893 /**
894 * \name GL_OES_draw_texture interface
895 */
896 /*@{*/
897 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
898 GLfloat width, GLfloat height);
899 /*@}*/
900
901 /**
902 * \name GL_OES_EGL_image interface
903 */
904 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
905 struct gl_texture_object *texObj,
906 struct gl_texture_image *texImage,
907 GLeglImageOES image_handle);
908 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
909 struct gl_renderbuffer *rb,
910 void *image_handle);
911
912 /**
913 * \name GL_EXT_transform_feedback interface
914 */
915 struct gl_transform_feedback_object *
916 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
917 void (*DeleteTransformFeedback)(struct gl_context *ctx,
918 struct gl_transform_feedback_object *obj);
919 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
920 struct gl_transform_feedback_object *obj);
921 void (*EndTransformFeedback)(struct gl_context *ctx,
922 struct gl_transform_feedback_object *obj);
923 void (*PauseTransformFeedback)(struct gl_context *ctx,
924 struct gl_transform_feedback_object *obj);
925 void (*ResumeTransformFeedback)(struct gl_context *ctx,
926 struct gl_transform_feedback_object *obj);
927
928 /**
929 * Return the number of vertices written to a stream during the last
930 * Begin/EndTransformFeedback block.
931 */
932 GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
933 struct gl_transform_feedback_object *obj,
934 GLuint stream);
935
936 /**
937 * \name GL_NV_texture_barrier interface
938 */
939 void (*TextureBarrier)(struct gl_context *ctx);
940
941 /**
942 * \name GL_ARB_sampler_objects
943 */
944 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
945 GLuint name);
946
947 /**
948 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
949 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
950 */
951 uint64_t (*GetTimestamp)(struct gl_context *ctx);
952
953 /**
954 * \name GL_ARB_texture_multisample
955 */
956 void (*GetSamplePosition)(struct gl_context *ctx,
957 struct gl_framebuffer *fb,
958 GLuint index,
959 GLfloat *outValue);
960
961 /**
962 * \name NV_vdpau_interop interface
963 */
964 void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
965 GLenum access, GLboolean output,
966 struct gl_texture_object *texObj,
967 struct gl_texture_image *texImage,
968 const GLvoid *vdpSurface, GLuint index);
969 void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
970 GLenum access, GLboolean output,
971 struct gl_texture_object *texObj,
972 struct gl_texture_image *texImage,
973 const GLvoid *vdpSurface, GLuint index);
974
975 /**
976 * Query reset status for GL_ARB_robustness
977 *
978 * Per \c glGetGraphicsResetStatusARB, this function should return a
979 * non-zero value once after a reset. If a reset is non-atomic, the
980 * non-zero status should be returned for the duration of the reset.
981 */
982 GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
983
984 /**
985 * \name GL_ARB_shader_image_load_store interface.
986 */
987 /** @{ */
988 void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
989 /** @} */
990
991 /**
992 * GL_MESA_shader_framebuffer_fetch_non_coherent rendering barrier.
993 *
994 * On return from this function any framebuffer contents written by
995 * previous draw commands are guaranteed to be visible from subsequent
996 * fragment shader invocations using the
997 * MESA_shader_framebuffer_fetch_non_coherent interface.
998 */
999 /** @{ */
1000 void (*BlendBarrier)(struct gl_context *ctx);
1001 /** @} */
1002
1003 /**
1004 * \name GL_ARB_compute_shader interface
1005 */
1006 /*@{*/
1007 void (*DispatchCompute)(struct gl_context *ctx, const GLuint *num_groups);
1008 void (*DispatchComputeIndirect)(struct gl_context *ctx, GLintptr indirect);
1009 /*@}*/
1010
1011 /**
1012 * \name GL_ARB_compute_variable_group_size interface
1013 */
1014 /*@{*/
1015 void (*DispatchComputeGroupSize)(struct gl_context *ctx,
1016 const GLuint *num_groups,
1017 const GLuint *group_size);
1018 /*@}*/
1019
1020 /**
1021 * Query information about memory. Device memory is e.g. VRAM. Staging
1022 * memory is e.g. GART. All sizes are in kilobytes.
1023 */
1024 void (*QueryMemoryInfo)(struct gl_context *ctx,
1025 struct gl_memory_info *info);
1026
1027 /**
1028 * Indicate that this thread is being used by Mesa as a background drawing
1029 * thread for the given GL context.
1030 *
1031 * If this function is called more than once from any given thread, each
1032 * subsequent call overrides the context that was passed in the previous
1033 * call. Mesa takes advantage of this to re-use a background thread to
1034 * perform drawing on behalf of multiple contexts.
1035 *
1036 * Mesa may sometimes call this function from a non-background thread
1037 * (i.e. a thread that has already been bound to a context using
1038 * __DriverAPIRec::MakeCurrent()); when this happens, ctx will be equal to
1039 * the context that is bound to this thread.
1040 *
1041 * Mesa will only call this function if GL multithreading is enabled.
1042 */
1043 void (*SetBackgroundContext)(struct gl_context *ctx,
1044 struct util_queue_monitoring *queue_info);
1045
1046 /**
1047 * \name GL_ARB_sparse_buffer interface
1048 */
1049 /*@{*/
1050 void (*BufferPageCommitment)(struct gl_context *ctx,
1051 struct gl_buffer_object *bufferObj,
1052 GLintptr offset, GLsizeiptr size,
1053 GLboolean commit);
1054 /*@}*/
1055
1056 /**
1057 * \name GL_ARB_bindless_texture interface
1058 */
1059 /*@{*/
1060 GLuint64 (*NewTextureHandle)(struct gl_context *ctx,
1061 struct gl_texture_object *texObj,
1062 struct gl_sampler_object *sampObj);
1063 void (*DeleteTextureHandle)(struct gl_context *ctx, GLuint64 handle);
1064 void (*MakeTextureHandleResident)(struct gl_context *ctx, GLuint64 handle,
1065 bool resident);
1066 GLuint64 (*NewImageHandle)(struct gl_context *ctx,
1067 struct gl_image_unit *imgObj);
1068 void (*DeleteImageHandle)(struct gl_context *ctx, GLuint64 handle);
1069 void (*MakeImageHandleResident)(struct gl_context *ctx, GLuint64 handle,
1070 GLenum access, bool resident);
1071 /*@}*/
1072 };
1073
1074
1075 /**
1076 * Per-vertex functions.
1077 *
1078 * These are the functions which can appear between glBegin and glEnd.
1079 * Depending on whether we're inside or outside a glBegin/End pair
1080 * and whether we're in immediate mode or building a display list, these
1081 * functions behave differently. This structure allows us to switch
1082 * between those modes more easily.
1083 *
1084 * Generally, these pointers point to functions in the VBO module.
1085 */
1086 typedef struct {
1087 void (GLAPIENTRYP ArrayElement)( GLint );
1088 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
1089 void (GLAPIENTRYP Color3fv)( const GLfloat * );
1090 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1091 void (GLAPIENTRYP Color4fv)( const GLfloat * );
1092 void (GLAPIENTRYP EdgeFlag)( GLboolean );
1093 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
1094 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
1095 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
1096 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
1097 void (GLAPIENTRYP EvalPoint1)( GLint );
1098 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
1099 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
1100 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
1101 void (GLAPIENTRYP Indexf)( GLfloat );
1102 void (GLAPIENTRYP Indexfv)( const GLfloat * );
1103 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
1104 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
1105 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
1106 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
1107 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
1108 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
1109 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
1110 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
1111 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
1112 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
1113 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
1114 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
1115 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
1116 void (GLAPIENTRYP TexCoord1f)( GLfloat );
1117 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
1118 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
1119 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
1120 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
1121 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
1122 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1123 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
1124 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
1125 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
1126 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
1127 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
1128 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1129 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
1130 void (GLAPIENTRYP CallList)( GLuint );
1131 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
1132 void (GLAPIENTRYP Begin)( GLenum );
1133 void (GLAPIENTRYP End)( void );
1134 void (GLAPIENTRYP PrimitiveRestartNV)( void );
1135 /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
1136 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
1137 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
1138 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
1139 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
1140 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1141 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
1142 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1143 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
1144 /* GL_ARB_vertex_program */
1145 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
1146 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
1147 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
1148 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
1149 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1150 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
1151 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1152 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
1153
1154 /* GL_EXT_gpu_shader4 / GL 3.0 */
1155 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
1156 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
1157 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
1158 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
1159 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
1160 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
1161 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
1162
1163 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
1164 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
1165 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
1166 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1167 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
1168 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
1169 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
1170
1171 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1172 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1173 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1174
1175 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1176 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1177
1178 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1179 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1180
1181 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1182 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1183
1184 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1185 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1186
1187 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1188 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1189
1190 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1191 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1192
1193 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1194 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1195 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1196 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1197 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1198 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1199 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1200 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1201
1202 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1203 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1204
1205 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1206 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1207
1208 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1209 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1210
1211 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1212 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1213
1214 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1215 GLboolean normalized, GLuint value);
1216 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1217 GLboolean normalized, GLuint value);
1218 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1219 GLboolean normalized, GLuint value);
1220 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1221 GLboolean normalized, GLuint value);
1222 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1223 GLboolean normalized,
1224 const GLuint *value);
1225 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1226 GLboolean normalized,
1227 const GLuint *value);
1228 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1229 GLboolean normalized,
1230 const GLuint *value);
1231 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1232 GLboolean normalized,
1233 const GLuint *value);
1234
1235 /* GL_ARB_vertex_attrib_64bit / GL 4.1 */
1236 void (GLAPIENTRYP VertexAttribL1d)( GLuint index, GLdouble x);
1237 void (GLAPIENTRYP VertexAttribL2d)( GLuint index, GLdouble x, GLdouble y);
1238 void (GLAPIENTRYP VertexAttribL3d)( GLuint index, GLdouble x, GLdouble y, GLdouble z);
1239 void (GLAPIENTRYP VertexAttribL4d)( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1240
1241
1242 void (GLAPIENTRYP VertexAttribL1dv)( GLuint index, const GLdouble *v);
1243 void (GLAPIENTRYP VertexAttribL2dv)( GLuint index, const GLdouble *v);
1244 void (GLAPIENTRYP VertexAttribL3dv)( GLuint index, const GLdouble *v);
1245 void (GLAPIENTRYP VertexAttribL4dv)( GLuint index, const GLdouble *v);
1246
1247 void (GLAPIENTRYP VertexAttribL1ui64ARB)( GLuint index, GLuint64EXT x);
1248 void (GLAPIENTRYP VertexAttribL1ui64vARB)( GLuint index, const GLuint64EXT *v);
1249 } GLvertexformat;
1250
1251
1252 #endif /* DD_INCLUDED */