dd.h revision 4a49301e
17117f1b4Smrg/**
27117f1b4Smrg * \file dd.h
37117f1b4Smrg * Device driver interfaces.
47117f1b4Smrg */
57117f1b4Smrg
67117f1b4Smrg/*
77117f1b4Smrg * Mesa 3-D graphics library
87117f1b4Smrg * Version:  6.5.2
97117f1b4Smrg *
107117f1b4Smrg * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
117117f1b4Smrg *
127117f1b4Smrg * Permission is hereby granted, free of charge, to any person obtaining a
137117f1b4Smrg * copy of this software and associated documentation files (the "Software"),
147117f1b4Smrg * to deal in the Software without restriction, including without limitation
157117f1b4Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
167117f1b4Smrg * and/or sell copies of the Software, and to permit persons to whom the
177117f1b4Smrg * Software is furnished to do so, subject to the following conditions:
187117f1b4Smrg *
197117f1b4Smrg * The above copyright notice and this permission notice shall be included
207117f1b4Smrg * in all copies or substantial portions of the Software.
217117f1b4Smrg *
227117f1b4Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
237117f1b4Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
247117f1b4Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
257117f1b4Smrg * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
267117f1b4Smrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
277117f1b4Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR 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
367117f1b4Smrgstruct gl_pixelstore_attrib;
374a49301eSmrgstruct gl_display_list;
384a49301eSmrg
394a49301eSmrg#if FEATURE_ARB_vertex_buffer_object
404a49301eSmrg/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
414a49301eSmrg * NULL) if buffer is unavailable for immediate mapping.
424a49301eSmrg *
434a49301eSmrg * Does GL_MAP_INVALIDATE_RANGE_BIT do this?  It seems so, but it
444a49301eSmrg * would require more book-keeping in the driver than seems necessary
454a49301eSmrg * at this point.
464a49301eSmrg *
474a49301eSmrg * Does GL_MAP_INVALDIATE_BUFFER_BIT do this?  Not really -- we don't
484a49301eSmrg * want to provoke the driver to throw away the old storage, we will
494a49301eSmrg * respect the contents of already referenced data.
504a49301eSmrg */
514a49301eSmrg#define MESA_MAP_NOWAIT_BIT       0x0040
524a49301eSmrg#endif
534a49301eSmrg
547117f1b4Smrg
557117f1b4Smrg/**
567117f1b4Smrg * Device driver function table.
577117f1b4Smrg * Core Mesa uses these function pointers to call into device drivers.
587117f1b4Smrg * Most of these functions directly correspond to OpenGL state commands.
597117f1b4Smrg * Core Mesa will call these functions after error checking has been done
607117f1b4Smrg * so that the drivers don't have to worry about error testing.
617117f1b4Smrg *
627117f1b4Smrg * Vertex transformation/clipping/lighting is patched into the T&L module.
637117f1b4Smrg * Rasterization functions are patched into the swrast module.
647117f1b4Smrg *
657117f1b4Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c
667117f1b4Smrg * file should be updated too!!!
677117f1b4Smrg */
687117f1b4Smrgstruct dd_function_table {
697117f1b4Smrg   /**
707117f1b4Smrg    * Return a string as needed by glGetString().
717117f1b4Smrg    * Only the GL_RENDERER query must be implemented.  Otherwise, NULL can be
727117f1b4Smrg    * returned.
737117f1b4Smrg    */
747117f1b4Smrg   const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
757117f1b4Smrg
767117f1b4Smrg   /**
777117f1b4Smrg    * Notify the driver after Mesa has made some internal state changes.
787117f1b4Smrg    *
797117f1b4Smrg    * This is in addition to any state change callbacks Mesa may already have
807117f1b4Smrg    * made.
817117f1b4Smrg    */
827117f1b4Smrg   void (*UpdateState)( GLcontext *ctx, GLbitfield new_state );
837117f1b4Smrg
847117f1b4Smrg   /**
857117f1b4Smrg    * Get the width and height of the named buffer/window.
867117f1b4Smrg    *
877117f1b4Smrg    * Mesa uses this to determine when the driver's window size has changed.
887117f1b4Smrg    * XXX OBSOLETE: this function will be removed in the future.
897117f1b4Smrg    */
907117f1b4Smrg   void (*GetBufferSize)( GLframebuffer *buffer,
917117f1b4Smrg                          GLuint *width, GLuint *height );
927117f1b4Smrg
937117f1b4Smrg   /**
947117f1b4Smrg    * Resize the given framebuffer to the given size.
957117f1b4Smrg    * XXX OBSOLETE: this function will be removed in the future.
967117f1b4Smrg    */
977117f1b4Smrg   void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb,
987117f1b4Smrg                          GLuint width, GLuint height);
997117f1b4Smrg
1007117f1b4Smrg   /**
1017117f1b4Smrg    * Called whenever an error is generated.
1027117f1b4Smrg    * __GLcontextRec::ErrorValue contains the error value.
1037117f1b4Smrg    */
1047117f1b4Smrg   void (*Error)( GLcontext *ctx );
1057117f1b4Smrg
1067117f1b4Smrg   /**
1077117f1b4Smrg    * This is called whenever glFinish() is called.
1087117f1b4Smrg    */
1097117f1b4Smrg   void (*Finish)( GLcontext *ctx );
1107117f1b4Smrg
1117117f1b4Smrg   /**
1127117f1b4Smrg    * This is called whenever glFlush() is called.
1137117f1b4Smrg    */
1147117f1b4Smrg   void (*Flush)( GLcontext *ctx );
1157117f1b4Smrg
1167117f1b4Smrg   /**
1177117f1b4Smrg    * Clear the color/depth/stencil/accum buffer(s).
1187117f1b4Smrg    * \param buffers  a bitmask of BUFFER_BIT_* flags indicating which
1197117f1b4Smrg    *                 renderbuffers need to be cleared.
1207117f1b4Smrg    */
1217117f1b4Smrg   void (*Clear)( GLcontext *ctx, GLbitfield buffers );
1227117f1b4Smrg
1237117f1b4Smrg   /**
1247117f1b4Smrg    * Execute glAccum command.
1257117f1b4Smrg    */
1267117f1b4Smrg   void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value );
1277117f1b4Smrg
1287117f1b4Smrg
129c1f859d4Smrg   /**
130c1f859d4Smrg    * Execute glRasterPos, updating the ctx->Current.Raster fields
131c1f859d4Smrg    */
132c1f859d4Smrg   void (*RasterPos)( GLcontext *ctx, const GLfloat v[4] );
133c1f859d4Smrg
1347117f1b4Smrg   /**
1357117f1b4Smrg    * \name Image-related functions
1367117f1b4Smrg    */
1377117f1b4Smrg   /*@{*/
1387117f1b4Smrg
1397117f1b4Smrg   /**
1407117f1b4Smrg    * Called by glDrawPixels().
1417117f1b4Smrg    * \p unpack describes how to unpack the source image data.
1427117f1b4Smrg    */
1437117f1b4Smrg   void (*DrawPixels)( GLcontext *ctx,
1447117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1457117f1b4Smrg		       GLenum format, GLenum type,
1467117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1477117f1b4Smrg		       const GLvoid *pixels );
1487117f1b4Smrg
1497117f1b4Smrg   /**
1507117f1b4Smrg    * Called by glReadPixels().
1517117f1b4Smrg    */
1527117f1b4Smrg   void (*ReadPixels)( GLcontext *ctx,
1537117f1b4Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
1547117f1b4Smrg		       GLenum format, GLenum type,
1557117f1b4Smrg		       const struct gl_pixelstore_attrib *unpack,
1567117f1b4Smrg		       GLvoid *dest );
1577117f1b4Smrg
1587117f1b4Smrg   /**
1597117f1b4Smrg    * Called by glCopyPixels().
1607117f1b4Smrg    */
1617117f1b4Smrg   void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy,
1627117f1b4Smrg                       GLsizei width, GLsizei height,
1637117f1b4Smrg                       GLint dstx, GLint dsty, GLenum type );
1647117f1b4Smrg
1657117f1b4Smrg   /**
1667117f1b4Smrg    * Called by glBitmap().
1677117f1b4Smrg    */
1687117f1b4Smrg   void (*Bitmap)( GLcontext *ctx,
1697117f1b4Smrg		   GLint x, GLint y, GLsizei width, GLsizei height,
1707117f1b4Smrg		   const struct gl_pixelstore_attrib *unpack,
1717117f1b4Smrg		   const GLubyte *bitmap );
1727117f1b4Smrg   /*@}*/
1737117f1b4Smrg
1747117f1b4Smrg
1757117f1b4Smrg   /**
1767117f1b4Smrg    * \name Texture image functions
1777117f1b4Smrg    */
1787117f1b4Smrg   /*@{*/
1797117f1b4Smrg
1807117f1b4Smrg   /**
1817117f1b4Smrg    * Choose texture format.
1827117f1b4Smrg    *
1837117f1b4Smrg    * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
1847117f1b4Smrg    * functions.  The driver should examine \p internalFormat and return a
1857117f1b4Smrg    * pointer to an appropriate gl_texture_format.
1867117f1b4Smrg    */
1874a49301eSmrg   GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
1884a49301eSmrg                                     GLenum srcFormat, GLenum srcType );
1897117f1b4Smrg
1907117f1b4Smrg   /**
1917117f1b4Smrg    * Called by glTexImage1D().
1927117f1b4Smrg    *
1937117f1b4Smrg    * \param target user specified.
1947117f1b4Smrg    * \param format user specified.
1957117f1b4Smrg    * \param type user specified.
1967117f1b4Smrg    * \param pixels user specified.
1977117f1b4Smrg    * \param packing indicates the image packing of pixels.
1987117f1b4Smrg    * \param texObj is the target texture object.
1997117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
2007117f1b4Smrg    * width, \p height, \p depth, \p border and \p internalFormat information.
2017117f1b4Smrg    *
2027117f1b4Smrg    * \p retainInternalCopy is returned by this function and indicates whether
2037117f1b4Smrg    * core Mesa should keep an internal copy of the texture image.
2047117f1b4Smrg    *
2057117f1b4Smrg    * Drivers should call a fallback routine from texstore.c if needed.
2067117f1b4Smrg    */
2077117f1b4Smrg   void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level,
2087117f1b4Smrg                       GLint internalFormat,
2097117f1b4Smrg                       GLint width, GLint border,
2107117f1b4Smrg                       GLenum format, GLenum type, const GLvoid *pixels,
2117117f1b4Smrg                       const struct gl_pixelstore_attrib *packing,
2127117f1b4Smrg                       struct gl_texture_object *texObj,
2137117f1b4Smrg                       struct gl_texture_image *texImage );
2147117f1b4Smrg
2157117f1b4Smrg   /**
2167117f1b4Smrg    * Called by glTexImage2D().
2177117f1b4Smrg    *
2187117f1b4Smrg    * \sa dd_function_table::TexImage1D.
2197117f1b4Smrg    */
2207117f1b4Smrg   void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level,
2217117f1b4Smrg                       GLint internalFormat,
2227117f1b4Smrg                       GLint width, GLint height, GLint border,
2237117f1b4Smrg                       GLenum format, GLenum type, const GLvoid *pixels,
2247117f1b4Smrg                       const struct gl_pixelstore_attrib *packing,
2257117f1b4Smrg                       struct gl_texture_object *texObj,
2267117f1b4Smrg                       struct gl_texture_image *texImage );
2277117f1b4Smrg
2287117f1b4Smrg   /**
2297117f1b4Smrg    * Called by glTexImage3D().
2307117f1b4Smrg    *
2317117f1b4Smrg    * \sa dd_function_table::TexImage1D.
2327117f1b4Smrg    */
2337117f1b4Smrg   void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level,
2347117f1b4Smrg                       GLint internalFormat,
2357117f1b4Smrg                       GLint width, GLint height, GLint depth, GLint border,
2367117f1b4Smrg                       GLenum format, GLenum type, const GLvoid *pixels,
2377117f1b4Smrg                       const struct gl_pixelstore_attrib *packing,
2387117f1b4Smrg                       struct gl_texture_object *texObj,
2397117f1b4Smrg                       struct gl_texture_image *texImage );
2407117f1b4Smrg
2417117f1b4Smrg   /**
2427117f1b4Smrg    * Called by glTexSubImage1D().
2437117f1b4Smrg    *
2447117f1b4Smrg    * \param target user specified.
2457117f1b4Smrg    * \param level user specified.
2467117f1b4Smrg    * \param xoffset user specified.
2477117f1b4Smrg    * \param yoffset user specified.
2487117f1b4Smrg    * \param zoffset user specified.
2497117f1b4Smrg    * \param width user specified.
2507117f1b4Smrg    * \param height user specified.
2517117f1b4Smrg    * \param depth user specified.
2527117f1b4Smrg    * \param format user specified.
2537117f1b4Smrg    * \param type user specified.
2547117f1b4Smrg    * \param pixels user specified.
2557117f1b4Smrg    * \param packing indicates the image packing of pixels.
2567117f1b4Smrg    * \param texObj is the target texture object.
2577117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
2587117f1b4Smrg    * width, \p height, \p border and \p internalFormat information.
2597117f1b4Smrg    *
2607117f1b4Smrg    * The driver should use a fallback routine from texstore.c if needed.
2617117f1b4Smrg    */
2627117f1b4Smrg   void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
2637117f1b4Smrg                          GLint xoffset, GLsizei width,
2647117f1b4Smrg                          GLenum format, GLenum type,
2657117f1b4Smrg                          const GLvoid *pixels,
2667117f1b4Smrg                          const struct gl_pixelstore_attrib *packing,
2677117f1b4Smrg                          struct gl_texture_object *texObj,
2687117f1b4Smrg                          struct gl_texture_image *texImage );
2697117f1b4Smrg
2707117f1b4Smrg   /**
2717117f1b4Smrg    * Called by glTexSubImage2D().
2727117f1b4Smrg    *
2737117f1b4Smrg    * \sa dd_function_table::TexSubImage1D.
2747117f1b4Smrg    */
2757117f1b4Smrg   void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
2767117f1b4Smrg                          GLint xoffset, GLint yoffset,
2777117f1b4Smrg                          GLsizei width, GLsizei height,
2787117f1b4Smrg                          GLenum format, GLenum type,
2797117f1b4Smrg                          const GLvoid *pixels,
2807117f1b4Smrg                          const struct gl_pixelstore_attrib *packing,
2817117f1b4Smrg                          struct gl_texture_object *texObj,
2827117f1b4Smrg                          struct gl_texture_image *texImage );
2837117f1b4Smrg
2847117f1b4Smrg   /**
2857117f1b4Smrg    * Called by glTexSubImage3D().
2867117f1b4Smrg    *
2877117f1b4Smrg    * \sa dd_function_table::TexSubImage1D.
2887117f1b4Smrg    */
2897117f1b4Smrg   void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
2907117f1b4Smrg                          GLint xoffset, GLint yoffset, GLint zoffset,
2917117f1b4Smrg                          GLsizei width, GLsizei height, GLint depth,
2927117f1b4Smrg                          GLenum format, GLenum type,
2937117f1b4Smrg                          const GLvoid *pixels,
2947117f1b4Smrg                          const struct gl_pixelstore_attrib *packing,
2957117f1b4Smrg                          struct gl_texture_object *texObj,
2967117f1b4Smrg                          struct gl_texture_image *texImage );
2977117f1b4Smrg
2987117f1b4Smrg   /**
2997117f1b4Smrg    * Called by glGetTexImage().
3007117f1b4Smrg    */
3017117f1b4Smrg   void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level,
3027117f1b4Smrg                        GLenum format, GLenum type, GLvoid *pixels,
3037117f1b4Smrg                        struct gl_texture_object *texObj,
3047117f1b4Smrg                        struct gl_texture_image *texImage );
3057117f1b4Smrg
3067117f1b4Smrg   /**
3077117f1b4Smrg    * Called by glCopyTexImage1D().
3087117f1b4Smrg    *
3097117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3107117f1b4Smrg    */
3117117f1b4Smrg   void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level,
3127117f1b4Smrg                           GLenum internalFormat, GLint x, GLint y,
3137117f1b4Smrg                           GLsizei width, GLint border );
3147117f1b4Smrg
3157117f1b4Smrg   /**
3167117f1b4Smrg    * Called by glCopyTexImage2D().
3177117f1b4Smrg    *
3187117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3197117f1b4Smrg    */
3207117f1b4Smrg   void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level,
3217117f1b4Smrg                           GLenum internalFormat, GLint x, GLint y,
3227117f1b4Smrg                           GLsizei width, GLsizei height, GLint border );
3237117f1b4Smrg
3247117f1b4Smrg   /**
3257117f1b4Smrg    * Called by glCopyTexSubImage1D().
3267117f1b4Smrg    *
3277117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3287117f1b4Smrg    */
3297117f1b4Smrg   void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level,
3307117f1b4Smrg                              GLint xoffset,
3317117f1b4Smrg                              GLint x, GLint y, GLsizei width );
3327117f1b4Smrg   /**
3337117f1b4Smrg    * Called by glCopyTexSubImage2D().
3347117f1b4Smrg    *
3357117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3367117f1b4Smrg    */
3377117f1b4Smrg   void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level,
3387117f1b4Smrg                              GLint xoffset, GLint yoffset,
3397117f1b4Smrg                              GLint x, GLint y,
3407117f1b4Smrg                              GLsizei width, GLsizei height );
3417117f1b4Smrg   /**
3427117f1b4Smrg    * Called by glCopyTexSubImage3D().
3437117f1b4Smrg    *
3447117f1b4Smrg    * Drivers should use a fallback routine from texstore.c if needed.
3457117f1b4Smrg    */
3467117f1b4Smrg   void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level,
3477117f1b4Smrg                              GLint xoffset, GLint yoffset, GLint zoffset,
3487117f1b4Smrg                              GLint x, GLint y,
3497117f1b4Smrg                              GLsizei width, GLsizei height );
3507117f1b4Smrg
351c1f859d4Smrg   /**
352c1f859d4Smrg    * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
353c1f859d4Smrg    */
354c1f859d4Smrg   void (*GenerateMipmap)(GLcontext *ctx, GLenum target,
355c1f859d4Smrg                          struct gl_texture_object *texObj);
356c1f859d4Smrg
3577117f1b4Smrg   /**
3587117f1b4Smrg    * Called by glTexImage[123]D when user specifies a proxy texture
3597117f1b4Smrg    * target.
3607117f1b4Smrg    *
3617117f1b4Smrg    * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
3627117f1b4Smrg    */
3637117f1b4Smrg   GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target,
3647117f1b4Smrg                                  GLint level, GLint internalFormat,
3657117f1b4Smrg                                  GLenum format, GLenum type,
3667117f1b4Smrg                                  GLint width, GLint height,
3677117f1b4Smrg                                  GLint depth, GLint border);
3687117f1b4Smrg   /*@}*/
3697117f1b4Smrg
3707117f1b4Smrg
3717117f1b4Smrg   /**
3727117f1b4Smrg    * \name Compressed texture functions
3737117f1b4Smrg    */
3747117f1b4Smrg   /*@{*/
3757117f1b4Smrg
3767117f1b4Smrg   /**
3777117f1b4Smrg    * Called by glCompressedTexImage1D().
3787117f1b4Smrg    *
3797117f1b4Smrg    * \param target user specified.
3807117f1b4Smrg    * \param format user specified.
3817117f1b4Smrg    * \param type user specified.
3827117f1b4Smrg    * \param pixels user specified.
3837117f1b4Smrg    * \param packing indicates the image packing of pixels.
3847117f1b4Smrg    * \param texObj is the target texture object.
3857117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
3867117f1b4Smrg    * width, \p height, \p depth, \p border and \p internalFormat information.
3877117f1b4Smrg    *
3887117f1b4Smrg    * \a retainInternalCopy is returned by this function and indicates whether
3897117f1b4Smrg    * core Mesa should keep an internal copy of the texture image.
3907117f1b4Smrg    */
3917117f1b4Smrg   void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
3927117f1b4Smrg                                 GLint level, GLint internalFormat,
3937117f1b4Smrg                                 GLsizei width, GLint border,
3947117f1b4Smrg                                 GLsizei imageSize, const GLvoid *data,
3957117f1b4Smrg                                 struct gl_texture_object *texObj,
3967117f1b4Smrg                                 struct gl_texture_image *texImage );
3977117f1b4Smrg   /**
3987117f1b4Smrg    * Called by glCompressedTexImage2D().
3997117f1b4Smrg    *
4007117f1b4Smrg    * \sa dd_function_table::CompressedTexImage1D.
4017117f1b4Smrg    */
4027117f1b4Smrg   void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
4037117f1b4Smrg                                 GLint level, GLint internalFormat,
4047117f1b4Smrg                                 GLsizei width, GLsizei height, GLint border,
4057117f1b4Smrg                                 GLsizei imageSize, const GLvoid *data,
4067117f1b4Smrg                                 struct gl_texture_object *texObj,
4077117f1b4Smrg                                 struct gl_texture_image *texImage );
4087117f1b4Smrg   /**
4097117f1b4Smrg    * Called by glCompressedTexImage3D().
4107117f1b4Smrg    *
4117117f1b4Smrg    * \sa dd_function_table::CompressedTexImage3D.
4127117f1b4Smrg    */
4137117f1b4Smrg   void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
4147117f1b4Smrg                                 GLint level, GLint internalFormat,
4157117f1b4Smrg                                 GLsizei width, GLsizei height, GLsizei depth,
4167117f1b4Smrg                                 GLint border,
4177117f1b4Smrg                                 GLsizei imageSize, const GLvoid *data,
4187117f1b4Smrg                                 struct gl_texture_object *texObj,
4197117f1b4Smrg                                 struct gl_texture_image *texImage );
4207117f1b4Smrg
4217117f1b4Smrg   /**
4227117f1b4Smrg    * Called by glCompressedTexSubImage1D().
4237117f1b4Smrg    *
4247117f1b4Smrg    * \param target user specified.
4257117f1b4Smrg    * \param level user specified.
4267117f1b4Smrg    * \param xoffset user specified.
4277117f1b4Smrg    * \param yoffset user specified.
4287117f1b4Smrg    * \param zoffset user specified.
4297117f1b4Smrg    * \param width user specified.
4307117f1b4Smrg    * \param height user specified.
4317117f1b4Smrg    * \param depth user specified.
4327117f1b4Smrg    * \param imageSize user specified.
4337117f1b4Smrg    * \param data user specified.
4347117f1b4Smrg    * \param texObj is the target texture object.
4357117f1b4Smrg    * \param texImage is the target texture image.  It will have the texture \p
4367117f1b4Smrg    * width, \p height, \p depth, \p border and \p internalFormat information.
4377117f1b4Smrg    */
4387117f1b4Smrg   void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level,
4397117f1b4Smrg                                   GLint xoffset, GLsizei width,
4407117f1b4Smrg                                   GLenum format,
4417117f1b4Smrg                                   GLsizei imageSize, const GLvoid *data,
4427117f1b4Smrg                                   struct gl_texture_object *texObj,
4437117f1b4Smrg                                   struct gl_texture_image *texImage);
4447117f1b4Smrg   /**
4457117f1b4Smrg    * Called by glCompressedTexSubImage2D().
4467117f1b4Smrg    *
4477117f1b4Smrg    * \sa dd_function_table::CompressedTexImage3D.
4487117f1b4Smrg    */
4497117f1b4Smrg   void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level,
4507117f1b4Smrg                                   GLint xoffset, GLint yoffset,
4517117f1b4Smrg                                   GLsizei width, GLint height,
4527117f1b4Smrg                                   GLenum format,
4537117f1b4Smrg                                   GLsizei imageSize, const GLvoid *data,
4547117f1b4Smrg                                   struct gl_texture_object *texObj,
4557117f1b4Smrg                                   struct gl_texture_image *texImage);
4567117f1b4Smrg   /**
4577117f1b4Smrg    * Called by glCompressedTexSubImage3D().
4587117f1b4Smrg    *
4597117f1b4Smrg    * \sa dd_function_table::CompressedTexImage3D.
4607117f1b4Smrg    */
4617117f1b4Smrg   void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level,
4627117f1b4Smrg                                   GLint xoffset, GLint yoffset, GLint zoffset,
4637117f1b4Smrg                                   GLsizei width, GLint height, GLint depth,
4647117f1b4Smrg                                   GLenum format,
4657117f1b4Smrg                                   GLsizei imageSize, const GLvoid *data,
4667117f1b4Smrg                                   struct gl_texture_object *texObj,
4677117f1b4Smrg                                   struct gl_texture_image *texImage);
4687117f1b4Smrg
4697117f1b4Smrg
4707117f1b4Smrg   /**
4717117f1b4Smrg    * Called by glGetCompressedTexImage.
4727117f1b4Smrg    */
4737117f1b4Smrg   void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level,
4747117f1b4Smrg                                 GLvoid *img,
475c1f859d4Smrg                                 struct gl_texture_object *texObj,
476c1f859d4Smrg                                 struct gl_texture_image *texImage);
4777117f1b4Smrg
4787117f1b4Smrg   /*@}*/
4797117f1b4Smrg
4807117f1b4Smrg   /**
4817117f1b4Smrg    * \name Texture object functions
4827117f1b4Smrg    */
4837117f1b4Smrg   /*@{*/
4847117f1b4Smrg
4857117f1b4Smrg   /**
4867117f1b4Smrg    * Called by glBindTexture().
4877117f1b4Smrg    */
4887117f1b4Smrg   void (*BindTexture)( GLcontext *ctx, GLenum target,
4897117f1b4Smrg                        struct gl_texture_object *tObj );
4907117f1b4Smrg
4917117f1b4Smrg   /**
4927117f1b4Smrg    * Called to allocate a new texture object.
4937117f1b4Smrg    * A new gl_texture_object should be returned.  The driver should
4947117f1b4Smrg    * attach to it any device-specific info it needs.
4957117f1b4Smrg    */
4967117f1b4Smrg   struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name,
4977117f1b4Smrg                                                   GLenum target );
4987117f1b4Smrg   /**
4997117f1b4Smrg    * Called when a texture object is about to be deallocated.
5007117f1b4Smrg    *
5017117f1b4Smrg    * Driver should delete the gl_texture_object object and anything
5027117f1b4Smrg    * hanging off of it.
5037117f1b4Smrg    */
5047117f1b4Smrg   void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
5057117f1b4Smrg
5067117f1b4Smrg   /**
5077117f1b4Smrg    * Called to allocate a new texture image object.
5087117f1b4Smrg    */
5097117f1b4Smrg   struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx );
5107117f1b4Smrg
5117117f1b4Smrg   /**
5127117f1b4Smrg    * Called to free tImage->Data.
5137117f1b4Smrg    */
5147117f1b4Smrg   void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
5157117f1b4Smrg
5167117f1b4Smrg   /** Map texture image data into user space */
5177117f1b4Smrg   void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
5187117f1b4Smrg   /** Unmap texture images from user space */
5197117f1b4Smrg   void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
5207117f1b4Smrg
5217117f1b4Smrg   /**
5227117f1b4Smrg    * Note: no context argument.  This function doesn't initially look
5237117f1b4Smrg    * like it belongs here, except that the driver is the only entity
5247117f1b4Smrg    * that knows for sure how the texture memory is allocated - via
5257117f1b4Smrg    * the above callbacks.  There is then an argument that the driver
5267117f1b4Smrg    * knows what memcpy paths might be fast.  Typically this is invoked with
5277117f1b4Smrg    *
5287117f1b4Smrg    * to -- a pointer into texture memory allocated by NewTextureImage() above.
5297117f1b4Smrg    * from -- a pointer into client memory or a mesa temporary.
5307117f1b4Smrg    * sz -- nr bytes to copy.
5317117f1b4Smrg    */
5327117f1b4Smrg   void* (*TextureMemCpy)( void *to, const void *from, size_t sz );
5337117f1b4Smrg
5347117f1b4Smrg   /**
5357117f1b4Smrg    * Called by glAreTextureResident().
5367117f1b4Smrg    */
5377117f1b4Smrg   GLboolean (*IsTextureResident)( GLcontext *ctx,
5387117f1b4Smrg                                   struct gl_texture_object *t );
5397117f1b4Smrg
5407117f1b4Smrg   /**
5417117f1b4Smrg    * Called by glActiveTextureARB() to set current texture unit.
5427117f1b4Smrg    */
5437117f1b4Smrg   void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber );
5447117f1b4Smrg
5457117f1b4Smrg   /**
5467117f1b4Smrg    * Called when the texture's color lookup table is changed.
5477117f1b4Smrg    *
5487117f1b4Smrg    * If \p tObj is NULL then the shared texture palette
5497117f1b4Smrg    * gl_texture_object::Palette is to be updated.
5507117f1b4Smrg    */
5517117f1b4Smrg   void (*UpdateTexturePalette)( GLcontext *ctx,
5527117f1b4Smrg                                 struct gl_texture_object *tObj );
5537117f1b4Smrg   /*@}*/
5547117f1b4Smrg
5557117f1b4Smrg
5567117f1b4Smrg   /**
5577117f1b4Smrg    * \name Imaging functionality
5587117f1b4Smrg    */
5597117f1b4Smrg   /*@{*/
5607117f1b4Smrg   void (*CopyColorTable)( GLcontext *ctx,
5617117f1b4Smrg			   GLenum target, GLenum internalformat,
5627117f1b4Smrg			   GLint x, GLint y, GLsizei width );
5637117f1b4Smrg
5647117f1b4Smrg   void (*CopyColorSubTable)( GLcontext *ctx,
5657117f1b4Smrg			      GLenum target, GLsizei start,
5667117f1b4Smrg			      GLint x, GLint y, GLsizei width );
5677117f1b4Smrg
5687117f1b4Smrg   void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target,
5697117f1b4Smrg				    GLenum internalFormat,
5707117f1b4Smrg				    GLint x, GLint y, GLsizei width );
5717117f1b4Smrg
5727117f1b4Smrg   void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target,
5737117f1b4Smrg				    GLenum internalFormat,
5747117f1b4Smrg				    GLint x, GLint y,
5757117f1b4Smrg				    GLsizei width, GLsizei height );
5767117f1b4Smrg   /*@}*/
5777117f1b4Smrg
5787117f1b4Smrg
5797117f1b4Smrg   /**
5807117f1b4Smrg    * \name Vertex/fragment program functions
5817117f1b4Smrg    */
5827117f1b4Smrg   /*@{*/
5837117f1b4Smrg   /** Bind a vertex/fragment program */
5847117f1b4Smrg   void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog);
5857117f1b4Smrg   /** Allocate a new program */
5867117f1b4Smrg   struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id);
5877117f1b4Smrg   /** Delete a program */
5887117f1b4Smrg   void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog);
5897117f1b4Smrg   /** Notify driver that a program string has been specified. */
5907117f1b4Smrg   void (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
5917117f1b4Smrg			       struct gl_program *prog);
5927117f1b4Smrg
5937117f1b4Smrg   /** Query if program can be loaded onto hardware */
5947117f1b4Smrg   GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target,
5957117f1b4Smrg				struct gl_program *prog);
5967117f1b4Smrg
5977117f1b4Smrg   /*@}*/
5987117f1b4Smrg
5997117f1b4Smrg
6007117f1b4Smrg   /**
6017117f1b4Smrg    * \name State-changing functions.
6027117f1b4Smrg    *
6037117f1b4Smrg    * \note drawing functions are above.
6047117f1b4Smrg    *
6057117f1b4Smrg    * These functions are called by their corresponding OpenGL API functions.
6067117f1b4Smrg    * They are \e also called by the gl_PopAttrib() function!!!
6077117f1b4Smrg    * May add more functions like these to the device driver in the future.
6087117f1b4Smrg    */
6097117f1b4Smrg   /*@{*/
6107117f1b4Smrg   /** Specify the alpha test function */
6117117f1b4Smrg   void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref);
6127117f1b4Smrg   /** Set the blend color */
6137117f1b4Smrg   void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]);
6147117f1b4Smrg   /** Set the blend equation */
6157117f1b4Smrg   void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA);
6167117f1b4Smrg   /** Specify pixel arithmetic */
6177117f1b4Smrg   void (*BlendFuncSeparate)(GLcontext *ctx,
6187117f1b4Smrg                             GLenum sfactorRGB, GLenum dfactorRGB,
6197117f1b4Smrg                             GLenum sfactorA, GLenum dfactorA);
6207117f1b4Smrg   /** Specify clear values for the color buffers */
6217117f1b4Smrg   void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]);
6227117f1b4Smrg   /** Specify the clear value for the depth buffer */
6237117f1b4Smrg   void (*ClearDepth)(GLcontext *ctx, GLclampd d);
6247117f1b4Smrg   /** Specify the clear value for the color index buffers */
6257117f1b4Smrg   void (*ClearIndex)(GLcontext *ctx, GLuint index);
6267117f1b4Smrg   /** Specify the clear value for the stencil buffer */
6277117f1b4Smrg   void (*ClearStencil)(GLcontext *ctx, GLint s);
6287117f1b4Smrg   /** Specify a plane against which all geometry is clipped */
6297117f1b4Smrg   void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation );
6307117f1b4Smrg   /** Enable and disable writing of frame buffer color components */
6317117f1b4Smrg   void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask,
6327117f1b4Smrg                     GLboolean bmask, GLboolean amask );
6337117f1b4Smrg   /** Cause a material color to track the current color */
6347117f1b4Smrg   void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode);
6357117f1b4Smrg   /** Specify whether front- or back-facing facets can be culled */
6367117f1b4Smrg   void (*CullFace)(GLcontext *ctx, GLenum mode);
6377117f1b4Smrg   /** Define front- and back-facing polygons */
6387117f1b4Smrg   void (*FrontFace)(GLcontext *ctx, GLenum mode);
6397117f1b4Smrg   /** Specify the value used for depth buffer comparisons */
6407117f1b4Smrg   void (*DepthFunc)(GLcontext *ctx, GLenum func);
6417117f1b4Smrg   /** Enable or disable writing into the depth buffer */
6427117f1b4Smrg   void (*DepthMask)(GLcontext *ctx, GLboolean flag);
6437117f1b4Smrg   /** Specify mapping of depth values from NDC to window coordinates */
6447117f1b4Smrg   void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval);
6457117f1b4Smrg   /** Specify the current buffer for writing */
6467117f1b4Smrg   void (*DrawBuffer)( GLcontext *ctx, GLenum buffer );
6477117f1b4Smrg   /** Specify the buffers for writing for fragment programs*/
6487117f1b4Smrg   void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers );
6497117f1b4Smrg   /** Enable or disable server-side gl capabilities */
6507117f1b4Smrg   void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state);
6517117f1b4Smrg   /** Specify fog parameters */
6527117f1b4Smrg   void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
6537117f1b4Smrg   /** Specify implementation-specific hints */
6547117f1b4Smrg   void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
6557117f1b4Smrg   /** Control the writing of individual bits in the color index buffers */
6567117f1b4Smrg   void (*IndexMask)(GLcontext *ctx, GLuint mask);
6577117f1b4Smrg   /** Set light source parameters.
6587117f1b4Smrg    * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
6597117f1b4Smrg    * been transformed to eye-space.
6607117f1b4Smrg    */
6617117f1b4Smrg   void (*Lightfv)(GLcontext *ctx, GLenum light,
6627117f1b4Smrg		   GLenum pname, const GLfloat *params );
6637117f1b4Smrg   /** Set the lighting model parameters */
6647117f1b4Smrg   void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
6657117f1b4Smrg   /** Specify the line stipple pattern */
6667117f1b4Smrg   void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern );
6677117f1b4Smrg   /** Specify the width of rasterized lines */
6687117f1b4Smrg   void (*LineWidth)(GLcontext *ctx, GLfloat width);
6697117f1b4Smrg   /** Specify a logical pixel operation for color index rendering */
6707117f1b4Smrg   void (*LogicOpcode)(GLcontext *ctx, GLenum opcode);
6717117f1b4Smrg   void (*PointParameterfv)(GLcontext *ctx, GLenum pname,
6727117f1b4Smrg                            const GLfloat *params);
6737117f1b4Smrg   /** Specify the diameter of rasterized points */
6747117f1b4Smrg   void (*PointSize)(GLcontext *ctx, GLfloat size);
6757117f1b4Smrg   /** Select a polygon rasterization mode */
6767117f1b4Smrg   void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
6777117f1b4Smrg   /** Set the scale and units used to calculate depth values */
6787117f1b4Smrg   void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units);
6797117f1b4Smrg   /** Set the polygon stippling pattern */
6807117f1b4Smrg   void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask );
6817117f1b4Smrg   /* Specifies the current buffer for reading */
6827117f1b4Smrg   void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
6837117f1b4Smrg   /** Set rasterization mode */
6847117f1b4Smrg   void (*RenderMode)(GLcontext *ctx, GLenum mode );
6857117f1b4Smrg   /** Define the scissor box */
6867117f1b4Smrg   void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
6877117f1b4Smrg   /** Select flat or smooth shading */
6887117f1b4Smrg   void (*ShadeModel)(GLcontext *ctx, GLenum mode);
6897117f1b4Smrg   /** OpenGL 2.0 two-sided StencilFunc */
6907117f1b4Smrg   void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func,
6917117f1b4Smrg                               GLint ref, GLuint mask);
6927117f1b4Smrg   /** OpenGL 2.0 two-sided StencilMask */
6937117f1b4Smrg   void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask);
6947117f1b4Smrg   /** OpenGL 2.0 two-sided StencilOp */
6957117f1b4Smrg   void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail,
6967117f1b4Smrg                             GLenum zfail, GLenum zpass);
6977117f1b4Smrg   /** Control the generation of texture coordinates */
6987117f1b4Smrg   void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname,
6997117f1b4Smrg		  const GLfloat *params);
7007117f1b4Smrg   /** Set texture environment parameters */
7017117f1b4Smrg   void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname,
7027117f1b4Smrg                  const GLfloat *param);
7037117f1b4Smrg   /** Set texture parameters */
7047117f1b4Smrg   void (*TexParameter)(GLcontext *ctx, GLenum target,
7057117f1b4Smrg                        struct gl_texture_object *texObj,
7067117f1b4Smrg                        GLenum pname, const GLfloat *params);
7077117f1b4Smrg   /** Set the viewport */
7087117f1b4Smrg   void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
7097117f1b4Smrg   /*@}*/
7107117f1b4Smrg
7117117f1b4Smrg
7127117f1b4Smrg   /**
7137117f1b4Smrg    * \name State-query functions
7147117f1b4Smrg    *
7157117f1b4Smrg    * Return GL_TRUE if query was completed, GL_FALSE otherwise.
7167117f1b4Smrg    */
7177117f1b4Smrg   /*@{*/
7187117f1b4Smrg   /** Return the value or values of a selected parameter */
7197117f1b4Smrg   GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result);
7207117f1b4Smrg   /** Return the value or values of a selected parameter */
7217117f1b4Smrg   GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result);
7227117f1b4Smrg   /** Return the value or values of a selected parameter */
7237117f1b4Smrg   GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result);
7247117f1b4Smrg   /** Return the value or values of a selected parameter */
7257117f1b4Smrg   GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result);
7267117f1b4Smrg   /** Return the value or values of a selected parameter */
7274a49301eSmrg   GLboolean (*GetInteger64v)(GLcontext *ctx, GLenum pname, GLint64 *result);
7284a49301eSmrg   /** Return the value or values of a selected parameter */
7297117f1b4Smrg   GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result);
7307117f1b4Smrg   /*@}*/
7317117f1b4Smrg
7327117f1b4Smrg
7337117f1b4Smrg   /**
7347117f1b4Smrg    * \name Vertex/pixel buffer object functions
7357117f1b4Smrg    */
7367117f1b4Smrg#if FEATURE_ARB_vertex_buffer_object
7377117f1b4Smrg   /*@{*/
7387117f1b4Smrg   void (*BindBuffer)( GLcontext *ctx, GLenum target,
7397117f1b4Smrg		       struct gl_buffer_object *obj );
7407117f1b4Smrg
7417117f1b4Smrg   struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer,
7427117f1b4Smrg						 GLenum target );
7437117f1b4Smrg
7447117f1b4Smrg   void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj );
7457117f1b4Smrg
7464a49301eSmrg   GLboolean (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size,
7474a49301eSmrg                            const GLvoid *data, GLenum usage,
7484a49301eSmrg                            struct gl_buffer_object *obj );
7497117f1b4Smrg
7507117f1b4Smrg   void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset,
7517117f1b4Smrg			  GLsizeiptrARB size, const GLvoid *data,
7527117f1b4Smrg			  struct gl_buffer_object *obj );
7537117f1b4Smrg
7547117f1b4Smrg   void (*GetBufferSubData)( GLcontext *ctx, GLenum target,
7557117f1b4Smrg			     GLintptrARB offset, GLsizeiptrARB size,
7567117f1b4Smrg			     GLvoid *data, struct gl_buffer_object *obj );
7577117f1b4Smrg
7587117f1b4Smrg   void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access,
7597117f1b4Smrg			struct gl_buffer_object *obj );
7607117f1b4Smrg
7614a49301eSmrg   void (*CopyBufferSubData)( GLcontext *ctx,
7624a49301eSmrg                              struct gl_buffer_object *src,
7634a49301eSmrg                              struct gl_buffer_object *dst,
7644a49301eSmrg                              GLintptr readOffset, GLintptr writeOffset,
7654a49301eSmrg                              GLsizeiptr size );
7664a49301eSmrg
7674a49301eSmrg   /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
7684a49301eSmrg    */
7694a49301eSmrg   void * (*MapBufferRange)( GLcontext *ctx, GLenum target,
7704a49301eSmrg                             GLintptr offset, GLsizeiptr length, GLbitfield access,
7714a49301eSmrg                             struct gl_buffer_object *obj);
7724a49301eSmrg
7734a49301eSmrg   void (*FlushMappedBufferRange) (GLcontext *ctx, GLenum target,
7744a49301eSmrg                                   GLintptr offset, GLsizeiptr length,
7754a49301eSmrg                                   struct gl_buffer_object *obj);
7764a49301eSmrg
7777117f1b4Smrg   GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target,
7787117f1b4Smrg			     struct gl_buffer_object *obj );
7797117f1b4Smrg   /*@}*/
7807117f1b4Smrg#endif
7817117f1b4Smrg
7827117f1b4Smrg   /**
7837117f1b4Smrg    * \name Functions for GL_EXT_framebuffer_object
7847117f1b4Smrg    */
7857117f1b4Smrg#if FEATURE_EXT_framebuffer_object
7867117f1b4Smrg   /*@{*/
7877117f1b4Smrg   struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
7887117f1b4Smrg   struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
7897117f1b4Smrg   void (*BindFramebuffer)(GLcontext *ctx, GLenum target,
790c1f859d4Smrg                           struct gl_framebuffer *fb, struct gl_framebuffer *fbread);
7917117f1b4Smrg   void (*FramebufferRenderbuffer)(GLcontext *ctx,
7927117f1b4Smrg                                   struct gl_framebuffer *fb,
7937117f1b4Smrg                                   GLenum attachment,
7947117f1b4Smrg                                   struct gl_renderbuffer *rb);
7957117f1b4Smrg   void (*RenderTexture)(GLcontext *ctx,
7967117f1b4Smrg                         struct gl_framebuffer *fb,
7977117f1b4Smrg                         struct gl_renderbuffer_attachment *att);
7987117f1b4Smrg   void (*FinishRenderTexture)(GLcontext *ctx,
7997117f1b4Smrg                               struct gl_renderbuffer_attachment *att);
8004a49301eSmrg   void (*ValidateFramebuffer)(GLcontext *ctx,
8014a49301eSmrg                               struct gl_framebuffer *fb);
8027117f1b4Smrg   /*@}*/
8037117f1b4Smrg#endif
8047117f1b4Smrg#if FEATURE_EXT_framebuffer_blit
8057117f1b4Smrg   void (*BlitFramebuffer)(GLcontext *ctx,
8067117f1b4Smrg                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
8077117f1b4Smrg                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
8087117f1b4Smrg                           GLbitfield mask, GLenum filter);
8097117f1b4Smrg#endif
8107117f1b4Smrg
8117117f1b4Smrg   /**
8127117f1b4Smrg    * \name Query objects
8137117f1b4Smrg    */
8147117f1b4Smrg   /*@{*/
8157117f1b4Smrg   struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id);
816c1f859d4Smrg   void (*DeleteQuery)(GLcontext *ctx, struct gl_query_object *q);
817c1f859d4Smrg   void (*BeginQuery)(GLcontext *ctx, struct gl_query_object *q);
818c1f859d4Smrg   void (*EndQuery)(GLcontext *ctx, struct gl_query_object *q);
819c1f859d4Smrg   void (*CheckQuery)(GLcontext *ctx, struct gl_query_object *q);
820c1f859d4Smrg   void (*WaitQuery)(GLcontext *ctx, struct gl_query_object *q);
8217117f1b4Smrg   /*@}*/
8227117f1b4Smrg
8237117f1b4Smrg
8247117f1b4Smrg   /**
8257117f1b4Smrg    * \name Vertex Array objects
8267117f1b4Smrg    */
8277117f1b4Smrg   /*@{*/
8287117f1b4Smrg   struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id);
8297117f1b4Smrg   void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
8307117f1b4Smrg   void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj);
8317117f1b4Smrg   /*@}*/
8327117f1b4Smrg
8337117f1b4Smrg   /**
8347117f1b4Smrg    * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
8357117f1b4Smrg    */
8367117f1b4Smrg   /*@{*/
8377117f1b4Smrg   void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader);
8387117f1b4Smrg   void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index,
8397117f1b4Smrg                              const GLcharARB *name);
8407117f1b4Smrg   void (*CompileShader)(GLcontext *ctx, GLuint shader);
8417117f1b4Smrg   GLuint (*CreateShader)(GLcontext *ctx, GLenum type);
8427117f1b4Smrg   GLuint (*CreateProgram)(GLcontext *ctx);
8437117f1b4Smrg   void (*DeleteProgram2)(GLcontext *ctx, GLuint program);
8447117f1b4Smrg   void (*DeleteShader)(GLcontext *ctx, GLuint shader);
8457117f1b4Smrg   void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader);
8467117f1b4Smrg   void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index,
8477117f1b4Smrg                           GLsizei maxLength, GLsizei * length, GLint * size,
8487117f1b4Smrg                           GLenum * type, GLcharARB * name);
8497117f1b4Smrg   void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index,
8507117f1b4Smrg                            GLsizei maxLength, GLsizei *length, GLint *size,
8517117f1b4Smrg                            GLenum *type, GLcharARB *name);
8527117f1b4Smrg   void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount,
8537117f1b4Smrg                              GLsizei *count, GLuint *obj);
8547117f1b4Smrg   GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program,
8557117f1b4Smrg                              const GLcharARB *name);
8567117f1b4Smrg   GLuint (*GetHandle)(GLcontext *ctx, GLenum pname);
8577117f1b4Smrg   void (*GetProgramiv)(GLcontext *ctx, GLuint program,
8587117f1b4Smrg                        GLenum pname, GLint *params);
8597117f1b4Smrg   void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize,
8607117f1b4Smrg                             GLsizei *length, GLchar *infoLog);
8617117f1b4Smrg   void (*GetShaderiv)(GLcontext *ctx, GLuint shader,
8627117f1b4Smrg                       GLenum pname, GLint *params);
8637117f1b4Smrg   void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize,
8647117f1b4Smrg                            GLsizei *length, GLchar *infoLog);
8657117f1b4Smrg   void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength,
8667117f1b4Smrg                           GLsizei *length, GLcharARB *sourceOut);
8677117f1b4Smrg   void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location,
8687117f1b4Smrg                        GLfloat *params);
869c1f859d4Smrg   void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location,
870c1f859d4Smrg                        GLint *params);
8717117f1b4Smrg   GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program,
8727117f1b4Smrg                               const GLcharARB *name);
8737117f1b4Smrg   GLboolean (*IsProgram)(GLcontext *ctx, GLuint name);
8747117f1b4Smrg   GLboolean (*IsShader)(GLcontext *ctx, GLuint name);
8757117f1b4Smrg   void (*LinkProgram)(GLcontext *ctx, GLuint program);
8767117f1b4Smrg   void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source);
8777117f1b4Smrg   void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count,
8787117f1b4Smrg                   const GLvoid *values, GLenum type);
8797117f1b4Smrg   void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows,
8804a49301eSmrg                         GLint location, GLsizei count,
8817117f1b4Smrg                         GLboolean transpose, const GLfloat *values);
8827117f1b4Smrg   void (*UseProgram)(GLcontext *ctx, GLuint program);
8837117f1b4Smrg   void (*ValidateProgram)(GLcontext *ctx, GLuint program);
8847117f1b4Smrg   /* XXX many more to come */
8857117f1b4Smrg   /*@}*/
8867117f1b4Smrg
8877117f1b4Smrg
8887117f1b4Smrg   /**
8897117f1b4Smrg    * \name Support for multiple T&L engines
8907117f1b4Smrg    */
8917117f1b4Smrg   /*@{*/
8927117f1b4Smrg
8937117f1b4Smrg   /**
8947117f1b4Smrg    * Bitmask of state changes that require the current T&L module to be
8957117f1b4Smrg    * validated, using ValidateTnlModule() below.
8967117f1b4Smrg    */
8977117f1b4Smrg   GLuint NeedValidate;
8987117f1b4Smrg
8997117f1b4Smrg   /**
9007117f1b4Smrg    * Validate the current T&L module.
9017117f1b4Smrg    *
9027117f1b4Smrg    * This is called directly after UpdateState() when a state change that has
9037117f1b4Smrg    * occurred matches the dd_function_table::NeedValidate bitmask above.  This
9047117f1b4Smrg    * ensures all computed values are up to date, thus allowing the driver to
9057117f1b4Smrg    * decide if the current T&L module needs to be swapped out.
9067117f1b4Smrg    *
9077117f1b4Smrg    * This must be non-NULL if a driver installs a custom T&L module and sets
9087117f1b4Smrg    * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
9097117f1b4Smrg    */
9107117f1b4Smrg   void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );
9117117f1b4Smrg
9127117f1b4Smrg
913c1f859d4Smrg#define PRIM_OUTSIDE_BEGIN_END   (GL_POLYGON+1)
914c1f859d4Smrg#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
915c1f859d4Smrg#define PRIM_UNKNOWN             (GL_POLYGON+3)
9167117f1b4Smrg
9177117f1b4Smrg   /**
9187117f1b4Smrg    * Set by the driver-supplied T&L engine.
9197117f1b4Smrg    *
9207117f1b4Smrg    * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
9217117f1b4Smrg    */
9227117f1b4Smrg   GLuint CurrentExecPrimitive;
9237117f1b4Smrg
9247117f1b4Smrg   /**
9257117f1b4Smrg    * Current state of an in-progress compilation.
9267117f1b4Smrg    *
9277117f1b4Smrg    * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
9287117f1b4Smrg    * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
9297117f1b4Smrg    */
9307117f1b4Smrg   GLuint CurrentSavePrimitive;
9317117f1b4Smrg
9327117f1b4Smrg
9337117f1b4Smrg#define FLUSH_STORED_VERTICES 0x1
9347117f1b4Smrg#define FLUSH_UPDATE_CURRENT  0x2
9357117f1b4Smrg   /**
9367117f1b4Smrg    * Set by the driver-supplied T&L engine whenever vertices are buffered
9377117f1b4Smrg    * between glBegin()/glEnd() objects or __GLcontextRec::Current is not
9387117f1b4Smrg    * updated.
9397117f1b4Smrg    *
9407117f1b4Smrg    * The dd_function_table::FlushVertices call below may be used to resolve
9417117f1b4Smrg    * these conditions.
9427117f1b4Smrg    */
9437117f1b4Smrg   GLuint NeedFlush;
9447117f1b4Smrg   GLuint SaveNeedFlush;
9457117f1b4Smrg
9464a49301eSmrg
9474a49301eSmrg   /* Called prior to any of the GLvertexformat functions being
9484a49301eSmrg    * called.  Paired with Driver.FlushVertices().
9494a49301eSmrg    */
9504a49301eSmrg   void (*BeginVertices)( GLcontext *ctx );
9514a49301eSmrg
9527117f1b4Smrg   /**
9537117f1b4Smrg    * If inside glBegin()/glEnd(), it should ASSERT(0).  Otherwise, if
9547117f1b4Smrg    * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
9557117f1b4Smrg    * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
9567117f1b4Smrg    * __GLcontextRec::Current and gl_light_attrib::Material
9577117f1b4Smrg    *
9587117f1b4Smrg    * Note that the default T&L engine never clears the
9597117f1b4Smrg    * FLUSH_UPDATE_CURRENT bit, even after performing the update.
9607117f1b4Smrg    */
9617117f1b4Smrg   void (*FlushVertices)( GLcontext *ctx, GLuint flags );
9627117f1b4Smrg   void (*SaveFlushVertices)( GLcontext *ctx );
9637117f1b4Smrg
9647117f1b4Smrg   /**
9657117f1b4Smrg    * Give the driver the opportunity to hook in its own vtxfmt for
9667117f1b4Smrg    * compiling optimized display lists.  This is called on each valid
9677117f1b4Smrg    * glBegin() during list compilation.
9687117f1b4Smrg    */
9697117f1b4Smrg   GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode );
9707117f1b4Smrg
9717117f1b4Smrg   /**
9727117f1b4Smrg    * Notify driver that the special derived value _NeedEyeCoords has
9737117f1b4Smrg    * changed.
9747117f1b4Smrg    */
9757117f1b4Smrg   void (*LightingSpaceChange)( GLcontext *ctx );
9767117f1b4Smrg
9777117f1b4Smrg   /**
9787117f1b4Smrg    * Called by glNewList().
9797117f1b4Smrg    *
9807117f1b4Smrg    * Let the T&L component know what is going on with display lists
9817117f1b4Smrg    * in time to make changes to dispatch tables, etc.
9827117f1b4Smrg    */
9837117f1b4Smrg   void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode );
9847117f1b4Smrg   /**
9857117f1b4Smrg    * Called by glEndList().
9867117f1b4Smrg    *
9877117f1b4Smrg    * \sa dd_function_table::NewList.
9887117f1b4Smrg    */
9897117f1b4Smrg   void (*EndList)( GLcontext *ctx );
9907117f1b4Smrg
9917117f1b4Smrg   /**
9927117f1b4Smrg    * Called by glCallList(s).
9937117f1b4Smrg    *
9947117f1b4Smrg    * Notify the T&L component before and after calling a display list.
9957117f1b4Smrg    */
9967117f1b4Smrg   void (*BeginCallList)( GLcontext *ctx,
9974a49301eSmrg			  struct gl_display_list *dlist );
9987117f1b4Smrg   /**
9997117f1b4Smrg    * Called by glEndCallList().
10007117f1b4Smrg    *
10017117f1b4Smrg    * \sa dd_function_table::BeginCallList.
10027117f1b4Smrg    */
10037117f1b4Smrg   void (*EndCallList)( GLcontext *ctx );
10047117f1b4Smrg
10054a49301eSmrg
10064a49301eSmrg#if FEATURE_ARB_sync
10074a49301eSmrg   /**
10084a49301eSmrg    * \name GL_ARB_sync interfaces
10094a49301eSmrg    */
10104a49301eSmrg   /*@{*/
10114a49301eSmrg   struct gl_sync_object * (*NewSyncObject)(GLcontext *, GLenum);
10124a49301eSmrg   void (*FenceSync)(GLcontext *, struct gl_sync_object *, GLenum, GLbitfield);
10134a49301eSmrg   void (*DeleteSyncObject)(GLcontext *, struct gl_sync_object *);
10144a49301eSmrg   void (*CheckSync)(GLcontext *, struct gl_sync_object *);
10154a49301eSmrg   void (*ClientWaitSync)(GLcontext *, struct gl_sync_object *,
10164a49301eSmrg			  GLbitfield, GLuint64);
10174a49301eSmrg   void (*ServerWaitSync)(GLcontext *, struct gl_sync_object *,
10184a49301eSmrg			  GLbitfield, GLuint64);
10194a49301eSmrg   /*@}*/
10204a49301eSmrg#endif
10217117f1b4Smrg};
10227117f1b4Smrg
10237117f1b4Smrg
10247117f1b4Smrg/**
10257117f1b4Smrg * Transform/Clip/Lighting interface
10267117f1b4Smrg *
10277117f1b4Smrg * Drivers present a reduced set of the functions possible in
10287117f1b4Smrg * glBegin()/glEnd() objects.  Core mesa provides translation stubs for the
10297117f1b4Smrg * remaining functions to map down to these entry points.
10307117f1b4Smrg *
10317117f1b4Smrg * These are the initial values to be installed into dispatch by
10327117f1b4Smrg * mesa.  If the T&L driver wants to modify the dispatch table
10337117f1b4Smrg * while installed, it must do so itself.  It would be possible for
10347117f1b4Smrg * the vertexformat to install it's own initial values for these
10357117f1b4Smrg * functions, but this way there is an obvious list of what is
10367117f1b4Smrg * expected of the driver.
10377117f1b4Smrg *
10387117f1b4Smrg * If the driver wants to hook in entry points other than those
10397117f1b4Smrg * listed, it must restore them to their original values in
10407117f1b4Smrg * the disable() callback, below.
10417117f1b4Smrg */
10427117f1b4Smrgtypedef struct {
10437117f1b4Smrg   /**
10447117f1b4Smrg    * \name Vertex
10457117f1b4Smrg    */
10467117f1b4Smrg   /*@{*/
10477117f1b4Smrg   void (GLAPIENTRYP ArrayElement)( GLint ); /* NOTE */
10487117f1b4Smrg   void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
10497117f1b4Smrg   void (GLAPIENTRYP Color3fv)( const GLfloat * );
10507117f1b4Smrg   void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10517117f1b4Smrg   void (GLAPIENTRYP Color4fv)( const GLfloat * );
10527117f1b4Smrg   void (GLAPIENTRYP EdgeFlag)( GLboolean );
10537117f1b4Smrg   void (GLAPIENTRYP EvalCoord1f)( GLfloat );          /* NOTE */
10547117f1b4Smrg   void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); /* NOTE */
10557117f1b4Smrg   void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */
10567117f1b4Smrg   void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); /* NOTE */
10577117f1b4Smrg   void (GLAPIENTRYP EvalPoint1)( GLint );             /* NOTE */
10587117f1b4Smrg   void (GLAPIENTRYP EvalPoint2)( GLint, GLint );      /* NOTE */
10597117f1b4Smrg   void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
10607117f1b4Smrg   void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
10617117f1b4Smrg   void (GLAPIENTRYP Indexf)( GLfloat );
10627117f1b4Smrg   void (GLAPIENTRYP Indexfv)( const GLfloat * );
10637117f1b4Smrg   void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */
10647117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
10657117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
10667117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
10677117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
10687117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
10697117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
10707117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
10717117f1b4Smrg   void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
10727117f1b4Smrg   void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
10737117f1b4Smrg   void (GLAPIENTRYP Normal3fv)( const GLfloat * );
10747117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
10757117f1b4Smrg   void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
10767117f1b4Smrg   void (GLAPIENTRYP TexCoord1f)( GLfloat );
10777117f1b4Smrg   void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
10787117f1b4Smrg   void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
10797117f1b4Smrg   void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
10807117f1b4Smrg   void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
10817117f1b4Smrg   void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
10827117f1b4Smrg   void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10837117f1b4Smrg   void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
10847117f1b4Smrg   void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
10857117f1b4Smrg   void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
10867117f1b4Smrg   void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
10877117f1b4Smrg   void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
10887117f1b4Smrg   void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
10897117f1b4Smrg   void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
10907117f1b4Smrg   void (GLAPIENTRYP CallList)( GLuint );	/* NOTE */
10917117f1b4Smrg   void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );	/* NOTE */
10927117f1b4Smrg   void (GLAPIENTRYP Begin)( GLenum );
10937117f1b4Smrg   void (GLAPIENTRYP End)( void );
10947117f1b4Smrg   /* GL_NV_vertex_program */
10957117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
10967117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
10977117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
10987117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
10997117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
11007117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
11017117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
11027117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
11037117f1b4Smrg#if FEATURE_ARB_vertex_program
11047117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
11057117f1b4Smrg   void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
11067117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
11077117f1b4Smrg   void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
11087117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
11097117f1b4Smrg   void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
11107117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
11117117f1b4Smrg   void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
11127117f1b4Smrg#endif
11137117f1b4Smrg   /*@}*/
11147117f1b4Smrg
11157117f1b4Smrg   /*
11167117f1b4Smrg    */
11177117f1b4Smrg   void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
11187117f1b4Smrg
11197117f1b4Smrg   /**
11207117f1b4Smrg    * \name Array
11217117f1b4Smrg    */
11227117f1b4Smrg   /*@{*/
11237117f1b4Smrg   void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count );
11247117f1b4Smrg   void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type,
11257117f1b4Smrg			 const GLvoid *indices );
11267117f1b4Smrg   void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start,
11277117f1b4Smrg			      GLuint end, GLsizei count,
11287117f1b4Smrg			      GLenum type, const GLvoid *indices );
11294a49301eSmrg   void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count,
11304a49301eSmrg					    GLenum type,
11314a49301eSmrg					    const GLvoid **indices,
11324a49301eSmrg					    GLsizei primcount);
11334a49301eSmrg   void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
11344a49301eSmrg					      GLenum type,
11354a49301eSmrg					      const GLvoid *indices,
11364a49301eSmrg					      GLint basevertex );
11374a49301eSmrg   void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
11384a49301eSmrg						   GLuint end, GLsizei count,
11394a49301eSmrg						   GLenum type,
11404a49301eSmrg						   const GLvoid *indices,
11414a49301eSmrg						   GLint basevertex);
11424a49301eSmrg   void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
11434a49301eSmrg						   const GLsizei *count,
11444a49301eSmrg						   GLenum type,
11454a49301eSmrg						   const GLvoid **indices,
11464a49301eSmrg						   GLsizei primcount,
11474a49301eSmrg						   const GLint *basevertex);
11487117f1b4Smrg   /*@}*/
11497117f1b4Smrg
11507117f1b4Smrg   /**
11517117f1b4Smrg    * \name Eval
11527117f1b4Smrg    *
11537117f1b4Smrg    * If you don't support eval, fallback to the default vertex format
11547117f1b4Smrg    * on receiving an eval call and use the pipeline mechanism to
11557117f1b4Smrg    * provide partial T&L acceleration.
11567117f1b4Smrg    *
11577117f1b4Smrg    * Mesa will provide a set of helper functions to do eval within
11587117f1b4Smrg    * accelerated vertex formats, eventually...
11597117f1b4Smrg    */
11607117f1b4Smrg   /*@{*/
11617117f1b4Smrg   void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 );
11627117f1b4Smrg   void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
11637117f1b4Smrg   /*@}*/
11647117f1b4Smrg
11657117f1b4Smrg} GLvertexformat;
11667117f1b4Smrg
11677117f1b4Smrg
11687117f1b4Smrg#endif /* DD_INCLUDED */
1169