dd.h revision af69d88d
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
347117f1b4Smrg/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
357117f1b4Smrg
363464ebd5Sriastradh#include "glheader.h"
374a49301eSmrg
383464ebd5Sriastradhstruct gl_buffer_object;
393464ebd5Sriastradhstruct gl_context;
403464ebd5Sriastradhstruct gl_display_list;
413464ebd5Sriastradhstruct gl_framebuffer;
42af69d88dSmrgstruct gl_image_unit;
433464ebd5Sriastradhstruct gl_pixelstore_attrib;
443464ebd5Sriastradhstruct gl_program;
453464ebd5Sriastradhstruct gl_renderbuffer;
463464ebd5Sriastradhstruct gl_renderbuffer_attachment;
473464ebd5Sriastradhstruct gl_shader;
483464ebd5Sriastradhstruct gl_shader_program;
493464ebd5Sriastradhstruct gl_texture_image;
503464ebd5Sriastradhstruct gl_texture_object;
513464ebd5Sriastradh
523464ebd5Sriastradh/* GL_ARB_vertex_buffer_object */
534a49301eSmrg/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
544a49301eSmrg * NULL) if buffer is unavailable for immediate mapping.
554a49301eSmrg *
564a49301eSmrg * Does GL_MAP_INVALIDATE_RANGE_BIT do this?  It seems so, but it
574a49301eSmrg * would require more book-keeping in the driver than seems necessary
584a49301eSmrg * at this point.
594a49301eSmrg *
604a49301eSmrg * Does GL_MAP_INVALDIATE_BUFFER_BIT do this?  Not really -- we don't
614a49301eSmrg * want to provoke the driver to throw away the old storage, we will
624a49301eSmrg * respect the contents of already referenced data.
634a49301eSmrg */
644a49301eSmrg#define MESA_MAP_NOWAIT_BIT       0x0040
654a49301eSmrg
667117f1b4Smrg
677117f1b4Smrg/**
687117f1b4Smrg * Device driver function table.
697117f1b4Smrg * Core Mesa uses these function pointers to call into device drivers.
707117f1b4Smrg * Most of these functions directly correspond to OpenGL state commands.
717117f1b4Smrg * Core Mesa will call these functions after error checking has been done
727117f1b4Smrg * so that the drivers don't have to worry about error testing.
737117f1b4Smrg *
747117f1b4Smrg * Vertex transformation/clipping/lighting is patched into the T&L module.
757117f1b4Smrg * Rasterization functions are patched into the swrast module.
767117f1b4Smrg *
777117f1b4Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c
787117f1b4Smrg * file should be updated too!!!
797117f1b4Smrg */
807117f1b4Smrgstruct dd_function_table {
817117f1b4Smrg   /**
827117f1b4Smrg    * Return a string as needed by glGetString().
837117f1b4Smrg    * Only the GL_RENDERER query must be implemented.  Otherwise, NULL can be
847117f1b4Smrg    * returned.
857117f1b4Smrg    */
863464ebd5Sriastradh   const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
877117f1b4Smrg
887117f1b4Smrg   /**
897117f1b4Smrg    * Notify the driver after Mesa has made some internal state changes.
907117f1b4Smrg    *
917117f1b4Smrg    * This is in addition to any state change callbacks Mesa may already have
927117f1b4Smrg    * made.
937117f1b4Smrg    */
943464ebd5Sriastradh   void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
957117f1b4Smrg
967117f1b4Smrg   /**
977117f1b4Smrg    * Resize the given framebuffer to the given size.
987117f1b4Smrg    * XXX OBSOLETE: this function will be removed in the future.
997117f1b4Smrg    */
1003464ebd5Sriastradh   void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
1017117f1b4Smrg                          GLuint width, GLuint height);
1027117f1b4Smrg
1037117f1b4Smrg   /**
1047117f1b4Smrg    * This is called whenever glFinish() is called.
1057117f1b4Smrg    */
1063464ebd5Sriastradh   void (*Finish)( struct gl_context *ctx );
1077117f1b4Smrg
1087117f1b4Smrg   /**
1097117f1b4Smrg    * This is called whenever glFlush() is called.
1107117f1b4Smrg    */
1113464ebd5Sriastradh   void (*Flush)( struct gl_context *ctx );
1127117f1b4Smrg
1137117f1b4Smrg   /**
1147117f1b4Smrg    * Clear the color/depth/stencil/accum buffer(s).
1157117f1b4Smrg    * \param buffers  a bitmask of BUFFER_BIT_* flags indicating which
1167117f1b4Smrg    *                 renderbuffers need to be cleared.
1177117f1b4Smrg    */
1183464ebd5Sriastradh   void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
1197117f1b4Smrg
1207117f1b4Smrg   /**
1217117f1b4Smrg    * Execute glAccum command.
1227117f1b4Smrg    */
1233464ebd5Sriastradh   void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
1247117f1b4Smrg
1257117f1b4Smrg
126c1f859d4Smrg   /**
127c1f859d4Smrg    * Execute glRasterPos, updating the ctx->Current.Raster fields
128c1f859d4Smrg    */
1293464ebd5Sriastradh   void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
130c1f859d4Smrg
1317117f1b4Smrg   /**
1327117f1b4Smrg    * \name Image-related functions
1337117f1b4Smrg    */
1347117f1b4Smrg   /*@{*/
1357117f1b4Smrg
1367117f1b4Smrg   /**
1377117f1b4Smrg    * Called by glDrawPixels().
1387117f1b4Smrg    * \p unpack describes how to unpack the source image data.
1397117f1b4Smrg    */
1403464ebd5Sriastradh   void (*DrawPixels)( struct gl_context *ctx,
1417117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1427117f1b4Smrg		       GLenum format, GLenum type,
1437117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1447117f1b4Smrg		       const GLvoid *pixels );
1457117f1b4Smrg
1467117f1b4Smrg   /**
1477117f1b4Smrg    * Called by glReadPixels().
1487117f1b4Smrg    */
1493464ebd5Sriastradh   void (*ReadPixels)( struct gl_context *ctx,
1507117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1517117f1b4Smrg		       GLenum format, GLenum type,
1527117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1537117f1b4Smrg		       GLvoid *dest );
1547117f1b4Smrg
1557117f1b4Smrg   /**
1567117f1b4Smrg    * Called by glCopyPixels().
1577117f1b4Smrg    */
1583464ebd5Sriastradh   void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
1597117f1b4Smrg                       GLsizei width, GLsizei height,
1607117f1b4Smrg                       GLint dstx, GLint dsty, GLenum type );
1617117f1b4Smrg
1627117f1b4Smrg   /**
1637117f1b4Smrg    * Called by glBitmap().
1647117f1b4Smrg    */
1653464ebd5Sriastradh   void (*Bitmap)( struct gl_context *ctx,
1667117f1b4Smrg		   GLint x, GLint y, GLsizei width, GLsizei height,
1677117f1b4Smrg		   const struct gl_pixelstore_attrib *unpack,
1687117f1b4Smrg		   const GLubyte *bitmap );
1697117f1b4Smrg   /*@}*/
1707117f1b4Smrg
1717117f1b4Smrg
1727117f1b4Smrg   /**
1737117f1b4Smrg    * \name Texture image functions
1747117f1b4Smrg    */
1757117f1b4Smrg   /*@{*/
1767117f1b4Smrg
1777117f1b4Smrg   /**
178af69d88dSmrg    * Choose actual hardware texture format given the texture target, the
179af69d88dSmrg    * user-provided source image format and type and the desired internal
180af69d88dSmrg    * format.  In some cases, srcFormat and srcType can be GL_NONE.
181af69d88dSmrg    * Note:  target may be GL_TEXTURE_CUBE_MAP, but never
182af69d88dSmrg    * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
183af69d88dSmrg    * Called by glTexImage(), etc.
1847117f1b4Smrg    */
185af69d88dSmrg   mesa_format (*ChooseTextureFormat)(struct gl_context *ctx,
186af69d88dSmrg                                      GLenum target, GLint internalFormat,
187af69d88dSmrg                                      GLenum srcFormat, GLenum srcType );
1887117f1b4Smrg
1897117f1b4Smrg   /**
190af69d88dSmrg    * Determine sample counts support for a particular target and format
1917117f1b4Smrg    *
192af69d88dSmrg    * \param ctx            GL context
193af69d88dSmrg    * \param target         GL target enum
194af69d88dSmrg    * \param internalFormat GL format enum
195af69d88dSmrg    * \param samples        Buffer to hold the returned sample counts.
196af69d88dSmrg    *                       Drivers \b must \b not return more than 16 counts.
1977117f1b4Smrg    *
198af69d88dSmrg    * \returns
199af69d88dSmrg    * The number of sample counts actually written to \c samples.  If
200af69d88dSmrg    * \c internaFormat is not renderable, zero is returned.
201af69d88dSmrg    */
202af69d88dSmrg   size_t (*QuerySamplesForFormat)(struct gl_context *ctx,
203af69d88dSmrg                                   GLenum target,
204af69d88dSmrg                                   GLenum internalFormat,
205af69d88dSmrg                                   int samples[16]);
206af69d88dSmrg
2077117f1b4Smrg   /**
208af69d88dSmrg    * Called by glTexImage[123]D() and glCopyTexImage[12]D()
209af69d88dSmrg    * Allocate texture memory and copy the user's image to the buffer.
210af69d88dSmrg    * The gl_texture_image fields, etc. will be fully initialized.
211af69d88dSmrg    * The parameters are the same as glTexImage3D(), plus:
212af69d88dSmrg    * \param dims  1, 2, or 3 indicating glTexImage1/2/3D()
213af69d88dSmrg    * \param packing describes how to unpack the source data.
214af69d88dSmrg    * \param texImage is the destination texture image.
215af69d88dSmrg    */
216af69d88dSmrg   void (*TexImage)(struct gl_context *ctx, GLuint dims,
217af69d88dSmrg                    struct gl_texture_image *texImage,
218af69d88dSmrg                    GLenum format, GLenum type, const GLvoid *pixels,
219af69d88dSmrg                    const struct gl_pixelstore_attrib *packing);
220af69d88dSmrg
2217117f1b4Smrg   /**
222af69d88dSmrg    * Called by glTexSubImage[123]D().
223af69d88dSmrg    * Replace a subset of the target texture with new texel data.
2247117f1b4Smrg    */
225af69d88dSmrg   void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
226af69d88dSmrg                       struct gl_texture_image *texImage,
227af69d88dSmrg                       GLint xoffset, GLint yoffset, GLint zoffset,
228af69d88dSmrg                       GLsizei width, GLsizei height, GLint depth,
229af69d88dSmrg                       GLenum format, GLenum type,
230af69d88dSmrg                       const GLvoid *pixels,
231af69d88dSmrg                       const struct gl_pixelstore_attrib *packing);
232af69d88dSmrg
2337117f1b4Smrg
2347117f1b4Smrg   /**
2357117f1b4Smrg    * Called by glGetTexImage().
2367117f1b4Smrg    */
237af69d88dSmrg   void (*GetTexImage)( struct gl_context *ctx,
2387117f1b4Smrg                        GLenum format, GLenum type, GLvoid *pixels,
2397117f1b4Smrg                        struct gl_texture_image *texImage );
2407117f1b4Smrg
2417117f1b4Smrg   /**
242af69d88dSmrg    * Called by glClearTex[Sub]Image
243af69d88dSmrg    *
244af69d88dSmrg    * Clears a rectangular region of the image to a given value. The
245af69d88dSmrg    * clearValue argument is either NULL or points to a single texel to use as
246af69d88dSmrg    * the clear value in the same internal format as the texture image. If it
247af69d88dSmrg    * is NULL then the texture should be cleared to zeroes.
2487117f1b4Smrg    */
249af69d88dSmrg   void (*ClearTexSubImage)(struct gl_context *ctx,
250af69d88dSmrg                            struct gl_texture_image *texImage,
251af69d88dSmrg                            GLint xoffset, GLint yoffset, GLint zoffset,
252af69d88dSmrg                            GLsizei width, GLsizei height, GLsizei depth,
253af69d88dSmrg                            const GLvoid *clearValue);
2547117f1b4Smrg
2557117f1b4Smrg   /**
256af69d88dSmrg    * Called by glCopyTex[Sub]Image[123]D().
257af69d88dSmrg    *
258af69d88dSmrg    * This function should copy a rectangular region in the rb to a single
259af69d88dSmrg    * destination slice, specified by @slice.  In the case of 1D array
260af69d88dSmrg    * textures (where one GL call can potentially affect multiple destination
261af69d88dSmrg    * slices), core mesa takes care of calling this function multiple times,
262af69d88dSmrg    * once for each scanline to be copied.
2637117f1b4Smrg    */
264af69d88dSmrg   void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
265af69d88dSmrg                           struct gl_texture_image *texImage,
266af69d88dSmrg                           GLint xoffset, GLint yoffset, GLint slice,
267af69d88dSmrg                           struct gl_renderbuffer *rb,
268af69d88dSmrg                           GLint x, GLint y,
269af69d88dSmrg                           GLsizei width, GLsizei height);
2707117f1b4Smrg
2717117f1b4Smrg   /**
272af69d88dSmrg    * Called by glCopyImageSubData().
273af69d88dSmrg    *
274af69d88dSmrg    * This function should copy one 2-D slice from srcTexImage to
275af69d88dSmrg    * dstTexImage.  If one of the textures is 3-D or is a 1-D or 2-D array
276af69d88dSmrg    * texture, this function will be called multiple times: once for each
277af69d88dSmrg    * slice.  If one of the textures is a cube map, this function will be
278af69d88dSmrg    * called once for each face to be copied.
2797117f1b4Smrg    */
280af69d88dSmrg   void (*CopyImageSubData)(struct gl_context *ctx,
281af69d88dSmrg                            struct gl_texture_image *src_image,
282af69d88dSmrg                            int src_x, int src_y, int src_z,
283af69d88dSmrg                            struct gl_texture_image *dstTexImage,
284af69d88dSmrg                            int dst_x, int dst_y, int dst_z,
285af69d88dSmrg                            int src_width, int src_height);
2867117f1b4Smrg
287c1f859d4Smrg   /**
288c1f859d4Smrg    * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
289af69d88dSmrg    * Note that if the texture is a cube map, the <target> parameter will
290af69d88dSmrg    * indicate which cube face to generate (GL_POSITIVE/NEGATIVE_X/Y/Z).
291af69d88dSmrg    * texObj->BaseLevel is the level from which to generate the remaining
292af69d88dSmrg    * mipmap levels.
293c1f859d4Smrg    */
2943464ebd5Sriastradh   void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
295c1f859d4Smrg                          struct gl_texture_object *texObj);
296c1f859d4Smrg
2977117f1b4Smrg   /**
298af69d88dSmrg    * Called by glTexImage, glCompressedTexImage, glCopyTexImage
299af69d88dSmrg    * and glTexStorage to check if the dimensions of the texture image
300af69d88dSmrg    * are too large.
301af69d88dSmrg    * \param target  any GL_PROXY_TEXTURE_x target
302af69d88dSmrg    * \return GL_TRUE if the image is OK, GL_FALSE if too large
3037117f1b4Smrg    */
3043464ebd5Sriastradh   GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
305af69d88dSmrg                                  GLint level, mesa_format format,
3067117f1b4Smrg                                  GLint width, GLint height,
3077117f1b4Smrg                                  GLint depth, GLint border);
3087117f1b4Smrg   /*@}*/
3097117f1b4Smrg
3107117f1b4Smrg
3117117f1b4Smrg   /**
3127117f1b4Smrg    * \name Compressed texture functions
3137117f1b4Smrg    */
3147117f1b4Smrg   /*@{*/
3157117f1b4Smrg
3167117f1b4Smrg   /**
317af69d88dSmrg    * Called by glCompressedTexImage[123]D().
3187117f1b4Smrg    */
319af69d88dSmrg   void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
320af69d88dSmrg                              struct gl_texture_image *texImage,
321af69d88dSmrg                              GLsizei imageSize, const GLvoid *data);
322af69d88dSmrg
3237117f1b4Smrg   /**
324af69d88dSmrg    * Called by glCompressedTexSubImage[123]D().
3257117f1b4Smrg    */
326af69d88dSmrg   void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
327af69d88dSmrg                                 struct gl_texture_image *texImage,
328af69d88dSmrg                                 GLint xoffset, GLint yoffset, GLint zoffset,
329af69d88dSmrg                                 GLsizei width, GLint height, GLint depth,
330af69d88dSmrg                                 GLenum format,
331af69d88dSmrg                                 GLsizei imageSize, const GLvoid *data);
3327117f1b4Smrg
3337117f1b4Smrg   /**
3347117f1b4Smrg    * Called by glGetCompressedTexImage.
3357117f1b4Smrg    */
336af69d88dSmrg   void (*GetCompressedTexImage)(struct gl_context *ctx,
337af69d88dSmrg                                 struct gl_texture_image *texImage,
338af69d88dSmrg                                 GLvoid *data);
3397117f1b4Smrg   /*@}*/
3407117f1b4Smrg
3417117f1b4Smrg   /**
342af69d88dSmrg    * \name Texture object / image functions
3437117f1b4Smrg    */
3447117f1b4Smrg   /*@{*/
3457117f1b4Smrg
3467117f1b4Smrg   /**
347af69d88dSmrg    * Called by glBindTexture() and glBindTextures().
3487117f1b4Smrg    */
349af69d88dSmrg   void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
350af69d88dSmrg                        GLenum target, struct gl_texture_object *tObj );
3517117f1b4Smrg
3527117f1b4Smrg   /**
353af69d88dSmrg    * Called to allocate a new texture object.  Drivers will usually
354af69d88dSmrg    * allocate/return a subclass of gl_texture_object.
3557117f1b4Smrg    */
356af69d88dSmrg   struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
357af69d88dSmrg                                                  GLuint name, GLenum target);
3587117f1b4Smrg   /**
359af69d88dSmrg    * Called to delete/free a texture object.  Drivers should free the
360af69d88dSmrg    * object and any image data it contains.
3617117f1b4Smrg    */
362af69d88dSmrg   void (*DeleteTexture)(struct gl_context *ctx,
363af69d88dSmrg                         struct gl_texture_object *texObj);
3647117f1b4Smrg
365af69d88dSmrg   /** Called to allocate a new texture image object. */
366af69d88dSmrg   struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
3677117f1b4Smrg
368af69d88dSmrg   /** Called to free a texture image object returned by NewTextureImage() */
369af69d88dSmrg   void (*DeleteTextureImage)(struct gl_context *ctx,
370af69d88dSmrg                              struct gl_texture_image *);
3717117f1b4Smrg
372af69d88dSmrg   /** Called to allocate memory for a single texture image */
373af69d88dSmrg   GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
374af69d88dSmrg                                        struct gl_texture_image *texImage);
3757117f1b4Smrg
376af69d88dSmrg   /** Free the memory for a single texture image */
377af69d88dSmrg   void (*FreeTextureImageBuffer)(struct gl_context *ctx,
378af69d88dSmrg                                  struct gl_texture_image *texImage);
379af69d88dSmrg
380af69d88dSmrg   /** Map a slice of a texture image into user space.
381af69d88dSmrg    * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
382af69d88dSmrg    * indicates the 1D array index.
383af69d88dSmrg    * \param texImage  the texture image
384af69d88dSmrg    * \param slice  the 3D image slice or array texture slice
385af69d88dSmrg    * \param x, y, w, h  region of interest
386af69d88dSmrg    * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
387af69d88dSmrg    *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
388af69d88dSmrg    * \param mapOut  returns start of mapping of region of interest
389af69d88dSmrg    * \param rowStrideOut returns row stride (in bytes).  In the case of a
390af69d88dSmrg    * compressed texture, this is the byte stride between one row of blocks
391af69d88dSmrg    * and another.
3927117f1b4Smrg    */
393af69d88dSmrg   void (*MapTextureImage)(struct gl_context *ctx,
394af69d88dSmrg			   struct gl_texture_image *texImage,
395af69d88dSmrg			   GLuint slice,
396af69d88dSmrg			   GLuint x, GLuint y, GLuint w, GLuint h,
397af69d88dSmrg			   GLbitfield mode,
398af69d88dSmrg			   GLubyte **mapOut, GLint *rowStrideOut);
3997117f1b4Smrg
400af69d88dSmrg   void (*UnmapTextureImage)(struct gl_context *ctx,
401af69d88dSmrg			     struct gl_texture_image *texImage,
402af69d88dSmrg			     GLuint slice);
403af69d88dSmrg
404af69d88dSmrg   /** For GL_ARB_texture_storage.  Allocate memory for whole mipmap stack.
405af69d88dSmrg    * All the gl_texture_images in the texture object will have their
406af69d88dSmrg    * dimensions, format, etc. initialized already.
4077117f1b4Smrg    */
408af69d88dSmrg   GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
409af69d88dSmrg                                    struct gl_texture_object *texObj,
410af69d88dSmrg                                    GLsizei levels, GLsizei width,
411af69d88dSmrg                                    GLsizei height, GLsizei depth);
412af69d88dSmrg
413af69d88dSmrg   /** Called as part of glTextureView to add views to origTexObj */
414af69d88dSmrg   GLboolean (*TextureView)(struct gl_context *ctx,
415af69d88dSmrg                            struct gl_texture_object *texObj,
416af69d88dSmrg                            struct gl_texture_object *origTexObj);
4177117f1b4Smrg
4187117f1b4Smrg   /**
419af69d88dSmrg    * Map a renderbuffer into user space.
420af69d88dSmrg    * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
421af69d88dSmrg    *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
4227117f1b4Smrg    */
423af69d88dSmrg   void (*MapRenderbuffer)(struct gl_context *ctx,
424af69d88dSmrg			   struct gl_renderbuffer *rb,
425af69d88dSmrg			   GLuint x, GLuint y, GLuint w, GLuint h,
426af69d88dSmrg			   GLbitfield mode,
427af69d88dSmrg			   GLubyte **mapOut, GLint *rowStrideOut);
428af69d88dSmrg
429af69d88dSmrg   void (*UnmapRenderbuffer)(struct gl_context *ctx,
430af69d88dSmrg			     struct gl_renderbuffer *rb);
4317117f1b4Smrg
4327117f1b4Smrg   /**
433af69d88dSmrg    * Optional driver entrypoint that binds a non-texture renderbuffer's
434af69d88dSmrg    * contents to a texture image.
4357117f1b4Smrg    */
436af69d88dSmrg   GLboolean (*BindRenderbufferTexImage)(struct gl_context *ctx,
437af69d88dSmrg                                         struct gl_renderbuffer *rb,
438af69d88dSmrg                                         struct gl_texture_image *texImage);
4397117f1b4Smrg   /*@}*/
4407117f1b4Smrg
4417117f1b4Smrg
4427117f1b4Smrg   /**
4437117f1b4Smrg    * \name Vertex/fragment program functions
4447117f1b4Smrg    */
4457117f1b4Smrg   /*@{*/
4467117f1b4Smrg   /** Bind a vertex/fragment program */
447af69d88dSmrg   void (*BindProgram)(struct gl_context *ctx, GLenum target,
448af69d88dSmrg                       struct gl_program *prog);
4497117f1b4Smrg   /** Allocate a new program */
450af69d88dSmrg   struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target,
451af69d88dSmrg                                     GLuint id);
4527117f1b4Smrg   /** Delete a program */
4533464ebd5Sriastradh   void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
454cdc920a0Smrg   /**
455cdc920a0Smrg    * Notify driver that a program string (and GPU code) has been specified
456cdc920a0Smrg    * or modified.  Return GL_TRUE or GL_FALSE to indicate if the program is
457cdc920a0Smrg    * supported by the driver.
458cdc920a0Smrg    */
4593464ebd5Sriastradh   GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
460cdc920a0Smrg                                    struct gl_program *prog);
4617117f1b4Smrg
462af69d88dSmrg   /**
463af69d88dSmrg    * Notify driver that the sampler uniforms for the current program have
464af69d88dSmrg    * changed.  On some drivers, this may require shader recompiles.
465af69d88dSmrg    */
466af69d88dSmrg   void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
467af69d88dSmrg                                struct gl_program *prog);
468af69d88dSmrg
4697117f1b4Smrg   /** Query if program can be loaded onto hardware */
4703464ebd5Sriastradh   GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
4717117f1b4Smrg				struct gl_program *prog);
4727117f1b4Smrg
4737117f1b4Smrg   /*@}*/
4747117f1b4Smrg
4753464ebd5Sriastradh   /**
4763464ebd5Sriastradh    * \name GLSL shader/program functions.
4773464ebd5Sriastradh    */
4783464ebd5Sriastradh   /*@{*/
4793464ebd5Sriastradh   /**
4803464ebd5Sriastradh    * Called when a shader program is linked.
4813464ebd5Sriastradh    *
4823464ebd5Sriastradh    * This gives drivers an opportunity to clone the IR and make their
4833464ebd5Sriastradh    * own transformations on it for the purposes of code generation.
4843464ebd5Sriastradh    */
485af69d88dSmrg   GLboolean (*LinkShader)(struct gl_context *ctx,
486af69d88dSmrg                           struct gl_shader_program *shader);
4873464ebd5Sriastradh   /*@}*/
4887117f1b4Smrg
4897117f1b4Smrg   /**
4907117f1b4Smrg    * \name State-changing functions.
4917117f1b4Smrg    *
4927117f1b4Smrg    * \note drawing functions are above.
4937117f1b4Smrg    *
4947117f1b4Smrg    * These functions are called by their corresponding OpenGL API functions.
4957117f1b4Smrg    * They are \e also called by the gl_PopAttrib() function!!!
4967117f1b4Smrg    * May add more functions like these to the device driver in the future.
4977117f1b4Smrg    */
4987117f1b4Smrg   /*@{*/
4997117f1b4Smrg   /** Specify the alpha test function */
5003464ebd5Sriastradh   void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
5017117f1b4Smrg   /** Set the blend color */
5023464ebd5Sriastradh   void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
5037117f1b4Smrg   /** Set the blend equation */
504af69d88dSmrg   void (*BlendEquationSeparate)(struct gl_context *ctx,
505af69d88dSmrg                                 GLenum modeRGB, GLenum modeA);
5063464ebd5Sriastradh   void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
5073464ebd5Sriastradh                                  GLenum modeRGB, GLenum modeA);
5087117f1b4Smrg   /** Specify pixel arithmetic */
5093464ebd5Sriastradh   void (*BlendFuncSeparate)(struct gl_context *ctx,
5107117f1b4Smrg                             GLenum sfactorRGB, GLenum dfactorRGB,
5117117f1b4Smrg                             GLenum sfactorA, GLenum dfactorA);
5123464ebd5Sriastradh   void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
5133464ebd5Sriastradh                              GLenum sfactorRGB, GLenum dfactorRGB,
5143464ebd5Sriastradh                              GLenum sfactorA, GLenum dfactorA);
5157117f1b4Smrg   /** Specify a plane against which all geometry is clipped */
516af69d88dSmrg   void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
5177117f1b4Smrg   /** Enable and disable writing of frame buffer color components */
5183464ebd5Sriastradh   void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
5197117f1b4Smrg                     GLboolean bmask, GLboolean amask );
5203464ebd5Sriastradh   void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
521cdc920a0Smrg                            GLboolean gmask, GLboolean bmask, GLboolean amask);
5227117f1b4Smrg   /** Cause a material color to track the current color */
5233464ebd5Sriastradh   void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
5247117f1b4Smrg   /** Specify whether front- or back-facing facets can be culled */
5253464ebd5Sriastradh   void (*CullFace)(struct gl_context *ctx, GLenum mode);
5267117f1b4Smrg   /** Define front- and back-facing polygons */
5273464ebd5Sriastradh   void (*FrontFace)(struct gl_context *ctx, GLenum mode);
5287117f1b4Smrg   /** Specify the value used for depth buffer comparisons */
5293464ebd5Sriastradh   void (*DepthFunc)(struct gl_context *ctx, GLenum func);
5307117f1b4Smrg   /** Enable or disable writing into the depth buffer */
5313464ebd5Sriastradh   void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
5327117f1b4Smrg   /** Specify mapping of depth values from NDC to window coordinates */
533af69d88dSmrg   void (*DepthRange)(struct gl_context *ctx);
5347117f1b4Smrg   /** Specify the current buffer for writing */
5353464ebd5Sriastradh   void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
5367117f1b4Smrg   /** Specify the buffers for writing for fragment programs*/
537af69d88dSmrg   void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
5387117f1b4Smrg   /** Enable or disable server-side gl capabilities */
5393464ebd5Sriastradh   void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
5407117f1b4Smrg   /** Specify fog parameters */
5413464ebd5Sriastradh   void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
5427117f1b4Smrg   /** Specify implementation-specific hints */
5433464ebd5Sriastradh   void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
5447117f1b4Smrg   /** Set light source parameters.
5457117f1b4Smrg    * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
5467117f1b4Smrg    * been transformed to eye-space.
5477117f1b4Smrg    */
5483464ebd5Sriastradh   void (*Lightfv)(struct gl_context *ctx, GLenum light,
5497117f1b4Smrg		   GLenum pname, const GLfloat *params );
5507117f1b4Smrg   /** Set the lighting model parameters */
551af69d88dSmrg   void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
552af69d88dSmrg                        const GLfloat *params);
5537117f1b4Smrg   /** Specify the line stipple pattern */
5543464ebd5Sriastradh   void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
5557117f1b4Smrg   /** Specify the width of rasterized lines */
5563464ebd5Sriastradh   void (*LineWidth)(struct gl_context *ctx, GLfloat width);
5577117f1b4Smrg   /** Specify a logical pixel operation for color index rendering */
5583464ebd5Sriastradh   void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
5593464ebd5Sriastradh   void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
5607117f1b4Smrg                            const GLfloat *params);
5617117f1b4Smrg   /** Specify the diameter of rasterized points */
5623464ebd5Sriastradh   void (*PointSize)(struct gl_context *ctx, GLfloat size);
5637117f1b4Smrg   /** Select a polygon rasterization mode */
5643464ebd5Sriastradh   void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
5657117f1b4Smrg   /** Set the scale and units used to calculate depth values */
5663464ebd5Sriastradh   void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units);
5677117f1b4Smrg   /** Set the polygon stippling pattern */
5683464ebd5Sriastradh   void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
5697117f1b4Smrg   /* Specifies the current buffer for reading */
5703464ebd5Sriastradh   void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
5717117f1b4Smrg   /** Set rasterization mode */
5723464ebd5Sriastradh   void (*RenderMode)(struct gl_context *ctx, GLenum mode );
5737117f1b4Smrg   /** Define the scissor box */
574af69d88dSmrg   void (*Scissor)(struct gl_context *ctx);
5757117f1b4Smrg   /** Select flat or smooth shading */
5763464ebd5Sriastradh   void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
5777117f1b4Smrg   /** OpenGL 2.0 two-sided StencilFunc */
5783464ebd5Sriastradh   void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
5797117f1b4Smrg                               GLint ref, GLuint mask);
5807117f1b4Smrg   /** OpenGL 2.0 two-sided StencilMask */
5813464ebd5Sriastradh   void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
5827117f1b4Smrg   /** OpenGL 2.0 two-sided StencilOp */
5833464ebd5Sriastradh   void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
5847117f1b4Smrg                             GLenum zfail, GLenum zpass);
5857117f1b4Smrg   /** Control the generation of texture coordinates */
5863464ebd5Sriastradh   void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
5877117f1b4Smrg		  const GLfloat *params);
5887117f1b4Smrg   /** Set texture environment parameters */
5893464ebd5Sriastradh   void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
5907117f1b4Smrg                  const GLfloat *param);
5917117f1b4Smrg   /** Set texture parameters */
592af69d88dSmrg   void (*TexParameter)(struct gl_context *ctx,
5937117f1b4Smrg                        struct gl_texture_object *texObj,
5947117f1b4Smrg                        GLenum pname, const GLfloat *params);
5957117f1b4Smrg   /** Set the viewport */
596af69d88dSmrg   void (*Viewport)(struct gl_context *ctx);
5977117f1b4Smrg   /*@}*/
5987117f1b4Smrg
5997117f1b4Smrg
6007117f1b4Smrg   /**
6017117f1b4Smrg    * \name Vertex/pixel buffer object functions
6027117f1b4Smrg    */
6037117f1b4Smrg   /*@{*/
604af69d88dSmrg   struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
605af69d88dSmrg                                                GLuint buffer, GLenum target);
6067117f1b4Smrg
6073464ebd5Sriastradh   void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
6087117f1b4Smrg
609af69d88dSmrg   GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
610af69d88dSmrg                           GLsizeiptrARB size, const GLvoid *data, GLenum usage,
611af69d88dSmrg                           GLenum storageFlags, struct gl_buffer_object *obj);
6127117f1b4Smrg
613af69d88dSmrg   void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
6147117f1b4Smrg			  GLsizeiptrARB size, const GLvoid *data,
6157117f1b4Smrg			  struct gl_buffer_object *obj );
6167117f1b4Smrg
617af69d88dSmrg   void (*GetBufferSubData)( struct gl_context *ctx,
6187117f1b4Smrg			     GLintptrARB offset, GLsizeiptrARB size,
6197117f1b4Smrg			     GLvoid *data, struct gl_buffer_object *obj );
6207117f1b4Smrg
621af69d88dSmrg   void (*ClearBufferSubData)( struct gl_context *ctx,
622af69d88dSmrg                               GLintptr offset, GLsizeiptr size,
623af69d88dSmrg                               const GLvoid *clearValue,
624af69d88dSmrg                               GLsizeiptr clearValueSize,
625af69d88dSmrg                               struct gl_buffer_object *obj );
6267117f1b4Smrg
6273464ebd5Sriastradh   void (*CopyBufferSubData)( struct gl_context *ctx,
6284a49301eSmrg                              struct gl_buffer_object *src,
6294a49301eSmrg                              struct gl_buffer_object *dst,
6304a49301eSmrg                              GLintptr readOffset, GLintptr writeOffset,
6314a49301eSmrg                              GLsizeiptr size );
6324a49301eSmrg
633af69d88dSmrg   /* Returns pointer to the start of the mapped range.
634af69d88dSmrg    * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
6354a49301eSmrg    */
636af69d88dSmrg   void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
637cdc920a0Smrg                             GLsizeiptr length, GLbitfield access,
638af69d88dSmrg                             struct gl_buffer_object *obj,
639af69d88dSmrg                             gl_map_buffer_index index);
6404a49301eSmrg
641af69d88dSmrg   void (*FlushMappedBufferRange)(struct gl_context *ctx,
642cdc920a0Smrg                                  GLintptr offset, GLsizeiptr length,
643af69d88dSmrg                                  struct gl_buffer_object *obj,
644af69d88dSmrg                                  gl_map_buffer_index index);
6454a49301eSmrg
646af69d88dSmrg   GLboolean (*UnmapBuffer)( struct gl_context *ctx,
647af69d88dSmrg			     struct gl_buffer_object *obj,
648af69d88dSmrg                             gl_map_buffer_index index);
6497117f1b4Smrg   /*@}*/
6507117f1b4Smrg
651cdc920a0Smrg   /**
652cdc920a0Smrg    * \name Functions for GL_APPLE_object_purgeable
653cdc920a0Smrg    */
654cdc920a0Smrg   /*@{*/
655cdc920a0Smrg   /* variations on ObjectPurgeable */
656af69d88dSmrg   GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
657af69d88dSmrg                                   struct gl_buffer_object *obj, GLenum option);
658af69d88dSmrg   GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
659af69d88dSmrg                                   struct gl_renderbuffer *obj, GLenum option);
660af69d88dSmrg   GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
661af69d88dSmrg                                    struct gl_texture_object *obj,
662af69d88dSmrg                                    GLenum option);
663cdc920a0Smrg
664cdc920a0Smrg   /* variations on ObjectUnpurgeable */
665af69d88dSmrg   GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
666af69d88dSmrg                                     struct gl_buffer_object *obj,
667af69d88dSmrg                                     GLenum option);
668af69d88dSmrg   GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
669af69d88dSmrg                                     struct gl_renderbuffer *obj,
670af69d88dSmrg                                     GLenum option);
671af69d88dSmrg   GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
672af69d88dSmrg                                      struct gl_texture_object *obj,
673af69d88dSmrg                                      GLenum option);
674cdc920a0Smrg   /*@}*/
675cdc920a0Smrg
6767117f1b4Smrg   /**
677af69d88dSmrg    * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
6787117f1b4Smrg    */
6797117f1b4Smrg   /*@{*/
680af69d88dSmrg   struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
681af69d88dSmrg                                             GLuint name);
682af69d88dSmrg   struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
683af69d88dSmrg                                               GLuint name);
6843464ebd5Sriastradh   void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
685cdc920a0Smrg                           struct gl_framebuffer *drawFb,
686cdc920a0Smrg                           struct gl_framebuffer *readFb);
6873464ebd5Sriastradh   void (*FramebufferRenderbuffer)(struct gl_context *ctx,
6887117f1b4Smrg                                   struct gl_framebuffer *fb,
6897117f1b4Smrg                                   GLenum attachment,
6907117f1b4Smrg                                   struct gl_renderbuffer *rb);
6913464ebd5Sriastradh   void (*RenderTexture)(struct gl_context *ctx,
6927117f1b4Smrg                         struct gl_framebuffer *fb,
6937117f1b4Smrg                         struct gl_renderbuffer_attachment *att);
6943464ebd5Sriastradh   void (*FinishRenderTexture)(struct gl_context *ctx,
695af69d88dSmrg                               struct gl_renderbuffer *rb);
6963464ebd5Sriastradh   void (*ValidateFramebuffer)(struct gl_context *ctx,
6974a49301eSmrg                               struct gl_framebuffer *fb);
6987117f1b4Smrg   /*@}*/
6993464ebd5Sriastradh   void (*BlitFramebuffer)(struct gl_context *ctx,
7007117f1b4Smrg                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
7017117f1b4Smrg                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
7027117f1b4Smrg                           GLbitfield mask, GLenum filter);
703af69d88dSmrg   void (*DiscardFramebuffer)(struct gl_context *ctx,
704af69d88dSmrg                              GLenum target, GLsizei numAttachments,
705af69d88dSmrg                              const GLenum *attachments);
7067117f1b4Smrg
7077117f1b4Smrg   /**
7087117f1b4Smrg    * \name Query objects
7097117f1b4Smrg    */
7107117f1b4Smrg   /*@{*/
7113464ebd5Sriastradh   struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
7123464ebd5Sriastradh   void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
7133464ebd5Sriastradh   void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
714af69d88dSmrg   void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
7153464ebd5Sriastradh   void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
7163464ebd5Sriastradh   void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
7173464ebd5Sriastradh   void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
7187117f1b4Smrg   /*@}*/
7197117f1b4Smrg
720af69d88dSmrg   /**
721af69d88dSmrg    * \name Performance monitors
722af69d88dSmrg    */
723af69d88dSmrg   /*@{*/
724af69d88dSmrg   struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
725af69d88dSmrg   void (*DeletePerfMonitor)(struct gl_context *ctx,
726af69d88dSmrg                             struct gl_perf_monitor_object *m);
727af69d88dSmrg   GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
728af69d88dSmrg                                 struct gl_perf_monitor_object *m);
729af69d88dSmrg
730af69d88dSmrg   /** Stop an active performance monitor, discarding results. */
731af69d88dSmrg   void (*ResetPerfMonitor)(struct gl_context *ctx,
732af69d88dSmrg                            struct gl_perf_monitor_object *m);
733af69d88dSmrg   void (*EndPerfMonitor)(struct gl_context *ctx,
734af69d88dSmrg                          struct gl_perf_monitor_object *m);
735af69d88dSmrg   GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
736af69d88dSmrg                                             struct gl_perf_monitor_object *m);
737af69d88dSmrg   void (*GetPerfMonitorResult)(struct gl_context *ctx,
738af69d88dSmrg                                struct gl_perf_monitor_object *m,
739af69d88dSmrg                                GLsizei dataSize,
740af69d88dSmrg                                GLuint *data,
741af69d88dSmrg                                GLint *bytesWritten);
742af69d88dSmrg   /*@}*/
743af69d88dSmrg
7447117f1b4Smrg
7457117f1b4Smrg   /**
7467117f1b4Smrg    * \name Vertex Array objects
7477117f1b4Smrg    */
7487117f1b4Smrg   /*@{*/
749af69d88dSmrg   struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
750af69d88dSmrg   void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
751af69d88dSmrg   void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
7527117f1b4Smrg   /*@}*/
7537117f1b4Smrg
7547117f1b4Smrg   /**
7557117f1b4Smrg    * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
7567117f1b4Smrg    */
7577117f1b4Smrg   /*@{*/
758af69d88dSmrg   struct gl_shader *(*NewShader)(struct gl_context *ctx,
759af69d88dSmrg                                  GLuint name, GLenum type);
7603464ebd5Sriastradh   void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
761af69d88dSmrg   struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx,
762af69d88dSmrg                                                 GLuint name);
7633464ebd5Sriastradh   void (*DeleteShaderProgram)(struct gl_context *ctx,
7643464ebd5Sriastradh                               struct gl_shader_program *shProg);
7653464ebd5Sriastradh   void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
7667117f1b4Smrg   /*@}*/
7677117f1b4Smrg
7687117f1b4Smrg
7697117f1b4Smrg   /**
7707117f1b4Smrg    * \name Support for multiple T&L engines
7717117f1b4Smrg    */
7727117f1b4Smrg   /*@{*/
7737117f1b4Smrg
7747117f1b4Smrg   /**
7757117f1b4Smrg    * Set by the driver-supplied T&L engine.
7767117f1b4Smrg    *
7777117f1b4Smrg    * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
7787117f1b4Smrg    */
7797117f1b4Smrg   GLuint CurrentExecPrimitive;
7807117f1b4Smrg
7817117f1b4Smrg   /**
782af69d88dSmrg    * Current glBegin state of an in-progress compilation.  May be
783af69d88dSmrg    * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
784af69d88dSmrg    * or PRIM_UNKNOWN.
7857117f1b4Smrg    */
7867117f1b4Smrg   GLuint CurrentSavePrimitive;
7877117f1b4Smrg
7887117f1b4Smrg
7897117f1b4Smrg#define FLUSH_STORED_VERTICES 0x1
7907117f1b4Smrg#define FLUSH_UPDATE_CURRENT  0x2
7917117f1b4Smrg   /**
7927117f1b4Smrg    * Set by the driver-supplied T&L engine whenever vertices are buffered
793af69d88dSmrg    * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
794af69d88dSmrg    * is not updated.  A bitmask of the FLUSH_x values above.
7957117f1b4Smrg    *
7967117f1b4Smrg    * The dd_function_table::FlushVertices call below may be used to resolve
7977117f1b4Smrg    * these conditions.
7987117f1b4Smrg    */
799af69d88dSmrg   GLbitfield NeedFlush;
8007117f1b4Smrg
801af69d88dSmrg   /** Need to call SaveFlushVertices() upon state change? */
802af69d88dSmrg   GLboolean SaveNeedFlush;
8034a49301eSmrg
8044a49301eSmrg   /* Called prior to any of the GLvertexformat functions being
8054a49301eSmrg    * called.  Paired with Driver.FlushVertices().
8064a49301eSmrg    */
8073464ebd5Sriastradh   void (*BeginVertices)( struct gl_context *ctx );
8084a49301eSmrg
8097117f1b4Smrg   /**
8107117f1b4Smrg    * If inside glBegin()/glEnd(), it should ASSERT(0).  Otherwise, if
8117117f1b4Smrg    * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
8127117f1b4Smrg    * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
8133464ebd5Sriastradh    * __struct gl_contextRec::Current and gl_light_attrib::Material
8147117f1b4Smrg    *
8157117f1b4Smrg    * Note that the default T&L engine never clears the
8167117f1b4Smrg    * FLUSH_UPDATE_CURRENT bit, even after performing the update.
8177117f1b4Smrg    */
8183464ebd5Sriastradh   void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
8193464ebd5Sriastradh   void (*SaveFlushVertices)( struct gl_context *ctx );
8207117f1b4Smrg
8217117f1b4Smrg   /**
8227117f1b4Smrg    * Give the driver the opportunity to hook in its own vtxfmt for
8237117f1b4Smrg    * compiling optimized display lists.  This is called on each valid
8247117f1b4Smrg    * glBegin() during list compilation.
8257117f1b4Smrg    */
8263464ebd5Sriastradh   GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
8277117f1b4Smrg
8287117f1b4Smrg   /**
8297117f1b4Smrg    * Notify driver that the special derived value _NeedEyeCoords has
8307117f1b4Smrg    * changed.
8317117f1b4Smrg    */
8323464ebd5Sriastradh   void (*LightingSpaceChange)( struct gl_context *ctx );
8337117f1b4Smrg
8347117f1b4Smrg   /**
8357117f1b4Smrg    * Called by glNewList().
8367117f1b4Smrg    *
8377117f1b4Smrg    * Let the T&L component know what is going on with display lists
8387117f1b4Smrg    * in time to make changes to dispatch tables, etc.
8397117f1b4Smrg    */
8403464ebd5Sriastradh   void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
8417117f1b4Smrg   /**
8427117f1b4Smrg    * Called by glEndList().
8437117f1b4Smrg    *
8447117f1b4Smrg    * \sa dd_function_table::NewList.
8457117f1b4Smrg    */
8463464ebd5Sriastradh   void (*EndList)( struct gl_context *ctx );
8477117f1b4Smrg
8487117f1b4Smrg   /**
8497117f1b4Smrg    * Called by glCallList(s).
8507117f1b4Smrg    *
8517117f1b4Smrg    * Notify the T&L component before and after calling a display list.
8527117f1b4Smrg    */
8533464ebd5Sriastradh   void (*BeginCallList)( struct gl_context *ctx,
8544a49301eSmrg			  struct gl_display_list *dlist );
8557117f1b4Smrg   /**
8567117f1b4Smrg    * Called by glEndCallList().
8577117f1b4Smrg    *
8587117f1b4Smrg    * \sa dd_function_table::BeginCallList.
8597117f1b4Smrg    */
8603464ebd5Sriastradh   void (*EndCallList)( struct gl_context *ctx );
8617117f1b4Smrg
862af69d88dSmrg   /**@}*/
8634a49301eSmrg
8644a49301eSmrg   /**
8654a49301eSmrg    * \name GL_ARB_sync interfaces
8664a49301eSmrg    */
8674a49301eSmrg   /*@{*/
8683464ebd5Sriastradh   struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
869af69d88dSmrg   void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
870af69d88dSmrg                     GLenum, GLbitfield);
8713464ebd5Sriastradh   void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
8723464ebd5Sriastradh   void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
8733464ebd5Sriastradh   void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
8744a49301eSmrg			  GLbitfield, GLuint64);
8753464ebd5Sriastradh   void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
8764a49301eSmrg			  GLbitfield, GLuint64);
8774a49301eSmrg   /*@}*/
878cdc920a0Smrg
879cdc920a0Smrg   /** GL_NV_conditional_render */
880af69d88dSmrg   void (*BeginConditionalRender)(struct gl_context *ctx,
881af69d88dSmrg                                  struct gl_query_object *q,
882cdc920a0Smrg                                  GLenum mode);
883af69d88dSmrg   void (*EndConditionalRender)(struct gl_context *ctx,
884af69d88dSmrg                                struct gl_query_object *q);
885cdc920a0Smrg
886cdc920a0Smrg   /**
887cdc920a0Smrg    * \name GL_OES_draw_texture interface
888cdc920a0Smrg    */
889cdc920a0Smrg   /*@{*/
8903464ebd5Sriastradh   void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
891cdc920a0Smrg                   GLfloat width, GLfloat height);
892cdc920a0Smrg   /*@}*/
893cdc920a0Smrg
8943464ebd5Sriastradh   /**
8953464ebd5Sriastradh    * \name GL_OES_EGL_image interface
8963464ebd5Sriastradh    */
8973464ebd5Sriastradh   void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
898cdc920a0Smrg				   struct gl_texture_object *texObj,
899cdc920a0Smrg				   struct gl_texture_image *texImage,
900cdc920a0Smrg				   GLeglImageOES image_handle);
9013464ebd5Sriastradh   void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
902cdc920a0Smrg					     struct gl_renderbuffer *rb,
903cdc920a0Smrg					     void *image_handle);
904cdc920a0Smrg
9053464ebd5Sriastradh   /**
9063464ebd5Sriastradh    * \name GL_EXT_transform_feedback interface
9073464ebd5Sriastradh    */
9083464ebd5Sriastradh   struct gl_transform_feedback_object *
9093464ebd5Sriastradh        (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
9103464ebd5Sriastradh   void (*DeleteTransformFeedback)(struct gl_context *ctx,
9113464ebd5Sriastradh                                   struct gl_transform_feedback_object *obj);
9123464ebd5Sriastradh   void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
9133464ebd5Sriastradh                                  struct gl_transform_feedback_object *obj);
9143464ebd5Sriastradh   void (*EndTransformFeedback)(struct gl_context *ctx,
9153464ebd5Sriastradh                                struct gl_transform_feedback_object *obj);
9163464ebd5Sriastradh   void (*PauseTransformFeedback)(struct gl_context *ctx,
9173464ebd5Sriastradh                                  struct gl_transform_feedback_object *obj);
9183464ebd5Sriastradh   void (*ResumeTransformFeedback)(struct gl_context *ctx,
9193464ebd5Sriastradh                                   struct gl_transform_feedback_object *obj);
920af69d88dSmrg
921af69d88dSmrg   /**
922af69d88dSmrg    * Return the number of vertices written to a stream during the last
923af69d88dSmrg    * Begin/EndTransformFeedback block.
924af69d88dSmrg    */
925af69d88dSmrg   GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
926af69d88dSmrg                                       struct gl_transform_feedback_object *obj,
927af69d88dSmrg                                       GLuint stream);
9283464ebd5Sriastradh
9293464ebd5Sriastradh   /**
9303464ebd5Sriastradh    * \name GL_NV_texture_barrier interface
9313464ebd5Sriastradh    */
9323464ebd5Sriastradh   void (*TextureBarrier)(struct gl_context *ctx);
9333464ebd5Sriastradh
9343464ebd5Sriastradh   /**
9353464ebd5Sriastradh    * \name GL_ARB_sampler_objects
9363464ebd5Sriastradh    */
9373464ebd5Sriastradh   struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
9383464ebd5Sriastradh                                                  GLuint name);
9393464ebd5Sriastradh   void (*DeleteSamplerObject)(struct gl_context *ctx,
9403464ebd5Sriastradh                               struct gl_sampler_object *samp);
941af69d88dSmrg
942af69d88dSmrg   /**
943af69d88dSmrg    * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
944af69d88dSmrg    * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
945af69d88dSmrg    */
946af69d88dSmrg   uint64_t (*GetTimestamp)(struct gl_context *ctx);
947af69d88dSmrg
948af69d88dSmrg   /**
949af69d88dSmrg    * \name GL_ARB_texture_multisample
950af69d88dSmrg    */
951af69d88dSmrg   void (*GetSamplePosition)(struct gl_context *ctx,
952af69d88dSmrg                             struct gl_framebuffer *fb,
953af69d88dSmrg                             GLuint index,
954af69d88dSmrg                             GLfloat *outValue);
955af69d88dSmrg
956af69d88dSmrg   /**
957af69d88dSmrg    * \name NV_vdpau_interop interface
958af69d88dSmrg    */
959af69d88dSmrg   void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
960af69d88dSmrg                           GLenum access, GLboolean output,
961af69d88dSmrg                           struct gl_texture_object *texObj,
962af69d88dSmrg                           struct gl_texture_image *texImage,
963af69d88dSmrg                           const GLvoid *vdpSurface, GLuint index);
964af69d88dSmrg   void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
965af69d88dSmrg                             GLenum access, GLboolean output,
966af69d88dSmrg                             struct gl_texture_object *texObj,
967af69d88dSmrg                             struct gl_texture_image *texImage,
968af69d88dSmrg                             const GLvoid *vdpSurface, GLuint index);
969af69d88dSmrg
970af69d88dSmrg   /**
971af69d88dSmrg    * Query reset status for GL_ARB_robustness
972af69d88dSmrg    *
973af69d88dSmrg    * Per \c glGetGraphicsResetStatusARB, this function should return a
974af69d88dSmrg    * non-zero value once after a reset.  If a reset is non-atomic, the
975af69d88dSmrg    * non-zero status should be returned for the duration of the reset.
976af69d88dSmrg    */
977af69d88dSmrg   GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
978af69d88dSmrg
979af69d88dSmrg   /**
980af69d88dSmrg    * \name GL_ARB_shader_image_load_store interface.
981af69d88dSmrg    */
982af69d88dSmrg   /** @{ */
983af69d88dSmrg   void (*BindImageTexture)(struct gl_context *ctx,
984af69d88dSmrg                            struct gl_image_unit *unit,
985af69d88dSmrg                            struct gl_texture_object *texObj,
986af69d88dSmrg                            GLint level, GLboolean layered, GLint layer,
987af69d88dSmrg                            GLenum access, GLenum format);
988af69d88dSmrg
989af69d88dSmrg   void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
990af69d88dSmrg   /** @} */
9917117f1b4Smrg};
9927117f1b4Smrg
9937117f1b4Smrg
9947117f1b4Smrg/**
995af69d88dSmrg * Per-vertex functions.
9967117f1b4Smrg *
997af69d88dSmrg * These are the functions which can appear between glBegin and glEnd.
998af69d88dSmrg * Depending on whether we're inside or outside a glBegin/End pair
999af69d88dSmrg * and whether we're in immediate mode or building a display list, these
1000af69d88dSmrg * functions behave differently.  This structure allows us to switch
1001af69d88dSmrg * between those modes more easily.
10027117f1b4Smrg *
1003af69d88dSmrg * Generally, these pointers point to functions in the VBO module.
10047117f1b4Smrg */
10057117f1b4Smrgtypedef struct {
10063464ebd5Sriastradh   void (GLAPIENTRYP ArrayElement)( GLint );
10077117f1b4Smrg   void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
10087117f1b4Smrg   void (GLAPIENTRYP Color3fv)( const GLfloat * );
10097117f1b4Smrg   void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10107117f1b4Smrg   void (GLAPIENTRYP Color4fv)( const GLfloat * );
10117117f1b4Smrg   void (GLAPIENTRYP EdgeFlag)( GLboolean );
10123464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord1f)( GLfloat );
10133464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
10143464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
10153464ebd5Sriastradh   void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
10163464ebd5Sriastradh   void (GLAPIENTRYP EvalPoint1)( GLint );
10173464ebd5Sriastradh   void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
10187117f1b4Smrg   void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
10197117f1b4Smrg   void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
10207117f1b4Smrg   void (GLAPIENTRYP Indexf)( GLfloat );
10217117f1b4Smrg   void (GLAPIENTRYP Indexfv)( const GLfloat * );
10223464ebd5Sriastradh   void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
10237117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
10247117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
10257117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
10267117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
10277117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
10287117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
10297117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
10307117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
10317117f1b4Smrg   void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
10327117f1b4Smrg   void (GLAPIENTRYP Normal3fv)( const GLfloat * );
10337117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
10347117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
10357117f1b4Smrg   void (GLAPIENTRYP TexCoord1f)( GLfloat );
10367117f1b4Smrg   void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
10377117f1b4Smrg   void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
10387117f1b4Smrg   void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
10397117f1b4Smrg   void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
10407117f1b4Smrg   void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
10417117f1b4Smrg   void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10427117f1b4Smrg   void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
10437117f1b4Smrg   void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
10447117f1b4Smrg   void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
10457117f1b4Smrg   void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
10467117f1b4Smrg   void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
10477117f1b4Smrg   void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10487117f1b4Smrg   void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
10493464ebd5Sriastradh   void (GLAPIENTRYP CallList)( GLuint );
10503464ebd5Sriastradh   void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
10517117f1b4Smrg   void (GLAPIENTRYP Begin)( GLenum );
10527117f1b4Smrg   void (GLAPIENTRYP End)( void );
10533464ebd5Sriastradh   void (GLAPIENTRYP PrimitiveRestartNV)( void );
1054af69d88dSmrg   /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
10557117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
10567117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
10577117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
10587117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
10597117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
10607117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
10617117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
10627117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
10633464ebd5Sriastradh   /* GL_ARB_vertex_program */
10647117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
10657117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
10667117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
10677117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
10687117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
10697117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
10707117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
10717117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
10723464ebd5Sriastradh
10733464ebd5Sriastradh   /* GL_EXT_gpu_shader4 / GL 3.0 */
10743464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
10753464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
10763464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
10773464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
10783464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
10793464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
10803464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
10813464ebd5Sriastradh
10823464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
10833464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
10843464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
10853464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
10863464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
10873464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
10883464ebd5Sriastradh   void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
10893464ebd5Sriastradh
1090af69d88dSmrg   /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1091af69d88dSmrg   void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1092af69d88dSmrg   void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1093af69d88dSmrg
1094af69d88dSmrg   void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1095af69d88dSmrg   void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1096af69d88dSmrg
1097af69d88dSmrg   void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1098af69d88dSmrg   void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1099af69d88dSmrg
1100af69d88dSmrg   void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1101af69d88dSmrg   void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1102af69d88dSmrg
1103af69d88dSmrg   void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1104af69d88dSmrg   void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1105af69d88dSmrg
1106af69d88dSmrg   void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1107af69d88dSmrg   void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1108af69d88dSmrg
1109af69d88dSmrg   void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1110af69d88dSmrg   void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1111af69d88dSmrg
1112af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1113af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1114af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1115af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1116af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1117af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1118af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1119af69d88dSmrg   void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1120af69d88dSmrg
1121af69d88dSmrg   void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1122af69d88dSmrg   void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1123af69d88dSmrg
1124af69d88dSmrg   void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1125af69d88dSmrg   void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1126af69d88dSmrg
1127af69d88dSmrg   void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1128af69d88dSmrg   void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1129af69d88dSmrg
1130af69d88dSmrg   void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1131af69d88dSmrg   void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1132af69d88dSmrg
1133af69d88dSmrg   void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1134af69d88dSmrg					GLboolean normalized, GLuint value);
1135af69d88dSmrg   void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1136af69d88dSmrg					GLboolean normalized, GLuint value);
1137af69d88dSmrg   void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1138af69d88dSmrg					GLboolean normalized, GLuint value);
1139af69d88dSmrg   void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1140af69d88dSmrg					GLboolean normalized, GLuint value);
1141af69d88dSmrg   void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1142af69d88dSmrg					GLboolean normalized,
1143af69d88dSmrg					 const GLuint *value);
1144af69d88dSmrg   void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1145af69d88dSmrg					GLboolean normalized,
1146af69d88dSmrg					 const GLuint *value);
1147af69d88dSmrg   void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1148af69d88dSmrg					GLboolean normalized,
1149af69d88dSmrg					 const GLuint *value);
1150af69d88dSmrg   void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1151af69d88dSmrg					 GLboolean normalized,
1152af69d88dSmrg					 const GLuint *value);
11537117f1b4Smrg} GLvertexformat;
11547117f1b4Smrg
11557117f1b4Smrg
11567117f1b4Smrg#endif /* DD_INCLUDED */
1157