dd.h revision 3464ebd5
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 363464ebd5Sriastradh#include "glheader.h" 374a49301eSmrg 383464ebd5Sriastradhstruct gl_buffer_object; 393464ebd5Sriastradhstruct gl_context; 403464ebd5Sriastradhstruct gl_display_list; 413464ebd5Sriastradhstruct gl_framebuffer; 423464ebd5Sriastradhstruct gl_pixelstore_attrib; 433464ebd5Sriastradhstruct gl_program; 443464ebd5Sriastradhstruct gl_renderbuffer; 453464ebd5Sriastradhstruct gl_renderbuffer_attachment; 463464ebd5Sriastradhstruct gl_shader; 473464ebd5Sriastradhstruct gl_shader_program; 483464ebd5Sriastradhstruct gl_texture_image; 493464ebd5Sriastradhstruct gl_texture_object; 503464ebd5Sriastradh 513464ebd5Sriastradh/* GL_ARB_vertex_buffer_object */ 524a49301eSmrg/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return 534a49301eSmrg * NULL) if buffer is unavailable for immediate mapping. 544a49301eSmrg * 554a49301eSmrg * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it 564a49301eSmrg * would require more book-keeping in the driver than seems necessary 574a49301eSmrg * at this point. 584a49301eSmrg * 594a49301eSmrg * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't 604a49301eSmrg * want to provoke the driver to throw away the old storage, we will 614a49301eSmrg * respect the contents of already referenced data. 624a49301eSmrg */ 634a49301eSmrg#define MESA_MAP_NOWAIT_BIT 0x0040 644a49301eSmrg 657117f1b4Smrg 667117f1b4Smrg/** 677117f1b4Smrg * Device driver function table. 687117f1b4Smrg * Core Mesa uses these function pointers to call into device drivers. 697117f1b4Smrg * Most of these functions directly correspond to OpenGL state commands. 707117f1b4Smrg * Core Mesa will call these functions after error checking has been done 717117f1b4Smrg * so that the drivers don't have to worry about error testing. 727117f1b4Smrg * 737117f1b4Smrg * Vertex transformation/clipping/lighting is patched into the T&L module. 747117f1b4Smrg * Rasterization functions are patched into the swrast module. 757117f1b4Smrg * 767117f1b4Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c 777117f1b4Smrg * file should be updated too!!! 787117f1b4Smrg */ 797117f1b4Smrgstruct dd_function_table { 807117f1b4Smrg /** 817117f1b4Smrg * Return a string as needed by glGetString(). 827117f1b4Smrg * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be 837117f1b4Smrg * returned. 847117f1b4Smrg */ 853464ebd5Sriastradh const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name ); 867117f1b4Smrg 877117f1b4Smrg /** 887117f1b4Smrg * Notify the driver after Mesa has made some internal state changes. 897117f1b4Smrg * 907117f1b4Smrg * This is in addition to any state change callbacks Mesa may already have 917117f1b4Smrg * made. 927117f1b4Smrg */ 933464ebd5Sriastradh void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state ); 947117f1b4Smrg 957117f1b4Smrg /** 967117f1b4Smrg * Get the width and height of the named buffer/window. 977117f1b4Smrg * 987117f1b4Smrg * Mesa uses this to determine when the driver's window size has changed. 997117f1b4Smrg * XXX OBSOLETE: this function will be removed in the future. 1007117f1b4Smrg */ 1013464ebd5Sriastradh void (*GetBufferSize)( struct gl_framebuffer *buffer, 1027117f1b4Smrg GLuint *width, GLuint *height ); 1037117f1b4Smrg 1047117f1b4Smrg /** 1057117f1b4Smrg * Resize the given framebuffer to the given size. 1067117f1b4Smrg * XXX OBSOLETE: this function will be removed in the future. 1077117f1b4Smrg */ 1083464ebd5Sriastradh void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb, 1097117f1b4Smrg GLuint width, GLuint height); 1107117f1b4Smrg 1117117f1b4Smrg /** 1127117f1b4Smrg * Called whenever an error is generated. 1133464ebd5Sriastradh * __struct gl_contextRec::ErrorValue contains the error value. 1147117f1b4Smrg */ 1153464ebd5Sriastradh void (*Error)( struct gl_context *ctx ); 1167117f1b4Smrg 1177117f1b4Smrg /** 1187117f1b4Smrg * This is called whenever glFinish() is called. 1197117f1b4Smrg */ 1203464ebd5Sriastradh void (*Finish)( struct gl_context *ctx ); 1217117f1b4Smrg 1227117f1b4Smrg /** 1237117f1b4Smrg * This is called whenever glFlush() is called. 1247117f1b4Smrg */ 1253464ebd5Sriastradh void (*Flush)( struct gl_context *ctx ); 1267117f1b4Smrg 1277117f1b4Smrg /** 1287117f1b4Smrg * Clear the color/depth/stencil/accum buffer(s). 1297117f1b4Smrg * \param buffers a bitmask of BUFFER_BIT_* flags indicating which 1307117f1b4Smrg * renderbuffers need to be cleared. 1317117f1b4Smrg */ 1323464ebd5Sriastradh void (*Clear)( struct gl_context *ctx, GLbitfield buffers ); 1337117f1b4Smrg 1347117f1b4Smrg /** 1357117f1b4Smrg * Execute glAccum command. 1367117f1b4Smrg */ 1373464ebd5Sriastradh void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value ); 1387117f1b4Smrg 1397117f1b4Smrg 140c1f859d4Smrg /** 141c1f859d4Smrg * Execute glRasterPos, updating the ctx->Current.Raster fields 142c1f859d4Smrg */ 1433464ebd5Sriastradh void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] ); 144c1f859d4Smrg 1457117f1b4Smrg /** 1467117f1b4Smrg * \name Image-related functions 1477117f1b4Smrg */ 1487117f1b4Smrg /*@{*/ 1497117f1b4Smrg 1507117f1b4Smrg /** 1517117f1b4Smrg * Called by glDrawPixels(). 1527117f1b4Smrg * \p unpack describes how to unpack the source image data. 1537117f1b4Smrg */ 1543464ebd5Sriastradh void (*DrawPixels)( struct gl_context *ctx, 1557117f1b4Smrg GLint x, GLint y, GLsizei width, GLsizei height, 1567117f1b4Smrg GLenum format, GLenum type, 1577117f1b4Smrg const struct gl_pixelstore_attrib *unpack, 1587117f1b4Smrg const GLvoid *pixels ); 1597117f1b4Smrg 1607117f1b4Smrg /** 1617117f1b4Smrg * Called by glReadPixels(). 1627117f1b4Smrg */ 1633464ebd5Sriastradh void (*ReadPixels)( struct gl_context *ctx, 1647117f1b4Smrg GLint x, GLint y, GLsizei width, GLsizei height, 1657117f1b4Smrg GLenum format, GLenum type, 1667117f1b4Smrg const struct gl_pixelstore_attrib *unpack, 1677117f1b4Smrg GLvoid *dest ); 1687117f1b4Smrg 1697117f1b4Smrg /** 1707117f1b4Smrg * Called by glCopyPixels(). 1717117f1b4Smrg */ 1723464ebd5Sriastradh void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy, 1737117f1b4Smrg GLsizei width, GLsizei height, 1747117f1b4Smrg GLint dstx, GLint dsty, GLenum type ); 1757117f1b4Smrg 1767117f1b4Smrg /** 1777117f1b4Smrg * Called by glBitmap(). 1787117f1b4Smrg */ 1793464ebd5Sriastradh void (*Bitmap)( struct gl_context *ctx, 1807117f1b4Smrg GLint x, GLint y, GLsizei width, GLsizei height, 1817117f1b4Smrg const struct gl_pixelstore_attrib *unpack, 1827117f1b4Smrg const GLubyte *bitmap ); 1837117f1b4Smrg /*@}*/ 1847117f1b4Smrg 1857117f1b4Smrg 1867117f1b4Smrg /** 1877117f1b4Smrg * \name Texture image functions 1887117f1b4Smrg */ 1897117f1b4Smrg /*@{*/ 1907117f1b4Smrg 1917117f1b4Smrg /** 1927117f1b4Smrg * Choose texture format. 1937117f1b4Smrg * 1947117f1b4Smrg * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback 1957117f1b4Smrg * functions. The driver should examine \p internalFormat and return a 196cdc920a0Smrg * gl_format value. 1977117f1b4Smrg */ 1983464ebd5Sriastradh GLuint (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat, 1994a49301eSmrg GLenum srcFormat, GLenum srcType ); 2007117f1b4Smrg 2017117f1b4Smrg /** 2027117f1b4Smrg * Called by glTexImage1D(). 2037117f1b4Smrg * 2047117f1b4Smrg * \param target user specified. 2057117f1b4Smrg * \param format user specified. 2067117f1b4Smrg * \param type user specified. 2077117f1b4Smrg * \param pixels user specified. 2087117f1b4Smrg * \param packing indicates the image packing of pixels. 2097117f1b4Smrg * \param texObj is the target texture object. 2107117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 2117117f1b4Smrg * width, \p height, \p depth, \p border and \p internalFormat information. 2127117f1b4Smrg * 2137117f1b4Smrg * \p retainInternalCopy is returned by this function and indicates whether 2147117f1b4Smrg * core Mesa should keep an internal copy of the texture image. 2157117f1b4Smrg * 2167117f1b4Smrg * Drivers should call a fallback routine from texstore.c if needed. 2177117f1b4Smrg */ 2183464ebd5Sriastradh void (*TexImage1D)( struct gl_context *ctx, GLenum target, GLint level, 2197117f1b4Smrg GLint internalFormat, 2207117f1b4Smrg GLint width, GLint border, 2217117f1b4Smrg GLenum format, GLenum type, const GLvoid *pixels, 2227117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2237117f1b4Smrg struct gl_texture_object *texObj, 2247117f1b4Smrg struct gl_texture_image *texImage ); 2257117f1b4Smrg 2267117f1b4Smrg /** 2277117f1b4Smrg * Called by glTexImage2D(). 2287117f1b4Smrg * 2297117f1b4Smrg * \sa dd_function_table::TexImage1D. 2307117f1b4Smrg */ 2313464ebd5Sriastradh void (*TexImage2D)( struct gl_context *ctx, GLenum target, GLint level, 2327117f1b4Smrg GLint internalFormat, 2337117f1b4Smrg GLint width, GLint height, GLint border, 2347117f1b4Smrg GLenum format, GLenum type, const GLvoid *pixels, 2357117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2367117f1b4Smrg struct gl_texture_object *texObj, 2377117f1b4Smrg struct gl_texture_image *texImage ); 2387117f1b4Smrg 2397117f1b4Smrg /** 2407117f1b4Smrg * Called by glTexImage3D(). 2417117f1b4Smrg * 2427117f1b4Smrg * \sa dd_function_table::TexImage1D. 2437117f1b4Smrg */ 2443464ebd5Sriastradh void (*TexImage3D)( struct gl_context *ctx, GLenum target, GLint level, 2457117f1b4Smrg GLint internalFormat, 2467117f1b4Smrg GLint width, GLint height, GLint depth, GLint border, 2477117f1b4Smrg GLenum format, GLenum type, const GLvoid *pixels, 2487117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2497117f1b4Smrg struct gl_texture_object *texObj, 2507117f1b4Smrg struct gl_texture_image *texImage ); 2517117f1b4Smrg 2527117f1b4Smrg /** 2537117f1b4Smrg * Called by glTexSubImage1D(). 2547117f1b4Smrg * 2557117f1b4Smrg * \param target user specified. 2567117f1b4Smrg * \param level user specified. 2577117f1b4Smrg * \param xoffset user specified. 2587117f1b4Smrg * \param yoffset user specified. 2597117f1b4Smrg * \param zoffset user specified. 2607117f1b4Smrg * \param width user specified. 2617117f1b4Smrg * \param height user specified. 2627117f1b4Smrg * \param depth user specified. 2637117f1b4Smrg * \param format user specified. 2647117f1b4Smrg * \param type user specified. 2657117f1b4Smrg * \param pixels user specified. 2667117f1b4Smrg * \param packing indicates the image packing of pixels. 2677117f1b4Smrg * \param texObj is the target texture object. 2687117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 2697117f1b4Smrg * width, \p height, \p border and \p internalFormat information. 2707117f1b4Smrg * 2717117f1b4Smrg * The driver should use a fallback routine from texstore.c if needed. 2727117f1b4Smrg */ 2733464ebd5Sriastradh void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, 2747117f1b4Smrg GLint xoffset, GLsizei width, 2757117f1b4Smrg GLenum format, GLenum type, 2767117f1b4Smrg const GLvoid *pixels, 2777117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2787117f1b4Smrg struct gl_texture_object *texObj, 2797117f1b4Smrg struct gl_texture_image *texImage ); 2807117f1b4Smrg 2817117f1b4Smrg /** 2827117f1b4Smrg * Called by glTexSubImage2D(). 2837117f1b4Smrg * 2847117f1b4Smrg * \sa dd_function_table::TexSubImage1D. 2857117f1b4Smrg */ 2863464ebd5Sriastradh void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, 2877117f1b4Smrg GLint xoffset, GLint yoffset, 2887117f1b4Smrg GLsizei width, GLsizei height, 2897117f1b4Smrg GLenum format, GLenum type, 2907117f1b4Smrg const GLvoid *pixels, 2917117f1b4Smrg const struct gl_pixelstore_attrib *packing, 2927117f1b4Smrg struct gl_texture_object *texObj, 2937117f1b4Smrg struct gl_texture_image *texImage ); 2947117f1b4Smrg 2957117f1b4Smrg /** 2967117f1b4Smrg * Called by glTexSubImage3D(). 2977117f1b4Smrg * 2987117f1b4Smrg * \sa dd_function_table::TexSubImage1D. 2997117f1b4Smrg */ 3003464ebd5Sriastradh void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, 3017117f1b4Smrg GLint xoffset, GLint yoffset, GLint zoffset, 3027117f1b4Smrg GLsizei width, GLsizei height, GLint depth, 3037117f1b4Smrg GLenum format, GLenum type, 3047117f1b4Smrg const GLvoid *pixels, 3057117f1b4Smrg const struct gl_pixelstore_attrib *packing, 3067117f1b4Smrg struct gl_texture_object *texObj, 3077117f1b4Smrg struct gl_texture_image *texImage ); 3087117f1b4Smrg 3097117f1b4Smrg /** 3107117f1b4Smrg * Called by glGetTexImage(). 3117117f1b4Smrg */ 3123464ebd5Sriastradh void (*GetTexImage)( struct gl_context *ctx, GLenum target, GLint level, 3137117f1b4Smrg GLenum format, GLenum type, GLvoid *pixels, 3147117f1b4Smrg struct gl_texture_object *texObj, 3157117f1b4Smrg struct gl_texture_image *texImage ); 3167117f1b4Smrg 3177117f1b4Smrg /** 3187117f1b4Smrg * Called by glCopyTexImage1D(). 3197117f1b4Smrg * 3207117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3217117f1b4Smrg */ 3223464ebd5Sriastradh void (*CopyTexImage1D)( struct gl_context *ctx, GLenum target, GLint level, 3237117f1b4Smrg GLenum internalFormat, GLint x, GLint y, 3247117f1b4Smrg GLsizei width, GLint border ); 3257117f1b4Smrg 3267117f1b4Smrg /** 3277117f1b4Smrg * Called by glCopyTexImage2D(). 3287117f1b4Smrg * 3297117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3307117f1b4Smrg */ 3313464ebd5Sriastradh void (*CopyTexImage2D)( struct gl_context *ctx, GLenum target, GLint level, 3327117f1b4Smrg GLenum internalFormat, GLint x, GLint y, 3337117f1b4Smrg GLsizei width, GLsizei height, GLint border ); 3347117f1b4Smrg 3357117f1b4Smrg /** 3367117f1b4Smrg * Called by glCopyTexSubImage1D(). 3377117f1b4Smrg * 3387117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3397117f1b4Smrg */ 3403464ebd5Sriastradh void (*CopyTexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, 3417117f1b4Smrg GLint xoffset, 3427117f1b4Smrg GLint x, GLint y, GLsizei width ); 3437117f1b4Smrg /** 3447117f1b4Smrg * Called by glCopyTexSubImage2D(). 3457117f1b4Smrg * 3467117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3477117f1b4Smrg */ 3483464ebd5Sriastradh void (*CopyTexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, 3497117f1b4Smrg GLint xoffset, GLint yoffset, 3507117f1b4Smrg GLint x, GLint y, 3517117f1b4Smrg GLsizei width, GLsizei height ); 3527117f1b4Smrg /** 3537117f1b4Smrg * Called by glCopyTexSubImage3D(). 3547117f1b4Smrg * 3557117f1b4Smrg * Drivers should use a fallback routine from texstore.c if needed. 3567117f1b4Smrg */ 3573464ebd5Sriastradh void (*CopyTexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, 3587117f1b4Smrg GLint xoffset, GLint yoffset, GLint zoffset, 3597117f1b4Smrg GLint x, GLint y, 3607117f1b4Smrg GLsizei width, GLsizei height ); 3617117f1b4Smrg 362c1f859d4Smrg /** 363c1f859d4Smrg * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled. 364c1f859d4Smrg */ 3653464ebd5Sriastradh void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, 366c1f859d4Smrg struct gl_texture_object *texObj); 367c1f859d4Smrg 3687117f1b4Smrg /** 3697117f1b4Smrg * Called by glTexImage[123]D when user specifies a proxy texture 3707117f1b4Smrg * target. 3717117f1b4Smrg * 3727117f1b4Smrg * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails. 3737117f1b4Smrg */ 3743464ebd5Sriastradh GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target, 3757117f1b4Smrg GLint level, GLint internalFormat, 3767117f1b4Smrg GLenum format, GLenum type, 3777117f1b4Smrg GLint width, GLint height, 3787117f1b4Smrg GLint depth, GLint border); 3797117f1b4Smrg /*@}*/ 3807117f1b4Smrg 3817117f1b4Smrg 3827117f1b4Smrg /** 3837117f1b4Smrg * \name Compressed texture functions 3847117f1b4Smrg */ 3857117f1b4Smrg /*@{*/ 3867117f1b4Smrg 3877117f1b4Smrg /** 3887117f1b4Smrg * Called by glCompressedTexImage1D(). 3897117f1b4Smrg * 3907117f1b4Smrg * \param target user specified. 3917117f1b4Smrg * \param format user specified. 3927117f1b4Smrg * \param type user specified. 3937117f1b4Smrg * \param pixels user specified. 3947117f1b4Smrg * \param packing indicates the image packing of pixels. 3957117f1b4Smrg * \param texObj is the target texture object. 3967117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 3977117f1b4Smrg * width, \p height, \p depth, \p border and \p internalFormat information. 3987117f1b4Smrg * 3997117f1b4Smrg * \a retainInternalCopy is returned by this function and indicates whether 4007117f1b4Smrg * core Mesa should keep an internal copy of the texture image. 4017117f1b4Smrg */ 4023464ebd5Sriastradh void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target, 4037117f1b4Smrg GLint level, GLint internalFormat, 4047117f1b4Smrg GLsizei width, GLint border, 4057117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4067117f1b4Smrg struct gl_texture_object *texObj, 4077117f1b4Smrg struct gl_texture_image *texImage ); 4087117f1b4Smrg /** 4097117f1b4Smrg * Called by glCompressedTexImage2D(). 4107117f1b4Smrg * 4117117f1b4Smrg * \sa dd_function_table::CompressedTexImage1D. 4127117f1b4Smrg */ 4133464ebd5Sriastradh void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target, 4147117f1b4Smrg GLint level, GLint internalFormat, 4157117f1b4Smrg GLsizei width, GLsizei height, GLint border, 4167117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4177117f1b4Smrg struct gl_texture_object *texObj, 4187117f1b4Smrg struct gl_texture_image *texImage ); 4197117f1b4Smrg /** 4207117f1b4Smrg * Called by glCompressedTexImage3D(). 4217117f1b4Smrg * 4227117f1b4Smrg * \sa dd_function_table::CompressedTexImage3D. 4237117f1b4Smrg */ 4243464ebd5Sriastradh void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target, 4257117f1b4Smrg GLint level, GLint internalFormat, 4267117f1b4Smrg GLsizei width, GLsizei height, GLsizei depth, 4277117f1b4Smrg GLint border, 4287117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4297117f1b4Smrg struct gl_texture_object *texObj, 4307117f1b4Smrg struct gl_texture_image *texImage ); 4317117f1b4Smrg 4327117f1b4Smrg /** 4337117f1b4Smrg * Called by glCompressedTexSubImage1D(). 4347117f1b4Smrg * 4357117f1b4Smrg * \param target user specified. 4367117f1b4Smrg * \param level user specified. 4377117f1b4Smrg * \param xoffset user specified. 4387117f1b4Smrg * \param yoffset user specified. 4397117f1b4Smrg * \param zoffset user specified. 4407117f1b4Smrg * \param width user specified. 4417117f1b4Smrg * \param height user specified. 4427117f1b4Smrg * \param depth user specified. 4437117f1b4Smrg * \param imageSize user specified. 4447117f1b4Smrg * \param data user specified. 4457117f1b4Smrg * \param texObj is the target texture object. 4467117f1b4Smrg * \param texImage is the target texture image. It will have the texture \p 4477117f1b4Smrg * width, \p height, \p depth, \p border and \p internalFormat information. 4487117f1b4Smrg */ 4493464ebd5Sriastradh void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level, 4507117f1b4Smrg GLint xoffset, GLsizei width, 4517117f1b4Smrg GLenum format, 4527117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4537117f1b4Smrg struct gl_texture_object *texObj, 4547117f1b4Smrg struct gl_texture_image *texImage); 4557117f1b4Smrg /** 4567117f1b4Smrg * Called by glCompressedTexSubImage2D(). 4577117f1b4Smrg * 4587117f1b4Smrg * \sa dd_function_table::CompressedTexImage3D. 4597117f1b4Smrg */ 4603464ebd5Sriastradh void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level, 4617117f1b4Smrg GLint xoffset, GLint yoffset, 4627117f1b4Smrg GLsizei width, GLint height, 4637117f1b4Smrg GLenum format, 4647117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4657117f1b4Smrg struct gl_texture_object *texObj, 4667117f1b4Smrg struct gl_texture_image *texImage); 4677117f1b4Smrg /** 4687117f1b4Smrg * Called by glCompressedTexSubImage3D(). 4697117f1b4Smrg * 4707117f1b4Smrg * \sa dd_function_table::CompressedTexImage3D. 4717117f1b4Smrg */ 4723464ebd5Sriastradh void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level, 4737117f1b4Smrg GLint xoffset, GLint yoffset, GLint zoffset, 4747117f1b4Smrg GLsizei width, GLint height, GLint depth, 4757117f1b4Smrg GLenum format, 4767117f1b4Smrg GLsizei imageSize, const GLvoid *data, 4777117f1b4Smrg struct gl_texture_object *texObj, 4787117f1b4Smrg struct gl_texture_image *texImage); 4797117f1b4Smrg 4807117f1b4Smrg 4817117f1b4Smrg /** 4827117f1b4Smrg * Called by glGetCompressedTexImage. 4837117f1b4Smrg */ 4843464ebd5Sriastradh void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level, 4857117f1b4Smrg GLvoid *img, 486c1f859d4Smrg struct gl_texture_object *texObj, 487c1f859d4Smrg struct gl_texture_image *texImage); 4887117f1b4Smrg 4897117f1b4Smrg /*@}*/ 4907117f1b4Smrg 4917117f1b4Smrg /** 4927117f1b4Smrg * \name Texture object functions 4937117f1b4Smrg */ 4947117f1b4Smrg /*@{*/ 4957117f1b4Smrg 4967117f1b4Smrg /** 4977117f1b4Smrg * Called by glBindTexture(). 4987117f1b4Smrg */ 4993464ebd5Sriastradh void (*BindTexture)( struct gl_context *ctx, GLenum target, 5007117f1b4Smrg struct gl_texture_object *tObj ); 5017117f1b4Smrg 5027117f1b4Smrg /** 5037117f1b4Smrg * Called to allocate a new texture object. 5047117f1b4Smrg * A new gl_texture_object should be returned. The driver should 5057117f1b4Smrg * attach to it any device-specific info it needs. 5067117f1b4Smrg */ 5073464ebd5Sriastradh struct gl_texture_object * (*NewTextureObject)( struct gl_context *ctx, GLuint name, 5087117f1b4Smrg GLenum target ); 5097117f1b4Smrg /** 5107117f1b4Smrg * Called when a texture object is about to be deallocated. 5117117f1b4Smrg * 5127117f1b4Smrg * Driver should delete the gl_texture_object object and anything 5137117f1b4Smrg * hanging off of it. 5147117f1b4Smrg */ 5153464ebd5Sriastradh void (*DeleteTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); 5167117f1b4Smrg 5177117f1b4Smrg /** 5187117f1b4Smrg * Called to allocate a new texture image object. 5197117f1b4Smrg */ 5203464ebd5Sriastradh struct gl_texture_image * (*NewTextureImage)( struct gl_context *ctx ); 5217117f1b4Smrg 5227117f1b4Smrg /** 5237117f1b4Smrg * Called to free tImage->Data. 5247117f1b4Smrg */ 5253464ebd5Sriastradh void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage ); 5267117f1b4Smrg 5277117f1b4Smrg /** Map texture image data into user space */ 5283464ebd5Sriastradh void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); 5297117f1b4Smrg /** Unmap texture images from user space */ 5303464ebd5Sriastradh void (*UnmapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); 5317117f1b4Smrg 5327117f1b4Smrg /** 5337117f1b4Smrg * Note: no context argument. This function doesn't initially look 5347117f1b4Smrg * like it belongs here, except that the driver is the only entity 5357117f1b4Smrg * that knows for sure how the texture memory is allocated - via 5367117f1b4Smrg * the above callbacks. There is then an argument that the driver 5377117f1b4Smrg * knows what memcpy paths might be fast. Typically this is invoked with 5387117f1b4Smrg * 5397117f1b4Smrg * to -- a pointer into texture memory allocated by NewTextureImage() above. 5407117f1b4Smrg * from -- a pointer into client memory or a mesa temporary. 5417117f1b4Smrg * sz -- nr bytes to copy. 5427117f1b4Smrg */ 5437117f1b4Smrg void* (*TextureMemCpy)( void *to, const void *from, size_t sz ); 5447117f1b4Smrg 5457117f1b4Smrg /** 5467117f1b4Smrg * Called by glAreTextureResident(). 5477117f1b4Smrg */ 5483464ebd5Sriastradh GLboolean (*IsTextureResident)( struct gl_context *ctx, 5497117f1b4Smrg struct gl_texture_object *t ); 5507117f1b4Smrg 5517117f1b4Smrg /** 5527117f1b4Smrg * Called when the texture's color lookup table is changed. 5537117f1b4Smrg * 5547117f1b4Smrg * If \p tObj is NULL then the shared texture palette 5557117f1b4Smrg * gl_texture_object::Palette is to be updated. 5567117f1b4Smrg */ 5573464ebd5Sriastradh void (*UpdateTexturePalette)( struct gl_context *ctx, 5587117f1b4Smrg struct gl_texture_object *tObj ); 5597117f1b4Smrg /*@}*/ 5607117f1b4Smrg 5617117f1b4Smrg 5627117f1b4Smrg /** 5637117f1b4Smrg * \name Imaging functionality 5647117f1b4Smrg */ 5657117f1b4Smrg /*@{*/ 5663464ebd5Sriastradh void (*CopyColorTable)( struct gl_context *ctx, 5677117f1b4Smrg GLenum target, GLenum internalformat, 5687117f1b4Smrg GLint x, GLint y, GLsizei width ); 5697117f1b4Smrg 5703464ebd5Sriastradh void (*CopyColorSubTable)( struct gl_context *ctx, 5717117f1b4Smrg GLenum target, GLsizei start, 5727117f1b4Smrg GLint x, GLint y, GLsizei width ); 5737117f1b4Smrg /*@}*/ 5747117f1b4Smrg 5757117f1b4Smrg 5767117f1b4Smrg /** 5777117f1b4Smrg * \name Vertex/fragment program functions 5787117f1b4Smrg */ 5797117f1b4Smrg /*@{*/ 5807117f1b4Smrg /** Bind a vertex/fragment program */ 5813464ebd5Sriastradh void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); 5827117f1b4Smrg /** Allocate a new program */ 5833464ebd5Sriastradh struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); 5847117f1b4Smrg /** Delete a program */ 5853464ebd5Sriastradh void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); 586cdc920a0Smrg /** 587cdc920a0Smrg * Notify driver that a program string (and GPU code) has been specified 588cdc920a0Smrg * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is 589cdc920a0Smrg * supported by the driver. 590cdc920a0Smrg */ 5913464ebd5Sriastradh GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, 592cdc920a0Smrg struct gl_program *prog); 5937117f1b4Smrg 5947117f1b4Smrg /** Query if program can be loaded onto hardware */ 5953464ebd5Sriastradh GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, 5967117f1b4Smrg struct gl_program *prog); 5977117f1b4Smrg 5987117f1b4Smrg /*@}*/ 5997117f1b4Smrg 6003464ebd5Sriastradh /** 6013464ebd5Sriastradh * \name GLSL shader/program functions. 6023464ebd5Sriastradh */ 6033464ebd5Sriastradh /*@{*/ 6043464ebd5Sriastradh /** 6053464ebd5Sriastradh * Called when a shader program is linked. 6063464ebd5Sriastradh * 6073464ebd5Sriastradh * This gives drivers an opportunity to clone the IR and make their 6083464ebd5Sriastradh * own transformations on it for the purposes of code generation. 6093464ebd5Sriastradh */ 6103464ebd5Sriastradh GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); 6113464ebd5Sriastradh /*@}*/ 6127117f1b4Smrg 6137117f1b4Smrg /** 6147117f1b4Smrg * \name State-changing functions. 6157117f1b4Smrg * 6167117f1b4Smrg * \note drawing functions are above. 6177117f1b4Smrg * 6187117f1b4Smrg * These functions are called by their corresponding OpenGL API functions. 6197117f1b4Smrg * They are \e also called by the gl_PopAttrib() function!!! 6207117f1b4Smrg * May add more functions like these to the device driver in the future. 6217117f1b4Smrg */ 6227117f1b4Smrg /*@{*/ 6237117f1b4Smrg /** Specify the alpha test function */ 6243464ebd5Sriastradh void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref); 6257117f1b4Smrg /** Set the blend color */ 6263464ebd5Sriastradh void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]); 6277117f1b4Smrg /** Set the blend equation */ 6283464ebd5Sriastradh void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA); 6293464ebd5Sriastradh void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer, 6303464ebd5Sriastradh GLenum modeRGB, GLenum modeA); 6317117f1b4Smrg /** Specify pixel arithmetic */ 6323464ebd5Sriastradh void (*BlendFuncSeparate)(struct gl_context *ctx, 6337117f1b4Smrg GLenum sfactorRGB, GLenum dfactorRGB, 6347117f1b4Smrg GLenum sfactorA, GLenum dfactorA); 6353464ebd5Sriastradh void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer, 6363464ebd5Sriastradh GLenum sfactorRGB, GLenum dfactorRGB, 6373464ebd5Sriastradh GLenum sfactorA, GLenum dfactorA); 6387117f1b4Smrg /** Specify clear values for the color buffers */ 6393464ebd5Sriastradh void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]); 6407117f1b4Smrg /** Specify the clear value for the depth buffer */ 6413464ebd5Sriastradh void (*ClearDepth)(struct gl_context *ctx, GLclampd d); 6427117f1b4Smrg /** Specify the clear value for the stencil buffer */ 6433464ebd5Sriastradh void (*ClearStencil)(struct gl_context *ctx, GLint s); 6447117f1b4Smrg /** Specify a plane against which all geometry is clipped */ 6453464ebd5Sriastradh void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation ); 6467117f1b4Smrg /** Enable and disable writing of frame buffer color components */ 6473464ebd5Sriastradh void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, 6487117f1b4Smrg GLboolean bmask, GLboolean amask ); 6493464ebd5Sriastradh void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, 650cdc920a0Smrg GLboolean gmask, GLboolean bmask, GLboolean amask); 6517117f1b4Smrg /** Cause a material color to track the current color */ 6523464ebd5Sriastradh void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); 6537117f1b4Smrg /** Specify whether front- or back-facing facets can be culled */ 6543464ebd5Sriastradh void (*CullFace)(struct gl_context *ctx, GLenum mode); 6557117f1b4Smrg /** Define front- and back-facing polygons */ 6563464ebd5Sriastradh void (*FrontFace)(struct gl_context *ctx, GLenum mode); 6577117f1b4Smrg /** Specify the value used for depth buffer comparisons */ 6583464ebd5Sriastradh void (*DepthFunc)(struct gl_context *ctx, GLenum func); 6597117f1b4Smrg /** Enable or disable writing into the depth buffer */ 6603464ebd5Sriastradh void (*DepthMask)(struct gl_context *ctx, GLboolean flag); 6617117f1b4Smrg /** Specify mapping of depth values from NDC to window coordinates */ 6623464ebd5Sriastradh void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); 6637117f1b4Smrg /** Specify the current buffer for writing */ 6643464ebd5Sriastradh void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); 6657117f1b4Smrg /** Specify the buffers for writing for fragment programs*/ 6663464ebd5Sriastradh void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); 6677117f1b4Smrg /** Enable or disable server-side gl capabilities */ 6683464ebd5Sriastradh void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); 6697117f1b4Smrg /** Specify fog parameters */ 6703464ebd5Sriastradh void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); 6717117f1b4Smrg /** Specify implementation-specific hints */ 6723464ebd5Sriastradh void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode); 6737117f1b4Smrg /** Set light source parameters. 6747117f1b4Smrg * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already 6757117f1b4Smrg * been transformed to eye-space. 6767117f1b4Smrg */ 6773464ebd5Sriastradh void (*Lightfv)(struct gl_context *ctx, GLenum light, 6787117f1b4Smrg GLenum pname, const GLfloat *params ); 6797117f1b4Smrg /** Set the lighting model parameters */ 6803464ebd5Sriastradh void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); 6817117f1b4Smrg /** Specify the line stipple pattern */ 6823464ebd5Sriastradh void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern ); 6837117f1b4Smrg /** Specify the width of rasterized lines */ 6843464ebd5Sriastradh void (*LineWidth)(struct gl_context *ctx, GLfloat width); 6857117f1b4Smrg /** Specify a logical pixel operation for color index rendering */ 6863464ebd5Sriastradh void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode); 6873464ebd5Sriastradh void (*PointParameterfv)(struct gl_context *ctx, GLenum pname, 6887117f1b4Smrg const GLfloat *params); 6897117f1b4Smrg /** Specify the diameter of rasterized points */ 6903464ebd5Sriastradh void (*PointSize)(struct gl_context *ctx, GLfloat size); 6917117f1b4Smrg /** Select a polygon rasterization mode */ 6923464ebd5Sriastradh void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode); 6937117f1b4Smrg /** Set the scale and units used to calculate depth values */ 6943464ebd5Sriastradh void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units); 6957117f1b4Smrg /** Set the polygon stippling pattern */ 6963464ebd5Sriastradh void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask ); 6977117f1b4Smrg /* Specifies the current buffer for reading */ 6983464ebd5Sriastradh void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); 6997117f1b4Smrg /** Set rasterization mode */ 7003464ebd5Sriastradh void (*RenderMode)(struct gl_context *ctx, GLenum mode ); 7017117f1b4Smrg /** Define the scissor box */ 7023464ebd5Sriastradh void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 7037117f1b4Smrg /** Select flat or smooth shading */ 7043464ebd5Sriastradh void (*ShadeModel)(struct gl_context *ctx, GLenum mode); 7057117f1b4Smrg /** OpenGL 2.0 two-sided StencilFunc */ 7063464ebd5Sriastradh void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, 7077117f1b4Smrg GLint ref, GLuint mask); 7087117f1b4Smrg /** OpenGL 2.0 two-sided StencilMask */ 7093464ebd5Sriastradh void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); 7107117f1b4Smrg /** OpenGL 2.0 two-sided StencilOp */ 7113464ebd5Sriastradh void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, 7127117f1b4Smrg GLenum zfail, GLenum zpass); 7137117f1b4Smrg /** Control the generation of texture coordinates */ 7143464ebd5Sriastradh void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, 7157117f1b4Smrg const GLfloat *params); 7167117f1b4Smrg /** Set texture environment parameters */ 7173464ebd5Sriastradh void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname, 7187117f1b4Smrg const GLfloat *param); 7197117f1b4Smrg /** Set texture parameters */ 7203464ebd5Sriastradh void (*TexParameter)(struct gl_context *ctx, GLenum target, 7217117f1b4Smrg struct gl_texture_object *texObj, 7227117f1b4Smrg GLenum pname, const GLfloat *params); 7237117f1b4Smrg /** Set the viewport */ 7243464ebd5Sriastradh void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); 7257117f1b4Smrg /*@}*/ 7267117f1b4Smrg 7277117f1b4Smrg 7287117f1b4Smrg /** 7297117f1b4Smrg * \name Vertex/pixel buffer object functions 7307117f1b4Smrg */ 7317117f1b4Smrg /*@{*/ 7323464ebd5Sriastradh void (*BindBuffer)( struct gl_context *ctx, GLenum target, 7337117f1b4Smrg struct gl_buffer_object *obj ); 7347117f1b4Smrg 7353464ebd5Sriastradh struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer, 7367117f1b4Smrg GLenum target ); 7377117f1b4Smrg 7383464ebd5Sriastradh void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj ); 7397117f1b4Smrg 7403464ebd5Sriastradh GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, 7414a49301eSmrg const GLvoid *data, GLenum usage, 7424a49301eSmrg struct gl_buffer_object *obj ); 7437117f1b4Smrg 7443464ebd5Sriastradh void (*BufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset, 7457117f1b4Smrg GLsizeiptrARB size, const GLvoid *data, 7467117f1b4Smrg struct gl_buffer_object *obj ); 7477117f1b4Smrg 7483464ebd5Sriastradh void (*GetBufferSubData)( struct gl_context *ctx, GLenum target, 7497117f1b4Smrg GLintptrARB offset, GLsizeiptrARB size, 7507117f1b4Smrg GLvoid *data, struct gl_buffer_object *obj ); 7517117f1b4Smrg 7523464ebd5Sriastradh void * (*MapBuffer)( struct gl_context *ctx, GLenum target, GLenum access, 7537117f1b4Smrg struct gl_buffer_object *obj ); 7547117f1b4Smrg 7553464ebd5Sriastradh void (*CopyBufferSubData)( struct gl_context *ctx, 7564a49301eSmrg struct gl_buffer_object *src, 7574a49301eSmrg struct gl_buffer_object *dst, 7584a49301eSmrg GLintptr readOffset, GLintptr writeOffset, 7594a49301eSmrg GLsizeiptr size ); 7604a49301eSmrg 7614a49301eSmrg /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: 7624a49301eSmrg */ 7633464ebd5Sriastradh void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset, 764cdc920a0Smrg GLsizeiptr length, GLbitfield access, 7654a49301eSmrg struct gl_buffer_object *obj); 7664a49301eSmrg 7673464ebd5Sriastradh void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target, 768cdc920a0Smrg GLintptr offset, GLsizeiptr length, 769cdc920a0Smrg struct gl_buffer_object *obj); 7704a49301eSmrg 7713464ebd5Sriastradh GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target, 7727117f1b4Smrg struct gl_buffer_object *obj ); 7737117f1b4Smrg /*@}*/ 7747117f1b4Smrg 775cdc920a0Smrg /** 776cdc920a0Smrg * \name Functions for GL_APPLE_object_purgeable 777cdc920a0Smrg */ 778cdc920a0Smrg /*@{*/ 779cdc920a0Smrg /* variations on ObjectPurgeable */ 7803464ebd5Sriastradh GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); 7813464ebd5Sriastradh GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); 7823464ebd5Sriastradh GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); 783cdc920a0Smrg 784cdc920a0Smrg /* variations on ObjectUnpurgeable */ 7853464ebd5Sriastradh GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); 7863464ebd5Sriastradh GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); 7873464ebd5Sriastradh GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); 788cdc920a0Smrg /*@}*/ 789cdc920a0Smrg 7907117f1b4Smrg /** 7913464ebd5Sriastradh * \name Functions for GL_EXT_framebuffer_{object,blit}. 7927117f1b4Smrg */ 7937117f1b4Smrg /*@{*/ 7943464ebd5Sriastradh struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); 7953464ebd5Sriastradh struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); 7963464ebd5Sriastradh void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, 797cdc920a0Smrg struct gl_framebuffer *drawFb, 798cdc920a0Smrg struct gl_framebuffer *readFb); 7993464ebd5Sriastradh void (*FramebufferRenderbuffer)(struct gl_context *ctx, 8007117f1b4Smrg struct gl_framebuffer *fb, 8017117f1b4Smrg GLenum attachment, 8027117f1b4Smrg struct gl_renderbuffer *rb); 8033464ebd5Sriastradh void (*RenderTexture)(struct gl_context *ctx, 8047117f1b4Smrg struct gl_framebuffer *fb, 8057117f1b4Smrg struct gl_renderbuffer_attachment *att); 8063464ebd5Sriastradh void (*FinishRenderTexture)(struct gl_context *ctx, 8077117f1b4Smrg struct gl_renderbuffer_attachment *att); 8083464ebd5Sriastradh void (*ValidateFramebuffer)(struct gl_context *ctx, 8094a49301eSmrg struct gl_framebuffer *fb); 8107117f1b4Smrg /*@}*/ 8113464ebd5Sriastradh void (*BlitFramebuffer)(struct gl_context *ctx, 8127117f1b4Smrg GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 8137117f1b4Smrg GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, 8147117f1b4Smrg GLbitfield mask, GLenum filter); 8157117f1b4Smrg 8167117f1b4Smrg /** 8177117f1b4Smrg * \name Query objects 8187117f1b4Smrg */ 8197117f1b4Smrg /*@{*/ 8203464ebd5Sriastradh struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); 8213464ebd5Sriastradh void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); 8223464ebd5Sriastradh void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); 8233464ebd5Sriastradh void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); 8243464ebd5Sriastradh void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); 8253464ebd5Sriastradh void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); 8267117f1b4Smrg /*@}*/ 8277117f1b4Smrg 8287117f1b4Smrg 8297117f1b4Smrg /** 8307117f1b4Smrg * \name Vertex Array objects 8317117f1b4Smrg */ 8327117f1b4Smrg /*@{*/ 8333464ebd5Sriastradh struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id); 8343464ebd5Sriastradh void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); 8353464ebd5Sriastradh void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); 8367117f1b4Smrg /*@}*/ 8377117f1b4Smrg 8387117f1b4Smrg /** 8397117f1b4Smrg * \name GLSL-related functions (ARB extensions and OpenGL 2.x) 8407117f1b4Smrg */ 8417117f1b4Smrg /*@{*/ 8423464ebd5Sriastradh struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); 8433464ebd5Sriastradh void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); 8443464ebd5Sriastradh struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); 8453464ebd5Sriastradh void (*DeleteShaderProgram)(struct gl_context *ctx, 8463464ebd5Sriastradh struct gl_shader_program *shProg); 8473464ebd5Sriastradh void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); 8487117f1b4Smrg /*@}*/ 8497117f1b4Smrg 8507117f1b4Smrg 8517117f1b4Smrg /** 8527117f1b4Smrg * \name Support for multiple T&L engines 8537117f1b4Smrg */ 8547117f1b4Smrg /*@{*/ 8557117f1b4Smrg 8567117f1b4Smrg /** 8577117f1b4Smrg * Bitmask of state changes that require the current T&L module to be 8587117f1b4Smrg * validated, using ValidateTnlModule() below. 8597117f1b4Smrg */ 8607117f1b4Smrg GLuint NeedValidate; 8617117f1b4Smrg 8627117f1b4Smrg /** 8637117f1b4Smrg * Validate the current T&L module. 8647117f1b4Smrg * 8657117f1b4Smrg * This is called directly after UpdateState() when a state change that has 8667117f1b4Smrg * occurred matches the dd_function_table::NeedValidate bitmask above. This 8677117f1b4Smrg * ensures all computed values are up to date, thus allowing the driver to 8687117f1b4Smrg * decide if the current T&L module needs to be swapped out. 8697117f1b4Smrg * 8707117f1b4Smrg * This must be non-NULL if a driver installs a custom T&L module and sets 8717117f1b4Smrg * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise. 8727117f1b4Smrg */ 8733464ebd5Sriastradh void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state ); 8747117f1b4Smrg 8757117f1b4Smrg /** 8767117f1b4Smrg * Set by the driver-supplied T&L engine. 8777117f1b4Smrg * 8787117f1b4Smrg * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd(). 8797117f1b4Smrg */ 8807117f1b4Smrg GLuint CurrentExecPrimitive; 8817117f1b4Smrg 8827117f1b4Smrg /** 8837117f1b4Smrg * Current state of an in-progress compilation. 8847117f1b4Smrg * 8857117f1b4Smrg * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END, 8867117f1b4Smrg * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above. 8877117f1b4Smrg */ 8887117f1b4Smrg GLuint CurrentSavePrimitive; 8897117f1b4Smrg 8907117f1b4Smrg 8917117f1b4Smrg#define FLUSH_STORED_VERTICES 0x1 8927117f1b4Smrg#define FLUSH_UPDATE_CURRENT 0x2 8937117f1b4Smrg /** 8947117f1b4Smrg * Set by the driver-supplied T&L engine whenever vertices are buffered 8953464ebd5Sriastradh * between glBegin()/glEnd() objects or __struct gl_contextRec::Current is not 8967117f1b4Smrg * updated. 8977117f1b4Smrg * 8987117f1b4Smrg * The dd_function_table::FlushVertices call below may be used to resolve 8997117f1b4Smrg * these conditions. 9007117f1b4Smrg */ 9017117f1b4Smrg GLuint NeedFlush; 9027117f1b4Smrg GLuint SaveNeedFlush; 9037117f1b4Smrg 9044a49301eSmrg 9054a49301eSmrg /* Called prior to any of the GLvertexformat functions being 9064a49301eSmrg * called. Paired with Driver.FlushVertices(). 9074a49301eSmrg */ 9083464ebd5Sriastradh void (*BeginVertices)( struct gl_context *ctx ); 9094a49301eSmrg 9107117f1b4Smrg /** 9117117f1b4Smrg * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if 9127117f1b4Smrg * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered 9137117f1b4Smrg * vertices, if FLUSH_UPDATE_CURRENT bit is set updates 9143464ebd5Sriastradh * __struct gl_contextRec::Current and gl_light_attrib::Material 9157117f1b4Smrg * 9167117f1b4Smrg * Note that the default T&L engine never clears the 9177117f1b4Smrg * FLUSH_UPDATE_CURRENT bit, even after performing the update. 9187117f1b4Smrg */ 9193464ebd5Sriastradh void (*FlushVertices)( struct gl_context *ctx, GLuint flags ); 9203464ebd5Sriastradh void (*SaveFlushVertices)( struct gl_context *ctx ); 9217117f1b4Smrg 9227117f1b4Smrg /** 9237117f1b4Smrg * Give the driver the opportunity to hook in its own vtxfmt for 9247117f1b4Smrg * compiling optimized display lists. This is called on each valid 9257117f1b4Smrg * glBegin() during list compilation. 9267117f1b4Smrg */ 9273464ebd5Sriastradh GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode ); 9287117f1b4Smrg 9297117f1b4Smrg /** 9307117f1b4Smrg * Notify driver that the special derived value _NeedEyeCoords has 9317117f1b4Smrg * changed. 9327117f1b4Smrg */ 9333464ebd5Sriastradh void (*LightingSpaceChange)( struct gl_context *ctx ); 9347117f1b4Smrg 9357117f1b4Smrg /** 9367117f1b4Smrg * Called by glNewList(). 9377117f1b4Smrg * 9387117f1b4Smrg * Let the T&L component know what is going on with display lists 9397117f1b4Smrg * in time to make changes to dispatch tables, etc. 9407117f1b4Smrg */ 9413464ebd5Sriastradh void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode ); 9427117f1b4Smrg /** 9437117f1b4Smrg * Called by glEndList(). 9447117f1b4Smrg * 9457117f1b4Smrg * \sa dd_function_table::NewList. 9467117f1b4Smrg */ 9473464ebd5Sriastradh void (*EndList)( struct gl_context *ctx ); 9487117f1b4Smrg 9497117f1b4Smrg /** 9507117f1b4Smrg * Called by glCallList(s). 9517117f1b4Smrg * 9527117f1b4Smrg * Notify the T&L component before and after calling a display list. 9537117f1b4Smrg */ 9543464ebd5Sriastradh void (*BeginCallList)( struct gl_context *ctx, 9554a49301eSmrg struct gl_display_list *dlist ); 9567117f1b4Smrg /** 9577117f1b4Smrg * Called by glEndCallList(). 9587117f1b4Smrg * 9597117f1b4Smrg * \sa dd_function_table::BeginCallList. 9607117f1b4Smrg */ 9613464ebd5Sriastradh void (*EndCallList)( struct gl_context *ctx ); 9627117f1b4Smrg 9634a49301eSmrg 9644a49301eSmrg /** 9654a49301eSmrg * \name GL_ARB_sync interfaces 9664a49301eSmrg */ 9674a49301eSmrg /*@{*/ 9683464ebd5Sriastradh struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); 9693464ebd5Sriastradh void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); 9703464ebd5Sriastradh void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); 9713464ebd5Sriastradh void (*CheckSync)(struct gl_context *, struct gl_sync_object *); 9723464ebd5Sriastradh void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, 9734a49301eSmrg GLbitfield, GLuint64); 9743464ebd5Sriastradh void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, 9754a49301eSmrg GLbitfield, GLuint64); 9764a49301eSmrg /*@}*/ 977cdc920a0Smrg 978cdc920a0Smrg /** GL_NV_conditional_render */ 9793464ebd5Sriastradh void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, 980cdc920a0Smrg GLenum mode); 9813464ebd5Sriastradh void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); 982cdc920a0Smrg 983cdc920a0Smrg /** 984cdc920a0Smrg * \name GL_OES_draw_texture interface 985cdc920a0Smrg */ 986cdc920a0Smrg /*@{*/ 9873464ebd5Sriastradh void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, 988cdc920a0Smrg GLfloat width, GLfloat height); 989cdc920a0Smrg /*@}*/ 990cdc920a0Smrg 9913464ebd5Sriastradh /** 9923464ebd5Sriastradh * \name GL_OES_EGL_image interface 9933464ebd5Sriastradh */ 9943464ebd5Sriastradh void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, 995cdc920a0Smrg struct gl_texture_object *texObj, 996cdc920a0Smrg struct gl_texture_image *texImage, 997cdc920a0Smrg GLeglImageOES image_handle); 9983464ebd5Sriastradh void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, 999cdc920a0Smrg struct gl_renderbuffer *rb, 1000cdc920a0Smrg void *image_handle); 1001cdc920a0Smrg 10023464ebd5Sriastradh /** 10033464ebd5Sriastradh * \name GL_EXT_transform_feedback interface 10043464ebd5Sriastradh */ 10053464ebd5Sriastradh struct gl_transform_feedback_object * 10063464ebd5Sriastradh (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); 10073464ebd5Sriastradh void (*DeleteTransformFeedback)(struct gl_context *ctx, 10083464ebd5Sriastradh struct gl_transform_feedback_object *obj); 10093464ebd5Sriastradh void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, 10103464ebd5Sriastradh struct gl_transform_feedback_object *obj); 10113464ebd5Sriastradh void (*EndTransformFeedback)(struct gl_context *ctx, 10123464ebd5Sriastradh struct gl_transform_feedback_object *obj); 10133464ebd5Sriastradh void (*PauseTransformFeedback)(struct gl_context *ctx, 10143464ebd5Sriastradh struct gl_transform_feedback_object *obj); 10153464ebd5Sriastradh void (*ResumeTransformFeedback)(struct gl_context *ctx, 10163464ebd5Sriastradh struct gl_transform_feedback_object *obj); 10173464ebd5Sriastradh void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode, 10183464ebd5Sriastradh struct gl_transform_feedback_object *obj); 10193464ebd5Sriastradh 10203464ebd5Sriastradh /** 10213464ebd5Sriastradh * \name GL_NV_texture_barrier interface 10223464ebd5Sriastradh */ 10233464ebd5Sriastradh void (*TextureBarrier)(struct gl_context *ctx); 10243464ebd5Sriastradh 10253464ebd5Sriastradh /** 10263464ebd5Sriastradh * \name GL_ARB_sampler_objects 10273464ebd5Sriastradh */ 10283464ebd5Sriastradh struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx, 10293464ebd5Sriastradh GLuint name); 10303464ebd5Sriastradh void (*DeleteSamplerObject)(struct gl_context *ctx, 10313464ebd5Sriastradh struct gl_sampler_object *samp); 10327117f1b4Smrg}; 10337117f1b4Smrg 10347117f1b4Smrg 10357117f1b4Smrg/** 10367117f1b4Smrg * Transform/Clip/Lighting interface 10377117f1b4Smrg * 10387117f1b4Smrg * Drivers present a reduced set of the functions possible in 10397117f1b4Smrg * glBegin()/glEnd() objects. Core mesa provides translation stubs for the 10407117f1b4Smrg * remaining functions to map down to these entry points. 10417117f1b4Smrg * 10427117f1b4Smrg * These are the initial values to be installed into dispatch by 10437117f1b4Smrg * mesa. If the T&L driver wants to modify the dispatch table 10447117f1b4Smrg * while installed, it must do so itself. It would be possible for 1045cdc920a0Smrg * the vertexformat to install its own initial values for these 10467117f1b4Smrg * functions, but this way there is an obvious list of what is 10477117f1b4Smrg * expected of the driver. 10487117f1b4Smrg * 10497117f1b4Smrg * If the driver wants to hook in entry points other than those 10507117f1b4Smrg * listed, it must restore them to their original values in 10517117f1b4Smrg * the disable() callback, below. 10527117f1b4Smrg */ 10537117f1b4Smrgtypedef struct { 10547117f1b4Smrg /** 10557117f1b4Smrg * \name Vertex 10567117f1b4Smrg */ 10577117f1b4Smrg /*@{*/ 10583464ebd5Sriastradh void (GLAPIENTRYP ArrayElement)( GLint ); 10597117f1b4Smrg void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat ); 10607117f1b4Smrg void (GLAPIENTRYP Color3fv)( const GLfloat * ); 10617117f1b4Smrg void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 10627117f1b4Smrg void (GLAPIENTRYP Color4fv)( const GLfloat * ); 10637117f1b4Smrg void (GLAPIENTRYP EdgeFlag)( GLboolean ); 10643464ebd5Sriastradh void (GLAPIENTRYP EvalCoord1f)( GLfloat ); 10653464ebd5Sriastradh void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); 10663464ebd5Sriastradh void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); 10673464ebd5Sriastradh void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); 10683464ebd5Sriastradh void (GLAPIENTRYP EvalPoint1)( GLint ); 10693464ebd5Sriastradh void (GLAPIENTRYP EvalPoint2)( GLint, GLint ); 10707117f1b4Smrg void (GLAPIENTRYP FogCoordfEXT)( GLfloat ); 10717117f1b4Smrg void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * ); 10727117f1b4Smrg void (GLAPIENTRYP Indexf)( GLfloat ); 10737117f1b4Smrg void (GLAPIENTRYP Indexfv)( const GLfloat * ); 10743464ebd5Sriastradh void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); 10757117f1b4Smrg void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat ); 10767117f1b4Smrg void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * ); 10777117f1b4Smrg void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); 10787117f1b4Smrg void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * ); 10797117f1b4Smrg void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); 10807117f1b4Smrg void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * ); 10817117f1b4Smrg void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); 10827117f1b4Smrg void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * ); 10837117f1b4Smrg void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat ); 10847117f1b4Smrg void (GLAPIENTRYP Normal3fv)( const GLfloat * ); 10857117f1b4Smrg void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); 10867117f1b4Smrg void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * ); 10877117f1b4Smrg void (GLAPIENTRYP TexCoord1f)( GLfloat ); 10887117f1b4Smrg void (GLAPIENTRYP TexCoord1fv)( const GLfloat * ); 10897117f1b4Smrg void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat ); 10907117f1b4Smrg void (GLAPIENTRYP TexCoord2fv)( const GLfloat * ); 10917117f1b4Smrg void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat ); 10927117f1b4Smrg void (GLAPIENTRYP TexCoord3fv)( const GLfloat * ); 10937117f1b4Smrg void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 10947117f1b4Smrg void (GLAPIENTRYP TexCoord4fv)( const GLfloat * ); 10957117f1b4Smrg void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat ); 10967117f1b4Smrg void (GLAPIENTRYP Vertex2fv)( const GLfloat * ); 10977117f1b4Smrg void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat ); 10987117f1b4Smrg void (GLAPIENTRYP Vertex3fv)( const GLfloat * ); 10997117f1b4Smrg void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); 11007117f1b4Smrg void (GLAPIENTRYP Vertex4fv)( const GLfloat * ); 11013464ebd5Sriastradh void (GLAPIENTRYP CallList)( GLuint ); 11023464ebd5Sriastradh void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); 11037117f1b4Smrg void (GLAPIENTRYP Begin)( GLenum ); 11047117f1b4Smrg void (GLAPIENTRYP End)( void ); 11053464ebd5Sriastradh void (GLAPIENTRYP PrimitiveRestartNV)( void ); 11067117f1b4Smrg /* GL_NV_vertex_program */ 11077117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x ); 11087117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); 11097117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); 11107117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); 11117117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 11127117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); 11137117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 11147117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); 11153464ebd5Sriastradh /* GL_ARB_vertex_program */ 11167117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x ); 11177117f1b4Smrg void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); 11187117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); 11197117f1b4Smrg void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); 11207117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 11217117f1b4Smrg void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); 11227117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 11237117f1b4Smrg void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); 11243464ebd5Sriastradh 11253464ebd5Sriastradh /* GL_EXT_gpu_shader4 / GL 3.0 */ 11263464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x); 11273464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y); 11283464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z); 11293464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w); 11303464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v); 11313464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v); 11323464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v); 11333464ebd5Sriastradh 11343464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x); 11353464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y); 11363464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z); 11373464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); 11383464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v); 11393464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v); 11403464ebd5Sriastradh void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v); 11413464ebd5Sriastradh 11427117f1b4Smrg /*@}*/ 11437117f1b4Smrg 11447117f1b4Smrg void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); 11457117f1b4Smrg 11467117f1b4Smrg /** 11477117f1b4Smrg * \name Array 11487117f1b4Smrg */ 11497117f1b4Smrg /*@{*/ 11507117f1b4Smrg void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count ); 11517117f1b4Smrg void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type, 11527117f1b4Smrg const GLvoid *indices ); 11537117f1b4Smrg void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, 11547117f1b4Smrg GLuint end, GLsizei count, 11557117f1b4Smrg GLenum type, const GLvoid *indices ); 11564a49301eSmrg void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, 11574a49301eSmrg GLenum type, 11584a49301eSmrg const GLvoid **indices, 11594a49301eSmrg GLsizei primcount); 11604a49301eSmrg void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count, 11614a49301eSmrg GLenum type, 11624a49301eSmrg const GLvoid *indices, 11634a49301eSmrg GLint basevertex ); 11644a49301eSmrg void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, 11654a49301eSmrg GLuint end, GLsizei count, 11664a49301eSmrg GLenum type, 11674a49301eSmrg const GLvoid *indices, 11684a49301eSmrg GLint basevertex); 11694a49301eSmrg void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode, 11704a49301eSmrg const GLsizei *count, 11714a49301eSmrg GLenum type, 11724a49301eSmrg const GLvoid **indices, 11734a49301eSmrg GLsizei primcount, 11744a49301eSmrg const GLint *basevertex); 11753464ebd5Sriastradh void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first, 11763464ebd5Sriastradh GLsizei count, GLsizei primcount); 11773464ebd5Sriastradh void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count, 11783464ebd5Sriastradh GLenum type, const GLvoid *indices, 11793464ebd5Sriastradh GLsizei primcount); 11803464ebd5Sriastradh void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, 11813464ebd5Sriastradh GLenum type, const GLvoid *indices, 11823464ebd5Sriastradh GLsizei primcount, GLint basevertex); 11837117f1b4Smrg /*@}*/ 11847117f1b4Smrg 11857117f1b4Smrg /** 11867117f1b4Smrg * \name Eval 11877117f1b4Smrg * 11887117f1b4Smrg * If you don't support eval, fallback to the default vertex format 11897117f1b4Smrg * on receiving an eval call and use the pipeline mechanism to 11907117f1b4Smrg * provide partial T&L acceleration. 11917117f1b4Smrg * 11927117f1b4Smrg * Mesa will provide a set of helper functions to do eval within 11937117f1b4Smrg * accelerated vertex formats, eventually... 11947117f1b4Smrg */ 11957117f1b4Smrg /*@{*/ 11967117f1b4Smrg void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); 11977117f1b4Smrg void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); 11987117f1b4Smrg /*@}*/ 11997117f1b4Smrg 12007117f1b4Smrg} GLvertexformat; 12017117f1b4Smrg 12027117f1b4Smrg 12037117f1b4Smrg#endif /* DD_INCLUDED */ 1204