dd.h revision 848b8605
1848b8605Smrg/**
2848b8605Smrg * \file dd.h
3848b8605Smrg * Device driver interfaces.
4848b8605Smrg */
5848b8605Smrg
6848b8605Smrg/*
7848b8605Smrg * Mesa 3-D graphics library
8848b8605Smrg *
9848b8605Smrg * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
10848b8605Smrg *
11848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a
12848b8605Smrg * copy of this software and associated documentation files (the "Software"),
13848b8605Smrg * to deal in the Software without restriction, including without limitation
14848b8605Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the
16848b8605Smrg * Software is furnished to do so, subject to the following conditions:
17848b8605Smrg *
18848b8605Smrg * The above copyright notice and this permission notice shall be included
19848b8605Smrg * in all copies or substantial portions of the Software.
20848b8605Smrg *
21848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23848b8605Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
24848b8605Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25848b8605Smrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26848b8605Smrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27848b8605Smrg * OTHER DEALINGS IN THE SOFTWARE.
28848b8605Smrg */
29848b8605Smrg
30848b8605Smrg
31848b8605Smrg#ifndef DD_INCLUDED
32848b8605Smrg#define DD_INCLUDED
33848b8605Smrg
34848b8605Smrg/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
35848b8605Smrg
36848b8605Smrg#include "glheader.h"
37848b8605Smrg
38848b8605Smrgstruct gl_buffer_object;
39848b8605Smrgstruct gl_context;
40848b8605Smrgstruct gl_display_list;
41848b8605Smrgstruct gl_framebuffer;
42848b8605Smrgstruct gl_image_unit;
43848b8605Smrgstruct gl_pixelstore_attrib;
44848b8605Smrgstruct gl_program;
45848b8605Smrgstruct gl_renderbuffer;
46848b8605Smrgstruct gl_renderbuffer_attachment;
47848b8605Smrgstruct gl_shader;
48848b8605Smrgstruct gl_shader_program;
49848b8605Smrgstruct gl_texture_image;
50848b8605Smrgstruct gl_texture_object;
51848b8605Smrg
52848b8605Smrg/* GL_ARB_vertex_buffer_object */
53848b8605Smrg/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
54848b8605Smrg * NULL) if buffer is unavailable for immediate mapping.
55848b8605Smrg *
56848b8605Smrg * Does GL_MAP_INVALIDATE_RANGE_BIT do this?  It seems so, but it
57848b8605Smrg * would require more book-keeping in the driver than seems necessary
58848b8605Smrg * at this point.
59848b8605Smrg *
60848b8605Smrg * Does GL_MAP_INVALDIATE_BUFFER_BIT do this?  Not really -- we don't
61848b8605Smrg * want to provoke the driver to throw away the old storage, we will
62848b8605Smrg * respect the contents of already referenced data.
63848b8605Smrg */
64848b8605Smrg#define MESA_MAP_NOWAIT_BIT       0x0040
65848b8605Smrg
66848b8605Smrg
67848b8605Smrg/**
68848b8605Smrg * Device driver function table.
69848b8605Smrg * Core Mesa uses these function pointers to call into device drivers.
70848b8605Smrg * Most of these functions directly correspond to OpenGL state commands.
71848b8605Smrg * Core Mesa will call these functions after error checking has been done
72848b8605Smrg * so that the drivers don't have to worry about error testing.
73848b8605Smrg *
74848b8605Smrg * Vertex transformation/clipping/lighting is patched into the T&L module.
75848b8605Smrg * Rasterization functions are patched into the swrast module.
76848b8605Smrg *
77848b8605Smrg * Note: when new functions are added here, the drivers/common/driverfuncs.c
78848b8605Smrg * file should be updated too!!!
79848b8605Smrg */
80848b8605Smrgstruct dd_function_table {
81848b8605Smrg   /**
82848b8605Smrg    * Return a string as needed by glGetString().
83848b8605Smrg    * Only the GL_RENDERER query must be implemented.  Otherwise, NULL can be
84848b8605Smrg    * returned.
85848b8605Smrg    */
86848b8605Smrg   const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
87848b8605Smrg
88848b8605Smrg   /**
89848b8605Smrg    * Notify the driver after Mesa has made some internal state changes.
90848b8605Smrg    *
91848b8605Smrg    * This is in addition to any state change callbacks Mesa may already have
92848b8605Smrg    * made.
93848b8605Smrg    */
94848b8605Smrg   void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
95848b8605Smrg
96848b8605Smrg   /**
97848b8605Smrg    * Resize the given framebuffer to the given size.
98848b8605Smrg    * XXX OBSOLETE: this function will be removed in the future.
99848b8605Smrg    */
100848b8605Smrg   void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
101848b8605Smrg                          GLuint width, GLuint height);
102848b8605Smrg
103848b8605Smrg   /**
104848b8605Smrg    * This is called whenever glFinish() is called.
105848b8605Smrg    */
106848b8605Smrg   void (*Finish)( struct gl_context *ctx );
107848b8605Smrg
108848b8605Smrg   /**
109848b8605Smrg    * This is called whenever glFlush() is called.
110848b8605Smrg    */
111848b8605Smrg   void (*Flush)( struct gl_context *ctx );
112848b8605Smrg
113848b8605Smrg   /**
114848b8605Smrg    * Clear the color/depth/stencil/accum buffer(s).
115848b8605Smrg    * \param buffers  a bitmask of BUFFER_BIT_* flags indicating which
116848b8605Smrg    *                 renderbuffers need to be cleared.
117848b8605Smrg    */
118848b8605Smrg   void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
119848b8605Smrg
120848b8605Smrg   /**
121848b8605Smrg    * Execute glAccum command.
122848b8605Smrg    */
123848b8605Smrg   void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
124848b8605Smrg
125848b8605Smrg
126848b8605Smrg   /**
127848b8605Smrg    * Execute glRasterPos, updating the ctx->Current.Raster fields
128848b8605Smrg    */
129848b8605Smrg   void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
130848b8605Smrg
131848b8605Smrg   /**
132848b8605Smrg    * \name Image-related functions
133848b8605Smrg    */
134848b8605Smrg   /*@{*/
135848b8605Smrg
136848b8605Smrg   /**
137848b8605Smrg    * Called by glDrawPixels().
138848b8605Smrg    * \p unpack describes how to unpack the source image data.
139848b8605Smrg    */
140848b8605Smrg   void (*DrawPixels)( struct gl_context *ctx,
141848b8605Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
142848b8605Smrg		       GLenum format, GLenum type,
143848b8605Smrg		       const struct gl_pixelstore_attrib *unpack,
144848b8605Smrg		       const GLvoid *pixels );
145848b8605Smrg
146848b8605Smrg   /**
147848b8605Smrg    * Called by glReadPixels().
148848b8605Smrg    */
149848b8605Smrg   void (*ReadPixels)( struct gl_context *ctx,
150848b8605Smrg		       GLint x, GLint y, GLsizei width, GLsizei height,
151848b8605Smrg		       GLenum format, GLenum type,
152848b8605Smrg		       const struct gl_pixelstore_attrib *unpack,
153848b8605Smrg		       GLvoid *dest );
154848b8605Smrg
155848b8605Smrg   /**
156848b8605Smrg    * Called by glCopyPixels().
157848b8605Smrg    */
158848b8605Smrg   void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
159848b8605Smrg                       GLsizei width, GLsizei height,
160848b8605Smrg                       GLint dstx, GLint dsty, GLenum type );
161848b8605Smrg
162848b8605Smrg   /**
163848b8605Smrg    * Called by glBitmap().
164848b8605Smrg    */
165848b8605Smrg   void (*Bitmap)( struct gl_context *ctx,
166848b8605Smrg		   GLint x, GLint y, GLsizei width, GLsizei height,
167848b8605Smrg		   const struct gl_pixelstore_attrib *unpack,
168848b8605Smrg		   const GLubyte *bitmap );
169848b8605Smrg   /*@}*/
170848b8605Smrg
171848b8605Smrg
172848b8605Smrg   /**
173848b8605Smrg    * \name Texture image functions
174848b8605Smrg    */
175848b8605Smrg   /*@{*/
176848b8605Smrg
177848b8605Smrg   /**
178848b8605Smrg    * Choose actual hardware texture format given the texture target, the
179848b8605Smrg    * user-provided source image format and type and the desired internal
180848b8605Smrg    * format.  In some cases, srcFormat and srcType can be GL_NONE.
181848b8605Smrg    * Note:  target may be GL_TEXTURE_CUBE_MAP, but never
182848b8605Smrg    * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
183848b8605Smrg    * Called by glTexImage(), etc.
184848b8605Smrg    */
185848b8605Smrg   mesa_format (*ChooseTextureFormat)(struct gl_context *ctx,
186848b8605Smrg                                      GLenum target, GLint internalFormat,
187848b8605Smrg                                      GLenum srcFormat, GLenum srcType );
188848b8605Smrg
189848b8605Smrg   /**
190848b8605Smrg    * Determine sample counts support for a particular target and format
191848b8605Smrg    *
192848b8605Smrg    * \param ctx            GL context
193848b8605Smrg    * \param target         GL target enum
194848b8605Smrg    * \param internalFormat GL format enum
195848b8605Smrg    * \param samples        Buffer to hold the returned sample counts.
196848b8605Smrg    *                       Drivers \b must \b not return more than 16 counts.
197848b8605Smrg    *
198848b8605Smrg    * \returns
199848b8605Smrg    * The number of sample counts actually written to \c samples.  If
200848b8605Smrg    * \c internaFormat is not renderable, zero is returned.
201848b8605Smrg    */
202848b8605Smrg   size_t (*QuerySamplesForFormat)(struct gl_context *ctx,
203848b8605Smrg                                   GLenum target,
204848b8605Smrg                                   GLenum internalFormat,
205848b8605Smrg                                   int samples[16]);
206848b8605Smrg
207848b8605Smrg   /**
208848b8605Smrg    * Called by glTexImage[123]D() and glCopyTexImage[12]D()
209848b8605Smrg    * Allocate texture memory and copy the user's image to the buffer.
210848b8605Smrg    * The gl_texture_image fields, etc. will be fully initialized.
211848b8605Smrg    * The parameters are the same as glTexImage3D(), plus:
212848b8605Smrg    * \param dims  1, 2, or 3 indicating glTexImage1/2/3D()
213848b8605Smrg    * \param packing describes how to unpack the source data.
214848b8605Smrg    * \param texImage is the destination texture image.
215848b8605Smrg    */
216848b8605Smrg   void (*TexImage)(struct gl_context *ctx, GLuint dims,
217848b8605Smrg                    struct gl_texture_image *texImage,
218848b8605Smrg                    GLenum format, GLenum type, const GLvoid *pixels,
219848b8605Smrg                    const struct gl_pixelstore_attrib *packing);
220848b8605Smrg
221848b8605Smrg   /**
222848b8605Smrg    * Called by glTexSubImage[123]D().
223848b8605Smrg    * Replace a subset of the target texture with new texel data.
224848b8605Smrg    */
225848b8605Smrg   void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
226848b8605Smrg                       struct gl_texture_image *texImage,
227848b8605Smrg                       GLint xoffset, GLint yoffset, GLint zoffset,
228848b8605Smrg                       GLsizei width, GLsizei height, GLint depth,
229848b8605Smrg                       GLenum format, GLenum type,
230848b8605Smrg                       const GLvoid *pixels,
231848b8605Smrg                       const struct gl_pixelstore_attrib *packing);
232848b8605Smrg
233848b8605Smrg
234848b8605Smrg   /**
235848b8605Smrg    * Called by glGetTexImage().
236848b8605Smrg    */
237848b8605Smrg   void (*GetTexImage)( struct gl_context *ctx,
238848b8605Smrg                        GLenum format, GLenum type, GLvoid *pixels,
239848b8605Smrg                        struct gl_texture_image *texImage );
240848b8605Smrg
241848b8605Smrg   /**
242848b8605Smrg    * Called by glClearTex[Sub]Image
243848b8605Smrg    *
244848b8605Smrg    * Clears a rectangular region of the image to a given value. The
245848b8605Smrg    * clearValue argument is either NULL or points to a single texel to use as
246848b8605Smrg    * the clear value in the same internal format as the texture image. If it
247848b8605Smrg    * is NULL then the texture should be cleared to zeroes.
248848b8605Smrg    */
249848b8605Smrg   void (*ClearTexSubImage)(struct gl_context *ctx,
250848b8605Smrg                            struct gl_texture_image *texImage,
251848b8605Smrg                            GLint xoffset, GLint yoffset, GLint zoffset,
252848b8605Smrg                            GLsizei width, GLsizei height, GLsizei depth,
253848b8605Smrg                            const GLvoid *clearValue);
254848b8605Smrg
255848b8605Smrg   /**
256848b8605Smrg    * Called by glCopyTex[Sub]Image[123]D().
257848b8605Smrg    *
258848b8605Smrg    * This function should copy a rectangular region in the rb to a single
259848b8605Smrg    * destination slice, specified by @slice.  In the case of 1D array
260848b8605Smrg    * textures (where one GL call can potentially affect multiple destination
261848b8605Smrg    * slices), core mesa takes care of calling this function multiple times,
262848b8605Smrg    * once for each scanline to be copied.
263848b8605Smrg    */
264848b8605Smrg   void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
265848b8605Smrg                           struct gl_texture_image *texImage,
266848b8605Smrg                           GLint xoffset, GLint yoffset, GLint slice,
267848b8605Smrg                           struct gl_renderbuffer *rb,
268848b8605Smrg                           GLint x, GLint y,
269848b8605Smrg                           GLsizei width, GLsizei height);
270848b8605Smrg
271848b8605Smrg   /**
272848b8605Smrg    * Called by glCopyImageSubData().
273848b8605Smrg    *
274848b8605Smrg    * This function should copy one 2-D slice from srcTexImage to
275848b8605Smrg    * dstTexImage.  If one of the textures is 3-D or is a 1-D or 2-D array
276848b8605Smrg    * texture, this function will be called multiple times: once for each
277848b8605Smrg    * slice.  If one of the textures is a cube map, this function will be
278848b8605Smrg    * called once for each face to be copied.
279848b8605Smrg    */
280848b8605Smrg   void (*CopyImageSubData)(struct gl_context *ctx,
281848b8605Smrg                            struct gl_texture_image *src_image,
282848b8605Smrg                            int src_x, int src_y, int src_z,
283848b8605Smrg                            struct gl_texture_image *dstTexImage,
284848b8605Smrg                            int dst_x, int dst_y, int dst_z,
285848b8605Smrg                            int src_width, int src_height);
286848b8605Smrg
287848b8605Smrg   /**
288848b8605Smrg    * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
289848b8605Smrg    * Note that if the texture is a cube map, the <target> parameter will
290848b8605Smrg    * indicate which cube face to generate (GL_POSITIVE/NEGATIVE_X/Y/Z).
291848b8605Smrg    * texObj->BaseLevel is the level from which to generate the remaining
292848b8605Smrg    * mipmap levels.
293848b8605Smrg    */
294848b8605Smrg   void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
295848b8605Smrg                          struct gl_texture_object *texObj);
296848b8605Smrg
297848b8605Smrg   /**
298848b8605Smrg    * Called by glTexImage, glCompressedTexImage, glCopyTexImage
299848b8605Smrg    * and glTexStorage to check if the dimensions of the texture image
300848b8605Smrg    * are too large.
301848b8605Smrg    * \param target  any GL_PROXY_TEXTURE_x target
302848b8605Smrg    * \return GL_TRUE if the image is OK, GL_FALSE if too large
303848b8605Smrg    */
304848b8605Smrg   GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
305848b8605Smrg                                  GLint level, mesa_format format,
306848b8605Smrg                                  GLint width, GLint height,
307848b8605Smrg                                  GLint depth, GLint border);
308848b8605Smrg   /*@}*/
309848b8605Smrg
310848b8605Smrg
311848b8605Smrg   /**
312848b8605Smrg    * \name Compressed texture functions
313848b8605Smrg    */
314848b8605Smrg   /*@{*/
315848b8605Smrg
316848b8605Smrg   /**
317848b8605Smrg    * Called by glCompressedTexImage[123]D().
318848b8605Smrg    */
319848b8605Smrg   void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
320848b8605Smrg                              struct gl_texture_image *texImage,
321848b8605Smrg                              GLsizei imageSize, const GLvoid *data);
322848b8605Smrg
323848b8605Smrg   /**
324848b8605Smrg    * Called by glCompressedTexSubImage[123]D().
325848b8605Smrg    */
326848b8605Smrg   void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
327848b8605Smrg                                 struct gl_texture_image *texImage,
328848b8605Smrg                                 GLint xoffset, GLint yoffset, GLint zoffset,
329848b8605Smrg                                 GLsizei width, GLint height, GLint depth,
330848b8605Smrg                                 GLenum format,
331848b8605Smrg                                 GLsizei imageSize, const GLvoid *data);
332848b8605Smrg
333848b8605Smrg   /**
334848b8605Smrg    * Called by glGetCompressedTexImage.
335848b8605Smrg    */
336848b8605Smrg   void (*GetCompressedTexImage)(struct gl_context *ctx,
337848b8605Smrg                                 struct gl_texture_image *texImage,
338848b8605Smrg                                 GLvoid *data);
339848b8605Smrg   /*@}*/
340848b8605Smrg
341848b8605Smrg   /**
342848b8605Smrg    * \name Texture object / image functions
343848b8605Smrg    */
344848b8605Smrg   /*@{*/
345848b8605Smrg
346848b8605Smrg   /**
347848b8605Smrg    * Called by glBindTexture() and glBindTextures().
348848b8605Smrg    */
349848b8605Smrg   void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
350848b8605Smrg                        GLenum target, struct gl_texture_object *tObj );
351848b8605Smrg
352848b8605Smrg   /**
353848b8605Smrg    * Called to allocate a new texture object.  Drivers will usually
354848b8605Smrg    * allocate/return a subclass of gl_texture_object.
355848b8605Smrg    */
356848b8605Smrg   struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
357848b8605Smrg                                                  GLuint name, GLenum target);
358848b8605Smrg   /**
359848b8605Smrg    * Called to delete/free a texture object.  Drivers should free the
360848b8605Smrg    * object and any image data it contains.
361848b8605Smrg    */
362848b8605Smrg   void (*DeleteTexture)(struct gl_context *ctx,
363848b8605Smrg                         struct gl_texture_object *texObj);
364848b8605Smrg
365848b8605Smrg   /** Called to allocate a new texture image object. */
366848b8605Smrg   struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
367848b8605Smrg
368848b8605Smrg   /** Called to free a texture image object returned by NewTextureImage() */
369848b8605Smrg   void (*DeleteTextureImage)(struct gl_context *ctx,
370848b8605Smrg                              struct gl_texture_image *);
371848b8605Smrg
372848b8605Smrg   /** Called to allocate memory for a single texture image */
373848b8605Smrg   GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
374848b8605Smrg                                        struct gl_texture_image *texImage);
375848b8605Smrg
376848b8605Smrg   /** Free the memory for a single texture image */
377848b8605Smrg   void (*FreeTextureImageBuffer)(struct gl_context *ctx,
378848b8605Smrg                                  struct gl_texture_image *texImage);
379848b8605Smrg
380848b8605Smrg   /** Map a slice of a texture image into user space.
381848b8605Smrg    * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
382848b8605Smrg    * indicates the 1D array index.
383848b8605Smrg    * \param texImage  the texture image
384848b8605Smrg    * \param slice  the 3D image slice or array texture slice
385848b8605Smrg    * \param x, y, w, h  region of interest
386848b8605Smrg    * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
387848b8605Smrg    *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
388848b8605Smrg    * \param mapOut  returns start of mapping of region of interest
389848b8605Smrg    * \param rowStrideOut returns row stride (in bytes).  In the case of a
390848b8605Smrg    * compressed texture, this is the byte stride between one row of blocks
391848b8605Smrg    * and another.
392848b8605Smrg    */
393848b8605Smrg   void (*MapTextureImage)(struct gl_context *ctx,
394848b8605Smrg			   struct gl_texture_image *texImage,
395848b8605Smrg			   GLuint slice,
396848b8605Smrg			   GLuint x, GLuint y, GLuint w, GLuint h,
397848b8605Smrg			   GLbitfield mode,
398848b8605Smrg			   GLubyte **mapOut, GLint *rowStrideOut);
399848b8605Smrg
400848b8605Smrg   void (*UnmapTextureImage)(struct gl_context *ctx,
401848b8605Smrg			     struct gl_texture_image *texImage,
402848b8605Smrg			     GLuint slice);
403848b8605Smrg
404848b8605Smrg   /** For GL_ARB_texture_storage.  Allocate memory for whole mipmap stack.
405848b8605Smrg    * All the gl_texture_images in the texture object will have their
406848b8605Smrg    * dimensions, format, etc. initialized already.
407848b8605Smrg    */
408848b8605Smrg   GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
409848b8605Smrg                                    struct gl_texture_object *texObj,
410848b8605Smrg                                    GLsizei levels, GLsizei width,
411848b8605Smrg                                    GLsizei height, GLsizei depth);
412848b8605Smrg
413848b8605Smrg   /** Called as part of glTextureView to add views to origTexObj */
414848b8605Smrg   GLboolean (*TextureView)(struct gl_context *ctx,
415848b8605Smrg                            struct gl_texture_object *texObj,
416848b8605Smrg                            struct gl_texture_object *origTexObj);
417848b8605Smrg
418848b8605Smrg   /**
419848b8605Smrg    * Map a renderbuffer into user space.
420848b8605Smrg    * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
421848b8605Smrg    *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
422848b8605Smrg    */
423848b8605Smrg   void (*MapRenderbuffer)(struct gl_context *ctx,
424848b8605Smrg			   struct gl_renderbuffer *rb,
425848b8605Smrg			   GLuint x, GLuint y, GLuint w, GLuint h,
426848b8605Smrg			   GLbitfield mode,
427848b8605Smrg			   GLubyte **mapOut, GLint *rowStrideOut);
428848b8605Smrg
429848b8605Smrg   void (*UnmapRenderbuffer)(struct gl_context *ctx,
430848b8605Smrg			     struct gl_renderbuffer *rb);
431848b8605Smrg
432848b8605Smrg   /**
433848b8605Smrg    * Optional driver entrypoint that binds a non-texture renderbuffer's
434848b8605Smrg    * contents to a texture image.
435848b8605Smrg    */
436848b8605Smrg   GLboolean (*BindRenderbufferTexImage)(struct gl_context *ctx,
437848b8605Smrg                                         struct gl_renderbuffer *rb,
438848b8605Smrg                                         struct gl_texture_image *texImage);
439848b8605Smrg   /*@}*/
440848b8605Smrg
441848b8605Smrg
442848b8605Smrg   /**
443848b8605Smrg    * \name Vertex/fragment program functions
444848b8605Smrg    */
445848b8605Smrg   /*@{*/
446848b8605Smrg   /** Bind a vertex/fragment program */
447848b8605Smrg   void (*BindProgram)(struct gl_context *ctx, GLenum target,
448848b8605Smrg                       struct gl_program *prog);
449848b8605Smrg   /** Allocate a new program */
450848b8605Smrg   struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target,
451848b8605Smrg                                     GLuint id);
452848b8605Smrg   /** Delete a program */
453848b8605Smrg   void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
454848b8605Smrg   /**
455848b8605Smrg    * Notify driver that a program string (and GPU code) has been specified
456848b8605Smrg    * or modified.  Return GL_TRUE or GL_FALSE to indicate if the program is
457848b8605Smrg    * supported by the driver.
458848b8605Smrg    */
459848b8605Smrg   GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
460848b8605Smrg                                    struct gl_program *prog);
461848b8605Smrg
462848b8605Smrg   /**
463848b8605Smrg    * Notify driver that the sampler uniforms for the current program have
464848b8605Smrg    * changed.  On some drivers, this may require shader recompiles.
465848b8605Smrg    */
466848b8605Smrg   void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
467848b8605Smrg                                struct gl_program *prog);
468848b8605Smrg
469848b8605Smrg   /** Query if program can be loaded onto hardware */
470848b8605Smrg   GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
471848b8605Smrg				struct gl_program *prog);
472848b8605Smrg
473848b8605Smrg   /*@}*/
474848b8605Smrg
475848b8605Smrg   /**
476848b8605Smrg    * \name GLSL shader/program functions.
477848b8605Smrg    */
478848b8605Smrg   /*@{*/
479848b8605Smrg   /**
480848b8605Smrg    * Called when a shader program is linked.
481848b8605Smrg    *
482848b8605Smrg    * This gives drivers an opportunity to clone the IR and make their
483848b8605Smrg    * own transformations on it for the purposes of code generation.
484848b8605Smrg    */
485848b8605Smrg   GLboolean (*LinkShader)(struct gl_context *ctx,
486848b8605Smrg                           struct gl_shader_program *shader);
487848b8605Smrg   /*@}*/
488848b8605Smrg
489848b8605Smrg   /**
490848b8605Smrg    * \name State-changing functions.
491848b8605Smrg    *
492848b8605Smrg    * \note drawing functions are above.
493848b8605Smrg    *
494848b8605Smrg    * These functions are called by their corresponding OpenGL API functions.
495848b8605Smrg    * They are \e also called by the gl_PopAttrib() function!!!
496848b8605Smrg    * May add more functions like these to the device driver in the future.
497848b8605Smrg    */
498848b8605Smrg   /*@{*/
499848b8605Smrg   /** Specify the alpha test function */
500848b8605Smrg   void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
501848b8605Smrg   /** Set the blend color */
502848b8605Smrg   void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
503848b8605Smrg   /** Set the blend equation */
504848b8605Smrg   void (*BlendEquationSeparate)(struct gl_context *ctx,
505848b8605Smrg                                 GLenum modeRGB, GLenum modeA);
506848b8605Smrg   void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
507848b8605Smrg                                  GLenum modeRGB, GLenum modeA);
508848b8605Smrg   /** Specify pixel arithmetic */
509848b8605Smrg   void (*BlendFuncSeparate)(struct gl_context *ctx,
510848b8605Smrg                             GLenum sfactorRGB, GLenum dfactorRGB,
511848b8605Smrg                             GLenum sfactorA, GLenum dfactorA);
512848b8605Smrg   void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
513848b8605Smrg                              GLenum sfactorRGB, GLenum dfactorRGB,
514848b8605Smrg                              GLenum sfactorA, GLenum dfactorA);
515848b8605Smrg   /** Specify a plane against which all geometry is clipped */
516848b8605Smrg   void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
517848b8605Smrg   /** Enable and disable writing of frame buffer color components */
518848b8605Smrg   void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
519848b8605Smrg                     GLboolean bmask, GLboolean amask );
520848b8605Smrg   void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
521848b8605Smrg                            GLboolean gmask, GLboolean bmask, GLboolean amask);
522848b8605Smrg   /** Cause a material color to track the current color */
523848b8605Smrg   void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
524848b8605Smrg   /** Specify whether front- or back-facing facets can be culled */
525848b8605Smrg   void (*CullFace)(struct gl_context *ctx, GLenum mode);
526848b8605Smrg   /** Define front- and back-facing polygons */
527848b8605Smrg   void (*FrontFace)(struct gl_context *ctx, GLenum mode);
528848b8605Smrg   /** Specify the value used for depth buffer comparisons */
529848b8605Smrg   void (*DepthFunc)(struct gl_context *ctx, GLenum func);
530848b8605Smrg   /** Enable or disable writing into the depth buffer */
531848b8605Smrg   void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
532848b8605Smrg   /** Specify mapping of depth values from NDC to window coordinates */
533848b8605Smrg   void (*DepthRange)(struct gl_context *ctx);
534848b8605Smrg   /** Specify the current buffer for writing */
535848b8605Smrg   void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
536848b8605Smrg   /** Specify the buffers for writing for fragment programs*/
537848b8605Smrg   void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
538848b8605Smrg   /** Enable or disable server-side gl capabilities */
539848b8605Smrg   void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
540848b8605Smrg   /** Specify fog parameters */
541848b8605Smrg   void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
542848b8605Smrg   /** Specify implementation-specific hints */
543848b8605Smrg   void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
544848b8605Smrg   /** Set light source parameters.
545848b8605Smrg    * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
546848b8605Smrg    * been transformed to eye-space.
547848b8605Smrg    */
548848b8605Smrg   void (*Lightfv)(struct gl_context *ctx, GLenum light,
549848b8605Smrg		   GLenum pname, const GLfloat *params );
550848b8605Smrg   /** Set the lighting model parameters */
551848b8605Smrg   void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
552848b8605Smrg                        const GLfloat *params);
553848b8605Smrg   /** Specify the line stipple pattern */
554848b8605Smrg   void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
555848b8605Smrg   /** Specify the width of rasterized lines */
556848b8605Smrg   void (*LineWidth)(struct gl_context *ctx, GLfloat width);
557848b8605Smrg   /** Specify a logical pixel operation for color index rendering */
558848b8605Smrg   void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
559848b8605Smrg   void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
560848b8605Smrg                            const GLfloat *params);
561848b8605Smrg   /** Specify the diameter of rasterized points */
562848b8605Smrg   void (*PointSize)(struct gl_context *ctx, GLfloat size);
563848b8605Smrg   /** Select a polygon rasterization mode */
564848b8605Smrg   void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
565848b8605Smrg   /** Set the scale and units used to calculate depth values */
566848b8605Smrg   void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units);
567848b8605Smrg   /** Set the polygon stippling pattern */
568848b8605Smrg   void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
569848b8605Smrg   /* Specifies the current buffer for reading */
570848b8605Smrg   void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
571848b8605Smrg   /** Set rasterization mode */
572848b8605Smrg   void (*RenderMode)(struct gl_context *ctx, GLenum mode );
573848b8605Smrg   /** Define the scissor box */
574848b8605Smrg   void (*Scissor)(struct gl_context *ctx);
575848b8605Smrg   /** Select flat or smooth shading */
576848b8605Smrg   void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
577848b8605Smrg   /** OpenGL 2.0 two-sided StencilFunc */
578848b8605Smrg   void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
579848b8605Smrg                               GLint ref, GLuint mask);
580848b8605Smrg   /** OpenGL 2.0 two-sided StencilMask */
581848b8605Smrg   void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
582848b8605Smrg   /** OpenGL 2.0 two-sided StencilOp */
583848b8605Smrg   void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
584848b8605Smrg                             GLenum zfail, GLenum zpass);
585848b8605Smrg   /** Control the generation of texture coordinates */
586848b8605Smrg   void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
587848b8605Smrg		  const GLfloat *params);
588848b8605Smrg   /** Set texture environment parameters */
589848b8605Smrg   void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
590848b8605Smrg                  const GLfloat *param);
591848b8605Smrg   /** Set texture parameters */
592848b8605Smrg   void (*TexParameter)(struct gl_context *ctx,
593848b8605Smrg                        struct gl_texture_object *texObj,
594848b8605Smrg                        GLenum pname, const GLfloat *params);
595848b8605Smrg   /** Set the viewport */
596848b8605Smrg   void (*Viewport)(struct gl_context *ctx);
597848b8605Smrg   /*@}*/
598848b8605Smrg
599848b8605Smrg
600848b8605Smrg   /**
601848b8605Smrg    * \name Vertex/pixel buffer object functions
602848b8605Smrg    */
603848b8605Smrg   /*@{*/
604848b8605Smrg   struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
605848b8605Smrg                                                GLuint buffer, GLenum target);
606848b8605Smrg
607848b8605Smrg   void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
608848b8605Smrg
609848b8605Smrg   GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
610848b8605Smrg                           GLsizeiptrARB size, const GLvoid *data, GLenum usage,
611848b8605Smrg                           GLenum storageFlags, struct gl_buffer_object *obj);
612848b8605Smrg
613848b8605Smrg   void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
614848b8605Smrg			  GLsizeiptrARB size, const GLvoid *data,
615848b8605Smrg			  struct gl_buffer_object *obj );
616848b8605Smrg
617848b8605Smrg   void (*GetBufferSubData)( struct gl_context *ctx,
618848b8605Smrg			     GLintptrARB offset, GLsizeiptrARB size,
619848b8605Smrg			     GLvoid *data, struct gl_buffer_object *obj );
620848b8605Smrg
621848b8605Smrg   void (*ClearBufferSubData)( struct gl_context *ctx,
622848b8605Smrg                               GLintptr offset, GLsizeiptr size,
623848b8605Smrg                               const GLvoid *clearValue,
624848b8605Smrg                               GLsizeiptr clearValueSize,
625848b8605Smrg                               struct gl_buffer_object *obj );
626848b8605Smrg
627848b8605Smrg   void (*CopyBufferSubData)( struct gl_context *ctx,
628848b8605Smrg                              struct gl_buffer_object *src,
629848b8605Smrg                              struct gl_buffer_object *dst,
630848b8605Smrg                              GLintptr readOffset, GLintptr writeOffset,
631848b8605Smrg                              GLsizeiptr size );
632848b8605Smrg
633848b8605Smrg   /* Returns pointer to the start of the mapped range.
634848b8605Smrg    * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
635848b8605Smrg    */
636848b8605Smrg   void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
637848b8605Smrg                             GLsizeiptr length, GLbitfield access,
638848b8605Smrg                             struct gl_buffer_object *obj,
639848b8605Smrg                             gl_map_buffer_index index);
640848b8605Smrg
641848b8605Smrg   void (*FlushMappedBufferRange)(struct gl_context *ctx,
642848b8605Smrg                                  GLintptr offset, GLsizeiptr length,
643848b8605Smrg                                  struct gl_buffer_object *obj,
644848b8605Smrg                                  gl_map_buffer_index index);
645848b8605Smrg
646848b8605Smrg   GLboolean (*UnmapBuffer)( struct gl_context *ctx,
647848b8605Smrg			     struct gl_buffer_object *obj,
648848b8605Smrg                             gl_map_buffer_index index);
649848b8605Smrg   /*@}*/
650848b8605Smrg
651848b8605Smrg   /**
652848b8605Smrg    * \name Functions for GL_APPLE_object_purgeable
653848b8605Smrg    */
654848b8605Smrg   /*@{*/
655848b8605Smrg   /* variations on ObjectPurgeable */
656848b8605Smrg   GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
657848b8605Smrg                                   struct gl_buffer_object *obj, GLenum option);
658848b8605Smrg   GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
659848b8605Smrg                                   struct gl_renderbuffer *obj, GLenum option);
660848b8605Smrg   GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
661848b8605Smrg                                    struct gl_texture_object *obj,
662848b8605Smrg                                    GLenum option);
663848b8605Smrg
664848b8605Smrg   /* variations on ObjectUnpurgeable */
665848b8605Smrg   GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
666848b8605Smrg                                     struct gl_buffer_object *obj,
667848b8605Smrg                                     GLenum option);
668848b8605Smrg   GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
669848b8605Smrg                                     struct gl_renderbuffer *obj,
670848b8605Smrg                                     GLenum option);
671848b8605Smrg   GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
672848b8605Smrg                                      struct gl_texture_object *obj,
673848b8605Smrg                                      GLenum option);
674848b8605Smrg   /*@}*/
675848b8605Smrg
676848b8605Smrg   /**
677848b8605Smrg    * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
678848b8605Smrg    */
679848b8605Smrg   /*@{*/
680848b8605Smrg   struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
681848b8605Smrg                                             GLuint name);
682848b8605Smrg   struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
683848b8605Smrg                                               GLuint name);
684848b8605Smrg   void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
685848b8605Smrg                           struct gl_framebuffer *drawFb,
686848b8605Smrg                           struct gl_framebuffer *readFb);
687848b8605Smrg   void (*FramebufferRenderbuffer)(struct gl_context *ctx,
688848b8605Smrg                                   struct gl_framebuffer *fb,
689848b8605Smrg                                   GLenum attachment,
690848b8605Smrg                                   struct gl_renderbuffer *rb);
691848b8605Smrg   void (*RenderTexture)(struct gl_context *ctx,
692848b8605Smrg                         struct gl_framebuffer *fb,
693848b8605Smrg                         struct gl_renderbuffer_attachment *att);
694848b8605Smrg   void (*FinishRenderTexture)(struct gl_context *ctx,
695848b8605Smrg                               struct gl_renderbuffer *rb);
696848b8605Smrg   void (*ValidateFramebuffer)(struct gl_context *ctx,
697848b8605Smrg                               struct gl_framebuffer *fb);
698848b8605Smrg   /*@}*/
699848b8605Smrg   void (*BlitFramebuffer)(struct gl_context *ctx,
700848b8605Smrg                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
701848b8605Smrg                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
702848b8605Smrg                           GLbitfield mask, GLenum filter);
703848b8605Smrg   void (*DiscardFramebuffer)(struct gl_context *ctx,
704848b8605Smrg                              GLenum target, GLsizei numAttachments,
705848b8605Smrg                              const GLenum *attachments);
706848b8605Smrg
707848b8605Smrg   /**
708848b8605Smrg    * \name Query objects
709848b8605Smrg    */
710848b8605Smrg   /*@{*/
711848b8605Smrg   struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
712848b8605Smrg   void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
713848b8605Smrg   void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
714848b8605Smrg   void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
715848b8605Smrg   void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
716848b8605Smrg   void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
717848b8605Smrg   void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
718848b8605Smrg   /*@}*/
719848b8605Smrg
720848b8605Smrg   /**
721848b8605Smrg    * \name Performance monitors
722848b8605Smrg    */
723848b8605Smrg   /*@{*/
724848b8605Smrg   struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
725848b8605Smrg   void (*DeletePerfMonitor)(struct gl_context *ctx,
726848b8605Smrg                             struct gl_perf_monitor_object *m);
727848b8605Smrg   GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
728848b8605Smrg                                 struct gl_perf_monitor_object *m);
729848b8605Smrg
730848b8605Smrg   /** Stop an active performance monitor, discarding results. */
731848b8605Smrg   void (*ResetPerfMonitor)(struct gl_context *ctx,
732848b8605Smrg                            struct gl_perf_monitor_object *m);
733848b8605Smrg   void (*EndPerfMonitor)(struct gl_context *ctx,
734848b8605Smrg                          struct gl_perf_monitor_object *m);
735848b8605Smrg   GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
736848b8605Smrg                                             struct gl_perf_monitor_object *m);
737848b8605Smrg   void (*GetPerfMonitorResult)(struct gl_context *ctx,
738848b8605Smrg                                struct gl_perf_monitor_object *m,
739848b8605Smrg                                GLsizei dataSize,
740848b8605Smrg                                GLuint *data,
741848b8605Smrg                                GLint *bytesWritten);
742848b8605Smrg   /*@}*/
743848b8605Smrg
744848b8605Smrg
745848b8605Smrg   /**
746848b8605Smrg    * \name Vertex Array objects
747848b8605Smrg    */
748848b8605Smrg   /*@{*/
749848b8605Smrg   struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
750848b8605Smrg   void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
751848b8605Smrg   void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
752848b8605Smrg   /*@}*/
753848b8605Smrg
754848b8605Smrg   /**
755848b8605Smrg    * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
756848b8605Smrg    */
757848b8605Smrg   /*@{*/
758848b8605Smrg   struct gl_shader *(*NewShader)(struct gl_context *ctx,
759848b8605Smrg                                  GLuint name, GLenum type);
760848b8605Smrg   void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
761848b8605Smrg   struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx,
762848b8605Smrg                                                 GLuint name);
763848b8605Smrg   void (*DeleteShaderProgram)(struct gl_context *ctx,
764848b8605Smrg                               struct gl_shader_program *shProg);
765848b8605Smrg   void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
766848b8605Smrg   /*@}*/
767848b8605Smrg
768848b8605Smrg
769848b8605Smrg   /**
770848b8605Smrg    * \name Support for multiple T&L engines
771848b8605Smrg    */
772848b8605Smrg   /*@{*/
773848b8605Smrg
774848b8605Smrg   /**
775848b8605Smrg    * Set by the driver-supplied T&L engine.
776848b8605Smrg    *
777848b8605Smrg    * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
778848b8605Smrg    */
779848b8605Smrg   GLuint CurrentExecPrimitive;
780848b8605Smrg
781848b8605Smrg   /**
782848b8605Smrg    * Current glBegin state of an in-progress compilation.  May be
783848b8605Smrg    * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
784848b8605Smrg    * or PRIM_UNKNOWN.
785848b8605Smrg    */
786848b8605Smrg   GLuint CurrentSavePrimitive;
787848b8605Smrg
788848b8605Smrg
789848b8605Smrg#define FLUSH_STORED_VERTICES 0x1
790848b8605Smrg#define FLUSH_UPDATE_CURRENT  0x2
791848b8605Smrg   /**
792848b8605Smrg    * Set by the driver-supplied T&L engine whenever vertices are buffered
793848b8605Smrg    * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
794848b8605Smrg    * is not updated.  A bitmask of the FLUSH_x values above.
795848b8605Smrg    *
796848b8605Smrg    * The dd_function_table::FlushVertices call below may be used to resolve
797848b8605Smrg    * these conditions.
798848b8605Smrg    */
799848b8605Smrg   GLbitfield NeedFlush;
800848b8605Smrg
801848b8605Smrg   /** Need to call SaveFlushVertices() upon state change? */
802848b8605Smrg   GLboolean SaveNeedFlush;
803848b8605Smrg
804848b8605Smrg   /* Called prior to any of the GLvertexformat functions being
805848b8605Smrg    * called.  Paired with Driver.FlushVertices().
806848b8605Smrg    */
807848b8605Smrg   void (*BeginVertices)( struct gl_context *ctx );
808848b8605Smrg
809848b8605Smrg   /**
810848b8605Smrg    * If inside glBegin()/glEnd(), it should ASSERT(0).  Otherwise, if
811848b8605Smrg    * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
812848b8605Smrg    * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
813848b8605Smrg    * __struct gl_contextRec::Current and gl_light_attrib::Material
814848b8605Smrg    *
815848b8605Smrg    * Note that the default T&L engine never clears the
816848b8605Smrg    * FLUSH_UPDATE_CURRENT bit, even after performing the update.
817848b8605Smrg    */
818848b8605Smrg   void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
819848b8605Smrg   void (*SaveFlushVertices)( struct gl_context *ctx );
820848b8605Smrg
821848b8605Smrg   /**
822848b8605Smrg    * Give the driver the opportunity to hook in its own vtxfmt for
823848b8605Smrg    * compiling optimized display lists.  This is called on each valid
824848b8605Smrg    * glBegin() during list compilation.
825848b8605Smrg    */
826848b8605Smrg   GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
827848b8605Smrg
828848b8605Smrg   /**
829848b8605Smrg    * Notify driver that the special derived value _NeedEyeCoords has
830848b8605Smrg    * changed.
831848b8605Smrg    */
832848b8605Smrg   void (*LightingSpaceChange)( struct gl_context *ctx );
833848b8605Smrg
834848b8605Smrg   /**
835848b8605Smrg    * Called by glNewList().
836848b8605Smrg    *
837848b8605Smrg    * Let the T&L component know what is going on with display lists
838848b8605Smrg    * in time to make changes to dispatch tables, etc.
839848b8605Smrg    */
840848b8605Smrg   void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
841848b8605Smrg   /**
842848b8605Smrg    * Called by glEndList().
843848b8605Smrg    *
844848b8605Smrg    * \sa dd_function_table::NewList.
845848b8605Smrg    */
846848b8605Smrg   void (*EndList)( struct gl_context *ctx );
847848b8605Smrg
848848b8605Smrg   /**
849848b8605Smrg    * Called by glCallList(s).
850848b8605Smrg    *
851848b8605Smrg    * Notify the T&L component before and after calling a display list.
852848b8605Smrg    */
853848b8605Smrg   void (*BeginCallList)( struct gl_context *ctx,
854848b8605Smrg			  struct gl_display_list *dlist );
855848b8605Smrg   /**
856848b8605Smrg    * Called by glEndCallList().
857848b8605Smrg    *
858848b8605Smrg    * \sa dd_function_table::BeginCallList.
859848b8605Smrg    */
860848b8605Smrg   void (*EndCallList)( struct gl_context *ctx );
861848b8605Smrg
862848b8605Smrg   /**@}*/
863848b8605Smrg
864848b8605Smrg   /**
865848b8605Smrg    * \name GL_ARB_sync interfaces
866848b8605Smrg    */
867848b8605Smrg   /*@{*/
868848b8605Smrg   struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
869848b8605Smrg   void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
870848b8605Smrg                     GLenum, GLbitfield);
871848b8605Smrg   void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
872848b8605Smrg   void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
873848b8605Smrg   void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
874848b8605Smrg			  GLbitfield, GLuint64);
875848b8605Smrg   void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
876848b8605Smrg			  GLbitfield, GLuint64);
877848b8605Smrg   /*@}*/
878848b8605Smrg
879848b8605Smrg   /** GL_NV_conditional_render */
880848b8605Smrg   void (*BeginConditionalRender)(struct gl_context *ctx,
881848b8605Smrg                                  struct gl_query_object *q,
882848b8605Smrg                                  GLenum mode);
883848b8605Smrg   void (*EndConditionalRender)(struct gl_context *ctx,
884848b8605Smrg                                struct gl_query_object *q);
885848b8605Smrg
886848b8605Smrg   /**
887848b8605Smrg    * \name GL_OES_draw_texture interface
888848b8605Smrg    */
889848b8605Smrg   /*@{*/
890848b8605Smrg   void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
891848b8605Smrg                   GLfloat width, GLfloat height);
892848b8605Smrg   /*@}*/
893848b8605Smrg
894848b8605Smrg   /**
895848b8605Smrg    * \name GL_OES_EGL_image interface
896848b8605Smrg    */
897848b8605Smrg   void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
898848b8605Smrg				   struct gl_texture_object *texObj,
899848b8605Smrg				   struct gl_texture_image *texImage,
900848b8605Smrg				   GLeglImageOES image_handle);
901848b8605Smrg   void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
902848b8605Smrg					     struct gl_renderbuffer *rb,
903848b8605Smrg					     void *image_handle);
904848b8605Smrg
905848b8605Smrg   /**
906848b8605Smrg    * \name GL_EXT_transform_feedback interface
907848b8605Smrg    */
908848b8605Smrg   struct gl_transform_feedback_object *
909848b8605Smrg        (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
910848b8605Smrg   void (*DeleteTransformFeedback)(struct gl_context *ctx,
911848b8605Smrg                                   struct gl_transform_feedback_object *obj);
912848b8605Smrg   void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
913848b8605Smrg                                  struct gl_transform_feedback_object *obj);
914848b8605Smrg   void (*EndTransformFeedback)(struct gl_context *ctx,
915848b8605Smrg                                struct gl_transform_feedback_object *obj);
916848b8605Smrg   void (*PauseTransformFeedback)(struct gl_context *ctx,
917848b8605Smrg                                  struct gl_transform_feedback_object *obj);
918848b8605Smrg   void (*ResumeTransformFeedback)(struct gl_context *ctx,
919848b8605Smrg                                   struct gl_transform_feedback_object *obj);
920848b8605Smrg
921848b8605Smrg   /**
922848b8605Smrg    * Return the number of vertices written to a stream during the last
923848b8605Smrg    * Begin/EndTransformFeedback block.
924848b8605Smrg    */
925848b8605Smrg   GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
926848b8605Smrg                                       struct gl_transform_feedback_object *obj,
927848b8605Smrg                                       GLuint stream);
928848b8605Smrg
929848b8605Smrg   /**
930848b8605Smrg    * \name GL_NV_texture_barrier interface
931848b8605Smrg    */
932848b8605Smrg   void (*TextureBarrier)(struct gl_context *ctx);
933848b8605Smrg
934848b8605Smrg   /**
935848b8605Smrg    * \name GL_ARB_sampler_objects
936848b8605Smrg    */
937848b8605Smrg   struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
938848b8605Smrg                                                  GLuint name);
939848b8605Smrg   void (*DeleteSamplerObject)(struct gl_context *ctx,
940848b8605Smrg                               struct gl_sampler_object *samp);
941848b8605Smrg
942848b8605Smrg   /**
943848b8605Smrg    * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
944848b8605Smrg    * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
945848b8605Smrg    */
946848b8605Smrg   uint64_t (*GetTimestamp)(struct gl_context *ctx);
947848b8605Smrg
948848b8605Smrg   /**
949848b8605Smrg    * \name GL_ARB_texture_multisample
950848b8605Smrg    */
951848b8605Smrg   void (*GetSamplePosition)(struct gl_context *ctx,
952848b8605Smrg                             struct gl_framebuffer *fb,
953848b8605Smrg                             GLuint index,
954848b8605Smrg                             GLfloat *outValue);
955848b8605Smrg
956848b8605Smrg   /**
957848b8605Smrg    * \name NV_vdpau_interop interface
958848b8605Smrg    */
959848b8605Smrg   void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
960848b8605Smrg                           GLenum access, GLboolean output,
961848b8605Smrg                           struct gl_texture_object *texObj,
962848b8605Smrg                           struct gl_texture_image *texImage,
963848b8605Smrg                           const GLvoid *vdpSurface, GLuint index);
964848b8605Smrg   void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
965848b8605Smrg                             GLenum access, GLboolean output,
966848b8605Smrg                             struct gl_texture_object *texObj,
967848b8605Smrg                             struct gl_texture_image *texImage,
968848b8605Smrg                             const GLvoid *vdpSurface, GLuint index);
969848b8605Smrg
970848b8605Smrg   /**
971848b8605Smrg    * Query reset status for GL_ARB_robustness
972848b8605Smrg    *
973848b8605Smrg    * Per \c glGetGraphicsResetStatusARB, this function should return a
974848b8605Smrg    * non-zero value once after a reset.  If a reset is non-atomic, the
975848b8605Smrg    * non-zero status should be returned for the duration of the reset.
976848b8605Smrg    */
977848b8605Smrg   GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
978848b8605Smrg
979848b8605Smrg   /**
980848b8605Smrg    * \name GL_ARB_shader_image_load_store interface.
981848b8605Smrg    */
982848b8605Smrg   /** @{ */
983848b8605Smrg   void (*BindImageTexture)(struct gl_context *ctx,
984848b8605Smrg                            struct gl_image_unit *unit,
985848b8605Smrg                            struct gl_texture_object *texObj,
986848b8605Smrg                            GLint level, GLboolean layered, GLint layer,
987848b8605Smrg                            GLenum access, GLenum format);
988848b8605Smrg
989848b8605Smrg   void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
990848b8605Smrg   /** @} */
991848b8605Smrg};
992848b8605Smrg
993848b8605Smrg
994848b8605Smrg/**
995848b8605Smrg * Per-vertex functions.
996848b8605Smrg *
997848b8605Smrg * These are the functions which can appear between glBegin and glEnd.
998848b8605Smrg * Depending on whether we're inside or outside a glBegin/End pair
999848b8605Smrg * and whether we're in immediate mode or building a display list, these
1000848b8605Smrg * functions behave differently.  This structure allows us to switch
1001848b8605Smrg * between those modes more easily.
1002848b8605Smrg *
1003848b8605Smrg * Generally, these pointers point to functions in the VBO module.
1004848b8605Smrg */
1005848b8605Smrgtypedef struct {
1006848b8605Smrg   void (GLAPIENTRYP ArrayElement)( GLint );
1007848b8605Smrg   void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
1008848b8605Smrg   void (GLAPIENTRYP Color3fv)( const GLfloat * );
1009848b8605Smrg   void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1010848b8605Smrg   void (GLAPIENTRYP Color4fv)( const GLfloat * );
1011848b8605Smrg   void (GLAPIENTRYP EdgeFlag)( GLboolean );
1012848b8605Smrg   void (GLAPIENTRYP EvalCoord1f)( GLfloat );
1013848b8605Smrg   void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
1014848b8605Smrg   void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
1015848b8605Smrg   void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
1016848b8605Smrg   void (GLAPIENTRYP EvalPoint1)( GLint );
1017848b8605Smrg   void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
1018848b8605Smrg   void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
1019848b8605Smrg   void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
1020848b8605Smrg   void (GLAPIENTRYP Indexf)( GLfloat );
1021848b8605Smrg   void (GLAPIENTRYP Indexfv)( const GLfloat * );
1022848b8605Smrg   void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
1023848b8605Smrg   void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
1024848b8605Smrg   void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
1025848b8605Smrg   void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
1026848b8605Smrg   void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
1027848b8605Smrg   void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
1028848b8605Smrg   void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
1029848b8605Smrg   void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
1030848b8605Smrg   void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
1031848b8605Smrg   void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
1032848b8605Smrg   void (GLAPIENTRYP Normal3fv)( const GLfloat * );
1033848b8605Smrg   void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
1034848b8605Smrg   void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
1035848b8605Smrg   void (GLAPIENTRYP TexCoord1f)( GLfloat );
1036848b8605Smrg   void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
1037848b8605Smrg   void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
1038848b8605Smrg   void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
1039848b8605Smrg   void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
1040848b8605Smrg   void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
1041848b8605Smrg   void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1042848b8605Smrg   void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
1043848b8605Smrg   void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
1044848b8605Smrg   void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
1045848b8605Smrg   void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
1046848b8605Smrg   void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
1047848b8605Smrg   void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1048848b8605Smrg   void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
1049848b8605Smrg   void (GLAPIENTRYP CallList)( GLuint );
1050848b8605Smrg   void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
1051848b8605Smrg   void (GLAPIENTRYP Begin)( GLenum );
1052848b8605Smrg   void (GLAPIENTRYP End)( void );
1053848b8605Smrg   void (GLAPIENTRYP PrimitiveRestartNV)( void );
1054848b8605Smrg   /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
1055848b8605Smrg   void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
1056848b8605Smrg   void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
1057848b8605Smrg   void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
1058848b8605Smrg   void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
1059848b8605Smrg   void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1060848b8605Smrg   void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
1061848b8605Smrg   void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1062848b8605Smrg   void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
1063848b8605Smrg   /* GL_ARB_vertex_program */
1064848b8605Smrg   void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
1065848b8605Smrg   void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
1066848b8605Smrg   void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
1067848b8605Smrg   void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
1068848b8605Smrg   void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1069848b8605Smrg   void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
1070848b8605Smrg   void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1071848b8605Smrg   void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
1072848b8605Smrg
1073848b8605Smrg   /* GL_EXT_gpu_shader4 / GL 3.0 */
1074848b8605Smrg   void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
1075848b8605Smrg   void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
1076848b8605Smrg   void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
1077848b8605Smrg   void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
1078848b8605Smrg   void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
1079848b8605Smrg   void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
1080848b8605Smrg   void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
1081848b8605Smrg
1082848b8605Smrg   void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
1083848b8605Smrg   void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
1084848b8605Smrg   void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
1085848b8605Smrg   void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1086848b8605Smrg   void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
1087848b8605Smrg   void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
1088848b8605Smrg   void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
1089848b8605Smrg
1090848b8605Smrg   /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1091848b8605Smrg   void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1092848b8605Smrg   void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1093848b8605Smrg
1094848b8605Smrg   void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1095848b8605Smrg   void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1096848b8605Smrg
1097848b8605Smrg   void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1098848b8605Smrg   void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1099848b8605Smrg
1100848b8605Smrg   void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1101848b8605Smrg   void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1102848b8605Smrg
1103848b8605Smrg   void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1104848b8605Smrg   void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1105848b8605Smrg
1106848b8605Smrg   void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1107848b8605Smrg   void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1108848b8605Smrg
1109848b8605Smrg   void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1110848b8605Smrg   void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1111848b8605Smrg
1112848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1113848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1114848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1115848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1116848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1117848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1118848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1119848b8605Smrg   void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1120848b8605Smrg
1121848b8605Smrg   void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1122848b8605Smrg   void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1123848b8605Smrg
1124848b8605Smrg   void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1125848b8605Smrg   void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1126848b8605Smrg
1127848b8605Smrg   void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1128848b8605Smrg   void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1129848b8605Smrg
1130848b8605Smrg   void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1131848b8605Smrg   void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1132848b8605Smrg
1133848b8605Smrg   void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1134848b8605Smrg					GLboolean normalized, GLuint value);
1135848b8605Smrg   void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1136848b8605Smrg					GLboolean normalized, GLuint value);
1137848b8605Smrg   void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1138848b8605Smrg					GLboolean normalized, GLuint value);
1139848b8605Smrg   void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1140848b8605Smrg					GLboolean normalized, GLuint value);
1141848b8605Smrg   void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1142848b8605Smrg					GLboolean normalized,
1143848b8605Smrg					 const GLuint *value);
1144848b8605Smrg   void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1145848b8605Smrg					GLboolean normalized,
1146848b8605Smrg					 const GLuint *value);
1147848b8605Smrg   void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1148848b8605Smrg					GLboolean normalized,
1149848b8605Smrg					 const GLuint *value);
1150848b8605Smrg   void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1151848b8605Smrg					 GLboolean normalized,
1152848b8605Smrg					 const GLuint *value);
1153848b8605Smrg} GLvertexformat;
1154848b8605Smrg
1155848b8605Smrg
1156848b8605Smrg#endif /* DD_INCLUDED */
1157