17117f1b4Smrg/**
27117f1b4Smrg * \file dd.h
37117f1b4Smrg * Device driver interfaces.
47117f1b4Smrg */
57117f1b4Smrg
67117f1b4Smrg/*
77117f1b4Smrg * Mesa 3-D graphics library
87117f1b4Smrg *
97117f1b4Smrg * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
107117f1b4Smrg *
117117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a
127117f1b4Smrg * copy of this software and associated documentation files (the "Software"),
137117f1b4Smrg * to deal in the Software without restriction, including without limitation
147117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
157117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the
167117f1b4Smrg * Software is furnished to do so, subject to the following conditions:
177117f1b4Smrg *
187117f1b4Smrg * The above copyright notice and this permission notice shall be included
197117f1b4Smrg * in all copies or substantial portions of the Software.
207117f1b4Smrg *
217117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
227117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
237117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
24af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25af69d88dSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26af69d88dSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27af69d88dSmrg * OTHER DEALINGS IN THE SOFTWARE.
287117f1b4Smrg */
297117f1b4Smrg
307117f1b4Smrg
317117f1b4Smrg#ifndef DD_INCLUDED
327117f1b4Smrg#define DD_INCLUDED
337117f1b4Smrg
343464ebd5Sriastradh#include "glheader.h"
3501e04c3fSmrg#include "formats.h"
3601e04c3fSmrg#include "menums.h"
377ec681f3Smrg#include "compiler/shader_enums.h"
387ec681f3Smrg
397ec681f3Smrg/* Windows winnt.h defines MemoryBarrier as a macro on some platforms,
407ec681f3Smrg * including as a function-like macro in some cases. That either causes
417ec681f3Smrg * the table entry below to have a weird name, or fail to compile.
427ec681f3Smrg */
437ec681f3Smrg#ifdef MemoryBarrier
447ec681f3Smrg#undef MemoryBarrier
457ec681f3Smrg#endif
464a49301eSmrg
4701e04c3fSmrgstruct gl_bitmap_atlas;
483464ebd5Sriastradhstruct gl_buffer_object;
493464ebd5Sriastradhstruct gl_context;
503464ebd5Sriastradhstruct gl_display_list;
513464ebd5Sriastradhstruct gl_framebuffer;
52af69d88dSmrgstruct gl_image_unit;
533464ebd5Sriastradhstruct gl_pixelstore_attrib;
543464ebd5Sriastradhstruct gl_program;
553464ebd5Sriastradhstruct gl_renderbuffer;
563464ebd5Sriastradhstruct gl_renderbuffer_attachment;
573464ebd5Sriastradhstruct gl_shader;
583464ebd5Sriastradhstruct gl_shader_program;
593464ebd5Sriastradhstruct gl_texture_image;
603464ebd5Sriastradhstruct gl_texture_object;
6101e04c3fSmrgstruct gl_memory_info;
6201e04c3fSmrgstruct gl_transform_feedback_object;
637ec681f3Smrgstruct gl_vertex_array_object;
6401e04c3fSmrgstruct ati_fragment_shader;
6501e04c3fSmrgstruct util_queue_monitoring;
6601e04c3fSmrgstruct _mesa_prim;
6701e04c3fSmrgstruct _mesa_index_buffer;
687ec681f3Smrgstruct pipe_draw_info;
697ec681f3Smrgstruct pipe_draw_start_count_bias;
707ec681f3Smrgstruct pipe_vertex_state;
717ec681f3Smrgstruct pipe_draw_vertex_state_info;
727ec681f3Smrgstruct pipe_vertex_buffer;
737ec681f3Smrgstruct pipe_vertex_element;
743464ebd5Sriastradh
753464ebd5Sriastradh/* GL_ARB_vertex_buffer_object */
764a49301eSmrg/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
774a49301eSmrg * NULL) if buffer is unavailable for immediate mapping.
784a49301eSmrg *
794a49301eSmrg * Does GL_MAP_INVALIDATE_RANGE_BIT do this?  It seems so, but it
804a49301eSmrg * would require more book-keeping in the driver than seems necessary
814a49301eSmrg * at this point.
824a49301eSmrg *
834a49301eSmrg * Does GL_MAP_INVALDIATE_BUFFER_BIT do this?  Not really -- we don't
844a49301eSmrg * want to provoke the driver to throw away the old storage, we will
854a49301eSmrg * respect the contents of already referenced data.
864a49301eSmrg */
8701e04c3fSmrg#define MESA_MAP_NOWAIT_BIT       0x4000
884a49301eSmrg
897ec681f3Smrg/* Mapping a buffer is allowed from any thread. */
907ec681f3Smrg#define MESA_MAP_THREAD_SAFE_BIT  0x8000
917ec681f3Smrg
927ec681f3Smrg/* This buffer will only be mapped/unmapped once */
937ec681f3Smrg#define MESA_MAP_ONCE            0x10000
947ec681f3Smrg
957117f1b4Smrg
967117f1b4Smrg/**
977117f1b4Smrg * Device driver function table.
987117f1b4Smrg * Core Mesa uses these function pointers to call into device drivers.
997117f1b4Smrg * Most of these functions directly correspond to OpenGL state commands.
1007117f1b4Smrg * Core Mesa will call these functions after error checking has been done
1017117f1b4Smrg * so that the drivers don't have to worry about error testing.
1027117f1b4Smrg *
1037117f1b4Smrg * Vertex transformation/clipping/lighting is patched into the T&L module.
1047117f1b4Smrg * Rasterization functions are patched into the swrast module.
1057117f1b4Smrg *
1067117f1b4Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c
1077117f1b4Smrg * file should be updated too!!!
1087117f1b4Smrg */
1097117f1b4Smrgstruct dd_function_table {
1107117f1b4Smrg   /**
1117117f1b4Smrg    * Return a string as needed by glGetString().
1127117f1b4Smrg    * Only the GL_RENDERER query must be implemented.  Otherwise, NULL can be
1137117f1b4Smrg    * returned.
1147117f1b4Smrg    */
1153464ebd5Sriastradh   const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
1167117f1b4Smrg
1177117f1b4Smrg   /**
1187117f1b4Smrg    * Notify the driver after Mesa has made some internal state changes.
1197117f1b4Smrg    *
1207117f1b4Smrg    * This is in addition to any state change callbacks Mesa may already have
1217117f1b4Smrg    * made.
1227117f1b4Smrg    */
12301e04c3fSmrg   void (*UpdateState)(struct gl_context *ctx);
1247117f1b4Smrg
1257117f1b4Smrg   /**
1267117f1b4Smrg    * This is called whenever glFinish() is called.
1277117f1b4Smrg    */
1283464ebd5Sriastradh   void (*Finish)( struct gl_context *ctx );
1297117f1b4Smrg
1307117f1b4Smrg   /**
1317117f1b4Smrg    * This is called whenever glFlush() is called.
1327117f1b4Smrg    */
1337ec681f3Smrg   void (*Flush)(struct gl_context *ctx, unsigned gallium_flush_flags);
1347117f1b4Smrg
1357117f1b4Smrg   /**
1367117f1b4Smrg    * Clear the color/depth/stencil/accum buffer(s).
1377117f1b4Smrg    * \param buffers  a bitmask of BUFFER_BIT_* flags indicating which
1387117f1b4Smrg    *                 renderbuffers need to be cleared.
1397117f1b4Smrg    */
1403464ebd5Sriastradh   void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
1417117f1b4Smrg
142c1f859d4Smrg   /**
143c1f859d4Smrg    * Execute glRasterPos, updating the ctx->Current.Raster fields
144c1f859d4Smrg    */
1453464ebd5Sriastradh   void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
146c1f859d4Smrg
1477117f1b4Smrg   /**
1487117f1b4Smrg    * \name Image-related functions
1497117f1b4Smrg    */
1507117f1b4Smrg   /*@{*/
1517117f1b4Smrg
1527117f1b4Smrg   /**
1537117f1b4Smrg    * Called by glDrawPixels().
1547117f1b4Smrg    * \p unpack describes how to unpack the source image data.
1557117f1b4Smrg    */
1563464ebd5Sriastradh   void (*DrawPixels)( struct gl_context *ctx,
1577117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1587117f1b4Smrg		       GLenum format, GLenum type,
1597117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1607117f1b4Smrg		       const GLvoid *pixels );
1617117f1b4Smrg
1627117f1b4Smrg   /**
1637117f1b4Smrg    * Called by glReadPixels().
1647117f1b4Smrg    */
1653464ebd5Sriastradh   void (*ReadPixels)( struct gl_context *ctx,
1667117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1677117f1b4Smrg		       GLenum format, GLenum type,
1687117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1697117f1b4Smrg		       GLvoid *dest );
1707117f1b4Smrg
1717117f1b4Smrg   /**
1727117f1b4Smrg    * Called by glCopyPixels().
1737117f1b4Smrg    */
1743464ebd5Sriastradh   void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
1757117f1b4Smrg                       GLsizei width, GLsizei height,
1767117f1b4Smrg                       GLint dstx, GLint dsty, GLenum type );
1777117f1b4Smrg
1787117f1b4Smrg   /**
1797117f1b4Smrg    * Called by glBitmap().
1807117f1b4Smrg    */
1813464ebd5Sriastradh   void (*Bitmap)( struct gl_context *ctx,
1827117f1b4Smrg		   GLint x, GLint y, GLsizei width, GLsizei height,
1837117f1b4Smrg		   const struct gl_pixelstore_attrib *unpack,
1847117f1b4Smrg		   const GLubyte *bitmap );
18501e04c3fSmrg
18601e04c3fSmrg   /**
18701e04c3fSmrg    * Called by display list code for optimized glCallLists/glBitmap rendering
18801e04c3fSmrg    * The driver must support texture rectangles of width 1024 or more.
18901e04c3fSmrg    */
19001e04c3fSmrg   void (*DrawAtlasBitmaps)(struct gl_context *ctx,
19101e04c3fSmrg                            const struct gl_bitmap_atlas *atlas,
19201e04c3fSmrg                            GLuint count, const GLubyte *ids);
1937117f1b4Smrg   /*@}*/
1947117f1b4Smrg
1957117f1b4Smrg
1967117f1b4Smrg   /**
1977117f1b4Smrg    * \name Texture image functions
1987117f1b4Smrg    */
1997117f1b4Smrg   /*@{*/
2007117f1b4Smrg
2017117f1b4Smrg   /**
202af69d88dSmrg    * Choose actual hardware texture format given the texture target, the
203af69d88dSmrg    * user-provided source image format and type and the desired internal
204af69d88dSmrg    * format.  In some cases, srcFormat and srcType can be GL_NONE.
205af69d88dSmrg    * Note:  target may be GL_TEXTURE_CUBE_MAP, but never
206af69d88dSmrg    * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
207af69d88dSmrg    * Called by glTexImage(), etc.
2087117f1b4Smrg    */
209af69d88dSmrg   mesa_format (*ChooseTextureFormat)(struct gl_context *ctx,
210af69d88dSmrg                                      GLenum target, GLint internalFormat,
211af69d88dSmrg                                      GLenum srcFormat, GLenum srcType );
2127117f1b4Smrg
2137117f1b4Smrg   /**
21401e04c3fSmrg    * Queries different driver parameters for a particular target and format.
21501e04c3fSmrg    * Since ARB_internalformat_query2 introduced several new query parameters
21601e04c3fSmrg    * over ARB_internalformat_query, having one driver hook for each parameter
21701e04c3fSmrg    * is no longer feasible. So this is the generic entry-point for calls
21801e04c3fSmrg    * to glGetInternalFormativ and glGetInternalFormati64v, after Mesa has
21901e04c3fSmrg    * checked errors and default values.
2207117f1b4Smrg    *
221af69d88dSmrg    * \param ctx            GL context
222af69d88dSmrg    * \param target         GL target enum
223af69d88dSmrg    * \param internalFormat GL format enum
22401e04c3fSmrg    * \param pname          GL enum that specifies the info to query.
22501e04c3fSmrg    * \param params         Buffer to hold the result of the query.
226af69d88dSmrg    */
22701e04c3fSmrg   void (*QueryInternalFormat)(struct gl_context *ctx,
22801e04c3fSmrg                               GLenum target,
22901e04c3fSmrg                               GLenum internalFormat,
23001e04c3fSmrg                               GLenum pname,
23101e04c3fSmrg                               GLint *params);
232af69d88dSmrg
2337117f1b4Smrg   /**
234af69d88dSmrg    * Called by glTexImage[123]D() and glCopyTexImage[12]D()
235af69d88dSmrg    * Allocate texture memory and copy the user's image to the buffer.
236af69d88dSmrg    * The gl_texture_image fields, etc. will be fully initialized.
237af69d88dSmrg    * The parameters are the same as glTexImage3D(), plus:
238af69d88dSmrg    * \param dims  1, 2, or 3 indicating glTexImage1/2/3D()
239af69d88dSmrg    * \param packing describes how to unpack the source data.
240af69d88dSmrg    * \param texImage is the destination texture image.
241af69d88dSmrg    */
242af69d88dSmrg   void (*TexImage)(struct gl_context *ctx, GLuint dims,
243af69d88dSmrg                    struct gl_texture_image *texImage,
244af69d88dSmrg                    GLenum format, GLenum type, const GLvoid *pixels,
245af69d88dSmrg                    const struct gl_pixelstore_attrib *packing);
246af69d88dSmrg
2477117f1b4Smrg   /**
248af69d88dSmrg    * Called by glTexSubImage[123]D().
249af69d88dSmrg    * Replace a subset of the target texture with new texel data.
2507117f1b4Smrg    */
251af69d88dSmrg   void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
252af69d88dSmrg                       struct gl_texture_image *texImage,
253af69d88dSmrg                       GLint xoffset, GLint yoffset, GLint zoffset,
254af69d88dSmrg                       GLsizei width, GLsizei height, GLint depth,
255af69d88dSmrg                       GLenum format, GLenum type,
256af69d88dSmrg                       const GLvoid *pixels,
257af69d88dSmrg                       const struct gl_pixelstore_attrib *packing);
258af69d88dSmrg
2597117f1b4Smrg
2607117f1b4Smrg   /**
26101e04c3fSmrg    * Called by glGetTexImage(), glGetTextureSubImage().
2627117f1b4Smrg    */
26301e04c3fSmrg   void (*GetTexSubImage)(struct gl_context *ctx,
26401e04c3fSmrg                          GLint xoffset, GLint yoffset, GLint zoffset,
26501e04c3fSmrg                          GLsizei width, GLsizei height, GLsizei depth,
26601e04c3fSmrg                          GLenum format, GLenum type, GLvoid *pixels,
26701e04c3fSmrg                          struct gl_texture_image *texImage);
2687117f1b4Smrg
2697117f1b4Smrg   /**
270af69d88dSmrg    * Called by glClearTex[Sub]Image
271af69d88dSmrg    *
272af69d88dSmrg    * Clears a rectangular region of the image to a given value. The
273af69d88dSmrg    * clearValue argument is either NULL or points to a single texel to use as
274af69d88dSmrg    * the clear value in the same internal format as the texture image. If it
275af69d88dSmrg    * is NULL then the texture should be cleared to zeroes.
2767117f1b4Smrg    */
277af69d88dSmrg   void (*ClearTexSubImage)(struct gl_context *ctx,
278af69d88dSmrg                            struct gl_texture_image *texImage,
279af69d88dSmrg                            GLint xoffset, GLint yoffset, GLint zoffset,
280af69d88dSmrg                            GLsizei width, GLsizei height, GLsizei depth,
281af69d88dSmrg                            const GLvoid *clearValue);
2827117f1b4Smrg
2837117f1b4Smrg   /**
284af69d88dSmrg    * Called by glCopyTex[Sub]Image[123]D().
285af69d88dSmrg    *
286af69d88dSmrg    * This function should copy a rectangular region in the rb to a single
287af69d88dSmrg    * destination slice, specified by @slice.  In the case of 1D array
288af69d88dSmrg    * textures (where one GL call can potentially affect multiple destination
289af69d88dSmrg    * slices), core mesa takes care of calling this function multiple times,
290af69d88dSmrg    * once for each scanline to be copied.
2917117f1b4Smrg    */
292af69d88dSmrg   void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
293af69d88dSmrg                           struct gl_texture_image *texImage,
294af69d88dSmrg                           GLint xoffset, GLint yoffset, GLint slice,
295af69d88dSmrg                           struct gl_renderbuffer *rb,
296af69d88dSmrg                           GLint x, GLint y,
297af69d88dSmrg                           GLsizei width, GLsizei height);
2987117f1b4Smrg   /**
299af69d88dSmrg    * Called by glCopyImageSubData().
300af69d88dSmrg    *
30101e04c3fSmrg    * This function should copy one 2-D slice from src_teximage or
30201e04c3fSmrg    * src_renderbuffer to dst_teximage or dst_renderbuffer.  Either the
30301e04c3fSmrg    * teximage or renderbuffer pointer will be non-null to indicate which
30401e04c3fSmrg    * is the real src/dst.
30501e04c3fSmrg    *
30601e04c3fSmrg    * If one of the textures is 3-D or is a 1-D or 2-D array
307af69d88dSmrg    * texture, this function will be called multiple times: once for each
308af69d88dSmrg    * slice.  If one of the textures is a cube map, this function will be
309af69d88dSmrg    * called once for each face to be copied.
3107117f1b4Smrg    */
311af69d88dSmrg   void (*CopyImageSubData)(struct gl_context *ctx,
31201e04c3fSmrg                            struct gl_texture_image *src_teximage,
31301e04c3fSmrg                            struct gl_renderbuffer *src_renderbuffer,
314af69d88dSmrg                            int src_x, int src_y, int src_z,
31501e04c3fSmrg                            struct gl_texture_image *dst_teximage,
31601e04c3fSmrg                            struct gl_renderbuffer *dst_renderbuffer,
317af69d88dSmrg                            int dst_x, int dst_y, int dst_z,
318af69d88dSmrg                            int src_width, int src_height);
3197117f1b4Smrg
320c1f859d4Smrg   /**
321c1f859d4Smrg    * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
322af69d88dSmrg    * Note that if the texture is a cube map, the <target> parameter will
323af69d88dSmrg    * indicate which cube face to generate (GL_POSITIVE/NEGATIVE_X/Y/Z).
324af69d88dSmrg    * texObj->BaseLevel is the level from which to generate the remaining
325af69d88dSmrg    * mipmap levels.
326c1f859d4Smrg    */
3273464ebd5Sriastradh   void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
328c1f859d4Smrg                          struct gl_texture_object *texObj);
329c1f859d4Smrg
3307117f1b4Smrg   /**
331af69d88dSmrg    * Called by glTexImage, glCompressedTexImage, glCopyTexImage
332af69d88dSmrg    * and glTexStorage to check if the dimensions of the texture image
333af69d88dSmrg    * are too large.
334af69d88dSmrg    * \param target  any GL_PROXY_TEXTURE_x target
335af69d88dSmrg    * \return GL_TRUE if the image is OK, GL_FALSE if too large
3367117f1b4Smrg    */
3373464ebd5Sriastradh   GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
33801e04c3fSmrg                                  GLuint numLevels, GLint level,
33901e04c3fSmrg                                  mesa_format format, GLuint numSamples,
3407117f1b4Smrg                                  GLint width, GLint height,
34101e04c3fSmrg                                  GLint depth);
3427117f1b4Smrg   /*@}*/
3437117f1b4Smrg
3447117f1b4Smrg
3457117f1b4Smrg   /**
3467117f1b4Smrg    * \name Compressed texture functions
3477117f1b4Smrg    */
3487117f1b4Smrg   /*@{*/
3497117f1b4Smrg
3507117f1b4Smrg   /**
351af69d88dSmrg    * Called by glCompressedTexImage[123]D().
3527117f1b4Smrg    */
353af69d88dSmrg   void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
354af69d88dSmrg                              struct gl_texture_image *texImage,
355af69d88dSmrg                              GLsizei imageSize, const GLvoid *data);
356af69d88dSmrg
3577117f1b4Smrg   /**
358af69d88dSmrg    * Called by glCompressedTexSubImage[123]D().
3597117f1b4Smrg    */
360af69d88dSmrg   void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
361af69d88dSmrg                                 struct gl_texture_image *texImage,
362af69d88dSmrg                                 GLint xoffset, GLint yoffset, GLint zoffset,
36301e04c3fSmrg                                 GLsizei width, GLsizei height, GLsizei depth,
364af69d88dSmrg                                 GLenum format,
365af69d88dSmrg                                 GLsizei imageSize, const GLvoid *data);
3667117f1b4Smrg   /*@}*/
3677117f1b4Smrg
3687117f1b4Smrg   /**
369af69d88dSmrg    * \name Texture object / image functions
3707117f1b4Smrg    */
3717117f1b4Smrg   /*@{*/
3727117f1b4Smrg
3737117f1b4Smrg   /**
374af69d88dSmrg    * Called by glBindTexture() and glBindTextures().
3757117f1b4Smrg    */
376af69d88dSmrg   void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
377af69d88dSmrg                        GLenum target, struct gl_texture_object *tObj );
3787117f1b4Smrg
3797117f1b4Smrg   /**
380af69d88dSmrg    * Called to allocate a new texture object.  Drivers will usually
381af69d88dSmrg    * allocate/return a subclass of gl_texture_object.
3827117f1b4Smrg    */
383af69d88dSmrg   struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
384af69d88dSmrg                                                  GLuint name, GLenum target);
3857117f1b4Smrg   /**
386af69d88dSmrg    * Called to delete/free a texture object.  Drivers should free the
387af69d88dSmrg    * object and any image data it contains.
3887117f1b4Smrg    */
389af69d88dSmrg   void (*DeleteTexture)(struct gl_context *ctx,
390af69d88dSmrg                         struct gl_texture_object *texObj);
3917117f1b4Smrg
3927ec681f3Smrg   /**
3937ec681f3Smrg    * Called to notify that texture is removed from ctx->Shared->TexObjects
3947ec681f3Smrg    */
3957ec681f3Smrg   void (*TextureRemovedFromShared)(struct gl_context *ctx,
3967ec681f3Smrg                                   struct gl_texture_object *texObj);
3977ec681f3Smrg
398af69d88dSmrg   /** Called to allocate a new texture image object. */
399af69d88dSmrg   struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
4007117f1b4Smrg
401af69d88dSmrg   /** Called to free a texture image object returned by NewTextureImage() */
402af69d88dSmrg   void (*DeleteTextureImage)(struct gl_context *ctx,
403af69d88dSmrg                              struct gl_texture_image *);
4047117f1b4Smrg
405af69d88dSmrg   /** Called to allocate memory for a single texture image */
406af69d88dSmrg   GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
407af69d88dSmrg                                        struct gl_texture_image *texImage);
4087117f1b4Smrg
409af69d88dSmrg   /** Free the memory for a single texture image */
410af69d88dSmrg   void (*FreeTextureImageBuffer)(struct gl_context *ctx,
411af69d88dSmrg                                  struct gl_texture_image *texImage);
412af69d88dSmrg
413af69d88dSmrg   /** Map a slice of a texture image into user space.
414af69d88dSmrg    * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
415af69d88dSmrg    * indicates the 1D array index.
416af69d88dSmrg    * \param texImage  the texture image
417af69d88dSmrg    * \param slice  the 3D image slice or array texture slice
418af69d88dSmrg    * \param x, y, w, h  region of interest
419af69d88dSmrg    * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
420af69d88dSmrg    *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
421af69d88dSmrg    * \param mapOut  returns start of mapping of region of interest
422af69d88dSmrg    * \param rowStrideOut returns row stride (in bytes).  In the case of a
423af69d88dSmrg    * compressed texture, this is the byte stride between one row of blocks
424af69d88dSmrg    * and another.
4257117f1b4Smrg    */
426af69d88dSmrg   void (*MapTextureImage)(struct gl_context *ctx,
427af69d88dSmrg			   struct gl_texture_image *texImage,
428af69d88dSmrg			   GLuint slice,
429af69d88dSmrg			   GLuint x, GLuint y, GLuint w, GLuint h,
430af69d88dSmrg			   GLbitfield mode,
431af69d88dSmrg			   GLubyte **mapOut, GLint *rowStrideOut);
4327117f1b4Smrg
433af69d88dSmrg   void (*UnmapTextureImage)(struct gl_context *ctx,
434af69d88dSmrg			     struct gl_texture_image *texImage,
435af69d88dSmrg			     GLuint slice);
436af69d88dSmrg
437af69d88dSmrg   /** For GL_ARB_texture_storage.  Allocate memory for whole mipmap stack.
438af69d88dSmrg    * All the gl_texture_images in the texture object will have their
439af69d88dSmrg    * dimensions, format, etc. initialized already.
4407117f1b4Smrg    */
441af69d88dSmrg   GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
442af69d88dSmrg                                    struct gl_texture_object *texObj,
443af69d88dSmrg                                    GLsizei levels, GLsizei width,
444af69d88dSmrg                                    GLsizei height, GLsizei depth);
445af69d88dSmrg
446af69d88dSmrg   /** Called as part of glTextureView to add views to origTexObj */
447af69d88dSmrg   GLboolean (*TextureView)(struct gl_context *ctx,
448af69d88dSmrg                            struct gl_texture_object *texObj,
449af69d88dSmrg                            struct gl_texture_object *origTexObj);
4507117f1b4Smrg
4517117f1b4Smrg   /**
452af69d88dSmrg    * Map a renderbuffer into user space.
453af69d88dSmrg    * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
454af69d88dSmrg    *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
4557117f1b4Smrg    */
456af69d88dSmrg   void (*MapRenderbuffer)(struct gl_context *ctx,
457af69d88dSmrg			   struct gl_renderbuffer *rb,
458af69d88dSmrg			   GLuint x, GLuint y, GLuint w, GLuint h,
459af69d88dSmrg			   GLbitfield mode,
46001e04c3fSmrg			   GLubyte **mapOut, GLint *rowStrideOut,
46101e04c3fSmrg			   bool flip_y);
462af69d88dSmrg
463af69d88dSmrg   void (*UnmapRenderbuffer)(struct gl_context *ctx,
464af69d88dSmrg			     struct gl_renderbuffer *rb);
4657117f1b4Smrg
4667117f1b4Smrg   /**
467af69d88dSmrg    * Optional driver entrypoint that binds a non-texture renderbuffer's
468af69d88dSmrg    * contents to a texture image.
4697117f1b4Smrg    */
470af69d88dSmrg   GLboolean (*BindRenderbufferTexImage)(struct gl_context *ctx,
471af69d88dSmrg                                         struct gl_renderbuffer *rb,
472af69d88dSmrg                                         struct gl_texture_image *texImage);
4737117f1b4Smrg   /*@}*/
4747117f1b4Smrg
4757117f1b4Smrg
4767117f1b4Smrg   /**
4777117f1b4Smrg    * \name Vertex/fragment program functions
4787117f1b4Smrg    */
4797117f1b4Smrg   /*@{*/
4807117f1b4Smrg   /** Allocate a new program */
4817ec681f3Smrg   struct gl_program * (*NewProgram)(struct gl_context *ctx,
4827ec681f3Smrg                                     gl_shader_stage stage,
48301e04c3fSmrg                                     GLuint id, bool is_arb_asm);
4847117f1b4Smrg   /** Delete a program */
4853464ebd5Sriastradh   void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
48601e04c3fSmrg   /**
48701e04c3fSmrg    * Allocate a program to associate with the new ATI fragment shader (optional)
48801e04c3fSmrg    */
48901e04c3fSmrg   struct gl_program * (*NewATIfs)(struct gl_context *ctx,
49001e04c3fSmrg                                   struct ati_fragment_shader *curProg);
491cdc920a0Smrg   /**
492cdc920a0Smrg    * Notify driver that a program string (and GPU code) has been specified
493cdc920a0Smrg    * or modified.  Return GL_TRUE or GL_FALSE to indicate if the program is
494cdc920a0Smrg    * supported by the driver.
495cdc920a0Smrg    */
4963464ebd5Sriastradh   GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
497cdc920a0Smrg                                    struct gl_program *prog);
4987117f1b4Smrg
499af69d88dSmrg   /**
500af69d88dSmrg    * Notify driver that the sampler uniforms for the current program have
501af69d88dSmrg    * changed.  On some drivers, this may require shader recompiles.
502af69d88dSmrg    */
503af69d88dSmrg   void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
504af69d88dSmrg                                struct gl_program *prog);
505af69d88dSmrg
5067117f1b4Smrg   /** Query if program can be loaded onto hardware */
5073464ebd5Sriastradh   GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
5087117f1b4Smrg				struct gl_program *prog);
5097117f1b4Smrg
5107117f1b4Smrg   /*@}*/
5117117f1b4Smrg
5123464ebd5Sriastradh   /**
5133464ebd5Sriastradh    * \name GLSL shader/program functions.
5143464ebd5Sriastradh    */
5153464ebd5Sriastradh   /*@{*/
5163464ebd5Sriastradh   /**
5173464ebd5Sriastradh    * Called when a shader program is linked.
5183464ebd5Sriastradh    *
5193464ebd5Sriastradh    * This gives drivers an opportunity to clone the IR and make their
5203464ebd5Sriastradh    * own transformations on it for the purposes of code generation.
5213464ebd5Sriastradh    */
522af69d88dSmrg   GLboolean (*LinkShader)(struct gl_context *ctx,
523af69d88dSmrg                           struct gl_shader_program *shader);
5243464ebd5Sriastradh   /*@}*/
5257117f1b4Smrg
52601e04c3fSmrg
52701e04c3fSmrg   /**
52801e04c3fSmrg    * \name Draw functions.
52901e04c3fSmrg    */
53001e04c3fSmrg   /*@{*/
53101e04c3fSmrg   /**
53201e04c3fSmrg    * For indirect array drawing:
53301e04c3fSmrg    *
53401e04c3fSmrg    *    typedef struct {
53501e04c3fSmrg    *       GLuint count;
53601e04c3fSmrg    *       GLuint primCount;
53701e04c3fSmrg    *       GLuint first;
53801e04c3fSmrg    *       GLuint baseInstance; // in GL 4.2 and later, must be zero otherwise
53901e04c3fSmrg    *    } DrawArraysIndirectCommand;
54001e04c3fSmrg    *
54101e04c3fSmrg    * For indirect indexed drawing:
54201e04c3fSmrg    *
54301e04c3fSmrg    *    typedef struct {
54401e04c3fSmrg    *       GLuint count;
54501e04c3fSmrg    *       GLuint primCount;
54601e04c3fSmrg    *       GLuint firstIndex;
54701e04c3fSmrg    *       GLint  baseVertex;
54801e04c3fSmrg    *       GLuint baseInstance; // in GL 4.2 and later, must be zero otherwise
54901e04c3fSmrg    *    } DrawElementsIndirectCommand;
55001e04c3fSmrg    */
55101e04c3fSmrg
55201e04c3fSmrg   /**
55301e04c3fSmrg    * Draw a number of primitives.
55401e04c3fSmrg    * \param prims  array [nr_prims] describing what to draw (prim type,
55501e04c3fSmrg    *               vertex count, first index, instance count, etc).
55601e04c3fSmrg    * \param ib  index buffer for indexed drawing, NULL for array drawing
55701e04c3fSmrg    * \param index_bounds_valid  are min_index and max_index valid?
55801e04c3fSmrg    * \param min_index  lowest vertex index used
55901e04c3fSmrg    * \param max_index  highest vertex index used
5607ec681f3Smrg    * \param num_instances  instance count from ARB_draw_instanced
5617ec681f3Smrg    * \param base_instance  base instance from ARB_base_instance
56201e04c3fSmrg    */
56301e04c3fSmrg   void (*Draw)(struct gl_context *ctx,
5647ec681f3Smrg                const struct _mesa_prim *prims, unsigned nr_prims,
56501e04c3fSmrg                const struct _mesa_index_buffer *ib,
5667ec681f3Smrg                bool index_bounds_valid,
5677ec681f3Smrg                bool primitive_restart,
5687ec681f3Smrg                unsigned restart_index,
5697ec681f3Smrg                unsigned min_index, unsigned max_index,
5707ec681f3Smrg                unsigned num_instances, unsigned base_instance);
57101e04c3fSmrg
5727ec681f3Smrg   /**
5737ec681f3Smrg    * Optimal Gallium version of Draw() that doesn't require translation
5747ec681f3Smrg    * of draw info in the state tracker.
5757ec681f3Smrg    *
5767ec681f3Smrg    * The interface is identical to pipe_context::draw_vbo
5777ec681f3Smrg    * with indirect == NULL.
5787ec681f3Smrg    *
5797ec681f3Smrg    * "info" is not const and the following fields can be changed by
5807ec681f3Smrg    * the callee, so callers should be aware:
5817ec681f3Smrg    * - info->index_bounds_valid (if false)
5827ec681f3Smrg    * - info->min_index (if index_bounds_valid is false)
5837ec681f3Smrg    * - info->max_index (if index_bounds_valid is false)
5847ec681f3Smrg    * - info->drawid (if increment_draw_id is true)
5857ec681f3Smrg    * - info->index.gl_bo (if index_size && !has_user_indices)
5867ec681f3Smrg    */
5877ec681f3Smrg   void (*DrawGallium)(struct gl_context *ctx,
5887ec681f3Smrg                       struct pipe_draw_info *info,
5897ec681f3Smrg                       unsigned drawid_offset,
5907ec681f3Smrg                       const struct pipe_draw_start_count_bias *draws,
5917ec681f3Smrg                       unsigned num_draws);
5927ec681f3Smrg
5937ec681f3Smrg   /**
5947ec681f3Smrg    * Same as DrawGallium, but mode can also change between draws.
5957ec681f3Smrg    *
5967ec681f3Smrg    * "info" is not const and the following fields can be changed by
5977ec681f3Smrg    * the callee in addition to the fields listed by DrawGallium:
5987ec681f3Smrg    * - info->mode
5997ec681f3Smrg    *
6007ec681f3Smrg    * This function exists to decrease complexity of DrawGallium.
6017ec681f3Smrg    */
6027ec681f3Smrg   void (*DrawGalliumMultiMode)(struct gl_context *ctx,
6037ec681f3Smrg                                struct pipe_draw_info *info,
6047ec681f3Smrg                                const struct pipe_draw_start_count_bias *draws,
6057ec681f3Smrg                                const unsigned char *mode,
6067ec681f3Smrg                                unsigned num_draws);
60701e04c3fSmrg
60801e04c3fSmrg   /**
60901e04c3fSmrg    * Draw a primitive, getting the vertex count, instance count, start
61001e04c3fSmrg    * vertex, etc. from a buffer object.
61101e04c3fSmrg    * \param mode  GL_POINTS, GL_LINES, GL_TRIANGLE_STRIP, etc.
61201e04c3fSmrg    * \param indirect_data  buffer to get "DrawArrays/ElementsIndirectCommand"
61301e04c3fSmrg    *                       data
61401e04c3fSmrg    * \param indirect_offset  offset of first primitive in indrect_data buffer
61501e04c3fSmrg    * \param draw_count  number of primitives to draw
61601e04c3fSmrg    * \param stride  stride, in bytes, between
61701e04c3fSmrg    *                "DrawArrays/ElementsIndirectCommand" objects
61801e04c3fSmrg    * \param indirect_draw_count_buffer  if non-NULL specifies a buffer to get
61901e04c3fSmrg    *                                    the real draw_count value.  Used for
62001e04c3fSmrg    *                                    GL_ARB_indirect_parameters.
62101e04c3fSmrg    * \param indirect_draw_count_offset  offset to the draw_count value in
62201e04c3fSmrg    *                                    indirect_draw_count_buffer
62301e04c3fSmrg    * \param ib  index buffer for indexed drawing, NULL otherwise.
62401e04c3fSmrg    */
62501e04c3fSmrg   void (*DrawIndirect)(struct gl_context *ctx, GLuint mode,
62601e04c3fSmrg                        struct gl_buffer_object *indirect_data,
62701e04c3fSmrg                        GLsizeiptr indirect_offset, unsigned draw_count,
62801e04c3fSmrg                        unsigned stride,
62901e04c3fSmrg                        struct gl_buffer_object *indirect_draw_count_buffer,
63001e04c3fSmrg                        GLsizeiptr indirect_draw_count_offset,
6317ec681f3Smrg                        const struct _mesa_index_buffer *ib,
6327ec681f3Smrg                        bool primitive_restart,
6337ec681f3Smrg                        unsigned restart_index);
6347ec681f3Smrg
6357ec681f3Smrg   /**
6367ec681f3Smrg    * Driver implementation of glDrawTransformFeedback.
6377ec681f3Smrg    *
6387ec681f3Smrg    * \param mode    Primitive type
6397ec681f3Smrg    * \param num_instances  instance count from ARB_draw_instanced
6407ec681f3Smrg    * \param stream  If called via DrawTransformFeedbackStream, specifies
6417ec681f3Smrg    *                the vertex stream buffer from which to get the vertex
6427ec681f3Smrg    *                count.
6437ec681f3Smrg    * \param tfb_vertcount  if non-null, indicates which transform feedback
6447ec681f3Smrg    *                       object has the vertex count.
6457ec681f3Smrg    */
6467ec681f3Smrg   void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode,
6477ec681f3Smrg                                 unsigned num_instances, unsigned stream,
6487ec681f3Smrg                                 struct gl_transform_feedback_object *tfb_vertcount);
6497ec681f3Smrg
6507ec681f3Smrg   void (*DrawGalliumVertexState)(struct gl_context *ctx,
6517ec681f3Smrg                                  struct pipe_vertex_state *state,
6527ec681f3Smrg                                  struct pipe_draw_vertex_state_info info,
6537ec681f3Smrg                                  const struct pipe_draw_start_count_bias *draws,
6547ec681f3Smrg                                  const uint8_t *mode,
6557ec681f3Smrg                                  unsigned num_draws,
6567ec681f3Smrg                                  bool per_vertex_edgeflags);
65701e04c3fSmrg   /*@}*/
65801e04c3fSmrg
6597ec681f3Smrg   struct pipe_vertex_state *
6607ec681f3Smrg      (*CreateGalliumVertexState)(struct gl_context *ctx,
6617ec681f3Smrg                                  const struct gl_vertex_array_object *vao,
6627ec681f3Smrg                                  struct gl_buffer_object *indexbuf,
6637ec681f3Smrg                                  uint32_t enabled_attribs);
66401e04c3fSmrg
6657117f1b4Smrg   /**
6667117f1b4Smrg    * \name State-changing functions.
6677117f1b4Smrg    *
6687117f1b4Smrg    * \note drawing functions are above.
6697117f1b4Smrg    *
6707117f1b4Smrg    * These functions are called by their corresponding OpenGL API functions.
6717117f1b4Smrg    * They are \e also called by the gl_PopAttrib() function!!!
6727117f1b4Smrg    * May add more functions like these to the device driver in the future.
6737117f1b4Smrg    */
6747117f1b4Smrg   /*@{*/
6757117f1b4Smrg   /** Specify the alpha test function */
6763464ebd5Sriastradh   void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
6777117f1b4Smrg   /** Set the blend color */
6783464ebd5Sriastradh   void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
6797117f1b4Smrg   /** Set the blend equation */
680af69d88dSmrg   void (*BlendEquationSeparate)(struct gl_context *ctx,
681af69d88dSmrg                                 GLenum modeRGB, GLenum modeA);
6827117f1b4Smrg   /** Specify pixel arithmetic */
6833464ebd5Sriastradh   void (*BlendFuncSeparate)(struct gl_context *ctx,
6847117f1b4Smrg                             GLenum sfactorRGB, GLenum dfactorRGB,
6857117f1b4Smrg                             GLenum sfactorA, GLenum dfactorA);
6867117f1b4Smrg   /** Specify a plane against which all geometry is clipped */
687af69d88dSmrg   void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
6887117f1b4Smrg   /** Enable and disable writing of frame buffer color components */
6893464ebd5Sriastradh   void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
6907117f1b4Smrg                     GLboolean bmask, GLboolean amask );
6917117f1b4Smrg   /** Cause a material color to track the current color */
6923464ebd5Sriastradh   void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
6937117f1b4Smrg   /** Specify whether front- or back-facing facets can be culled */
6943464ebd5Sriastradh   void (*CullFace)(struct gl_context *ctx, GLenum mode);
6957117f1b4Smrg   /** Define front- and back-facing polygons */
6963464ebd5Sriastradh   void (*FrontFace)(struct gl_context *ctx, GLenum mode);
6977117f1b4Smrg   /** Specify the value used for depth buffer comparisons */
6983464ebd5Sriastradh   void (*DepthFunc)(struct gl_context *ctx, GLenum func);
6997117f1b4Smrg   /** Enable or disable writing into the depth buffer */
7003464ebd5Sriastradh   void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
7017117f1b4Smrg   /** Specify mapping of depth values from NDC to window coordinates */
702af69d88dSmrg   void (*DepthRange)(struct gl_context *ctx);
7037117f1b4Smrg   /** Specify the current buffer for writing */
70401e04c3fSmrg   void (*DrawBuffer)(struct gl_context *ctx);
70501e04c3fSmrg   /** Used to allocated any buffers with on-demand creation */
70601e04c3fSmrg   void (*DrawBufferAllocate)(struct gl_context *ctx);
7077117f1b4Smrg   /** Enable or disable server-side gl capabilities */
7083464ebd5Sriastradh   void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
7097117f1b4Smrg   /** Specify fog parameters */
7103464ebd5Sriastradh   void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
7117117f1b4Smrg   /** Set light source parameters.
7127117f1b4Smrg    * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
7137117f1b4Smrg    * been transformed to eye-space.
7147117f1b4Smrg    */
7153464ebd5Sriastradh   void (*Lightfv)(struct gl_context *ctx, GLenum light,
7167117f1b4Smrg		   GLenum pname, const GLfloat *params );
7177117f1b4Smrg   /** Set the lighting model parameters */
718af69d88dSmrg   void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
719af69d88dSmrg                        const GLfloat *params);
7207117f1b4Smrg   /** Specify the line stipple pattern */
7213464ebd5Sriastradh   void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
7227117f1b4Smrg   /** Specify the width of rasterized lines */
7233464ebd5Sriastradh   void (*LineWidth)(struct gl_context *ctx, GLfloat width);
7247117f1b4Smrg   /** Specify a logical pixel operation for color index rendering */
72501e04c3fSmrg   void (*LogicOpcode)(struct gl_context *ctx, enum gl_logicop_mode opcode);
7263464ebd5Sriastradh   void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
7277117f1b4Smrg                            const GLfloat *params);
7287117f1b4Smrg   /** Specify the diameter of rasterized points */
7293464ebd5Sriastradh   void (*PointSize)(struct gl_context *ctx, GLfloat size);
7307117f1b4Smrg   /** Select a polygon rasterization mode */
7313464ebd5Sriastradh   void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
7327117f1b4Smrg   /** Set the scale and units used to calculate depth values */
73301e04c3fSmrg   void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp);
7347117f1b4Smrg   /** Set the polygon stippling pattern */
7353464ebd5Sriastradh   void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
7367117f1b4Smrg   /* Specifies the current buffer for reading */
7373464ebd5Sriastradh   void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
7387117f1b4Smrg   /** Set rasterization mode */
7393464ebd5Sriastradh   void (*RenderMode)(struct gl_context *ctx, GLenum mode );
7407117f1b4Smrg   /** Define the scissor box */
741af69d88dSmrg   void (*Scissor)(struct gl_context *ctx);
7427117f1b4Smrg   /** Select flat or smooth shading */
7433464ebd5Sriastradh   void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
7447117f1b4Smrg   /** OpenGL 2.0 two-sided StencilFunc */
7453464ebd5Sriastradh   void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
7467117f1b4Smrg                               GLint ref, GLuint mask);
7477117f1b4Smrg   /** OpenGL 2.0 two-sided StencilMask */
7483464ebd5Sriastradh   void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
7497117f1b4Smrg   /** OpenGL 2.0 two-sided StencilOp */
7503464ebd5Sriastradh   void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
7517117f1b4Smrg                             GLenum zfail, GLenum zpass);
7527117f1b4Smrg   /** Control the generation of texture coordinates */
7533464ebd5Sriastradh   void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
7547117f1b4Smrg		  const GLfloat *params);
7557117f1b4Smrg   /** Set texture environment parameters */
7563464ebd5Sriastradh   void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
7577117f1b4Smrg                  const GLfloat *param);
75801e04c3fSmrg   /** Set texture parameter (callee gets param value from the texObj) */
759af69d88dSmrg   void (*TexParameter)(struct gl_context *ctx,
76001e04c3fSmrg                        struct gl_texture_object *texObj, GLenum pname);
7617117f1b4Smrg   /** Set the viewport */
762af69d88dSmrg   void (*Viewport)(struct gl_context *ctx);
7637117f1b4Smrg   /*@}*/
7647117f1b4Smrg
7657117f1b4Smrg
7667117f1b4Smrg   /**
7677117f1b4Smrg    * \name Vertex/pixel buffer object functions
7687117f1b4Smrg    */
7697117f1b4Smrg   /*@{*/
770af69d88dSmrg   struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
77101e04c3fSmrg                                                GLuint buffer);
7727117f1b4Smrg
7733464ebd5Sriastradh   void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
7747117f1b4Smrg
775af69d88dSmrg   GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
776af69d88dSmrg                           GLsizeiptrARB size, const GLvoid *data, GLenum usage,
777af69d88dSmrg                           GLenum storageFlags, struct gl_buffer_object *obj);
7787117f1b4Smrg
779af69d88dSmrg   void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
7807117f1b4Smrg			  GLsizeiptrARB size, const GLvoid *data,
7817117f1b4Smrg			  struct gl_buffer_object *obj );
7827117f1b4Smrg
783af69d88dSmrg   void (*GetBufferSubData)( struct gl_context *ctx,
7847117f1b4Smrg			     GLintptrARB offset, GLsizeiptrARB size,
7857117f1b4Smrg			     GLvoid *data, struct gl_buffer_object *obj );
7867117f1b4Smrg
787af69d88dSmrg   void (*ClearBufferSubData)( struct gl_context *ctx,
788af69d88dSmrg                               GLintptr offset, GLsizeiptr size,
789af69d88dSmrg                               const GLvoid *clearValue,
790af69d88dSmrg                               GLsizeiptr clearValueSize,
791af69d88dSmrg                               struct gl_buffer_object *obj );
7927117f1b4Smrg
7933464ebd5Sriastradh   void (*CopyBufferSubData)( struct gl_context *ctx,
7944a49301eSmrg                              struct gl_buffer_object *src,
7954a49301eSmrg                              struct gl_buffer_object *dst,
7964a49301eSmrg                              GLintptr readOffset, GLintptr writeOffset,
7974a49301eSmrg                              GLsizeiptr size );
7984a49301eSmrg
79901e04c3fSmrg   void (*InvalidateBufferSubData)( struct gl_context *ctx,
80001e04c3fSmrg                                    struct gl_buffer_object *obj,
80101e04c3fSmrg                                    GLintptr offset,
80201e04c3fSmrg                                    GLsizeiptr length );
80301e04c3fSmrg
804af69d88dSmrg   /* Returns pointer to the start of the mapped range.
805af69d88dSmrg    * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
8064a49301eSmrg    */
807af69d88dSmrg   void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
808cdc920a0Smrg                             GLsizeiptr length, GLbitfield access,
809af69d88dSmrg                             struct gl_buffer_object *obj,
810af69d88dSmrg                             gl_map_buffer_index index);
8114a49301eSmrg
812af69d88dSmrg   void (*FlushMappedBufferRange)(struct gl_context *ctx,
813cdc920a0Smrg                                  GLintptr offset, GLsizeiptr length,
814af69d88dSmrg                                  struct gl_buffer_object *obj,
815af69d88dSmrg                                  gl_map_buffer_index index);
8164a49301eSmrg
817af69d88dSmrg   GLboolean (*UnmapBuffer)( struct gl_context *ctx,
818af69d88dSmrg			     struct gl_buffer_object *obj,
819af69d88dSmrg                             gl_map_buffer_index index);
8207117f1b4Smrg   /*@}*/
8217117f1b4Smrg
822cdc920a0Smrg   /**
823cdc920a0Smrg    * \name Functions for GL_APPLE_object_purgeable
824cdc920a0Smrg    */
825cdc920a0Smrg   /*@{*/
826cdc920a0Smrg   /* variations on ObjectPurgeable */
827af69d88dSmrg   GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
828af69d88dSmrg                                   struct gl_buffer_object *obj, GLenum option);
829af69d88dSmrg   GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
830af69d88dSmrg                                   struct gl_renderbuffer *obj, GLenum option);
831af69d88dSmrg   GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
832af69d88dSmrg                                    struct gl_texture_object *obj,
833af69d88dSmrg                                    GLenum option);
834cdc920a0Smrg
835cdc920a0Smrg   /* variations on ObjectUnpurgeable */
836af69d88dSmrg   GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
837af69d88dSmrg                                     struct gl_buffer_object *obj,
838af69d88dSmrg                                     GLenum option);
839af69d88dSmrg   GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
840af69d88dSmrg                                     struct gl_renderbuffer *obj,
841af69d88dSmrg                                     GLenum option);
842af69d88dSmrg   GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
843af69d88dSmrg                                      struct gl_texture_object *obj,
844af69d88dSmrg                                      GLenum option);
845cdc920a0Smrg   /*@}*/
846cdc920a0Smrg
8477117f1b4Smrg   /**
848af69d88dSmrg    * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
8497117f1b4Smrg    */
8507117f1b4Smrg   /*@{*/
851af69d88dSmrg   struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
852af69d88dSmrg                                             GLuint name);
853af69d88dSmrg   struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
854af69d88dSmrg                                               GLuint name);
8553464ebd5Sriastradh   void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
856cdc920a0Smrg                           struct gl_framebuffer *drawFb,
857cdc920a0Smrg                           struct gl_framebuffer *readFb);
8583464ebd5Sriastradh   void (*FramebufferRenderbuffer)(struct gl_context *ctx,
8597117f1b4Smrg                                   struct gl_framebuffer *fb,
8607117f1b4Smrg                                   GLenum attachment,
8617117f1b4Smrg                                   struct gl_renderbuffer *rb);
8623464ebd5Sriastradh   void (*RenderTexture)(struct gl_context *ctx,
8637117f1b4Smrg                         struct gl_framebuffer *fb,
8647117f1b4Smrg                         struct gl_renderbuffer_attachment *att);
8653464ebd5Sriastradh   void (*FinishRenderTexture)(struct gl_context *ctx,
866af69d88dSmrg                               struct gl_renderbuffer *rb);
8673464ebd5Sriastradh   void (*ValidateFramebuffer)(struct gl_context *ctx,
8684a49301eSmrg                               struct gl_framebuffer *fb);
8697117f1b4Smrg   /*@}*/
8703464ebd5Sriastradh   void (*BlitFramebuffer)(struct gl_context *ctx,
87101e04c3fSmrg                           struct gl_framebuffer *readFb,
87201e04c3fSmrg                           struct gl_framebuffer *drawFb,
8737117f1b4Smrg                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
8747117f1b4Smrg                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
8757117f1b4Smrg                           GLbitfield mask, GLenum filter);
876a8bb7a65Smaya   void (*DiscardFramebuffer)(struct gl_context *ctx, struct gl_framebuffer *fb,
877a8bb7a65Smaya                              struct gl_renderbuffer_attachment *att);
8787117f1b4Smrg
87901e04c3fSmrg   /**
88001e04c3fSmrg    * \name Functions for GL_ARB_sample_locations
88101e04c3fSmrg    */
88201e04c3fSmrg   void (*GetProgrammableSampleCaps)(struct gl_context *ctx,
88301e04c3fSmrg                                     const struct gl_framebuffer *fb,
88401e04c3fSmrg                                     GLuint *bits, GLuint *width, GLuint *height);
88501e04c3fSmrg   void (*EvaluateDepthValues)(struct gl_context *ctx);
88601e04c3fSmrg
8877117f1b4Smrg   /**
8887117f1b4Smrg    * \name Query objects
8897117f1b4Smrg    */
8907117f1b4Smrg   /*@{*/
8913464ebd5Sriastradh   struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
8923464ebd5Sriastradh   void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
8933464ebd5Sriastradh   void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
894af69d88dSmrg   void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
8953464ebd5Sriastradh   void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
8963464ebd5Sriastradh   void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
8973464ebd5Sriastradh   void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
89801e04c3fSmrg   /*
89901e04c3fSmrg    * \pname the value requested to be written (GL_QUERY_RESULT, etc)
90001e04c3fSmrg    * \ptype the type of the value requested to be written:
90101e04c3fSmrg    *    GL_UNSIGNED_INT, GL_UNSIGNED_INT64_ARB,
90201e04c3fSmrg    *    GL_INT, GL_INT64_ARB
90301e04c3fSmrg    */
90401e04c3fSmrg   void (*StoreQueryResult)(struct gl_context *ctx, struct gl_query_object *q,
90501e04c3fSmrg                            struct gl_buffer_object *buf, intptr_t offset,
90601e04c3fSmrg                            GLenum pname, GLenum ptype);
9077117f1b4Smrg   /*@}*/
9087117f1b4Smrg
909af69d88dSmrg   /**
910af69d88dSmrg    * \name Performance monitors
911af69d88dSmrg    */
912af69d88dSmrg   /*@{*/
91301e04c3fSmrg   void (*InitPerfMonitorGroups)(struct gl_context *ctx);
914af69d88dSmrg   struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
915af69d88dSmrg   void (*DeletePerfMonitor)(struct gl_context *ctx,
916af69d88dSmrg                             struct gl_perf_monitor_object *m);
917af69d88dSmrg   GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
918af69d88dSmrg                                 struct gl_perf_monitor_object *m);
919af69d88dSmrg
920af69d88dSmrg   /** Stop an active performance monitor, discarding results. */
921af69d88dSmrg   void (*ResetPerfMonitor)(struct gl_context *ctx,
922af69d88dSmrg                            struct gl_perf_monitor_object *m);
923af69d88dSmrg   void (*EndPerfMonitor)(struct gl_context *ctx,
924af69d88dSmrg                          struct gl_perf_monitor_object *m);
925af69d88dSmrg   GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
926af69d88dSmrg                                             struct gl_perf_monitor_object *m);
927af69d88dSmrg   void (*GetPerfMonitorResult)(struct gl_context *ctx,
928af69d88dSmrg                                struct gl_perf_monitor_object *m,
929af69d88dSmrg                                GLsizei dataSize,
930af69d88dSmrg                                GLuint *data,
931af69d88dSmrg                                GLint *bytesWritten);
932af69d88dSmrg   /*@}*/
933af69d88dSmrg
9347117f1b4Smrg   /**
93501e04c3fSmrg    * \name Performance Query objects
9367117f1b4Smrg    */
9377117f1b4Smrg   /*@{*/
93801e04c3fSmrg   unsigned (*InitPerfQueryInfo)(struct gl_context *ctx);
93901e04c3fSmrg   void (*GetPerfQueryInfo)(struct gl_context *ctx,
94001e04c3fSmrg                            unsigned queryIndex,
94101e04c3fSmrg                            const char **name,
94201e04c3fSmrg                            GLuint *dataSize,
94301e04c3fSmrg                            GLuint *numCounters,
94401e04c3fSmrg                            GLuint *numActive);
94501e04c3fSmrg   void (*GetPerfCounterInfo)(struct gl_context *ctx,
94601e04c3fSmrg                              unsigned queryIndex,
94701e04c3fSmrg                              unsigned counterIndex,
94801e04c3fSmrg                              const char **name,
94901e04c3fSmrg                              const char **desc,
95001e04c3fSmrg                              GLuint *offset,
95101e04c3fSmrg                              GLuint *data_size,
95201e04c3fSmrg                              GLuint *type_enum,
95301e04c3fSmrg                              GLuint *data_type_enum,
95401e04c3fSmrg                              GLuint64 *raw_max);
95501e04c3fSmrg   struct gl_perf_query_object * (*NewPerfQueryObject)(struct gl_context *ctx,
95601e04c3fSmrg                                                       unsigned queryIndex);
95701e04c3fSmrg   void (*DeletePerfQuery)(struct gl_context *ctx,
95801e04c3fSmrg                           struct gl_perf_query_object *obj);
95901e04c3fSmrg   bool (*BeginPerfQuery)(struct gl_context *ctx,
96001e04c3fSmrg                          struct gl_perf_query_object *obj);
96101e04c3fSmrg   void (*EndPerfQuery)(struct gl_context *ctx,
96201e04c3fSmrg                        struct gl_perf_query_object *obj);
96301e04c3fSmrg   void (*WaitPerfQuery)(struct gl_context *ctx,
96401e04c3fSmrg                         struct gl_perf_query_object *obj);
96501e04c3fSmrg   bool (*IsPerfQueryReady)(struct gl_context *ctx,
96601e04c3fSmrg                            struct gl_perf_query_object *obj);
9677ec681f3Smrg   bool (*GetPerfQueryData)(struct gl_context *ctx,
96801e04c3fSmrg                            struct gl_perf_query_object *obj,
96901e04c3fSmrg                            GLsizei dataSize,
97001e04c3fSmrg                            GLuint *data,
97101e04c3fSmrg                            GLuint *bytesWritten);
9727117f1b4Smrg   /*@}*/
9737117f1b4Smrg
97401e04c3fSmrg
9757117f1b4Smrg   /**
97601e04c3fSmrg    * \name GREMEDY debug/marker functions
9777117f1b4Smrg    */
9787117f1b4Smrg   /*@{*/
97901e04c3fSmrg   void (*EmitStringMarker)(struct gl_context *ctx, const GLchar *string, GLsizei len);
9807117f1b4Smrg   /*@}*/
9817117f1b4Smrg
9827117f1b4Smrg   /**
9837117f1b4Smrg    * \name Support for multiple T&L engines
9847117f1b4Smrg    */
9857117f1b4Smrg   /*@{*/
9867117f1b4Smrg
9877117f1b4Smrg   /**
9887117f1b4Smrg    * Set by the driver-supplied T&L engine.
9897117f1b4Smrg    *
9907117f1b4Smrg    * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
9917117f1b4Smrg    */
9927117f1b4Smrg   GLuint CurrentExecPrimitive;
9937117f1b4Smrg
9947117f1b4Smrg   /**
995af69d88dSmrg    * Current glBegin state of an in-progress compilation.  May be
996af69d88dSmrg    * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
997af69d88dSmrg    * or PRIM_UNKNOWN.
9987117f1b4Smrg    */
9997117f1b4Smrg   GLuint CurrentSavePrimitive;
10007117f1b4Smrg
10017117f1b4Smrg
10027117f1b4Smrg#define FLUSH_STORED_VERTICES 0x1
10037117f1b4Smrg#define FLUSH_UPDATE_CURRENT  0x2
10047117f1b4Smrg   /**
10057117f1b4Smrg    * Set by the driver-supplied T&L engine whenever vertices are buffered
1006af69d88dSmrg    * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
1007af69d88dSmrg    * is not updated.  A bitmask of the FLUSH_x values above.
10087117f1b4Smrg    *
10097117f1b4Smrg    * The dd_function_table::FlushVertices call below may be used to resolve
10107117f1b4Smrg    * these conditions.
10117117f1b4Smrg    */
1012af69d88dSmrg   GLbitfield NeedFlush;
10137117f1b4Smrg
101401e04c3fSmrg   /** Need to call vbo_save_SaveFlushVertices() upon state change? */
1015af69d88dSmrg   GLboolean SaveNeedFlush;
10164a49301eSmrg
10177117f1b4Smrg   /**
10187117f1b4Smrg    * Notify driver that the special derived value _NeedEyeCoords has
10197117f1b4Smrg    * changed.
10207117f1b4Smrg    */
10213464ebd5Sriastradh   void (*LightingSpaceChange)( struct gl_context *ctx );
10227117f1b4Smrg
1023af69d88dSmrg   /**@}*/
10244a49301eSmrg
10254a49301eSmrg   /**
10264a49301eSmrg    * \name GL_ARB_sync interfaces
10274a49301eSmrg    */
10284a49301eSmrg   /*@{*/
102901e04c3fSmrg   struct gl_sync_object * (*NewSyncObject)(struct gl_context *);
1030af69d88dSmrg   void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
1031af69d88dSmrg                     GLenum, GLbitfield);
10323464ebd5Sriastradh   void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
10333464ebd5Sriastradh   void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
10343464ebd5Sriastradh   void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
10354a49301eSmrg			  GLbitfield, GLuint64);
10363464ebd5Sriastradh   void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
10374a49301eSmrg			  GLbitfield, GLuint64);
10384a49301eSmrg   /*@}*/
1039cdc920a0Smrg
1040cdc920a0Smrg   /** GL_NV_conditional_render */
1041af69d88dSmrg   void (*BeginConditionalRender)(struct gl_context *ctx,
1042af69d88dSmrg                                  struct gl_query_object *q,
1043cdc920a0Smrg                                  GLenum mode);
1044af69d88dSmrg   void (*EndConditionalRender)(struct gl_context *ctx,
1045af69d88dSmrg                                struct gl_query_object *q);
1046cdc920a0Smrg
1047cdc920a0Smrg   /**
1048cdc920a0Smrg    * \name GL_OES_draw_texture interface
1049cdc920a0Smrg    */
1050cdc920a0Smrg   /*@{*/
10513464ebd5Sriastradh   void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
1052cdc920a0Smrg                   GLfloat width, GLfloat height);
1053cdc920a0Smrg   /*@}*/
1054cdc920a0Smrg
10553464ebd5Sriastradh   /**
10563464ebd5Sriastradh    * \name GL_OES_EGL_image interface
10573464ebd5Sriastradh    */
10583464ebd5Sriastradh   void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
1059cdc920a0Smrg				   struct gl_texture_object *texObj,
1060cdc920a0Smrg				   struct gl_texture_image *texImage,
1061cdc920a0Smrg				   GLeglImageOES image_handle);
10623464ebd5Sriastradh   void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
1063cdc920a0Smrg					     struct gl_renderbuffer *rb,
1064cdc920a0Smrg					     void *image_handle);
1065cdc920a0Smrg
10667ec681f3Smrg   /**
10677ec681f3Smrg    * \name GL_EXT_EGL_image_storage interface
10687ec681f3Smrg    */
10697ec681f3Smrg   void (*EGLImageTargetTexStorage)(struct gl_context *ctx, GLenum target,
10707ec681f3Smrg                                    struct gl_texture_object *texObj,
10717ec681f3Smrg                                    struct gl_texture_image *texImage,
10727ec681f3Smrg                                    GLeglImageOES image_handle);
10733464ebd5Sriastradh   /**
10743464ebd5Sriastradh    * \name GL_EXT_transform_feedback interface
10753464ebd5Sriastradh    */
10763464ebd5Sriastradh   struct gl_transform_feedback_object *
10773464ebd5Sriastradh        (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
10783464ebd5Sriastradh   void (*DeleteTransformFeedback)(struct gl_context *ctx,
10793464ebd5Sriastradh                                   struct gl_transform_feedback_object *obj);
10803464ebd5Sriastradh   void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
10813464ebd5Sriastradh                                  struct gl_transform_feedback_object *obj);
10823464ebd5Sriastradh   void (*EndTransformFeedback)(struct gl_context *ctx,
10833464ebd5Sriastradh                                struct gl_transform_feedback_object *obj);
10843464ebd5Sriastradh   void (*PauseTransformFeedback)(struct gl_context *ctx,
10853464ebd5Sriastradh                                  struct gl_transform_feedback_object *obj);
10863464ebd5Sriastradh   void (*ResumeTransformFeedback)(struct gl_context *ctx,
10873464ebd5Sriastradh                                   struct gl_transform_feedback_object *obj);
1088af69d88dSmrg
1089af69d88dSmrg   /**
1090af69d88dSmrg    * Return the number of vertices written to a stream during the last
1091af69d88dSmrg    * Begin/EndTransformFeedback block.
1092af69d88dSmrg    */
1093af69d88dSmrg   GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
1094af69d88dSmrg                                       struct gl_transform_feedback_object *obj,
1095af69d88dSmrg                                       GLuint stream);
10963464ebd5Sriastradh
10973464ebd5Sriastradh   /**
10983464ebd5Sriastradh    * \name GL_NV_texture_barrier interface
10993464ebd5Sriastradh    */
11003464ebd5Sriastradh   void (*TextureBarrier)(struct gl_context *ctx);
11013464ebd5Sriastradh
11023464ebd5Sriastradh   /**
11033464ebd5Sriastradh    * \name GL_ARB_sampler_objects
11043464ebd5Sriastradh    */
11053464ebd5Sriastradh   struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
11063464ebd5Sriastradh                                                  GLuint name);
1107af69d88dSmrg
1108af69d88dSmrg   /**
1109af69d88dSmrg    * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
1110af69d88dSmrg    * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
1111af69d88dSmrg    */
1112af69d88dSmrg   uint64_t (*GetTimestamp)(struct gl_context *ctx);
1113af69d88dSmrg
1114af69d88dSmrg   /**
1115af69d88dSmrg    * \name GL_ARB_texture_multisample
1116af69d88dSmrg    */
1117af69d88dSmrg   void (*GetSamplePosition)(struct gl_context *ctx,
1118af69d88dSmrg                             struct gl_framebuffer *fb,
1119af69d88dSmrg                             GLuint index,
1120af69d88dSmrg                             GLfloat *outValue);
1121af69d88dSmrg
1122af69d88dSmrg   /**
1123af69d88dSmrg    * \name NV_vdpau_interop interface
1124af69d88dSmrg    */
1125af69d88dSmrg   void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
1126af69d88dSmrg                           GLenum access, GLboolean output,
1127af69d88dSmrg                           struct gl_texture_object *texObj,
1128af69d88dSmrg                           struct gl_texture_image *texImage,
1129af69d88dSmrg                           const GLvoid *vdpSurface, GLuint index);
1130af69d88dSmrg   void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
1131af69d88dSmrg                             GLenum access, GLboolean output,
1132af69d88dSmrg                             struct gl_texture_object *texObj,
1133af69d88dSmrg                             struct gl_texture_image *texImage,
1134af69d88dSmrg                             const GLvoid *vdpSurface, GLuint index);
1135af69d88dSmrg
1136af69d88dSmrg   /**
1137af69d88dSmrg    * Query reset status for GL_ARB_robustness
1138af69d88dSmrg    *
1139af69d88dSmrg    * Per \c glGetGraphicsResetStatusARB, this function should return a
1140af69d88dSmrg    * non-zero value once after a reset.  If a reset is non-atomic, the
1141af69d88dSmrg    * non-zero status should be returned for the duration of the reset.
1142af69d88dSmrg    */
1143af69d88dSmrg   GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
1144af69d88dSmrg
1145af69d88dSmrg   /**
1146af69d88dSmrg    * \name GL_ARB_shader_image_load_store interface.
1147af69d88dSmrg    */
1148af69d88dSmrg   /** @{ */
1149af69d88dSmrg   void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
1150af69d88dSmrg   /** @} */
115101e04c3fSmrg
115201e04c3fSmrg   /**
115301e04c3fSmrg    * GL_EXT_shader_framebuffer_fetch_non_coherent rendering barrier.
115401e04c3fSmrg    *
115501e04c3fSmrg    * On return from this function any framebuffer contents written by
115601e04c3fSmrg    * previous draw commands are guaranteed to be visible from subsequent
115701e04c3fSmrg    * fragment shader invocations using the
115801e04c3fSmrg    * EXT_shader_framebuffer_fetch_non_coherent interface.
115901e04c3fSmrg    */
116001e04c3fSmrg   /** @{ */
116101e04c3fSmrg   void (*FramebufferFetchBarrier)(struct gl_context *ctx);
116201e04c3fSmrg   /** @} */
116301e04c3fSmrg
116401e04c3fSmrg   /**
116501e04c3fSmrg    * \name GL_ARB_compute_shader interface
116601e04c3fSmrg    */
116701e04c3fSmrg   /*@{*/
116801e04c3fSmrg   void (*DispatchCompute)(struct gl_context *ctx, const GLuint *num_groups);
116901e04c3fSmrg   void (*DispatchComputeIndirect)(struct gl_context *ctx, GLintptr indirect);
117001e04c3fSmrg   /*@}*/
117101e04c3fSmrg
117201e04c3fSmrg   /**
117301e04c3fSmrg    * \name GL_ARB_compute_variable_group_size interface
117401e04c3fSmrg    */
117501e04c3fSmrg   /*@{*/
117601e04c3fSmrg   void (*DispatchComputeGroupSize)(struct gl_context *ctx,
117701e04c3fSmrg                                    const GLuint *num_groups,
117801e04c3fSmrg                                    const GLuint *group_size);
117901e04c3fSmrg   /*@}*/
118001e04c3fSmrg
118101e04c3fSmrg   /**
118201e04c3fSmrg    * Query information about memory. Device memory is e.g. VRAM. Staging
118301e04c3fSmrg    * memory is e.g. GART. All sizes are in kilobytes.
118401e04c3fSmrg    */
118501e04c3fSmrg   void (*QueryMemoryInfo)(struct gl_context *ctx,
118601e04c3fSmrg                           struct gl_memory_info *info);
118701e04c3fSmrg
118801e04c3fSmrg   /**
118901e04c3fSmrg    * Indicate that this thread is being used by Mesa as a background drawing
119001e04c3fSmrg    * thread for the given GL context.
119101e04c3fSmrg    *
119201e04c3fSmrg    * If this function is called more than once from any given thread, each
119301e04c3fSmrg    * subsequent call overrides the context that was passed in the previous
119401e04c3fSmrg    * call.  Mesa takes advantage of this to re-use a background thread to
119501e04c3fSmrg    * perform drawing on behalf of multiple contexts.
119601e04c3fSmrg    *
119701e04c3fSmrg    * Mesa may sometimes call this function from a non-background thread
119801e04c3fSmrg    * (i.e. a thread that has already been bound to a context using
119901e04c3fSmrg    * __DriverAPIRec::MakeCurrent()); when this happens, ctx will be equal to
120001e04c3fSmrg    * the context that is bound to this thread.
120101e04c3fSmrg    *
120201e04c3fSmrg    * Mesa will only call this function if GL multithreading is enabled.
120301e04c3fSmrg    */
120401e04c3fSmrg   void (*SetBackgroundContext)(struct gl_context *ctx,
120501e04c3fSmrg                                struct util_queue_monitoring *queue_info);
120601e04c3fSmrg
120701e04c3fSmrg   /**
120801e04c3fSmrg    * \name GL_ARB_sparse_buffer interface
120901e04c3fSmrg    */
121001e04c3fSmrg   /*@{*/
121101e04c3fSmrg   void (*BufferPageCommitment)(struct gl_context *ctx,
121201e04c3fSmrg                                struct gl_buffer_object *bufferObj,
121301e04c3fSmrg                                GLintptr offset, GLsizeiptr size,
121401e04c3fSmrg                                GLboolean commit);
121501e04c3fSmrg   /*@}*/
121601e04c3fSmrg
121701e04c3fSmrg   /**
121801e04c3fSmrg    * \name GL_ARB_bindless_texture interface
121901e04c3fSmrg    */
122001e04c3fSmrg   /*@{*/
122101e04c3fSmrg   GLuint64 (*NewTextureHandle)(struct gl_context *ctx,
122201e04c3fSmrg                                struct gl_texture_object *texObj,
122301e04c3fSmrg                                struct gl_sampler_object *sampObj);
122401e04c3fSmrg   void (*DeleteTextureHandle)(struct gl_context *ctx, GLuint64 handle);
122501e04c3fSmrg   void (*MakeTextureHandleResident)(struct gl_context *ctx, GLuint64 handle,
122601e04c3fSmrg                                     bool resident);
122701e04c3fSmrg   GLuint64 (*NewImageHandle)(struct gl_context *ctx,
122801e04c3fSmrg                              struct gl_image_unit *imgObj);
122901e04c3fSmrg   void (*DeleteImageHandle)(struct gl_context *ctx, GLuint64 handle);
123001e04c3fSmrg   void (*MakeImageHandleResident)(struct gl_context *ctx, GLuint64 handle,
123101e04c3fSmrg                                   GLenum access, bool resident);
123201e04c3fSmrg   /*@}*/
123301e04c3fSmrg
123401e04c3fSmrg
123501e04c3fSmrg   /**
123601e04c3fSmrg    * \name GL_EXT_external_objects interface
123701e04c3fSmrg    */
123801e04c3fSmrg   /*@{*/
123901e04c3fSmrg  /**
124001e04c3fSmrg    * Called to allocate a new memory object.  Drivers will usually
124101e04c3fSmrg    * allocate/return a subclass of gl_memory_object.
124201e04c3fSmrg    */
124301e04c3fSmrg   struct gl_memory_object * (*NewMemoryObject)(struct gl_context *ctx,
124401e04c3fSmrg                                                GLuint name);
124501e04c3fSmrg   /**
124601e04c3fSmrg    * Called to delete/free a memory object.  Drivers should free the
124701e04c3fSmrg    * object and any image data it contains.
124801e04c3fSmrg    */
124901e04c3fSmrg   void (*DeleteMemoryObject)(struct gl_context *ctx,
125001e04c3fSmrg                              struct gl_memory_object *memObj);
125101e04c3fSmrg
125201e04c3fSmrg   /**
125301e04c3fSmrg    * Set the given memory object as the texture's storage.
125401e04c3fSmrg    */
125501e04c3fSmrg   GLboolean (*SetTextureStorageForMemoryObject)(struct gl_context *ctx,
125601e04c3fSmrg                                                 struct gl_texture_object *tex_obj,
125701e04c3fSmrg                                                 struct gl_memory_object *mem_obj,
125801e04c3fSmrg                                                 GLsizei levels, GLsizei width,
125901e04c3fSmrg                                                 GLsizei height, GLsizei depth,
126001e04c3fSmrg                                                 GLuint64 offset);
126101e04c3fSmrg
126201e04c3fSmrg   /**
126301e04c3fSmrg    * Use a memory object as the backing data for a buffer object
126401e04c3fSmrg    */
126501e04c3fSmrg   GLboolean (*BufferDataMem)(struct gl_context *ctx,
126601e04c3fSmrg                              GLenum target,
126701e04c3fSmrg                              GLsizeiptrARB size,
126801e04c3fSmrg                              struct gl_memory_object *memObj,
126901e04c3fSmrg                              GLuint64 offset,
127001e04c3fSmrg                              GLenum usage,
127101e04c3fSmrg                              struct gl_buffer_object *bufObj);
127201e04c3fSmrg
127301e04c3fSmrg   /**
127401e04c3fSmrg    * Fill uuid with an unique identifier for this driver
127501e04c3fSmrg    *
127601e04c3fSmrg    * uuid must point to GL_UUID_SIZE_EXT bytes of available memory
127701e04c3fSmrg    */
127801e04c3fSmrg   void (*GetDriverUuid)(struct gl_context *ctx, char *uuid);
127901e04c3fSmrg
128001e04c3fSmrg   /**
128101e04c3fSmrg    * Fill uuid with an unique identifier for the device associated
128201e04c3fSmrg    * to this driver
128301e04c3fSmrg    *
128401e04c3fSmrg    * uuid must point to GL_UUID_SIZE_EXT bytes of available memory
128501e04c3fSmrg    */
128601e04c3fSmrg   void (*GetDeviceUuid)(struct gl_context *ctx, char *uuid);
128701e04c3fSmrg
128801e04c3fSmrg   /*@}*/
128901e04c3fSmrg
129001e04c3fSmrg   /**
129101e04c3fSmrg    * \name GL_EXT_external_objects_fd interface
129201e04c3fSmrg    */
129301e04c3fSmrg   /*@{*/
129401e04c3fSmrg   /**
129501e04c3fSmrg    * Called to import a memory object. The caller relinquishes ownership
129601e04c3fSmrg    * of fd after the call returns.
129701e04c3fSmrg    *
129801e04c3fSmrg    * Accessing fd after ImportMemoryObjectFd returns results in undefined
129901e04c3fSmrg    * behaviour. This is consistent with EXT_external_object_fd.
130001e04c3fSmrg    */
130101e04c3fSmrg   void (*ImportMemoryObjectFd)(struct gl_context *ctx,
130201e04c3fSmrg                                struct gl_memory_object *memObj,
130301e04c3fSmrg                                GLuint64 size,
130401e04c3fSmrg                                int fd);
130501e04c3fSmrg   /*@}*/
130601e04c3fSmrg
130701e04c3fSmrg   /**
130801e04c3fSmrg    * \name GL_ARB_get_program_binary
130901e04c3fSmrg    */
131001e04c3fSmrg   /*@{*/
131101e04c3fSmrg   /**
131201e04c3fSmrg    * Calls to retrieve/store a binary serialized copy of the current program.
131301e04c3fSmrg    */
131401e04c3fSmrg   void (*GetProgramBinaryDriverSHA1)(struct gl_context *ctx, uint8_t *sha1);
131501e04c3fSmrg
131601e04c3fSmrg   void (*ProgramBinarySerializeDriverBlob)(struct gl_context *ctx,
131701e04c3fSmrg                                            struct gl_shader_program *shProg,
131801e04c3fSmrg                                            struct gl_program *prog);
131901e04c3fSmrg
132001e04c3fSmrg   void (*ProgramBinaryDeserializeDriverBlob)(struct gl_context *ctx,
132101e04c3fSmrg                                              struct gl_shader_program *shProg,
132201e04c3fSmrg                                              struct gl_program *prog);
132301e04c3fSmrg   /*@}*/
132401e04c3fSmrg
132501e04c3fSmrg   /**
132601e04c3fSmrg    * \name GL_EXT_semaphore interface
132701e04c3fSmrg    */
132801e04c3fSmrg   /*@{*/
132901e04c3fSmrg  /**
133001e04c3fSmrg    * Called to allocate a new semaphore object. Drivers will usually
133101e04c3fSmrg    * allocate/return a subclass of gl_semaphore_object.
133201e04c3fSmrg    */
133301e04c3fSmrg   struct gl_semaphore_object * (*NewSemaphoreObject)(struct gl_context *ctx,
133401e04c3fSmrg                                                      GLuint name);
133501e04c3fSmrg   /**
133601e04c3fSmrg    * Called to delete/free a semaphore object. Drivers should free the
133701e04c3fSmrg    * object and any associated resources.
133801e04c3fSmrg    */
133901e04c3fSmrg   void (*DeleteSemaphoreObject)(struct gl_context *ctx,
134001e04c3fSmrg                                 struct gl_semaphore_object *semObj);
134101e04c3fSmrg
134201e04c3fSmrg   /**
134301e04c3fSmrg    * Introduce an operation to wait for the semaphore object in the GL
134401e04c3fSmrg    * server's command stream
134501e04c3fSmrg    */
134601e04c3fSmrg   void (*ServerWaitSemaphoreObject)(struct gl_context *ctx,
134701e04c3fSmrg                                     struct gl_semaphore_object *semObj,
134801e04c3fSmrg                                     GLuint numBufferBarriers,
134901e04c3fSmrg                                     struct gl_buffer_object **bufObjs,
135001e04c3fSmrg                                     GLuint numTextureBarriers,
135101e04c3fSmrg                                     struct gl_texture_object **texObjs,
135201e04c3fSmrg                                     const GLenum *srcLayouts);
135301e04c3fSmrg
135401e04c3fSmrg   /**
135501e04c3fSmrg    * Introduce an operation to signal the semaphore object in the GL
135601e04c3fSmrg    * server's command stream
135701e04c3fSmrg    */
135801e04c3fSmrg   void (*ServerSignalSemaphoreObject)(struct gl_context *ctx,
135901e04c3fSmrg                                       struct gl_semaphore_object *semObj,
136001e04c3fSmrg                                       GLuint numBufferBarriers,
136101e04c3fSmrg                                       struct gl_buffer_object **bufObjs,
136201e04c3fSmrg                                       GLuint numTextureBarriers,
136301e04c3fSmrg                                       struct gl_texture_object **texObjs,
136401e04c3fSmrg                                       const GLenum *dstLayouts);
136501e04c3fSmrg   /*@}*/
136601e04c3fSmrg
136701e04c3fSmrg   /**
136801e04c3fSmrg    * \name GL_EXT_semaphore_fd interface
136901e04c3fSmrg    */
137001e04c3fSmrg   /*@{*/
137101e04c3fSmrg   /**
137201e04c3fSmrg    * Called to import a semaphore object. The caller relinquishes ownership
137301e04c3fSmrg    * of fd after the call returns.
137401e04c3fSmrg    *
137501e04c3fSmrg    * Accessing fd after ImportSemaphoreFd returns results in undefined
137601e04c3fSmrg    * behaviour. This is consistent with EXT_semaphore_fd.
137701e04c3fSmrg    */
137801e04c3fSmrg   void (*ImportSemaphoreFd)(struct gl_context *ctx,
137901e04c3fSmrg                                struct gl_semaphore_object *semObj,
138001e04c3fSmrg                                int fd);
138101e04c3fSmrg   /*@}*/
138201e04c3fSmrg
138301e04c3fSmrg   /**
138401e04c3fSmrg    * \name Disk shader cache functions
138501e04c3fSmrg    */
138601e04c3fSmrg   /*@{*/
138701e04c3fSmrg   /**
138801e04c3fSmrg    * Called to initialize gl_program::driver_cache_blob (and size) with a
138901e04c3fSmrg    * ralloc allocated buffer.
139001e04c3fSmrg    *
139101e04c3fSmrg    * This buffer will be saved and restored as part of the gl_program
139201e04c3fSmrg    * serialization and deserialization.
139301e04c3fSmrg    */
139401e04c3fSmrg   void (*ShaderCacheSerializeDriverBlob)(struct gl_context *ctx,
139501e04c3fSmrg                                          struct gl_program *prog);
139601e04c3fSmrg   /*@}*/
1397a8bb7a65Smaya
1398a8bb7a65Smaya   /**
1399a8bb7a65Smaya    * \name Set the number of compiler threads for ARB_parallel_shader_compile
1400a8bb7a65Smaya    */
1401a8bb7a65Smaya   void (*SetMaxShaderCompilerThreads)(struct gl_context *ctx, unsigned count);
1402a8bb7a65Smaya   bool (*GetShaderProgramCompletionStatus)(struct gl_context *ctx,
1403a8bb7a65Smaya                                            struct gl_shader_program *shprog);
14047ec681f3Smrg
14057ec681f3Smrg   void (*PinDriverToL3Cache)(struct gl_context *ctx, unsigned L3_cache);
14067ec681f3Smrg
14077ec681f3Smrg   GLboolean (*ValidateEGLImage)(struct gl_context *ctx, GLeglImageOES image_handle);
14087117f1b4Smrg};
14097117f1b4Smrg
14107117f1b4Smrg
14117117f1b4Smrg/**
1412af69d88dSmrg * Per-vertex functions.
14137117f1b4Smrg *
1414af69d88dSmrg * These are the functions which can appear between glBegin and glEnd.
1415af69d88dSmrg * Depending on whether we're inside or outside a glBegin/End pair
1416af69d88dSmrg * and whether we're in immediate mode or building a display list, these
1417af69d88dSmrg * functions behave differently.  This structure allows us to switch
1418af69d88dSmrg * between those modes more easily.
14197117f1b4Smrg *
1420af69d88dSmrg * Generally, these pointers point to functions in the VBO module.
14217117f1b4Smrg */
14227117f1b4Smrgtypedef struct {
14233464ebd5Sriastradh   void (GLAPIENTRYP ArrayElement)( GLint );
14247117f1b4Smrg   void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
14257117f1b4Smrg   void (GLAPIENTRYP Color3fv)( const GLfloat * );
14267117f1b4Smrg   void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
14277117f1b4Smrg   void (GLAPIENTRYP Color4fv)( const GLfloat * );
14287117f1b4Smrg   void (GLAPIENTRYP EdgeFlag)( GLboolean );
14293464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord1f)( GLfloat );
14303464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
14313464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
14323464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
14333464ebd5Sriastradh   void (GLAPIENTRYP EvalPoint1)( GLint );
14343464ebd5Sriastradh   void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
14357117f1b4Smrg   void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
14367117f1b4Smrg   void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
14377117f1b4Smrg   void (GLAPIENTRYP Indexf)( GLfloat );
14387117f1b4Smrg   void (GLAPIENTRYP Indexfv)( const GLfloat * );
14393464ebd5Sriastradh   void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
14407117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
14417117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
14427117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
14437117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
14447117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
14457117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
14467117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
14477117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
14487117f1b4Smrg   void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
14497117f1b4Smrg   void (GLAPIENTRYP Normal3fv)( const GLfloat * );
14507117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
14517117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
14527117f1b4Smrg   void (GLAPIENTRYP TexCoord1f)( GLfloat );
14537117f1b4Smrg   void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
14547117f1b4Smrg   void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
14557117f1b4Smrg   void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
14567117f1b4Smrg   void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
14577117f1b4Smrg   void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
14587117f1b4Smrg   void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
14597117f1b4Smrg   void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
14607117f1b4Smrg   void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
14617117f1b4Smrg   void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
14627117f1b4Smrg   void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
14637117f1b4Smrg   void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
14647117f1b4Smrg   void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
14657117f1b4Smrg   void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
14663464ebd5Sriastradh   void (GLAPIENTRYP CallList)( GLuint );
14673464ebd5Sriastradh   void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
14687117f1b4Smrg   void (GLAPIENTRYP Begin)( GLenum );
14697117f1b4Smrg   void (GLAPIENTRYP End)( void );
14703464ebd5Sriastradh   void (GLAPIENTRYP PrimitiveRestartNV)( void );
1471af69d88dSmrg   /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
14727117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
14737117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
14747117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
14757117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
14767117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
14777117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
14787117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
14797117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
14803464ebd5Sriastradh   /* GL_ARB_vertex_program */
14817117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
14827117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
14837117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
14847117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
14857117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
14867117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
14877117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
14887117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
14893464ebd5Sriastradh
14903464ebd5Sriastradh   /* GL_EXT_gpu_shader4 / GL 3.0 */
14913464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
14923464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
14933464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
14943464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
14953464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
14963464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
14973464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
14983464ebd5Sriastradh
14993464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
15003464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
15013464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
15023464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
15033464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
15043464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
15053464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
15063464ebd5Sriastradh
1507af69d88dSmrg   /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1508af69d88dSmrg   void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1509af69d88dSmrg   void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1510af69d88dSmrg
1511af69d88dSmrg   void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1512af69d88dSmrg   void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1513af69d88dSmrg
1514af69d88dSmrg   void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1515af69d88dSmrg   void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1516af69d88dSmrg
1517af69d88dSmrg   void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1518af69d88dSmrg   void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1519af69d88dSmrg
1520af69d88dSmrg   void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1521af69d88dSmrg   void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1522af69d88dSmrg
1523af69d88dSmrg   void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1524af69d88dSmrg   void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1525af69d88dSmrg
1526af69d88dSmrg   void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1527af69d88dSmrg   void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1528af69d88dSmrg
1529af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1530af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1531af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1532af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1533af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1534af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1535af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1536af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1537af69d88dSmrg
1538af69d88dSmrg   void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1539af69d88dSmrg   void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1540af69d88dSmrg
1541af69d88dSmrg   void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1542af69d88dSmrg   void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1543af69d88dSmrg
1544af69d88dSmrg   void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1545af69d88dSmrg   void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1546af69d88dSmrg
1547af69d88dSmrg   void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1548af69d88dSmrg   void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1549af69d88dSmrg
1550af69d88dSmrg   void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1551af69d88dSmrg					GLboolean normalized, GLuint value);
1552af69d88dSmrg   void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1553af69d88dSmrg					GLboolean normalized, GLuint value);
1554af69d88dSmrg   void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1555af69d88dSmrg					GLboolean normalized, GLuint value);
1556af69d88dSmrg   void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1557af69d88dSmrg					GLboolean normalized, GLuint value);
1558af69d88dSmrg   void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1559af69d88dSmrg					GLboolean normalized,
1560af69d88dSmrg					 const GLuint *value);
1561af69d88dSmrg   void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1562af69d88dSmrg					GLboolean normalized,
1563af69d88dSmrg					 const GLuint *value);
1564af69d88dSmrg   void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1565af69d88dSmrg					GLboolean normalized,
1566af69d88dSmrg					 const GLuint *value);
1567af69d88dSmrg   void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1568af69d88dSmrg					 GLboolean normalized,
1569af69d88dSmrg					 const GLuint *value);
157001e04c3fSmrg
157101e04c3fSmrg   /* GL_ARB_vertex_attrib_64bit / GL 4.1 */
157201e04c3fSmrg   void (GLAPIENTRYP VertexAttribL1d)( GLuint index, GLdouble x);
157301e04c3fSmrg   void (GLAPIENTRYP VertexAttribL2d)( GLuint index, GLdouble x, GLdouble y);
157401e04c3fSmrg   void (GLAPIENTRYP VertexAttribL3d)( GLuint index, GLdouble x, GLdouble y, GLdouble z);
157501e04c3fSmrg   void (GLAPIENTRYP VertexAttribL4d)( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
157601e04c3fSmrg
157701e04c3fSmrg
157801e04c3fSmrg   void (GLAPIENTRYP VertexAttribL1dv)( GLuint index, const GLdouble *v);
157901e04c3fSmrg   void (GLAPIENTRYP VertexAttribL2dv)( GLuint index, const GLdouble *v);
158001e04c3fSmrg   void (GLAPIENTRYP VertexAttribL3dv)( GLuint index, const GLdouble *v);
158101e04c3fSmrg   void (GLAPIENTRYP VertexAttribL4dv)( GLuint index, const GLdouble *v);
158201e04c3fSmrg
158301e04c3fSmrg   void (GLAPIENTRYP VertexAttribL1ui64ARB)( GLuint index, GLuint64EXT x);
158401e04c3fSmrg   void (GLAPIENTRYP VertexAttribL1ui64vARB)( GLuint index, const GLuint64EXT *v);
15857ec681f3Smrg
15867ec681f3Smrg   /* GL_NV_half_float */
15877ec681f3Smrg   void (GLAPIENTRYP Vertex2hNV)( GLhalfNV, GLhalfNV );
15887ec681f3Smrg   void (GLAPIENTRYP Vertex2hvNV)( const GLhalfNV * );
15897ec681f3Smrg   void (GLAPIENTRYP Vertex3hNV)( GLhalfNV, GLhalfNV, GLhalfNV );
15907ec681f3Smrg   void (GLAPIENTRYP Vertex3hvNV)( const GLhalfNV * );
15917ec681f3Smrg   void (GLAPIENTRYP Vertex4hNV)( GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV );
15927ec681f3Smrg   void (GLAPIENTRYP Vertex4hvNV)( const GLhalfNV * );
15937ec681f3Smrg   void (GLAPIENTRYP Normal3hNV)( GLhalfNV, GLhalfNV, GLhalfNV );
15947ec681f3Smrg   void (GLAPIENTRYP Normal3hvNV)( const GLhalfNV * );
15957ec681f3Smrg   void (GLAPIENTRYP Color3hNV)( GLhalfNV, GLhalfNV, GLhalfNV );
15967ec681f3Smrg   void (GLAPIENTRYP Color3hvNV)( const GLhalfNV * );
15977ec681f3Smrg   void (GLAPIENTRYP Color4hNV)( GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV );
15987ec681f3Smrg   void (GLAPIENTRYP Color4hvNV)( const GLhalfNV * );
15997ec681f3Smrg   void (GLAPIENTRYP TexCoord1hNV)( GLhalfNV );
16007ec681f3Smrg   void (GLAPIENTRYP TexCoord1hvNV)( const GLhalfNV * );
16017ec681f3Smrg   void (GLAPIENTRYP TexCoord2hNV)( GLhalfNV, GLhalfNV );
16027ec681f3Smrg   void (GLAPIENTRYP TexCoord2hvNV)( const GLhalfNV * );
16037ec681f3Smrg   void (GLAPIENTRYP TexCoord3hNV)( GLhalfNV, GLhalfNV, GLhalfNV );
16047ec681f3Smrg   void (GLAPIENTRYP TexCoord3hvNV)( const GLhalfNV * );
16057ec681f3Smrg   void (GLAPIENTRYP TexCoord4hNV)( GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV );
16067ec681f3Smrg   void (GLAPIENTRYP TexCoord4hvNV)( const GLhalfNV * );
16077ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1hNV)( GLenum, GLhalfNV );
16087ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1hvNV)( GLenum, const GLhalfNV * );
16097ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2hNV)( GLenum, GLhalfNV, GLhalfNV );
16107ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2hvNV)( GLenum, const GLhalfNV * );
16117ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3hNV)( GLenum, GLhalfNV, GLhalfNV, GLhalfNV );
16127ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3hvNV)( GLenum, const GLhalfNV * );
16137ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4hNV)( GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV );
16147ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4hvNV)( GLenum, const GLhalfNV * );
16157ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1hNV)( GLuint index, GLhalfNV x );
16167ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1hvNV)( GLuint index, const GLhalfNV *v );
16177ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2hNV)( GLuint index, GLhalfNV x, GLhalfNV y );
16187ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2hvNV)( GLuint index, const GLhalfNV *v );
16197ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3hNV)( GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z );
16207ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3hvNV)( GLuint index, const GLhalfNV *v );
16217ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4hNV)( GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w );
16227ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4hvNV)( GLuint index, const GLhalfNV *v );
16237ec681f3Smrg   void (GLAPIENTRYP VertexAttribs1hvNV)(GLuint index, GLsizei n, const GLhalfNV *v);
16247ec681f3Smrg   void (GLAPIENTRYP VertexAttribs2hvNV)(GLuint index, GLsizei n, const GLhalfNV *v);
16257ec681f3Smrg   void (GLAPIENTRYP VertexAttribs3hvNV)(GLuint index, GLsizei n, const GLhalfNV *v);
16267ec681f3Smrg   void (GLAPIENTRYP VertexAttribs4hvNV)(GLuint index, GLsizei n, const GLhalfNV *v);
16277ec681f3Smrg   void (GLAPIENTRYP FogCoordhNV)( GLhalfNV );
16287ec681f3Smrg   void (GLAPIENTRYP FogCoordhvNV)( const GLhalfNV * );
16297ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3hNV)( GLhalfNV, GLhalfNV, GLhalfNV );
16307ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3hvNV)( const GLhalfNV * );
16317ec681f3Smrg
16327ec681f3Smrg   void (GLAPIENTRYP Color3b)( GLbyte red, GLbyte green, GLbyte blue );
16337ec681f3Smrg   void (GLAPIENTRYP Color3d)( GLdouble red, GLdouble green, GLdouble blue );
16347ec681f3Smrg   void (GLAPIENTRYP Color3i)( GLint red, GLint green, GLint blue );
16357ec681f3Smrg   void (GLAPIENTRYP Color3s)( GLshort red, GLshort green, GLshort blue );
16367ec681f3Smrg   void (GLAPIENTRYP Color3ui)( GLuint red, GLuint green, GLuint blue );
16377ec681f3Smrg   void (GLAPIENTRYP Color3us)( GLushort red, GLushort green, GLushort blue );
16387ec681f3Smrg   void (GLAPIENTRYP Color3ub)( GLubyte red, GLubyte green, GLubyte blue );
16397ec681f3Smrg   void (GLAPIENTRYP Color3bv)( const GLbyte *v );
16407ec681f3Smrg   void (GLAPIENTRYP Color3dv)( const GLdouble *v );
16417ec681f3Smrg   void (GLAPIENTRYP Color3iv)( const GLint *v );
16427ec681f3Smrg   void (GLAPIENTRYP Color3sv)( const GLshort *v );
16437ec681f3Smrg   void (GLAPIENTRYP Color3uiv)( const GLuint *v );
16447ec681f3Smrg   void (GLAPIENTRYP Color3usv)( const GLushort *v );
16457ec681f3Smrg   void (GLAPIENTRYP Color3ubv)( const GLubyte *v );
16467ec681f3Smrg   void (GLAPIENTRYP Color4b)( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha );
16477ec681f3Smrg   void (GLAPIENTRYP Color4d)( GLdouble red, GLdouble green, GLdouble blue,
16487ec681f3Smrg                       GLdouble alpha );
16497ec681f3Smrg   void (GLAPIENTRYP Color4i)( GLint red, GLint green, GLint blue, GLint alpha );
16507ec681f3Smrg   void (GLAPIENTRYP Color4s)( GLshort red, GLshort green, GLshort blue,
16517ec681f3Smrg                       GLshort alpha );
16527ec681f3Smrg   void (GLAPIENTRYP Color4ui)( GLuint red, GLuint green, GLuint blue, GLuint alpha );
16537ec681f3Smrg   void (GLAPIENTRYP Color4us)( GLushort red, GLushort green, GLushort blue,
16547ec681f3Smrg                        GLushort alpha );
16557ec681f3Smrg   void (GLAPIENTRYP Color4ub)( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
16567ec681f3Smrg   void (GLAPIENTRYP Color4iv)( const GLint *v );
16577ec681f3Smrg   void (GLAPIENTRYP Color4bv)( const GLbyte *v );
16587ec681f3Smrg   void (GLAPIENTRYP Color4dv)( const GLdouble *v );
16597ec681f3Smrg   void (GLAPIENTRYP Color4sv)( const GLshort *v);
16607ec681f3Smrg   void (GLAPIENTRYP Color4uiv)( const GLuint *v);
16617ec681f3Smrg   void (GLAPIENTRYP Color4usv)( const GLushort *v);
16627ec681f3Smrg   void (GLAPIENTRYP Color4ubv)( const GLubyte *v);
16637ec681f3Smrg   void (GLAPIENTRYP FogCoordd)( GLdouble d );
16647ec681f3Smrg   void (GLAPIENTRYP FogCoorddv)( const GLdouble *v );
16657ec681f3Smrg   void (GLAPIENTRYP Indexd)( GLdouble c );
16667ec681f3Smrg   void (GLAPIENTRYP Indexi)( GLint c );
16677ec681f3Smrg   void (GLAPIENTRYP Indexs)( GLshort c );
16687ec681f3Smrg   void (GLAPIENTRYP Indexub)( GLubyte c );
16697ec681f3Smrg   void (GLAPIENTRYP Indexdv)( const GLdouble *c );
16707ec681f3Smrg   void (GLAPIENTRYP Indexiv)( const GLint *c );
16717ec681f3Smrg   void (GLAPIENTRYP Indexsv)( const GLshort *c );
16727ec681f3Smrg   void (GLAPIENTRYP Indexubv)( const GLubyte *c );
16737ec681f3Smrg   void (GLAPIENTRYP EdgeFlagv)(const GLboolean *flag);
16747ec681f3Smrg   void (GLAPIENTRYP Normal3b)( GLbyte nx, GLbyte ny, GLbyte nz );
16757ec681f3Smrg   void (GLAPIENTRYP Normal3d)( GLdouble nx, GLdouble ny, GLdouble nz );
16767ec681f3Smrg   void (GLAPIENTRYP Normal3i)( GLint nx, GLint ny, GLint nz );
16777ec681f3Smrg   void (GLAPIENTRYP Normal3s)( GLshort nx, GLshort ny, GLshort nz );
16787ec681f3Smrg   void (GLAPIENTRYP Normal3bv)( const GLbyte *v );
16797ec681f3Smrg   void (GLAPIENTRYP Normal3dv)( const GLdouble *v );
16807ec681f3Smrg   void (GLAPIENTRYP Normal3iv)( const GLint *v );
16817ec681f3Smrg   void (GLAPIENTRYP Normal3sv)( const GLshort *v );
16827ec681f3Smrg   void (GLAPIENTRYP TexCoord1d)( GLdouble s );
16837ec681f3Smrg   void (GLAPIENTRYP TexCoord1i)( GLint s );
16847ec681f3Smrg   void (GLAPIENTRYP TexCoord1s)( GLshort s );
16857ec681f3Smrg   void (GLAPIENTRYP TexCoord2d)( GLdouble s, GLdouble t );
16867ec681f3Smrg   void (GLAPIENTRYP TexCoord2s)( GLshort s, GLshort t );
16877ec681f3Smrg   void (GLAPIENTRYP TexCoord2i)( GLint s, GLint t );
16887ec681f3Smrg   void (GLAPIENTRYP TexCoord3d)( GLdouble s, GLdouble t, GLdouble r );
16897ec681f3Smrg   void (GLAPIENTRYP TexCoord3i)( GLint s, GLint t, GLint r );
16907ec681f3Smrg   void (GLAPIENTRYP TexCoord3s)( GLshort s, GLshort t, GLshort r );
16917ec681f3Smrg   void (GLAPIENTRYP TexCoord4d)( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
16927ec681f3Smrg   void (GLAPIENTRYP TexCoord4i)( GLint s, GLint t, GLint r, GLint q );
16937ec681f3Smrg   void (GLAPIENTRYP TexCoord4s)( GLshort s, GLshort t, GLshort r, GLshort q );
16947ec681f3Smrg   void (GLAPIENTRYP TexCoord1dv)( const GLdouble *v );
16957ec681f3Smrg   void (GLAPIENTRYP TexCoord1iv)( const GLint *v );
16967ec681f3Smrg   void (GLAPIENTRYP TexCoord1sv)( const GLshort *v );
16977ec681f3Smrg   void (GLAPIENTRYP TexCoord2dv)( const GLdouble *v );
16987ec681f3Smrg   void (GLAPIENTRYP TexCoord2iv)( const GLint *v );
16997ec681f3Smrg   void (GLAPIENTRYP TexCoord2sv)( const GLshort *v );
17007ec681f3Smrg   void (GLAPIENTRYP TexCoord3dv)( const GLdouble *v );
17017ec681f3Smrg   void (GLAPIENTRYP TexCoord3iv)( const GLint *v );
17027ec681f3Smrg   void (GLAPIENTRYP TexCoord3sv)( const GLshort *v );
17037ec681f3Smrg   void (GLAPIENTRYP TexCoord4dv)( const GLdouble *v );
17047ec681f3Smrg   void (GLAPIENTRYP TexCoord4iv)( const GLint *v );
17057ec681f3Smrg   void (GLAPIENTRYP TexCoord4sv)( const GLshort *v );
17067ec681f3Smrg   void (GLAPIENTRYP Vertex2d)( GLdouble x, GLdouble y );
17077ec681f3Smrg   void (GLAPIENTRYP Vertex2i)( GLint x, GLint y );
17087ec681f3Smrg   void (GLAPIENTRYP Vertex2s)( GLshort x, GLshort y );
17097ec681f3Smrg   void (GLAPIENTRYP Vertex3d)( GLdouble x, GLdouble y, GLdouble z );
17107ec681f3Smrg   void (GLAPIENTRYP Vertex3i)( GLint x, GLint y, GLint z );
17117ec681f3Smrg   void (GLAPIENTRYP Vertex3s)( GLshort x, GLshort y, GLshort z );
17127ec681f3Smrg   void (GLAPIENTRYP Vertex4d)( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
17137ec681f3Smrg   void (GLAPIENTRYP Vertex4i)( GLint x, GLint y, GLint z, GLint w );
17147ec681f3Smrg   void (GLAPIENTRYP Vertex4s)( GLshort x, GLshort y, GLshort z, GLshort w );
17157ec681f3Smrg   void (GLAPIENTRYP Vertex2dv)( const GLdouble *v );
17167ec681f3Smrg   void (GLAPIENTRYP Vertex2iv)( const GLint *v );
17177ec681f3Smrg   void (GLAPIENTRYP Vertex2sv)( const GLshort *v );
17187ec681f3Smrg   void (GLAPIENTRYP Vertex3dv)( const GLdouble *v );
17197ec681f3Smrg   void (GLAPIENTRYP Vertex3iv)( const GLint *v );
17207ec681f3Smrg   void (GLAPIENTRYP Vertex3sv)( const GLshort *v );
17217ec681f3Smrg   void (GLAPIENTRYP Vertex4dv)( const GLdouble *v );
17227ec681f3Smrg   void (GLAPIENTRYP Vertex4iv)( const GLint *v );
17237ec681f3Smrg   void (GLAPIENTRYP Vertex4sv)( const GLshort *v );
17247ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1d)(GLenum target, GLdouble s);
17257ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1dv)(GLenum target, const GLdouble *v);
17267ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1i)(GLenum target, GLint s);
17277ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1iv)(GLenum target, const GLint *v);
17287ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1s)(GLenum target, GLshort s);
17297ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord1sv)(GLenum target, const GLshort *v);
17307ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t);
17317ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2dv)(GLenum target, const GLdouble *v);
17327ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2i)(GLenum target, GLint s, GLint t);
17337ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2iv)(GLenum target, const GLint *v);
17347ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2s)(GLenum target, GLshort s, GLshort t);
17357ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord2sv)(GLenum target, const GLshort *v);
17367ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r);
17377ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3dv)(GLenum target, const GLdouble *v);
17387ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r);
17397ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3iv)(GLenum target, const GLint *v);
17407ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r);
17417ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord3sv)(GLenum target, const GLshort *v);
17427ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r,
17437ec681f3Smrg                               GLdouble q);
17447ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4dv)(GLenum target, const GLdouble *v);
17457ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q);
17467ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4iv)(GLenum target, const GLint *v);
17477ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r,
17487ec681f3Smrg                               GLshort q);
17497ec681f3Smrg   void (GLAPIENTRYP MultiTexCoord4sv)(GLenum target, const GLshort *v);
17507ec681f3Smrg   void (GLAPIENTRYP EvalCoord2dv)( const GLdouble *u );
17517ec681f3Smrg   void (GLAPIENTRYP EvalCoord2d)( GLdouble u, GLdouble v );
17527ec681f3Smrg   void (GLAPIENTRYP EvalCoord1dv)( const GLdouble *u );
17537ec681f3Smrg   void (GLAPIENTRYP EvalCoord1d)( GLdouble u );
17547ec681f3Smrg   void (GLAPIENTRYP Materialf)( GLenum face, GLenum pname, GLfloat param );
17557ec681f3Smrg   void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param );
17567ec681f3Smrg   void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint *params );
17577ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3b)( GLbyte red, GLbyte green, GLbyte blue );
17587ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3d)( GLdouble red, GLdouble green, GLdouble blue );
17597ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3i)( GLint red, GLint green, GLint blue );
17607ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3s)( GLshort red, GLshort green, GLshort blue );
17617ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3ui)( GLuint red, GLuint green, GLuint blue );
17627ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3us)( GLushort red, GLushort green, GLushort blue );
17637ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3ub)( GLubyte red, GLubyte green, GLubyte blue );
17647ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3bv)( const GLbyte *v );
17657ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3dv)( const GLdouble *v );
17667ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3iv)( const GLint *v );
17677ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3sv)( const GLshort *v );
17687ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3uiv)( const GLuint *v );
17697ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3usv)( const GLushort *v );
17707ec681f3Smrg   void (GLAPIENTRYP SecondaryColor3ubv)( const GLubyte *v );
17717ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x);
17727ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x);
17737ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y);
17747ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y);
17757ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z);
17767ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
17777ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z,
17787ec681f3Smrg                             GLshort w);
17797ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z,
17807ec681f3Smrg                             GLdouble w);
17817ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z,
17827ec681f3Smrg                              GLubyte w);
17837ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort *v);
17847ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble *v);
17857ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort *v);
17867ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble *v);
17877ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort *v);
17887ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble *v);
17897ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort *v);
17907ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble *v);
17917ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte *v);
17927ec681f3Smrg   void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort *v);
17937ec681f3Smrg   void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat *v);
17947ec681f3Smrg   void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble *v);
17957ec681f3Smrg   void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort *v);
17967ec681f3Smrg   void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat *v);
17977ec681f3Smrg   void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble *v);
17987ec681f3Smrg   void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort *v);
17997ec681f3Smrg   void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat *v);
18007ec681f3Smrg   void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble *v);
18017ec681f3Smrg   void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort *v);
18027ec681f3Smrg   void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat *v);
18037ec681f3Smrg   void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble *v);
18047ec681f3Smrg   void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte *v);
18057ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1s)(GLuint index, GLshort x);
18067ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1d)(GLuint index, GLdouble x);
18077ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2s)(GLuint index, GLshort x, GLshort y);
18087ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y);
18097ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z);
18107ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z);
18117ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z,
18127ec681f3Smrg                              GLshort w);
18137ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z,
18147ec681f3Smrg                              GLdouble w);
18157ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1sv)(GLuint index, const GLshort *v);
18167ec681f3Smrg   void (GLAPIENTRYP VertexAttrib1dv)(GLuint index, const GLdouble *v);
18177ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2sv)(GLuint index, const GLshort *v);
18187ec681f3Smrg   void (GLAPIENTRYP VertexAttrib2dv)(GLuint index, const GLdouble *v);
18197ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3sv)(GLuint index, const GLshort *v);
18207ec681f3Smrg   void (GLAPIENTRYP VertexAttrib3dv)(GLuint index, const GLdouble *v);
18217ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4sv)(GLuint index, const GLshort *v);
18227ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4dv)(GLuint index, const GLdouble *v);
18237ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4bv)(GLuint index, const GLbyte * v);
18247ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4iv)(GLuint index, const GLint * v);
18257ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4ubv)(GLuint index, const GLubyte * v);
18267ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4usv)(GLuint index, const GLushort * v);
18277ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4uiv)(GLuint index, const GLuint * v);
18287ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Nbv)(GLuint index, const GLbyte * v);
18297ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Nsv)(GLuint index, const GLshort * v);
18307ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Niv)(GLuint index, const GLint * v);
18317ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z,
18327ec681f3Smrg                                GLubyte w);
18337ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Nubv)(GLuint index, const GLubyte * v);
18347ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Nusv)(GLuint index, const GLushort * v);
18357ec681f3Smrg   void (GLAPIENTRYP VertexAttrib4Nuiv)(GLuint index, const GLuint * v);
18367ec681f3Smrg   void (GLAPIENTRYP VertexAttribI1iv)(GLuint index, const GLint *v);
18377ec681f3Smrg   void (GLAPIENTRYP VertexAttribI1uiv)(GLuint index, const GLuint *v);
18387ec681f3Smrg   void (GLAPIENTRYP VertexAttribI4bv)(GLuint index, const GLbyte *v);
18397ec681f3Smrg   void (GLAPIENTRYP VertexAttribI4sv)(GLuint index, const GLshort *v);
18407ec681f3Smrg   void (GLAPIENTRYP VertexAttribI4ubv)(GLuint index, const GLubyte *v);
18417ec681f3Smrg   void (GLAPIENTRYP VertexAttribI4usv)(GLuint index, const GLushort *v);
18427117f1b4Smrg} GLvertexformat;
18437117f1b4Smrg
18447117f1b4Smrg
18457117f1b4Smrg#endif /* DD_INCLUDED */
1846