diff options
author | Luc Verhaegen <libv@skynet.be> | 2010-03-13 04:47:47 +0100 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2010-03-13 04:47:47 +0100 |
commit | 31cf9104d4a679eb625d5abf9e365b90b9f5efbf (patch) | |
tree | bc14486b3673faa685bb347c1cd9191f7488dfae | |
parent | 87a6ef144f9b38898ec236450a92421f4891ad22 (diff) |
DRI SDK headers from mesa 7.5.0.
58 files changed, 2376 insertions, 1619 deletions
@@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.4 + * Version: 7.5 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -58,7 +58,11 @@ # else /* for use with static link lib build of Win32 edition only */ # define GLAPI extern # endif /* _STATIC_MESA support */ -# define GLAPIENTRY __stdcall +# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */ +# define GLAPIENTRY +# else +# define GLAPIENTRY __stdcall +# endif #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ # define GLAPI extern # define GLAPIENTRY __stdcall @@ -84,8 +88,9 @@ #include <windows.h> #endif -#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) \ - && !defined(OPENSTEP) && !defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_WIN32_WCE) \ + && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) \ + && !defined(__CYGWIN__) || defined(__MINGW32__) #include <GL/mesa_wgl.h> #endif @@ -716,6 +716,24 @@ extern "C" { /* reuse GL_VERTEX_ARRAY_BINDING */ #endif +#ifndef GL_VERSION_3_1 +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART 0x8F9D +#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E +#endif + #ifndef GL_ARB_multitexture #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE1_ARB 0x84C1 @@ -1327,6 +1345,7 @@ extern "C" { #endif #ifndef GL_ARB_instanced_arrays +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE #endif #ifndef GL_ARB_map_buffer_range @@ -1382,6 +1401,51 @@ extern "C" { #define GL_VERTEX_ARRAY_BINDING 0x85B5 #endif +#ifndef GL_ARB_uniform_buffer_object +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX_ARB 0xFFFFFFFFu +#endif + +#ifndef GL_ARB_compatibility +/* ARB_compatibility just defines tokens from core 3.0 */ +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#endif + #ifndef GL_EXT_abgr #define GL_ABGR_EXT 0x8000 #endif @@ -5341,6 +5405,38 @@ typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); #endif +#ifndef GL_ARB_uniform_buffer_object +#define GL_ARB_uniform_buffer_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUniformIndices (GLuint, GLsizei, const GLchar* *, GLuint *); +GLAPI void APIENTRY glGetActiveUniformsiv (GLuint, GLsizei, const GLuint *, GLenum, GLint *); +GLAPI void APIENTRY glGetActiveUniformName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *); +GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint, const GLchar *); +GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint, GLuint, GLenum, GLint *); +GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint, GLuint, GLsizei, GLsizei *, GLchar *); +GLAPI void APIENTRY glUniformBlockBinding (GLuint, GLuint, GLuint); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +#endif + +#ifndef GL_ARB_compatibility +#define GL_ARB_compatibility 1 +#endif + +#ifndef GL_ARB_copy_buffer +#define GL_ARB_copy_buffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glCopyBufferSubData (GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +#endif + #ifndef GL_EXT_abgr #define GL_EXT_abgr 1 #endif diff --git a/GL/internal/dri_interface.h b/GL/internal/dri_interface.h index 09ae940..910c916 100644 --- a/GL/internal/dri_interface.h +++ b/GL/internal/dri_interface.h @@ -41,7 +41,7 @@ #define DRI_INTERFACE_H /* For archs with no drm.h */ -#if !defined(__APPLE__) && !defined(__CYGWIN__) +#if !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__GNU__) #include <drm.h> #else typedef unsigned int drm_context_t; @@ -78,6 +78,7 @@ typedef struct __DRIswrastExtensionRec __DRIswrastExtension; typedef struct __DRIbufferRec __DRIbuffer; typedef struct __DRIdri2ExtensionRec __DRIdri2Extension; typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension; +typedef struct __DRI2flushExtensionRec __DRI2flushExtension; /*@}*/ @@ -230,7 +231,7 @@ struct __DRItexOffsetExtensionRec { #define __DRI_TEX_BUFFER "DRI_TexBuffer" -#define __DRI_TEX_BUFFER_VERSION 1 +#define __DRI_TEX_BUFFER_VERSION 2 struct __DRItexBufferExtensionRec { __DRIextension base; @@ -238,11 +239,33 @@ struct __DRItexBufferExtensionRec { * Method to override base texture image with the contents of a * __DRIdrawable. * - * For GLX_EXT_texture_from_pixmap with AIGLX. + * For GLX_EXT_texture_from_pixmap with AIGLX. Deprecated in favor of + * setTexBuffer2 in version 2 of this interface */ void (*setTexBuffer)(__DRIcontext *pDRICtx, GLint target, __DRIdrawable *pDraw); + + /** + * Method to override base texture image with the contents of a + * __DRIdrawable, including the required texture format attribute. + * + * For GLX_EXT_texture_from_pixmap with AIGLX. + */ + void (*setTexBuffer2)(__DRIcontext *pDRICtx, + GLint target, + GLint format, + __DRIdrawable *pDraw); +}; + +/** + * Used by drivers that implement DRI2 + */ +#define __DRI2_FLUSH "DRI2_Flush" +#define __DRI2_FLUSH_VERSION 1 +struct __DRI2flushExtensionRec { + __DRIextension base; + void (*flush)(__DRIdrawable *drawable); }; @@ -626,6 +649,7 @@ struct __DRIswrastExtensionRec { #define __DRI_BUFFER_ACCUM 6 #define __DRI_BUFFER_FAKE_FRONT_LEFT 7 #define __DRI_BUFFER_FAKE_FRONT_RIGHT 8 +#define __DRI_BUFFER_DEPTH_STENCIL 9 /**< Only available with DRI2 1.1 */ struct __DRIbufferRec { unsigned int attachment; @@ -636,7 +660,7 @@ struct __DRIbufferRec { }; #define __DRI_DRI2_LOADER "DRI_DRI2Loader" -#define __DRI_DRI2_LOADER_VERSION 2 +#define __DRI_DRI2_LOADER_VERSION 3 struct __DRIdri2LoaderExtensionRec { __DRIextension base; @@ -657,6 +681,31 @@ struct __DRIdri2LoaderExtensionRec { * into __DRIdri2ExtensionRec::createNewDrawable */ void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate); + + + /** + * Get list of buffers from the server + * + * Gets a list of buffer for the specified set of attachments. Unlike + * \c ::getBuffers, this function takes a list of attachments paired with + * opaque \c unsigned \c int value describing the format of the buffer. + * It is the responsibility of the caller to know what the service that + * allocates the buffers will expect to receive for the format. + * + * \param driDrawable Drawable whose buffers are being queried. + * \param width Output where the width of the buffers is stored. + * \param height Output where the height of the buffers is stored. + * \param attachments List of pairs of attachment ID and opaque format + * requested for the drawable. + * \param count Number of attachment / format pairs stored in + * \c attachments. + * \param loaderPrivate Loader's private data that was previously passed + * into __DRIdri2ExtensionRec::createNewDrawable. + */ + __DRIbuffer *(*getBuffersWithFormat)(__DRIdrawable *driDrawable, + int *width, int *height, + unsigned int *attachments, int count, + int *out_count, void *loaderPrivate); }; /** diff --git a/GL/internal/glcore.h b/GL/internal/glcore.h index 99de6c0..18f6576 100644 --- a/GL/internal/glcore.h +++ b/GL/internal/glcore.h @@ -31,7 +31,9 @@ * Silicon Graphics, Inc. */ +#if !defined(_WIN32_WCE) #include <sys/types.h> +#endif #define GL_CORE_SGI 1 #define GL_CORE_MESA 2 @@ -176,4 +178,8 @@ typedef struct __GLcontextModesRec { #define GLX_TEXTURE_2D_BIT_EXT 0x00000002 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA + #endif /* __gl_core_h_ */ diff --git a/mesa/drivers/dri/common/dri_util.h b/mesa/drivers/dri/common/dri_util.h index c6781f1..c95a5c8 100644 --- a/mesa/drivers/dri/common/dri_util.h +++ b/mesa/drivers/dri/common/dri_util.h @@ -1,25 +1,3 @@ -/* $XFree86: xc/lib/GL/dri/dri_util.h,v 1.1 2002/02/22 21:32:52 dawes Exp $ */ -/** - * \file dri_util.h - * DRI utility functions definitions. - * - * This module acts as glue between GLX and the actual hardware driver. A DRI - * driver doesn't really \e have to use any of this - it's optional. But, some - * useful stuff is done here that otherwise would have to be duplicated in most - * drivers. - * - * Basically, these utility functions take care of some of the dirty details of - * screen initialization, context creation, context binding, DRM setup, etc. - * - * These functions are compiled into each DRI driver so libGL.so knows nothing - * about them. - * - * \sa dri_util.c. - * - * \author Kevin E. Martin <kevin@precisioninsight.com> - * \author Brian Paul <brian@precisioninsight.com> - */ - /* * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. @@ -45,6 +23,26 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/** + * \file dri_util.h + * DRI utility functions definitions. + * + * This module acts as glue between GLX and the actual hardware driver. A DRI + * driver doesn't really \e have to use any of this - it's optional. But, some + * useful stuff is done here that otherwise would have to be duplicated in most + * drivers. + * + * Basically, these utility functions take care of some of the dirty details of + * screen initialization, context creation, context binding, DRM setup, etc. + * + * These functions are compiled into each DRI driver so libGL.so knows nothing + * about them. + * + * \sa dri_util.c. + * + * \author Kevin E. Martin <kevin@precisioninsight.com> + * \author Brian Paul <brian@precisioninsight.com> + */ #ifndef _DRI_UTIL_H_ #define _DRI_UTIL_H_ diff --git a/mesa/drivers/dri/common/extension_helper.h b/mesa/drivers/dri/common/extension_helper.h index b977ebf..8dcaaee 100644 --- a/mesa/drivers/dri/common/extension_helper.h +++ b/mesa/drivers/dri/common/extension_helper.h @@ -119,9 +119,10 @@ static const char ActiveTextureARB_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_blit) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_blit) static const char BlitFramebufferEXT_names[] = "iiiiiiiiii\0" /* Parameter signature */ + "glBlitFramebuffer\0" "glBlitFramebufferEXT\0" ""; #endif @@ -433,17 +434,18 @@ static const char Color4ubVertex3fvSUN_names[] = ""; #endif -#if defined(need_GL_EXT_texture_array) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_texture_array) static const char FramebufferTextureLayerEXT_names[] = "iiiii\0" /* Parameter signature */ + "glFramebufferTextureLayer\0" "glFramebufferTextureLayerEXT\0" ""; #endif #if defined(need_GL_SGIX_list_priority) -static const char GetListParameterivSGIX_names[] = +static const char GetListParameterfvSGIX_names[] = "iip\0" /* Parameter signature */ - "glGetListParameterivSGIX\0" + "glGetListParameterfvSGIX\0" ""; #endif @@ -777,6 +779,13 @@ static const char VertexAttribs4fvNV_names[] = ""; #endif +#if defined(need_GL_NV_vertex_array_range) +static const char VertexArrayRangeNV_names[] = + "ip\0" /* Parameter signature */ + "glVertexArrayRangeNV\0" + ""; +#endif + #if defined(need_GL_SGIX_fragment_lighting) static const char FragmentLightiSGIX_names[] = "iii\0" /* Parameter signature */ @@ -946,9 +955,10 @@ static const char VertexAttribs3fvNV_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char GenerateMipmapEXT_names[] = "i\0" /* Parameter signature */ + "glGenerateMipmap\0" "glGenerateMipmapEXT\0" ""; #endif @@ -1077,13 +1087,6 @@ static const char AreTexturesResident_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) -static const char IsRenderbufferEXT_names[] = - "i\0" /* Parameter signature */ - "glIsRenderbufferEXT\0" - ""; -#endif - #if defined(need_GL_VERSION_2_0) || defined(need_GL_ATI_separate_stencil) static const char StencilOpSeparate_names[] = "iiii\0" /* Parameter signature */ @@ -1171,9 +1174,10 @@ static const char TexCoord2fNormal3fVertex3fSUN_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char RenderbufferStorageEXT_names[] = "iiii\0" /* Parameter signature */ + "glRenderbufferStorage\0" "glRenderbufferStorageEXT\0" ""; #endif @@ -1364,9 +1368,10 @@ static const char SpriteParameterfvSGIX_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char CheckFramebufferStatusEXT_names[] = "i\0" /* Parameter signature */ + "glCheckFramebufferStatus\0" "glCheckFramebufferStatusEXT\0" ""; #endif @@ -1554,13 +1559,6 @@ static const char FragmentLightivSGIX_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) -static const char DeleteRenderbuffersEXT_names[] = - "ip\0" /* Parameter signature */ - "glDeleteRenderbuffersEXT\0" - ""; -#endif - #if defined(need_GL_EXT_pixel_transform) static const char PixelTransformParameterfvEXT_names[] = "iip\0" /* Parameter signature */ @@ -1621,9 +1619,10 @@ static const char WindowPos2dMESA_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char FramebufferTexture3DEXT_names[] = "iiiiii\0" /* Parameter signature */ + "glFramebufferTexture3D\0" "glFramebufferTexture3DEXT\0" ""; #endif @@ -1673,10 +1672,11 @@ static const char IndexFuncEXT_names[] = ""; #endif -#if defined(need_GL_SGIX_list_priority) -static const char GetListParameterfvSGIX_names[] = - "iip\0" /* Parameter signature */ - "glGetListParameterfvSGIX\0" +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) +static const char FramebufferTexture2DEXT_names[] = + "iiiii\0" /* Parameter signature */ + "glFramebufferTexture2D\0" + "glFramebufferTexture2DEXT\0" ""; #endif @@ -1763,13 +1763,6 @@ static const char DeleteFencesNV_names[] = ""; #endif -#if defined(need_GL_SGIX_polynomial_ffd) -static const char DeformationMap3dSGIX_names[] = - "iddiiddiiddiip\0" /* Parameter signature */ - "glDeformationMap3dSGIX\0" - ""; -#endif - #if defined(need_GL_VERSION_2_0) static const char IsShader_names[] = "i\0" /* Parameter signature */ @@ -1894,6 +1887,13 @@ static const char MatrixIndexuivARB_names[] = ""; #endif +#if defined(need_GL_ARB_framebuffer_object) +static const char RenderbufferStorageMultisample_names[] = + "iiiii\0" /* Parameter signature */ + "glRenderbufferStorageMultisample\0" + ""; +#endif + #if defined(need_GL_EXT_coordinate_frame) static const char Tangent3sEXT_names[] = "iii\0" /* Parameter signature */ @@ -1944,9 +1944,10 @@ static const char VertexAttrib2dvNV_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char FramebufferRenderbufferEXT_names[] = "iiii\0" /* Parameter signature */ + "glFramebufferRenderbuffer\0" "glFramebufferRenderbufferEXT\0" ""; #endif @@ -1973,9 +1974,10 @@ static const char SetFenceNV_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char FramebufferTexture1DEXT_names[] = "iiiii\0" /* Parameter signature */ + "glFramebufferTexture1D\0" "glFramebufferTexture1DEXT\0" ""; #endif @@ -2105,9 +2107,10 @@ static const char Tangent3fvEXT_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char BindFramebufferEXT_names[] = "ii\0" /* Parameter signature */ + "glBindFramebuffer\0" "glBindFramebufferEXT\0" ""; #endif @@ -2488,9 +2491,10 @@ static const char MapParameterivNV_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char GenRenderbuffersEXT_names[] = "ip\0" /* Parameter signature */ + "glGenRenderbuffers\0" "glGenRenderbuffersEXT\0" ""; #endif @@ -2636,6 +2640,13 @@ static const char GetProgramStringARB_names[] = ""; #endif +#if defined(need_GL_ATI_envmap_bumpmap) +static const char TexBumpParameterfvATI_names[] = + "ip\0" /* Parameter signature */ + "glTexBumpParameterfvATI\0" + ""; +#endif + #if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_shader_objects) static const char CompileShaderARB_names[] = "i\0" /* Parameter signature */ @@ -2952,9 +2963,10 @@ static const char WindowPos2ivMESA_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char IsFramebufferEXT_names[] = "i\0" /* Parameter signature */ + "glIsFramebuffer\0" "glIsFramebufferEXT\0" ""; #endif @@ -2975,6 +2987,13 @@ static const char GetVertexAttribdvARB_names[] = ""; #endif +#if defined(need_GL_ATI_envmap_bumpmap) +static const char TexBumpParameterivATI_names[] = + "ip\0" /* Parameter signature */ + "glTexBumpParameterivATI\0" + ""; +#endif + #if defined(need_GL_EXT_convolution) static const char GetSeparableFilter_names[] = "iiippp\0" /* Parameter signature */ @@ -3125,13 +3144,6 @@ static const char ReplacementCodeuiSUN_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) -static const char FramebufferTexture2DEXT_names[] = - "iiiii\0" /* Parameter signature */ - "glFramebufferTexture2DEXT\0" - ""; -#endif - #if defined(need_GL_NV_vertex_program) static const char VertexAttribPointerNV_names[] = "iiiip\0" /* Parameter signature */ @@ -3139,13 +3151,21 @@ static const char VertexAttribPointerNV_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char GetFramebufferAttachmentParameterivEXT_names[] = "iiip\0" /* Parameter signature */ + "glGetFramebufferAttachmentParameteriv\0" "glGetFramebufferAttachmentParameterivEXT\0" ""; #endif +#if defined(need_GL_EXT_pixel_transform) +static const char PixelTransformParameterfEXT_names[] = + "iif\0" /* Parameter signature */ + "glPixelTransformParameterfEXT\0" + ""; +#endif + #if defined(need_GL_VERSION_1_3) static const char MultiTexCoord4dvARB_names[] = "ip\0" /* Parameter signature */ @@ -3264,9 +3284,10 @@ static const char VertexAttrib3fvARB_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char DeleteFramebuffersEXT_names[] = "ip\0" /* Parameter signature */ + "glDeleteFramebuffers\0" "glDeleteFramebuffersEXT\0" ""; #endif @@ -3360,9 +3381,10 @@ static const char GetPixelTexGenParameterfvSGIS_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char GenFramebuffersEXT_names[] = "ip\0" /* Parameter signature */ + "glGenFramebuffers\0" "glGenFramebuffersEXT\0" ""; #endif @@ -3374,10 +3396,10 @@ static const char GetProgramParameterdvNV_names[] = ""; #endif -#if defined(need_GL_EXT_pixel_transform) -static const char PixelTransformParameterfEXT_names[] = - "iif\0" /* Parameter signature */ - "glPixelTransformParameterfEXT\0" +#if defined(need_GL_SGIX_instruments) +static const char PollInstrumentsSGIX_names[] = + "p\0" /* Parameter signature */ + "glPollInstrumentsSGIX\0" ""; #endif @@ -3709,9 +3731,10 @@ static const char MultiDrawArraysEXT_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char BindRenderbufferEXT_names[] = "ii\0" /* Parameter signature */ + "glBindRenderbuffer\0" "glBindRenderbufferEXT\0" ""; #endif @@ -3882,6 +3905,13 @@ static const char VertexAttrib4dARB_names[] = ""; #endif +#if defined(need_GL_ATI_envmap_bumpmap) +static const char GetTexBumpParameterfvATI_names[] = + "ip\0" /* Parameter signature */ + "glGetTexBumpParameterfvATI\0" + ""; +#endif + #if defined(need_GL_NV_fragment_program) static const char ProgramNamedParameter4dNV_names[] = "iipdddd\0" /* Parameter signature */ @@ -4530,6 +4560,13 @@ static const char Minmax_names[] = ""; #endif +#if defined(need_GL_SGIX_polynomial_ffd) +static const char DeformationMap3dSGIX_names[] = + "iddiiddiiddiip\0" /* Parameter signature */ + "glDeformationMap3dSGIX\0" + ""; +#endif + #if defined(need_GL_VERSION_1_4) || defined(need_GL_EXT_fog_coord) static const char FogCoorddvEXT_names[] = "p\0" /* Parameter signature */ @@ -4605,10 +4642,11 @@ static const char WeightdvARB_names[] = ""; #endif -#if defined(need_GL_SGIX_instruments) -static const char PollInstrumentsSGIX_names[] = - "p\0" /* Parameter signature */ - "glPollInstrumentsSGIX\0" +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) +static const char DeleteRenderbuffersEXT_names[] = + "ip\0" /* Parameter signature */ + "glDeleteRenderbuffers\0" + "glDeleteRenderbuffersEXT\0" ""; #endif @@ -4684,9 +4722,10 @@ static const char MultiTexCoord2fvARB_names[] = ""; #endif -#if defined(need_GL_EXT_framebuffer_object) +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) static const char GetRenderbufferParameterivEXT_names[] = "iip\0" /* Parameter signature */ + "glGetRenderbufferParameteriv\0" "glGetRenderbufferParameterivEXT\0" ""; #endif @@ -4742,6 +4781,13 @@ static const char Tangent3svEXT_names[] = ""; #endif +#if defined(need_GL_SGIX_list_priority) +static const char GetListParameterivSGIX_names[] = + "iip\0" /* Parameter signature */ + "glGetListParameterivSGIX\0" + ""; +#endif + #if defined(need_GL_VERSION_1_5) || defined(need_GL_ARB_vertex_buffer_object) static const char BindBufferARB_names[] = "ii\0" /* Parameter signature */ @@ -4809,6 +4855,13 @@ static const char VertexAttribs1svNV_names[] = ""; #endif +#if defined(need_GL_ATI_envmap_bumpmap) +static const char GetTexBumpParameterivATI_names[] = + "ip\0" /* Parameter signature */ + "glGetTexBumpParameterivATI\0" + ""; +#endif + #if defined(need_GL_EXT_coordinate_frame) static const char Binormal3bEXT_names[] = "iii\0" /* Parameter signature */ @@ -4823,10 +4876,11 @@ static const char FragmentMaterialivSGIX_names[] = ""; #endif -#if defined(need_GL_NV_vertex_array_range) -static const char VertexArrayRangeNV_names[] = - "ip\0" /* Parameter signature */ - "glVertexArrayRangeNV\0" +#if defined(need_GL_ARB_framebuffer_object) || defined(need_GL_EXT_framebuffer_object) +static const char IsRenderbufferEXT_names[] = + "i\0" /* Parameter signature */ + "glIsRenderbuffer\0" + "glIsRenderbufferEXT\0" ""; #endif @@ -4892,6 +4946,32 @@ static const struct dri_extension_function GL_ARB_draw_buffers_functions[] = { }; #endif +#if defined(need_GL_ARB_framebuffer_object) +static const struct dri_extension_function GL_ARB_framebuffer_object_functions[] = { + { BlitFramebufferEXT_names, BlitFramebufferEXT_remap_index, -1 }, + { FramebufferTextureLayerEXT_names, FramebufferTextureLayerEXT_remap_index, -1 }, + { GenerateMipmapEXT_names, GenerateMipmapEXT_remap_index, -1 }, + { RenderbufferStorageEXT_names, RenderbufferStorageEXT_remap_index, -1 }, + { CheckFramebufferStatusEXT_names, CheckFramebufferStatusEXT_remap_index, -1 }, + { FramebufferTexture3DEXT_names, FramebufferTexture3DEXT_remap_index, -1 }, + { FramebufferTexture2DEXT_names, FramebufferTexture2DEXT_remap_index, -1 }, + { RenderbufferStorageMultisample_names, RenderbufferStorageMultisample_remap_index, -1 }, + { FramebufferRenderbufferEXT_names, FramebufferRenderbufferEXT_remap_index, -1 }, + { FramebufferTexture1DEXT_names, FramebufferTexture1DEXT_remap_index, -1 }, + { BindFramebufferEXT_names, BindFramebufferEXT_remap_index, -1 }, + { GenRenderbuffersEXT_names, GenRenderbuffersEXT_remap_index, -1 }, + { IsFramebufferEXT_names, IsFramebufferEXT_remap_index, -1 }, + { GetFramebufferAttachmentParameterivEXT_names, GetFramebufferAttachmentParameterivEXT_remap_index, -1 }, + { DeleteFramebuffersEXT_names, DeleteFramebuffersEXT_remap_index, -1 }, + { GenFramebuffersEXT_names, GenFramebuffersEXT_remap_index, -1 }, + { BindRenderbufferEXT_names, BindRenderbufferEXT_remap_index, -1 }, + { DeleteRenderbuffersEXT_names, DeleteRenderbuffersEXT_remap_index, -1 }, + { GetRenderbufferParameterivEXT_names, GetRenderbufferParameterivEXT_remap_index, -1 }, + { IsRenderbufferEXT_names, IsRenderbufferEXT_remap_index, -1 }, + { NULL, 0, 0 } +}; +#endif + #if defined(need_GL_ARB_matrix_palette) static const struct dri_extension_function GL_ARB_matrix_palette_functions[] = { { MatrixIndexusvARB_names, MatrixIndexusvARB_remap_index, -1 }, @@ -5146,6 +5226,16 @@ static const struct dri_extension_function GL_ATI_draw_buffers_functions[] = { }; #endif +#if defined(need_GL_ATI_envmap_bumpmap) +static const struct dri_extension_function GL_ATI_envmap_bumpmap_functions[] = { + { TexBumpParameterfvATI_names, TexBumpParameterfvATI_remap_index, -1 }, + { TexBumpParameterivATI_names, TexBumpParameterivATI_remap_index, -1 }, + { GetTexBumpParameterfvATI_names, GetTexBumpParameterfvATI_remap_index, -1 }, + { GetTexBumpParameterivATI_names, GetTexBumpParameterivATI_remap_index, -1 }, + { NULL, 0, 0 } +}; +#endif + #if defined(need_GL_ATI_fragment_shader) static const struct dri_extension_function GL_ATI_fragment_shader_functions[] = { { ColorFragmentOp2ATI_names, ColorFragmentOp2ATI_remap_index, -1 }, @@ -5319,22 +5409,22 @@ static const struct dri_extension_function GL_EXT_framebuffer_blit_functions[] = #if defined(need_GL_EXT_framebuffer_object) static const struct dri_extension_function GL_EXT_framebuffer_object_functions[] = { { GenerateMipmapEXT_names, GenerateMipmapEXT_remap_index, -1 }, - { IsRenderbufferEXT_names, IsRenderbufferEXT_remap_index, -1 }, { RenderbufferStorageEXT_names, RenderbufferStorageEXT_remap_index, -1 }, { CheckFramebufferStatusEXT_names, CheckFramebufferStatusEXT_remap_index, -1 }, - { DeleteRenderbuffersEXT_names, DeleteRenderbuffersEXT_remap_index, -1 }, { FramebufferTexture3DEXT_names, FramebufferTexture3DEXT_remap_index, -1 }, + { FramebufferTexture2DEXT_names, FramebufferTexture2DEXT_remap_index, -1 }, { FramebufferRenderbufferEXT_names, FramebufferRenderbufferEXT_remap_index, -1 }, { FramebufferTexture1DEXT_names, FramebufferTexture1DEXT_remap_index, -1 }, { BindFramebufferEXT_names, BindFramebufferEXT_remap_index, -1 }, { GenRenderbuffersEXT_names, GenRenderbuffersEXT_remap_index, -1 }, { IsFramebufferEXT_names, IsFramebufferEXT_remap_index, -1 }, - { FramebufferTexture2DEXT_names, FramebufferTexture2DEXT_remap_index, -1 }, { GetFramebufferAttachmentParameterivEXT_names, GetFramebufferAttachmentParameterivEXT_remap_index, -1 }, { DeleteFramebuffersEXT_names, DeleteFramebuffersEXT_remap_index, -1 }, { GenFramebuffersEXT_names, GenFramebuffersEXT_remap_index, -1 }, { BindRenderbufferEXT_names, BindRenderbufferEXT_remap_index, -1 }, + { DeleteRenderbuffersEXT_names, DeleteRenderbuffersEXT_remap_index, -1 }, { GetRenderbufferParameterivEXT_names, GetRenderbufferParameterivEXT_remap_index, -1 }, + { IsRenderbufferEXT_names, IsRenderbufferEXT_remap_index, -1 }, { NULL, 0, 0 } }; #endif @@ -5415,8 +5505,8 @@ static const struct dri_extension_function GL_EXT_paletted_texture_functions[] = #if defined(need_GL_EXT_pixel_transform) static const struct dri_extension_function GL_EXT_pixel_transform_functions[] = { { PixelTransformParameterfvEXT_names, PixelTransformParameterfvEXT_remap_index, -1 }, - { PixelTransformParameteriEXT_names, PixelTransformParameteriEXT_remap_index, -1 }, { PixelTransformParameterfEXT_names, PixelTransformParameterfEXT_remap_index, -1 }, + { PixelTransformParameteriEXT_names, PixelTransformParameteriEXT_remap_index, -1 }, { PixelTransformParameterivEXT_names, PixelTransformParameterivEXT_remap_index, -1 }, { NULL, 0, 0 } }; @@ -5716,8 +5806,8 @@ static const struct dri_extension_function GL_NV_register_combiners2_functions[] #if defined(need_GL_NV_vertex_array_range) static const struct dri_extension_function GL_NV_vertex_array_range_functions[] = { - { FlushVertexArrayRangeNV_names, FlushVertexArrayRangeNV_remap_index, -1 }, { VertexArrayRangeNV_names, VertexArrayRangeNV_remap_index, -1 }, + { FlushVertexArrayRangeNV_names, FlushVertexArrayRangeNV_remap_index, -1 }, { NULL, 0, 0 } }; #endif @@ -5946,11 +6036,11 @@ static const struct dri_extension_function GL_SGIX_instruments_functions[] = { #if defined(need_GL_SGIX_list_priority) static const struct dri_extension_function GL_SGIX_list_priority_functions[] = { { ListParameterfSGIX_names, ListParameterfSGIX_remap_index, -1 }, - { GetListParameterivSGIX_names, GetListParameterivSGIX_remap_index, -1 }, { GetListParameterfvSGIX_names, GetListParameterfvSGIX_remap_index, -1 }, { ListParameteriSGIX_names, ListParameteriSGIX_remap_index, -1 }, { ListParameterfvSGIX_names, ListParameterfvSGIX_remap_index, -1 }, { ListParameterivSGIX_names, ListParameterivSGIX_remap_index, -1 }, + { GetListParameterivSGIX_names, GetListParameterivSGIX_remap_index, -1 }, { NULL, 0, 0 } }; #endif @@ -5965,9 +6055,9 @@ static const struct dri_extension_function GL_SGIX_pixel_texture_functions[] = { #if defined(need_GL_SGIX_polynomial_ffd) static const struct dri_extension_function GL_SGIX_polynomial_ffd_functions[] = { { LoadIdentityDeformationMapSGIX_names, LoadIdentityDeformationMapSGIX_remap_index, -1 }, - { DeformationMap3dSGIX_names, DeformationMap3dSGIX_remap_index, -1 }, { DeformSGIX_names, DeformSGIX_remap_index, -1 }, { DeformationMap3fSGIX_names, DeformationMap3fSGIX_remap_index, -1 }, + { DeformationMap3dSGIX_names, DeformationMap3dSGIX_remap_index, -1 }, { NULL, 0, 0 } }; #endif diff --git a/mesa/drivers/dri/common/spantmp2.h b/mesa/drivers/dri/common/spantmp2.h index f2868cb..89c8157 100644 --- a/mesa/drivers/dri/common/spantmp2.h +++ b/mesa/drivers/dri/common/spantmp2.h @@ -82,6 +82,71 @@ rgba[3] = 0xff; \ } while (0) +#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_4_4_4_4_REV) + +/** + ** GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV + **/ + +#ifndef GET_VALUE +#ifndef GET_PTR +#define GET_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch) +#endif + +#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y)) +#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) +#endif /* GET_VALUE */ + +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_4444(color[3], color[0], color[1], color[2]) + +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + PUT_VALUE(_x, _y, PACK_COLOR_4444(a, r, g, b)) \ + +#define WRITE_PIXEL( _x, _y, p ) PUT_VALUE(_x, _y, p) + +#define READ_RGBA( rgba, _x, _y ) \ + do { \ + GLushort p = GET_VALUE(_x, _y); \ + rgba[0] = ((p >> 8) & 0xf) * 0x11; \ + rgba[1] = ((p >> 4) & 0xf) * 0x11; \ + rgba[2] = ((p >> 0) & 0xf) * 0x11; \ + rgba[3] = ((p >> 12) & 0xf) * 0x11; \ + } while (0) + + +#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_1_5_5_5_REV) + +/** + ** GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV + **/ + +#ifndef GET_VALUE +#ifndef GET_PTR +#define GET_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch) +#endif + +#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y)) +#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) +#endif /* GET_VALUE */ + +#define INIT_MONO_PIXEL(p, color) \ + p = PACK_COLOR_1555(color[3], color[0], color[1], color[2]) + +#define WRITE_RGBA( _x, _y, r, g, b, a ) \ + PUT_VALUE(_x, _y, PACK_COLOR_1555(a, r, g, b)) \ + +#define WRITE_PIXEL( _x, _y, p ) PUT_VALUE(_x, _y, p) + +#define READ_RGBA( rgba, _x, _y ) \ + do { \ + GLushort p = GET_VALUE(_x, _y); \ + rgba[0] = ((p >> 7) & 0xf8) * 255 / 0xf8; \ + rgba[1] = ((p >> 2) & 0xf8) * 255 / 0xf8; \ + rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \ + rgba[3] = ((p >> 15) & 0x1) * 0xff; \ + } while (0) + #elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV) /** diff --git a/mesa/drivers/dri/common/utils.h b/mesa/drivers/dri/common/utils.h index 0c974db..9e9e5bc 100644 --- a/mesa/drivers/dri/common/utils.h +++ b/mesa/drivers/dri/common/utils.h @@ -131,9 +131,11 @@ extern __DRIconfig ** driCreateConfigs(GLenum fb_format, GLenum fb_type, const uint8_t * depth_bits, const uint8_t * stencil_bits, unsigned num_depth_stencil_bits, - const GLenum * db_modes, unsigned num_db_modes); + const GLenum * db_modes, unsigned num_db_modes, + const uint8_t * msaa_samples, unsigned num_msaa_modes); -const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b); +__DRIconfig **driConcatConfigs(__DRIconfig **a, + __DRIconfig **b); int driGetConfigAttrib(const __DRIconfig *config, diff --git a/mesa/drivers/dri/common/xmlpool/options.h b/mesa/drivers/dri/common/xmlpool/options.h index d5f4fc3..d765955 100644 --- a/mesa/drivers/dri/common/xmlpool/options.h +++ b/mesa/drivers/dri/common/xmlpool/options.h @@ -546,3 +546,23 @@ DRI_CONF_OPT_BEGIN(nv_vertex_program,bool,def) \ DRI_CONF_DESC(fr,"Activer l'extension GL_NV_vertex_program") \ DRI_CONF_DESC(sv,"Aktivera tillägget GL_NV_vertex_program") \ DRI_CONF_OPT_END + +#define DRI_CONF_ALWAYS_FLUSH_BATCH(def) \ +DRI_CONF_OPT_BEGIN(always_flush_batch,bool,def) \ + DRI_CONF_DESC(en,"Enable flushing batchbuffer after each draw call") \ + DRI_CONF_DESC(de,"Enable flushing batchbuffer after each draw call") \ + DRI_CONF_DESC(es,"Enable flushing batchbuffer after each draw call") \ + DRI_CONF_DESC(nl,"Enable flushing batchbuffer after each draw call") \ + DRI_CONF_DESC(fr,"Enable flushing batchbuffer after each draw call") \ + DRI_CONF_DESC(sv,"Enable flushing batchbuffer after each draw call") \ +DRI_CONF_OPT_END + +#define DRI_CONF_ALWAYS_FLUSH_CACHE(def) \ +DRI_CONF_OPT_BEGIN(always_flush_cache,bool,def) \ + DRI_CONF_DESC(en,"Enable flushing GPU caches with each draw call") \ + DRI_CONF_DESC(de,"Enable flushing GPU caches with each draw call") \ + DRI_CONF_DESC(es,"Enable flushing GPU caches with each draw call") \ + DRI_CONF_DESC(nl,"Enable flushing GPU caches with each draw call") \ + DRI_CONF_DESC(fr,"Enable flushing GPU caches with each draw call") \ + DRI_CONF_DESC(sv,"Enable flushing GPU caches with each draw call") \ +DRI_CONF_OPT_END diff --git a/mesa/glapi/dispatch.h b/mesa/glapi/dispatch.h index f019aa6..45b2fa0 100644 --- a/mesa/glapi/dispatch.h +++ b/mesa/glapi/dispatch.h @@ -1743,6 +1743,9 @@ #define CALL_DrawBuffersARB(disp, parameters) (*((disp)->DrawBuffersARB)) parameters #define GET_DrawBuffersARB(disp) ((disp)->DrawBuffersARB) #define SET_DrawBuffersARB(disp, fn) ((disp)->DrawBuffersARB = fn) +#define CALL_RenderbufferStorageMultisample(disp, parameters) (*((disp)->RenderbufferStorageMultisample)) parameters +#define GET_RenderbufferStorageMultisample(disp) ((disp)->RenderbufferStorageMultisample) +#define SET_RenderbufferStorageMultisample(disp, fn) ((disp)->RenderbufferStorageMultisample = fn) #define CALL_PolygonOffsetEXT(disp, parameters) (*((disp)->PolygonOffsetEXT)) parameters #define GET_PolygonOffsetEXT(disp) ((disp)->PolygonOffsetEXT) #define SET_PolygonOffsetEXT(disp, fn) ((disp)->PolygonOffsetEXT = fn) @@ -2211,6 +2214,18 @@ #define CALL_VertexAttribs4ubvNV(disp, parameters) (*((disp)->VertexAttribs4ubvNV)) parameters #define GET_VertexAttribs4ubvNV(disp) ((disp)->VertexAttribs4ubvNV) #define SET_VertexAttribs4ubvNV(disp, fn) ((disp)->VertexAttribs4ubvNV = fn) +#define CALL_GetTexBumpParameterfvATI(disp, parameters) (*((disp)->GetTexBumpParameterfvATI)) parameters +#define GET_GetTexBumpParameterfvATI(disp) ((disp)->GetTexBumpParameterfvATI) +#define SET_GetTexBumpParameterfvATI(disp, fn) ((disp)->GetTexBumpParameterfvATI = fn) +#define CALL_GetTexBumpParameterivATI(disp, parameters) (*((disp)->GetTexBumpParameterivATI)) parameters +#define GET_GetTexBumpParameterivATI(disp) ((disp)->GetTexBumpParameterivATI) +#define SET_GetTexBumpParameterivATI(disp, fn) ((disp)->GetTexBumpParameterivATI = fn) +#define CALL_TexBumpParameterfvATI(disp, parameters) (*((disp)->TexBumpParameterfvATI)) parameters +#define GET_TexBumpParameterfvATI(disp) ((disp)->TexBumpParameterfvATI) +#define SET_TexBumpParameterfvATI(disp, fn) ((disp)->TexBumpParameterfvATI = fn) +#define CALL_TexBumpParameterivATI(disp, parameters) (*((disp)->TexBumpParameterivATI)) parameters +#define GET_TexBumpParameterivATI(disp) ((disp)->TexBumpParameterivATI) +#define SET_TexBumpParameterivATI(disp, fn) ((disp)->TexBumpParameterivATI = fn) #define CALL_AlphaFragmentOp1ATI(disp, parameters) (*((disp)->AlphaFragmentOp1ATI)) parameters #define GET_AlphaFragmentOp1ATI(disp) ((disp)->AlphaFragmentOp1ATI) #define SET_AlphaFragmentOp1ATI(disp, fn) ((disp)->AlphaFragmentOp1ATI = fn) @@ -2373,7 +2388,7 @@ #else -#define driDispatchRemapTable_size 362 +#define driDispatchRemapTable_size 367 extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define AttachShader_remap_index 0 @@ -2529,215 +2544,220 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define GetActiveAttribARB_remap_index 150 #define GetAttribLocationARB_remap_index 151 #define DrawBuffersARB_remap_index 152 -#define PolygonOffsetEXT_remap_index 153 -#define GetPixelTexGenParameterfvSGIS_remap_index 154 -#define GetPixelTexGenParameterivSGIS_remap_index 155 -#define PixelTexGenParameterfSGIS_remap_index 156 -#define PixelTexGenParameterfvSGIS_remap_index 157 -#define PixelTexGenParameteriSGIS_remap_index 158 -#define PixelTexGenParameterivSGIS_remap_index 159 -#define SampleMaskSGIS_remap_index 160 -#define SamplePatternSGIS_remap_index 161 -#define ColorPointerEXT_remap_index 162 -#define EdgeFlagPointerEXT_remap_index 163 -#define IndexPointerEXT_remap_index 164 -#define NormalPointerEXT_remap_index 165 -#define TexCoordPointerEXT_remap_index 166 -#define VertexPointerEXT_remap_index 167 -#define PointParameterfEXT_remap_index 168 -#define PointParameterfvEXT_remap_index 169 -#define LockArraysEXT_remap_index 170 -#define UnlockArraysEXT_remap_index 171 -#define CullParameterdvEXT_remap_index 172 -#define CullParameterfvEXT_remap_index 173 -#define SecondaryColor3bEXT_remap_index 174 -#define SecondaryColor3bvEXT_remap_index 175 -#define SecondaryColor3dEXT_remap_index 176 -#define SecondaryColor3dvEXT_remap_index 177 -#define SecondaryColor3fEXT_remap_index 178 -#define SecondaryColor3fvEXT_remap_index 179 -#define SecondaryColor3iEXT_remap_index 180 -#define SecondaryColor3ivEXT_remap_index 181 -#define SecondaryColor3sEXT_remap_index 182 -#define SecondaryColor3svEXT_remap_index 183 -#define SecondaryColor3ubEXT_remap_index 184 -#define SecondaryColor3ubvEXT_remap_index 185 -#define SecondaryColor3uiEXT_remap_index 186 -#define SecondaryColor3uivEXT_remap_index 187 -#define SecondaryColor3usEXT_remap_index 188 -#define SecondaryColor3usvEXT_remap_index 189 -#define SecondaryColorPointerEXT_remap_index 190 -#define MultiDrawArraysEXT_remap_index 191 -#define MultiDrawElementsEXT_remap_index 192 -#define FogCoordPointerEXT_remap_index 193 -#define FogCoorddEXT_remap_index 194 -#define FogCoorddvEXT_remap_index 195 -#define FogCoordfEXT_remap_index 196 -#define FogCoordfvEXT_remap_index 197 -#define PixelTexGenSGIX_remap_index 198 -#define BlendFuncSeparateEXT_remap_index 199 -#define FlushVertexArrayRangeNV_remap_index 200 -#define VertexArrayRangeNV_remap_index 201 -#define CombinerInputNV_remap_index 202 -#define CombinerOutputNV_remap_index 203 -#define CombinerParameterfNV_remap_index 204 -#define CombinerParameterfvNV_remap_index 205 -#define CombinerParameteriNV_remap_index 206 -#define CombinerParameterivNV_remap_index 207 -#define FinalCombinerInputNV_remap_index 208 -#define GetCombinerInputParameterfvNV_remap_index 209 -#define GetCombinerInputParameterivNV_remap_index 210 -#define GetCombinerOutputParameterfvNV_remap_index 211 -#define GetCombinerOutputParameterivNV_remap_index 212 -#define GetFinalCombinerInputParameterfvNV_remap_index 213 -#define GetFinalCombinerInputParameterivNV_remap_index 214 -#define ResizeBuffersMESA_remap_index 215 -#define WindowPos2dMESA_remap_index 216 -#define WindowPos2dvMESA_remap_index 217 -#define WindowPos2fMESA_remap_index 218 -#define WindowPos2fvMESA_remap_index 219 -#define WindowPos2iMESA_remap_index 220 -#define WindowPos2ivMESA_remap_index 221 -#define WindowPos2sMESA_remap_index 222 -#define WindowPos2svMESA_remap_index 223 -#define WindowPos3dMESA_remap_index 224 -#define WindowPos3dvMESA_remap_index 225 -#define WindowPos3fMESA_remap_index 226 -#define WindowPos3fvMESA_remap_index 227 -#define WindowPos3iMESA_remap_index 228 -#define WindowPos3ivMESA_remap_index 229 -#define WindowPos3sMESA_remap_index 230 -#define WindowPos3svMESA_remap_index 231 -#define WindowPos4dMESA_remap_index 232 -#define WindowPos4dvMESA_remap_index 233 -#define WindowPos4fMESA_remap_index 234 -#define WindowPos4fvMESA_remap_index 235 -#define WindowPos4iMESA_remap_index 236 -#define WindowPos4ivMESA_remap_index 237 -#define WindowPos4sMESA_remap_index 238 -#define WindowPos4svMESA_remap_index 239 -#define MultiModeDrawArraysIBM_remap_index 240 -#define MultiModeDrawElementsIBM_remap_index 241 -#define DeleteFencesNV_remap_index 242 -#define FinishFenceNV_remap_index 243 -#define GenFencesNV_remap_index 244 -#define GetFenceivNV_remap_index 245 -#define IsFenceNV_remap_index 246 -#define SetFenceNV_remap_index 247 -#define TestFenceNV_remap_index 248 -#define AreProgramsResidentNV_remap_index 249 -#define BindProgramNV_remap_index 250 -#define DeleteProgramsNV_remap_index 251 -#define ExecuteProgramNV_remap_index 252 -#define GenProgramsNV_remap_index 253 -#define GetProgramParameterdvNV_remap_index 254 -#define GetProgramParameterfvNV_remap_index 255 -#define GetProgramStringNV_remap_index 256 -#define GetProgramivNV_remap_index 257 -#define GetTrackMatrixivNV_remap_index 258 -#define GetVertexAttribPointervNV_remap_index 259 -#define GetVertexAttribdvNV_remap_index 260 -#define GetVertexAttribfvNV_remap_index 261 -#define GetVertexAttribivNV_remap_index 262 -#define IsProgramNV_remap_index 263 -#define LoadProgramNV_remap_index 264 -#define ProgramParameters4dvNV_remap_index 265 -#define ProgramParameters4fvNV_remap_index 266 -#define RequestResidentProgramsNV_remap_index 267 -#define TrackMatrixNV_remap_index 268 -#define VertexAttrib1dNV_remap_index 269 -#define VertexAttrib1dvNV_remap_index 270 -#define VertexAttrib1fNV_remap_index 271 -#define VertexAttrib1fvNV_remap_index 272 -#define VertexAttrib1sNV_remap_index 273 -#define VertexAttrib1svNV_remap_index 274 -#define VertexAttrib2dNV_remap_index 275 -#define VertexAttrib2dvNV_remap_index 276 -#define VertexAttrib2fNV_remap_index 277 -#define VertexAttrib2fvNV_remap_index 278 -#define VertexAttrib2sNV_remap_index 279 -#define VertexAttrib2svNV_remap_index 280 -#define VertexAttrib3dNV_remap_index 281 -#define VertexAttrib3dvNV_remap_index 282 -#define VertexAttrib3fNV_remap_index 283 -#define VertexAttrib3fvNV_remap_index 284 -#define VertexAttrib3sNV_remap_index 285 -#define VertexAttrib3svNV_remap_index 286 -#define VertexAttrib4dNV_remap_index 287 -#define VertexAttrib4dvNV_remap_index 288 -#define VertexAttrib4fNV_remap_index 289 -#define VertexAttrib4fvNV_remap_index 290 -#define VertexAttrib4sNV_remap_index 291 -#define VertexAttrib4svNV_remap_index 292 -#define VertexAttrib4ubNV_remap_index 293 -#define VertexAttrib4ubvNV_remap_index 294 -#define VertexAttribPointerNV_remap_index 295 -#define VertexAttribs1dvNV_remap_index 296 -#define VertexAttribs1fvNV_remap_index 297 -#define VertexAttribs1svNV_remap_index 298 -#define VertexAttribs2dvNV_remap_index 299 -#define VertexAttribs2fvNV_remap_index 300 -#define VertexAttribs2svNV_remap_index 301 -#define VertexAttribs3dvNV_remap_index 302 -#define VertexAttribs3fvNV_remap_index 303 -#define VertexAttribs3svNV_remap_index 304 -#define VertexAttribs4dvNV_remap_index 305 -#define VertexAttribs4fvNV_remap_index 306 -#define VertexAttribs4svNV_remap_index 307 -#define VertexAttribs4ubvNV_remap_index 308 -#define AlphaFragmentOp1ATI_remap_index 309 -#define AlphaFragmentOp2ATI_remap_index 310 -#define AlphaFragmentOp3ATI_remap_index 311 -#define BeginFragmentShaderATI_remap_index 312 -#define BindFragmentShaderATI_remap_index 313 -#define ColorFragmentOp1ATI_remap_index 314 -#define ColorFragmentOp2ATI_remap_index 315 -#define ColorFragmentOp3ATI_remap_index 316 -#define DeleteFragmentShaderATI_remap_index 317 -#define EndFragmentShaderATI_remap_index 318 -#define GenFragmentShadersATI_remap_index 319 -#define PassTexCoordATI_remap_index 320 -#define SampleMapATI_remap_index 321 -#define SetFragmentShaderConstantATI_remap_index 322 -#define PointParameteriNV_remap_index 323 -#define PointParameterivNV_remap_index 324 -#define ActiveStencilFaceEXT_remap_index 325 -#define BindVertexArrayAPPLE_remap_index 326 -#define DeleteVertexArraysAPPLE_remap_index 327 -#define GenVertexArraysAPPLE_remap_index 328 -#define IsVertexArrayAPPLE_remap_index 329 -#define GetProgramNamedParameterdvNV_remap_index 330 -#define GetProgramNamedParameterfvNV_remap_index 331 -#define ProgramNamedParameter4dNV_remap_index 332 -#define ProgramNamedParameter4dvNV_remap_index 333 -#define ProgramNamedParameter4fNV_remap_index 334 -#define ProgramNamedParameter4fvNV_remap_index 335 -#define DepthBoundsEXT_remap_index 336 -#define BlendEquationSeparateEXT_remap_index 337 -#define BindFramebufferEXT_remap_index 338 -#define BindRenderbufferEXT_remap_index 339 -#define CheckFramebufferStatusEXT_remap_index 340 -#define DeleteFramebuffersEXT_remap_index 341 -#define DeleteRenderbuffersEXT_remap_index 342 -#define FramebufferRenderbufferEXT_remap_index 343 -#define FramebufferTexture1DEXT_remap_index 344 -#define FramebufferTexture2DEXT_remap_index 345 -#define FramebufferTexture3DEXT_remap_index 346 -#define GenFramebuffersEXT_remap_index 347 -#define GenRenderbuffersEXT_remap_index 348 -#define GenerateMipmapEXT_remap_index 349 -#define GetFramebufferAttachmentParameterivEXT_remap_index 350 -#define GetRenderbufferParameterivEXT_remap_index 351 -#define IsFramebufferEXT_remap_index 352 -#define IsRenderbufferEXT_remap_index 353 -#define RenderbufferStorageEXT_remap_index 354 -#define BlitFramebufferEXT_remap_index 355 -#define FramebufferTextureLayerEXT_remap_index 356 -#define StencilFuncSeparateATI_remap_index 357 -#define ProgramEnvParameters4fvEXT_remap_index 358 -#define ProgramLocalParameters4fvEXT_remap_index 359 -#define GetQueryObjecti64vEXT_remap_index 360 -#define GetQueryObjectui64vEXT_remap_index 361 +#define RenderbufferStorageMultisample_remap_index 153 +#define PolygonOffsetEXT_remap_index 154 +#define GetPixelTexGenParameterfvSGIS_remap_index 155 +#define GetPixelTexGenParameterivSGIS_remap_index 156 +#define PixelTexGenParameterfSGIS_remap_index 157 +#define PixelTexGenParameterfvSGIS_remap_index 158 +#define PixelTexGenParameteriSGIS_remap_index 159 +#define PixelTexGenParameterivSGIS_remap_index 160 +#define SampleMaskSGIS_remap_index 161 +#define SamplePatternSGIS_remap_index 162 +#define ColorPointerEXT_remap_index 163 +#define EdgeFlagPointerEXT_remap_index 164 +#define IndexPointerEXT_remap_index 165 +#define NormalPointerEXT_remap_index 166 +#define TexCoordPointerEXT_remap_index 167 +#define VertexPointerEXT_remap_index 168 +#define PointParameterfEXT_remap_index 169 +#define PointParameterfvEXT_remap_index 170 +#define LockArraysEXT_remap_index 171 +#define UnlockArraysEXT_remap_index 172 +#define CullParameterdvEXT_remap_index 173 +#define CullParameterfvEXT_remap_index 174 +#define SecondaryColor3bEXT_remap_index 175 +#define SecondaryColor3bvEXT_remap_index 176 +#define SecondaryColor3dEXT_remap_index 177 +#define SecondaryColor3dvEXT_remap_index 178 +#define SecondaryColor3fEXT_remap_index 179 +#define SecondaryColor3fvEXT_remap_index 180 +#define SecondaryColor3iEXT_remap_index 181 +#define SecondaryColor3ivEXT_remap_index 182 +#define SecondaryColor3sEXT_remap_index 183 +#define SecondaryColor3svEXT_remap_index 184 +#define SecondaryColor3ubEXT_remap_index 185 +#define SecondaryColor3ubvEXT_remap_index 186 +#define SecondaryColor3uiEXT_remap_index 187 +#define SecondaryColor3uivEXT_remap_index 188 +#define SecondaryColor3usEXT_remap_index 189 +#define SecondaryColor3usvEXT_remap_index 190 +#define SecondaryColorPointerEXT_remap_index 191 +#define MultiDrawArraysEXT_remap_index 192 +#define MultiDrawElementsEXT_remap_index 193 +#define FogCoordPointerEXT_remap_index 194 +#define FogCoorddEXT_remap_index 195 +#define FogCoorddvEXT_remap_index 196 +#define FogCoordfEXT_remap_index 197 +#define FogCoordfvEXT_remap_index 198 +#define PixelTexGenSGIX_remap_index 199 +#define BlendFuncSeparateEXT_remap_index 200 +#define FlushVertexArrayRangeNV_remap_index 201 +#define VertexArrayRangeNV_remap_index 202 +#define CombinerInputNV_remap_index 203 +#define CombinerOutputNV_remap_index 204 +#define CombinerParameterfNV_remap_index 205 +#define CombinerParameterfvNV_remap_index 206 +#define CombinerParameteriNV_remap_index 207 +#define CombinerParameterivNV_remap_index 208 +#define FinalCombinerInputNV_remap_index 209 +#define GetCombinerInputParameterfvNV_remap_index 210 +#define GetCombinerInputParameterivNV_remap_index 211 +#define GetCombinerOutputParameterfvNV_remap_index 212 +#define GetCombinerOutputParameterivNV_remap_index 213 +#define GetFinalCombinerInputParameterfvNV_remap_index 214 +#define GetFinalCombinerInputParameterivNV_remap_index 215 +#define ResizeBuffersMESA_remap_index 216 +#define WindowPos2dMESA_remap_index 217 +#define WindowPos2dvMESA_remap_index 218 +#define WindowPos2fMESA_remap_index 219 +#define WindowPos2fvMESA_remap_index 220 +#define WindowPos2iMESA_remap_index 221 +#define WindowPos2ivMESA_remap_index 222 +#define WindowPos2sMESA_remap_index 223 +#define WindowPos2svMESA_remap_index 224 +#define WindowPos3dMESA_remap_index 225 +#define WindowPos3dvMESA_remap_index 226 +#define WindowPos3fMESA_remap_index 227 +#define WindowPos3fvMESA_remap_index 228 +#define WindowPos3iMESA_remap_index 229 +#define WindowPos3ivMESA_remap_index 230 +#define WindowPos3sMESA_remap_index 231 +#define WindowPos3svMESA_remap_index 232 +#define WindowPos4dMESA_remap_index 233 +#define WindowPos4dvMESA_remap_index 234 +#define WindowPos4fMESA_remap_index 235 +#define WindowPos4fvMESA_remap_index 236 +#define WindowPos4iMESA_remap_index 237 +#define WindowPos4ivMESA_remap_index 238 +#define WindowPos4sMESA_remap_index 239 +#define WindowPos4svMESA_remap_index 240 +#define MultiModeDrawArraysIBM_remap_index 241 +#define MultiModeDrawElementsIBM_remap_index 242 +#define DeleteFencesNV_remap_index 243 +#define FinishFenceNV_remap_index 244 +#define GenFencesNV_remap_index 245 +#define GetFenceivNV_remap_index 246 +#define IsFenceNV_remap_index 247 +#define SetFenceNV_remap_index 248 +#define TestFenceNV_remap_index 249 +#define AreProgramsResidentNV_remap_index 250 +#define BindProgramNV_remap_index 251 +#define DeleteProgramsNV_remap_index 252 +#define ExecuteProgramNV_remap_index 253 +#define GenProgramsNV_remap_index 254 +#define GetProgramParameterdvNV_remap_index 255 +#define GetProgramParameterfvNV_remap_index 256 +#define GetProgramStringNV_remap_index 257 +#define GetProgramivNV_remap_index 258 +#define GetTrackMatrixivNV_remap_index 259 +#define GetVertexAttribPointervNV_remap_index 260 +#define GetVertexAttribdvNV_remap_index 261 +#define GetVertexAttribfvNV_remap_index 262 +#define GetVertexAttribivNV_remap_index 263 +#define IsProgramNV_remap_index 264 +#define LoadProgramNV_remap_index 265 +#define ProgramParameters4dvNV_remap_index 266 +#define ProgramParameters4fvNV_remap_index 267 +#define RequestResidentProgramsNV_remap_index 268 +#define TrackMatrixNV_remap_index 269 +#define VertexAttrib1dNV_remap_index 270 +#define VertexAttrib1dvNV_remap_index 271 +#define VertexAttrib1fNV_remap_index 272 +#define VertexAttrib1fvNV_remap_index 273 +#define VertexAttrib1sNV_remap_index 274 +#define VertexAttrib1svNV_remap_index 275 +#define VertexAttrib2dNV_remap_index 276 +#define VertexAttrib2dvNV_remap_index 277 +#define VertexAttrib2fNV_remap_index 278 +#define VertexAttrib2fvNV_remap_index 279 +#define VertexAttrib2sNV_remap_index 280 +#define VertexAttrib2svNV_remap_index 281 +#define VertexAttrib3dNV_remap_index 282 +#define VertexAttrib3dvNV_remap_index 283 +#define VertexAttrib3fNV_remap_index 284 +#define VertexAttrib3fvNV_remap_index 285 +#define VertexAttrib3sNV_remap_index 286 +#define VertexAttrib3svNV_remap_index 287 +#define VertexAttrib4dNV_remap_index 288 +#define VertexAttrib4dvNV_remap_index 289 +#define VertexAttrib4fNV_remap_index 290 +#define VertexAttrib4fvNV_remap_index 291 +#define VertexAttrib4sNV_remap_index 292 +#define VertexAttrib4svNV_remap_index 293 +#define VertexAttrib4ubNV_remap_index 294 +#define VertexAttrib4ubvNV_remap_index 295 +#define VertexAttribPointerNV_remap_index 296 +#define VertexAttribs1dvNV_remap_index 297 +#define VertexAttribs1fvNV_remap_index 298 +#define VertexAttribs1svNV_remap_index 299 +#define VertexAttribs2dvNV_remap_index 300 +#define VertexAttribs2fvNV_remap_index 301 +#define VertexAttribs2svNV_remap_index 302 +#define VertexAttribs3dvNV_remap_index 303 +#define VertexAttribs3fvNV_remap_index 304 +#define VertexAttribs3svNV_remap_index 305 +#define VertexAttribs4dvNV_remap_index 306 +#define VertexAttribs4fvNV_remap_index 307 +#define VertexAttribs4svNV_remap_index 308 +#define VertexAttribs4ubvNV_remap_index 309 +#define GetTexBumpParameterfvATI_remap_index 310 +#define GetTexBumpParameterivATI_remap_index 311 +#define TexBumpParameterfvATI_remap_index 312 +#define TexBumpParameterivATI_remap_index 313 +#define AlphaFragmentOp1ATI_remap_index 314 +#define AlphaFragmentOp2ATI_remap_index 315 +#define AlphaFragmentOp3ATI_remap_index 316 +#define BeginFragmentShaderATI_remap_index 317 +#define BindFragmentShaderATI_remap_index 318 +#define ColorFragmentOp1ATI_remap_index 319 +#define ColorFragmentOp2ATI_remap_index 320 +#define ColorFragmentOp3ATI_remap_index 321 +#define DeleteFragmentShaderATI_remap_index 322 +#define EndFragmentShaderATI_remap_index 323 +#define GenFragmentShadersATI_remap_index 324 +#define PassTexCoordATI_remap_index 325 +#define SampleMapATI_remap_index 326 +#define SetFragmentShaderConstantATI_remap_index 327 +#define PointParameteriNV_remap_index 328 +#define PointParameterivNV_remap_index 329 +#define ActiveStencilFaceEXT_remap_index 330 +#define BindVertexArrayAPPLE_remap_index 331 +#define DeleteVertexArraysAPPLE_remap_index 332 +#define GenVertexArraysAPPLE_remap_index 333 +#define IsVertexArrayAPPLE_remap_index 334 +#define GetProgramNamedParameterdvNV_remap_index 335 +#define GetProgramNamedParameterfvNV_remap_index 336 +#define ProgramNamedParameter4dNV_remap_index 337 +#define ProgramNamedParameter4dvNV_remap_index 338 +#define ProgramNamedParameter4fNV_remap_index 339 +#define ProgramNamedParameter4fvNV_remap_index 340 +#define DepthBoundsEXT_remap_index 341 +#define BlendEquationSeparateEXT_remap_index 342 +#define BindFramebufferEXT_remap_index 343 +#define BindRenderbufferEXT_remap_index 344 +#define CheckFramebufferStatusEXT_remap_index 345 +#define DeleteFramebuffersEXT_remap_index 346 +#define DeleteRenderbuffersEXT_remap_index 347 +#define FramebufferRenderbufferEXT_remap_index 348 +#define FramebufferTexture1DEXT_remap_index 349 +#define FramebufferTexture2DEXT_remap_index 350 +#define FramebufferTexture3DEXT_remap_index 351 +#define GenFramebuffersEXT_remap_index 352 +#define GenRenderbuffersEXT_remap_index 353 +#define GenerateMipmapEXT_remap_index 354 +#define GetFramebufferAttachmentParameterivEXT_remap_index 355 +#define GetRenderbufferParameterivEXT_remap_index 356 +#define IsFramebufferEXT_remap_index 357 +#define IsRenderbufferEXT_remap_index 358 +#define RenderbufferStorageEXT_remap_index 359 +#define BlitFramebufferEXT_remap_index 360 +#define FramebufferTextureLayerEXT_remap_index 361 +#define StencilFuncSeparateATI_remap_index 362 +#define ProgramEnvParameters4fvEXT_remap_index 363 +#define ProgramLocalParameters4fvEXT_remap_index 364 +#define GetQueryObjecti64vEXT_remap_index 365 +#define GetQueryObjectui64vEXT_remap_index 366 #define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters) #define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index]) @@ -3198,6 +3218,9 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), driDispatchRemapTable[DrawBuffersARB_remap_index], parameters) #define GET_DrawBuffersARB(disp) GET_by_offset(disp, driDispatchRemapTable[DrawBuffersARB_remap_index]) #define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DrawBuffersARB_remap_index], fn) +#define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), driDispatchRemapTable[RenderbufferStorageMultisample_remap_index], parameters) +#define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, driDispatchRemapTable[RenderbufferStorageMultisample_remap_index]) +#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, driDispatchRemapTable[RenderbufferStorageMultisample_remap_index], fn) #define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), driDispatchRemapTable[PolygonOffsetEXT_remap_index], parameters) #define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, driDispatchRemapTable[PolygonOffsetEXT_remap_index]) #define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[PolygonOffsetEXT_remap_index], fn) @@ -3666,6 +3689,18 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), driDispatchRemapTable[VertexAttribs4ubvNV_remap_index], parameters) #define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]) #define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[VertexAttribs4ubvNV_remap_index], fn) +#define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index], parameters) +#define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index]) +#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index], fn) +#define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), driDispatchRemapTable[GetTexBumpParameterivATI_remap_index], parameters) +#define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, driDispatchRemapTable[GetTexBumpParameterivATI_remap_index]) +#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetTexBumpParameterivATI_remap_index], fn) +#define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), driDispatchRemapTable[TexBumpParameterfvATI_remap_index], parameters) +#define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, driDispatchRemapTable[TexBumpParameterfvATI_remap_index]) +#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TexBumpParameterfvATI_remap_index], fn) +#define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), driDispatchRemapTable[TexBumpParameterivATI_remap_index], parameters) +#define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, driDispatchRemapTable[TexBumpParameterivATI_remap_index]) +#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TexBumpParameterivATI_remap_index], fn) #define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index], parameters) #define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index]) #define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index], fn) diff --git a/mesa/glapi/glapitable.h b/mesa/glapi/glapitable.h index 5d9d40a..9ecb036 100644 --- a/mesa/glapi/glapitable.h +++ b/mesa/glapi/glapitable.h @@ -601,215 +601,220 @@ struct _glapi_table void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 558 */ GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 559 */ void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 560 */ - void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 561 */ - void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 562 */ - void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 563 */ - void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 564 */ - void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 565 */ - void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 566 */ - void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 567 */ - void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 568 */ - void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 569 */ - void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 570 */ - void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 571 */ - void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 572 */ - void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 573 */ - void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 574 */ - void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 575 */ - void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 576 */ - void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 577 */ - void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 578 */ - void (GLAPIENTRYP UnlockArraysEXT)(void); /* 579 */ - void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 580 */ - void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 581 */ - void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 582 */ - void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 583 */ - void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 584 */ - void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 585 */ - void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 586 */ - void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 587 */ - void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 588 */ - void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 589 */ - void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 590 */ - void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 591 */ - void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 592 */ - void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 593 */ - void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 594 */ - void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 595 */ - void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 596 */ - void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 597 */ - void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 598 */ - void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 599 */ - void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 600 */ - void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 601 */ - void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 602 */ - void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 603 */ - void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 604 */ - void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 605 */ - void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 606 */ - void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 607 */ - void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 608 */ - void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 609 */ - void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 610 */ - void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 611 */ - void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 612 */ - void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 613 */ - void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 614 */ - void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 615 */ - void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 616 */ - void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 617 */ - void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 618 */ - void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 619 */ - void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 620 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 621 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 622 */ - void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 623 */ - void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 624 */ - void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 625 */ - void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 626 */ - void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 627 */ - void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 628 */ - void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 629 */ - void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 630 */ - void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 631 */ - void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 632 */ - void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 633 */ - void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 634 */ - void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 635 */ - void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 636 */ - void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 637 */ - void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 638 */ - void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 639 */ - void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 640 */ - void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 641 */ - void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 642 */ - void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 643 */ - void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 644 */ - void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 645 */ - void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 646 */ - void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 647 */ - void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 648 */ - void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 649 */ - void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 650 */ - void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 651 */ - void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 652 */ - void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 653 */ - GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 654 */ - void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 655 */ - GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 656 */ - GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 657 */ - void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 658 */ - void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 659 */ - void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 660 */ - void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 661 */ - void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 662 */ - void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 663 */ - void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 664 */ - void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 665 */ - void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 666 */ - void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 667 */ - void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 668 */ - void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 669 */ - void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 670 */ - GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 671 */ - void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 672 */ - void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 673 */ - void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 674 */ - void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 675 */ - void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 676 */ - void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 677 */ - void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 678 */ - void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 679 */ - void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 680 */ - void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 681 */ - void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 682 */ - void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 683 */ - void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 684 */ - void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 685 */ - void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 686 */ - void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 687 */ - void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 688 */ - void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 689 */ - void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 690 */ - void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 691 */ - void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 692 */ - void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 693 */ - void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 694 */ - void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 695 */ - void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 696 */ - void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 697 */ - void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 698 */ - void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 699 */ - void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 700 */ - void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 701 */ - void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 702 */ - void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 703 */ - void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 704 */ - void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 705 */ - void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 706 */ - void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 707 */ - void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 708 */ - void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 709 */ - void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 710 */ - void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 711 */ - void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 712 */ - void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 713 */ - void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 714 */ - void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 715 */ - void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 716 */ - void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 717 */ - void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 718 */ - void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 719 */ - void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 720 */ - void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 721 */ - void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 722 */ - void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 723 */ - void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 724 */ - void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 725 */ - void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 726 */ - GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 727 */ - void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 728 */ - void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 729 */ - void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 730 */ - void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 731 */ - void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 732 */ - void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 733 */ - void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 734 */ - void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 735 */ - void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 736 */ - GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 737 */ - void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 738 */ - void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 739 */ - void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 740 */ - void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 741 */ - void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 742 */ - void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 743 */ - void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 744 */ - void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 745 */ - void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 746 */ - void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 747 */ - GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 748 */ - void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 749 */ - void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 750 */ - void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 751 */ - void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 752 */ - void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 753 */ - void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 754 */ - void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 755 */ - void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 756 */ - void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 757 */ - void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 758 */ - void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 759 */ - GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 760 */ - GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 761 */ - void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 762 */ - void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 763 */ - void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 764 */ - void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 765 */ - void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 766 */ - void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 767 */ - void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 768 */ - void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 769 */ + void (GLAPIENTRYP RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); /* 561 */ + void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 562 */ + void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 563 */ + void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 564 */ + void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 565 */ + void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 566 */ + void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 567 */ + void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 568 */ + void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 569 */ + void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 570 */ + void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 571 */ + void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 572 */ + void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 573 */ + void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 574 */ + void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 575 */ + void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 576 */ + void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 577 */ + void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 578 */ + void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 579 */ + void (GLAPIENTRYP UnlockArraysEXT)(void); /* 580 */ + void (GLAPIENTRYP CullParameterdvEXT)(GLenum pname, GLdouble * params); /* 581 */ + void (GLAPIENTRYP CullParameterfvEXT)(GLenum pname, GLfloat * params); /* 582 */ + void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 583 */ + void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 584 */ + void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 585 */ + void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 586 */ + void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 587 */ + void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 588 */ + void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 589 */ + void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 590 */ + void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 591 */ + void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 592 */ + void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 593 */ + void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 594 */ + void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 595 */ + void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 596 */ + void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 597 */ + void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 598 */ + void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 599 */ + void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); /* 600 */ + void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 601 */ + void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 602 */ + void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 603 */ + void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 604 */ + void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 605 */ + void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 606 */ + void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 607 */ + void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 608 */ + void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 609 */ + void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 610 */ + void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 611 */ + void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 612 */ + void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 613 */ + void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 614 */ + void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 615 */ + void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 616 */ + void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 617 */ + void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 618 */ + void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 619 */ + void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 620 */ + void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 621 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 622 */ + void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 623 */ + void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 624 */ + void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 625 */ + void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 626 */ + void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 627 */ + void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 628 */ + void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 629 */ + void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 630 */ + void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 631 */ + void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 632 */ + void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 633 */ + void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 634 */ + void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 635 */ + void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 636 */ + void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 637 */ + void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 638 */ + void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 639 */ + void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 640 */ + void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 641 */ + void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 642 */ + void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 643 */ + void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 644 */ + void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 645 */ + void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 646 */ + void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 647 */ + void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 648 */ + void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 649 */ + void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 650 */ + void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 651 */ + void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 652 */ + void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 653 */ + void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 654 */ + GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 655 */ + void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 656 */ + GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 657 */ + GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 658 */ + void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 659 */ + void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 660 */ + void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 661 */ + void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 662 */ + void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 663 */ + void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 664 */ + void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 665 */ + void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 666 */ + void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 667 */ + void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 668 */ + void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 669 */ + void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 670 */ + void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 671 */ + GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 672 */ + void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 673 */ + void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); /* 674 */ + void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); /* 675 */ + void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 676 */ + void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 677 */ + void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 678 */ + void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 679 */ + void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 680 */ + void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 681 */ + void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 682 */ + void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 683 */ + void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 684 */ + void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 685 */ + void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 686 */ + void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 687 */ + void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 688 */ + void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 689 */ + void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 690 */ + void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 691 */ + void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 692 */ + void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 693 */ + void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 694 */ + void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 695 */ + void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 696 */ + void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 697 */ + void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 698 */ + void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 699 */ + void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 700 */ + void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 701 */ + void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 702 */ + void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 703 */ + void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 704 */ + void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 705 */ + void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 706 */ + void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 707 */ + void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 708 */ + void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 709 */ + void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 710 */ + void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 711 */ + void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 712 */ + void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 713 */ + void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 714 */ + void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 715 */ + void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 716 */ + void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 717 */ + void (GLAPIENTRYP GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param); /* 718 */ + void (GLAPIENTRYP GetTexBumpParameterivATI)(GLenum pname, GLint * param); /* 719 */ + void (GLAPIENTRYP TexBumpParameterfvATI)(GLenum pname, const GLfloat * param); /* 720 */ + void (GLAPIENTRYP TexBumpParameterivATI)(GLenum pname, const GLint * param); /* 721 */ + void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 722 */ + void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 723 */ + void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 724 */ + void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 725 */ + void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 726 */ + void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 727 */ + void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 728 */ + void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 729 */ + void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 730 */ + void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 731 */ + GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 732 */ + void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 733 */ + void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 734 */ + void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 735 */ + void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 736 */ + void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 737 */ + void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 738 */ + void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 739 */ + void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 740 */ + void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 741 */ + GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 742 */ + void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 743 */ + void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 744 */ + void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 745 */ + void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 746 */ + void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 747 */ + void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 748 */ + void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 749 */ + void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 750 */ + void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 751 */ + void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 752 */ + GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 753 */ + void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 754 */ + void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 755 */ + void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 756 */ + void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 757 */ + void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 758 */ + void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 759 */ + void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 760 */ + void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 761 */ + void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 762 */ + void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 763 */ + void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 764 */ + GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 765 */ + GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 766 */ + void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 767 */ + void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 768 */ + void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 769 */ + void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 770 */ + void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 771 */ + void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 772 */ + void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 773 */ + void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 774 */ }; #endif /* !defined( _GLAPI_TABLE_H_ ) */ diff --git a/mesa/glapi/glthread.h b/mesa/glapi/glthread.h index 8594a90..dfe09a9 100644 --- a/mesa/glapi/glthread.h +++ b/mesa/glapi/glthread.h @@ -116,9 +116,49 @@ typedef pthread_mutex_t _glthread_Mutex; #define _glthread_UNLOCK_MUTEX(name) \ (void) pthread_mutex_unlock(&(name)) -#endif /* PTHREADS */ +typedef pthread_cond_t _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ + static _glthread_Cond name = PTHREAD_COND_INITIALIZER +#define _glthread_INIT_COND(cond) \ + pthread_cond_init(&(cond), NULL) + +#define _glthread_DESTROY_COND(name) \ + pthread_cond_destroy(&(name)) + +#define _glthread_COND_WAIT(cond, mutex) \ + pthread_cond_wait(&(cond), &(mutex)) + +#define _glthread_COND_SIGNAL(cond) \ + pthread_cond_signal(&(cond)) + +#define _glthread_COND_BROADCAST(cond) \ + pthread_cond_broadcast(&(cond)) + + +#else /* PTHREADS */ + +typedef unsigned int _glthread_Cond; +#define _glthread_DECLARE_STATIC_COND(name) \ +// #warning Condition variables not implemented. + +#define _glthread_INIT_COND(cond) \ + ASSERT(0); + +#define _glthread_DESTROY_COND(name) \ + ASSERT(0); + +#define _glthread_COND_WAIT(cond, mutex) \ + ASSERT(0); + +#define _glthread_COND_SIGNAL(cond) \ + ASSERT(0); + +#define _glthread_COND_BROADCAST(cond) \ + ASSERT(0); + +#endif /* @@ -271,11 +311,11 @@ typedef benaphore _glthread_Mutex; * THREADS not defined */ -typedef int _glthread_TSD; +typedef unsigned _glthread_TSD; -typedef int _glthread_Thread; +typedef unsigned _glthread_Thread; -typedef int _glthread_Mutex; +typedef unsigned _glthread_Mutex; #define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 diff --git a/mesa/main/arrayobj.h b/mesa/main/arrayobj.h new file mode 100644 index 0000000..9c4036a --- /dev/null +++ b/mesa/main/arrayobj.h @@ -0,0 +1,79 @@ +/* + * Mesa 3-D graphics library + * Version: 6.5 + * + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * (C) Copyright IBM Corporation 2006 + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL OR IBM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef ARRAYOBJ_H +#define ARRAYOBJ_H + +#include "context.h" + +/** + * \file arrayobj.h + * Functions for the GL_APPLE_vertex_array_object extension. + * + * \author Ian Romanick <idr@us.ibm.com> + * \author Brian Paul + */ + +/* + * Internal functions + */ + +extern struct gl_array_object * +_mesa_new_array_object( GLcontext *ctx, GLuint name ); + +extern void +_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj ); + +extern void +_mesa_reference_array_object(GLcontext *ctx, + struct gl_array_object **ptr, + struct gl_array_object *arrayObj); + +extern void +_mesa_initialize_array_object( GLcontext *ctx, + struct gl_array_object *obj, GLuint name ); + +extern void +_mesa_save_array_object( GLcontext *ctx, struct gl_array_object *obj ); + +extern void +_mesa_remove_array_object( GLcontext *ctx, struct gl_array_object *obj ); + + + +/* + * API functions + */ + +void GLAPIENTRY _mesa_BindVertexArrayAPPLE( GLuint id ); + +void GLAPIENTRY _mesa_DeleteVertexArraysAPPLE(GLsizei n, const GLuint *ids); + +void GLAPIENTRY _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *buffer); + +GLboolean GLAPIENTRY _mesa_IsVertexArrayAPPLE( GLuint id ); + +#endif /* ARRAYOBJ_H */ diff --git a/mesa/main/bufferobj.h b/mesa/main/bufferobj.h index 163fe24..3c08f00 100644 --- a/mesa/main/bufferobj.h +++ b/mesa/main/bufferobj.h @@ -103,9 +103,8 @@ _mesa_map_drawpix_pbo(GLcontext *ctx, const GLvoid *pixels); extern void -_mesa_unmap_drapix_pbo(GLcontext *ctx, - const struct gl_pixelstore_attrib *unpack); - +_mesa_unmap_drawpix_pbo(GLcontext *ctx, + const struct gl_pixelstore_attrib *unpack); extern void * _mesa_map_readpix_pbo(GLcontext *ctx, diff --git a/mesa/main/colormac.h b/mesa/main/colormac.h index 74692e9..815624e 100644 --- a/mesa/main/colormac.h +++ b/mesa/main/colormac.h @@ -71,9 +71,6 @@ /** \def COPY_CHAN4 * Copy a GLchan[4] array */ -/** \def CHAN_PRODUCT - * Scaled product (usually approximated) between two GLchan arguments */ - #if CHAN_BITS == 8 #define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (GLchan) (b)) @@ -91,8 +88,6 @@ #define COPY_CHAN4(DST, SRC) COPY_4UBV(DST, SRC) -#define CHAN_PRODUCT(a, b) ((GLubyte) (((GLint)(a) * ((GLint)(b) + 1)) >> 8)) - #elif CHAN_BITS == 16 #define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (((GLchan) (b)) * 516)) @@ -110,8 +105,6 @@ #define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) -#define CHAN_PRODUCT(a, b) ((GLchan) ((((GLuint) (a)) * ((GLuint) (b))) / 65535)) - #elif CHAN_BITS == 32 /* XXX floating-point color channels not fully thought-out */ @@ -130,8 +123,6 @@ #define COPY_CHAN4(DST, SRC) COPY_4V(DST, SRC) -#define CHAN_PRODUCT(a, b) ((a) * (b)) - #else #error unexpected CHAN_BITS size diff --git a/mesa/main/compiler.h b/mesa/main/compiler.h new file mode 100644 index 0000000..e79bbc2 --- /dev/null +++ b/mesa/main/compiler.h @@ -0,0 +1,482 @@ +/* + * Mesa 3-D graphics library + * Version: 7.5 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file compiler.h + * Compiler-related stuff. + */ + + +#ifndef COMPILER_H +#define COMPILER_H + + +#include <assert.h> +#include <ctype.h> +#if defined(__alpha__) && defined(CCPML) +#include <cpml.h> /* use Compaq's Fast Math Library on Alpha */ +#else +#include <math.h> +#endif +#include <limits.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#if defined(__linux__) && defined(__i386__) +#include <fpu_control.h> +#endif +#include <float.h> +#include <stdarg.h> + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * Get standard integer types + */ +#if defined(_MSC_VER) + typedef __int8 int8_t; + typedef unsigned __int8 uint8_t; + typedef __int16 int16_t; + typedef unsigned __int16 uint16_t; +# ifndef __eglplatform_h_ + typedef __int32 int32_t; +# endif + typedef unsigned __int32 uint32_t; + typedef __int64 int64_t; + typedef unsigned __int64 uint64_t; + +# if defined(_WIN64) + typedef __int64 intptr_t; + typedef unsigned __int64 uintptr_t; +# else + typedef __int32 intptr_t; + typedef unsigned __int32 uintptr_t; +# endif + +# define INT64_C(__val) __val##i64 +# define UINT64_C(__val) __val##ui64 +#else +# include <stdint.h> +#endif + + +/** + * Sun compilers define __i386 instead of the gcc-style __i386__ + */ +#ifdef __SUNPRO_C +# if !defined(__i386__) && defined(__i386) +# define __i386__ +# elif !defined(__amd64__) && defined(__amd64) +# define __amd64__ +# elif !defined(__sparc__) && defined(__sparc) +# define __sparc__ +# endif +# if !defined(__volatile) +# define __volatile volatile +# endif +#endif + + +/** + * finite macro. + */ +#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) +# define __WIN32__ +# define finite _finite +#endif +#if defined(__WATCOMC__) +# define finite _finite +# pragma disable_message(201) /* Disable unreachable code warnings */ +#endif + + +/** + * Disable assorted warnings + */ +#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) +# if !defined(__GNUC__) /* mingw environment */ +# pragma warning( disable : 4068 ) /* unknown pragma */ +# pragma warning( disable : 4710 ) /* function 'foo' not inlined */ +# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */ +# pragma warning( disable : 4127 ) /* conditional expression is constant */ +# if defined(MESA_MINWARN) +# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ +# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ +# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ +# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */ +# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ +# endif +# endif +#endif + + +/** + * Function inlining + */ +#if defined(__GNUC__) +# define INLINE __inline__ +#elif defined(__MSC__) +# define INLINE __inline +#elif defined(_MSC_VER) +# define INLINE __inline +#elif defined(__ICL) +# define INLINE __inline +#elif defined(__INTEL_COMPILER) +# define INLINE inline +#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) +# define INLINE __inline +#elif defined(__SUNPRO_C) && defined(__C99FEATURES__) +# define INLINE inline +# define __inline inline +# define __inline__ inline +#elif (__STDC_VERSION__ >= 199901L) /* C99 */ +# define INLINE inline +#else +# define INLINE +#endif + + +/** + * PUBLIC/USED macros + * + * If we build the library with gcc's -fvisibility=hidden flag, we'll + * use the PUBLIC macro to mark functions that are to be exported. + * + * We also need to define a USED attribute, so the optimizer doesn't + * inline a static function that we later use in an alias. - ajax + */ +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define PUBLIC __attribute__((visibility("default"))) +# define USED __attribute__((used)) +#else +# define PUBLIC +# define USED +#endif + + +/** + * Some compilers don't like some of Mesa's const usage. In those places use + * CONST instead of const. Pass -DNO_CONST to compilers where this matters. + */ +#ifdef NO_CONST +# define CONST +#else +# define CONST const +#endif + + +/** + * __builtin_expect macros + */ +#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900) +# define __builtin_expect(x, y) x +#endif + + +/** + * The __FUNCTION__ gcc variable is generally only used for debugging. + * If we're not using gcc, define __FUNCTION__ as a cpp symbol here. + * Don't define it if using a newer Windows compiler. + */ +#ifndef __FUNCTION__ +# if defined(__VMS) +# define __FUNCTION__ "VMS$NL:" +# elif ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \ + (!defined(_MSC_VER) || _MSC_VER < 1300) +# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \ + (defined(__SUNPRO_C) && defined(__C99FEATURES__)) +# define __FUNCTION__ __func__ +# else +# define __FUNCTION__ "<unknown>" +# endif +# endif +#endif + + +/** + * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN. + * Do not use them unless absolutely necessary! + * Try to use a runtime test instead. + * For now, only used by some DRI hardware drivers for color/texel packing. + */ +#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN +#if defined(__linux__) +#include <byteswap.h> +#define CPU_TO_LE32( x ) bswap_32( x ) +#elif defined(__APPLE__) +#include <CoreFoundation/CFByteOrder.h> +#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) +#else /*__linux__ __APPLE__*/ +#include <sys/endian.h> +#define CPU_TO_LE32( x ) bswap32( x ) +#endif /*__linux__*/ +#define MESA_BIG_ENDIAN 1 +#else +#define CPU_TO_LE32( x ) ( x ) +#define MESA_LITTLE_ENDIAN 1 +#endif +#define LE32_TO_CPU( x ) CPU_TO_LE32( x ) + + + +#if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP) +#define CAPI _cdecl +#endif + + +/** + * Create a macro so that asm functions can be linked into compilers other + * than GNU C + */ +#ifndef _ASMAPI +#if defined(WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/ +#define _ASMAPI __cdecl +#else +#define _ASMAPI +#endif +#ifdef PTR_DECL_IN_FRONT +#define _ASMAPIP * _ASMAPI +#else +#define _ASMAPIP _ASMAPI * +#endif +#endif + +#ifdef USE_X86_ASM +#define _NORMAPI _ASMAPI +#define _NORMAPIP _ASMAPIP +#else +#define _NORMAPI +#define _NORMAPIP * +#endif + + +/* This is a macro on IRIX */ +#ifdef _P +#undef _P +#endif + + +/* Turn off macro checking systems used by other libraries */ +#ifdef CHECK +#undef CHECK +#endif + + +/** + * ASSERT macro + */ +#if !defined(_WIN32_WCE) +#if defined(BUILD_FOR_SNAP) && defined(CHECKED) +# define ASSERT(X) _CHECK(X) +#elif defined(DEBUG) +# define ASSERT(X) assert(X) +#else +# define ASSERT(X) +#endif +#endif + + +#ifndef NULL +#define NULL 0 +#endif + + +/** + * LONGSTRING macro + * gcc -pedantic warns about long string literals, LONGSTRING silences that. + */ +#if !defined(__GNUC__) || (__GNUC__ < 2) || \ + ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)) +# define LONGSTRING +#else +# define LONGSTRING __extension__ +#endif + + +#ifndef M_PI +#define M_PI (3.1415926536) +#endif + +#ifndef M_E +#define M_E (2.7182818284590452354) +#endif + +#ifndef ONE_DIV_LN2 +#define ONE_DIV_LN2 (1.442695040888963456) +#endif + +#ifndef ONE_DIV_SQRT_LN2 +#define ONE_DIV_SQRT_LN2 (1.201122408786449815) +#endif + +#ifndef FLT_MAX_EXP +#define FLT_MAX_EXP 128 +#endif + + +/** + * USE_IEEE: Determine if we're using IEEE floating point + */ +#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \ + defined(__s390x__) || defined(__powerpc__) || \ + defined(__x86_64__) || \ + defined(ia64) || defined(__ia64__) || \ + defined(__hppa__) || defined(hpux) || \ + defined(__mips) || defined(_MIPS_ARCH) || \ + defined(__arm__) || \ + defined(__sh__) || defined(__m32r__) || \ + (defined(__sun) && defined(_IEEE_754)) || \ + (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) +#define USE_IEEE +#define IEEE_ONE 0x3f800000 +#endif + + +/** + * START/END_FAST_MATH macros: + * + * START_FAST_MATH: Set x86 FPU to faster, 32-bit precision mode (and save + * original mode to a temporary). + * END_FAST_MATH: Restore x86 FPU to original mode. + */ +#if defined(__GNUC__) && defined(__i386__) +/* + * Set the x86 FPU control word to guarentee only 32 bits of precision + * are stored in registers. Allowing the FPU to store more introduces + * differences between situations where numbers are pulled out of memory + * vs. situations where the compiler is able to optimize register usage. + * + * In the worst case, we force the compiler to use a memory access to + * truncate the float, by specifying the 'volatile' keyword. + */ +/* Hardware default: All exceptions masked, extended double precision, + * round to nearest (IEEE compliant): + */ +#define DEFAULT_X86_FPU 0x037f +/* All exceptions masked, single precision, round to nearest: + */ +#define FAST_X86_FPU 0x003f +/* The fldcw instruction will cause any pending FP exceptions to be + * raised prior to entering the block, and we clear any pending + * exceptions before exiting the block. Hence, asm code has free + * reign over the FPU while in the fast math block. + */ +#if defined(NO_FAST_MATH) +#define START_FAST_MATH(x) \ +do { \ + static GLuint mask = DEFAULT_X86_FPU; \ + __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \ + __asm__ ( "fldcw %0" : : "m" (mask) ); \ +} while (0) +#else +#define START_FAST_MATH(x) \ +do { \ + static GLuint mask = FAST_X86_FPU; \ + __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \ + __asm__ ( "fldcw %0" : : "m" (mask) ); \ +} while (0) +#endif +/* Restore original FPU mode, and clear any exceptions that may have + * occurred in the FAST_MATH block. + */ +#define END_FAST_MATH(x) \ +do { \ + __asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) ); \ +} while (0) + +#elif defined(__WATCOMC__) && defined(__386__) +#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */ +#define FAST_X86_FPU 0x003f /* See GCC comments above */ +void _watcom_start_fast_math(unsigned short *x,unsigned short *mask); +#pragma aux _watcom_start_fast_math = \ + "fnstcw word ptr [eax]" \ + "fldcw word ptr [ecx]" \ + parm [eax] [ecx] \ + modify exact []; +void _watcom_end_fast_math(unsigned short *x); +#pragma aux _watcom_end_fast_math = \ + "fnclex" \ + "fldcw word ptr [eax]" \ + parm [eax] \ + modify exact []; +#if defined(NO_FAST_MATH) +#define START_FAST_MATH(x) \ +do { \ + static GLushort mask = DEFAULT_X86_FPU; \ + _watcom_start_fast_math(&x,&mask); \ +} while (0) +#else +#define START_FAST_MATH(x) \ +do { \ + static GLushort mask = FAST_X86_FPU; \ + _watcom_start_fast_math(&x,&mask); \ +} while (0) +#endif +#define END_FAST_MATH(x) _watcom_end_fast_math(&x) + +#elif defined(_MSC_VER) && defined(_M_IX86) +#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */ +#define FAST_X86_FPU 0x003f /* See GCC comments above */ +#if defined(NO_FAST_MATH) +#define START_FAST_MATH(x) do {\ + static GLuint mask = DEFAULT_X86_FPU;\ + __asm fnstcw word ptr [x]\ + __asm fldcw word ptr [mask]\ +} while(0) +#else +#define START_FAST_MATH(x) do {\ + static GLuint mask = FAST_X86_FPU;\ + __asm fnstcw word ptr [x]\ + __asm fldcw word ptr [mask]\ +} while(0) +#endif +#define END_FAST_MATH(x) do {\ + __asm fnclex\ + __asm fldcw word ptr [x]\ +} while(0) + +#else +#define START_FAST_MATH(x) x = 0 +#define END_FAST_MATH(x) (void)(x) +#endif + + +#ifndef Elements +#define Elements(x) (sizeof(x)/sizeof(*(x))) +#endif + + + +#ifdef __cplusplus +} +#endif + + +#endif /* COMPILER_H */ diff --git a/mesa/main/config.h b/mesa/main/config.h index f74576e..f7acd2f 100644 --- a/mesa/main/config.h +++ b/mesa/main/config.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.3 + * Version: 7.5 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * Copyright (C) 2008 VMware, Inc. All Rights Reserved. @@ -32,9 +32,6 @@ #define MESA_CONFIG_H_INCLUDED -#include "main/mfeatures.h" - - /** * \name OpenGL implementation limits */ @@ -71,7 +68,7 @@ #define MAX_PIXEL_MAP_TABLE 256 /** Maximum number of auxillary color buffers */ -#define MAX_AUX_BUFFERS 4 +#define MAX_AUX_BUFFERS 1 /** Maximum order (degree) of curves */ #ifdef AMIGA @@ -101,16 +98,16 @@ #define MAX_COLOR_TABLE_SIZE 256 /** Number of 1D/2D texture mipmap levels */ -#define MAX_TEXTURE_LEVELS 12 +#define MAX_TEXTURE_LEVELS 13 /** Number of 3D texture mipmap levels */ #define MAX_3D_TEXTURE_LEVELS 9 /** Number of cube texture mipmap levels - GL_ARB_texture_cube_map */ -#define MAX_CUBE_TEXTURE_LEVELS 12 +#define MAX_CUBE_TEXTURE_LEVELS 13 /** Maximum rectangular texture size - GL_NV_texture_rectangle */ -#define MAX_TEXTURE_RECT_SIZE 2048 +#define MAX_TEXTURE_RECT_SIZE 4096 /** Maximum number of layers in a 1D or 2D array texture - GL_MESA_texture_array */ #define MAX_ARRAY_TEXTURE_LAYERS 64 @@ -166,7 +163,7 @@ #define MAX_TEXTURE_MAX_ANISOTROPY 16.0 /** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */ -#define MAX_TEXTURE_LOD_BIAS 11.0 +#define MAX_TEXTURE_LOD_BIAS 12.0 /** For GL_ARB_vertex_program */ /*@{*/ @@ -177,22 +174,20 @@ /** For GL_ARB_fragment_program */ /*@{*/ #define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 0 -#define MAX_FRAGMENT_PROGRAM_ALU_INSTRUCTIONS 48 -#define MAX_FRAGMENT_PROGRAM_TEX_INSTRUCTIONS 24 -#define MAX_FRAGMENT_PROGRAM_TEX_INDIRECTIONS 4 /*@}*/ /** For any program target/extension */ /*@{*/ +#define MAX_PROGRAM_INSTRUCTIONS (16 * 1024) #define MAX_PROGRAM_LOCAL_PARAMS 256 /**< per-program constants (power of two) */ -#define MAX_PROGRAM_ENV_PARAMS 128 +#define MAX_PROGRAM_ENV_PARAMS 256 /**< per-context constants (power of two) */ #define MAX_PROGRAM_MATRICES 8 #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 #define MAX_PROGRAM_CALL_DEPTH 8 -#define MAX_PROGRAM_TEMPS 128 +#define MAX_PROGRAM_TEMPS 256 #define MAX_PROGRAM_ADDRESS_REGS 2 #define MAX_UNIFORMS 1024 /**< number of vec4 uniforms */ -#define MAX_VARYING 8 /**< number of float[4] vectors */ +#define MAX_VARYING 16 /**< number of float[4] vectors */ #define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS #define MAX_PROGRAM_INPUTS 32 #define MAX_PROGRAM_OUTPUTS 32 @@ -202,7 +197,7 @@ /*@{*/ #define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128 #define MAX_NV_VERTEX_PROGRAM_TEMPS 12 -#define MAX_NV_VERTEX_PROGRAM_PARAMS MAX_PROGRAM_ENV_PARAMS +#define MAX_NV_VERTEX_PROGRAM_PARAMS 96 #define MAX_NV_VERTEX_PROGRAM_INPUTS 16 #define MAX_NV_VERTEX_PROGRAM_OUTPUTS 15 /*@}*/ @@ -220,7 +215,7 @@ /** For GL_ARB_vertex_shader */ /*@{*/ -#define MAX_VERTEX_ATTRIBS 16 +#define MAX_VERTEX_GENERIC_ATTRIBS 16 #define MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS #define MAX_COMBINED_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS /*@}*/ @@ -237,7 +232,8 @@ #define MAX_COLOR_ATTACHMENTS 8 /*@}*/ - +/** For GL_ATI_envmap_bump - support bump mapping on first 8 units */ +#define SUPPORTED_ATI_BUMP_UNITS 0xff /** * \name Mesa-specific parameters diff --git a/mesa/main/context.h b/mesa/main/context.h index 8c1196d..0531ae8 100644 --- a/mesa/main/context.h +++ b/mesa/main/context.h @@ -49,11 +49,13 @@ #define CONTEXT_H -#include "glapi/glapi.h" #include "imports.h" #include "mtypes.h" +struct _glapi_table; + + /** \name Visual-related functions */ /*@{*/ @@ -129,12 +131,12 @@ _mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask); extern void +_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height); + +extern GLboolean _mesa_make_current( GLcontext *ctx, GLframebuffer *drawBuffer, GLframebuffer *readBuffer ); -extern void -_mesa_check_init_viewport(GLcontext *ctx, GLuint width, GLuint height); - extern GLboolean _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare); @@ -152,6 +154,10 @@ extern struct _glapi_table * _mesa_get_dispatch(GLcontext *ctx); +void +_mesa_set_mvp_with_dp4( GLcontext *ctx, + GLboolean flag ); + /** \name Miscellaneous */ /*@{*/ diff --git a/mesa/main/dd.h b/mesa/main/dd.h index ddb3803..32b1d4e 100644 --- a/mesa/main/dd.h +++ b/mesa/main/dd.h @@ -34,7 +34,23 @@ /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */ struct gl_pixelstore_attrib; -struct mesa_display_list; +struct gl_display_list; + +#if FEATURE_ARB_vertex_buffer_object +/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return + * NULL) if buffer is unavailable for immediate mapping. + * + * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it + * would require more book-keeping in the driver than seems necessary + * at this point. + * + * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't + * want to provoke the driver to throw away the old storage, we will + * respect the contents of already referenced data. + */ +#define MESA_MAP_NOWAIT_BIT 0x0040 +#endif + /** * Device driver function table. @@ -586,9 +602,6 @@ struct dd_function_table { /** Notify driver that a program string has been specified. */ void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, struct gl_program *prog); - /** Get value of a program register during program execution. */ - void (*GetProgramRegister)(GLcontext *ctx, enum register_file file, - GLuint index, GLfloat val[4]); /** Query if program can be loaded onto hardware */ GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, @@ -785,6 +798,16 @@ struct dd_function_table { void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access, struct gl_buffer_object *obj ); + /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: + */ + void * (*MapBufferRange)( GLcontext *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, GLbitfield access, + struct gl_buffer_object *obj); + + void (*FlushMappedBufferRange) (GLcontext *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, + struct gl_buffer_object *obj); + GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, struct gl_buffer_object *obj ); /*@}*/ @@ -808,6 +831,8 @@ struct dd_function_table { struct gl_renderbuffer_attachment *att); void (*FinishRenderTexture)(GLcontext *ctx, struct gl_renderbuffer_attachment *att); + void (*ValidateFramebuffer)(GLcontext *ctx, + struct gl_framebuffer *fb); /*@}*/ #endif #if FEATURE_EXT_framebuffer_blit @@ -886,7 +911,7 @@ struct dd_function_table { void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type); void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows, - GLenum matrixType, GLint location, GLsizei count, + GLint location, GLsizei count, GLboolean transpose, const GLfloat *values); void (*UseProgram)(GLcontext *ctx, GLuint program); void (*ValidateProgram)(GLcontext *ctx, GLuint program); @@ -952,6 +977,12 @@ struct dd_function_table { GLuint NeedFlush; GLuint SaveNeedFlush; + + /* Called prior to any of the GLvertexformat functions being + * called. Paired with Driver.FlushVertices(). + */ + void (*BeginVertices)( GLcontext *ctx ); + /** * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered @@ -997,7 +1028,7 @@ struct dd_function_table { * Notify the T&L component before and after calling a display list. */ void (*BeginCallList)( GLcontext *ctx, - struct mesa_display_list *dlist ); + struct gl_display_list *dlist ); /** * Called by glEndCallList(). * diff --git a/mesa/main/enums.h b/mesa/main/enums.h index 23a4767..b5f6900 100644 --- a/mesa/main/enums.h +++ b/mesa/main/enums.h @@ -40,6 +40,12 @@ #if defined(_HAVE_FULL_GL) && _HAVE_FULL_GL extern const char *_mesa_lookup_enum_by_nr( int nr ); + +/* Get the name of an enum given that it is a primitive type. Avoids + * GL_FALSE/GL_POINTS ambiguity and others. + */ +const char *_mesa_lookup_prim_by_nr( int nr ); + extern int _mesa_lookup_enum_by_name( const char *symbol ); #else diff --git a/mesa/main/fbobject.h b/mesa/main/fbobject.h index b615471..5409394 100644 --- a/mesa/main/fbobject.h +++ b/mesa/main/fbobject.h @@ -84,6 +84,11 @@ _mesa_RenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); extern void GLAPIENTRY +_mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height); + +extern void GLAPIENTRY _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params); diff --git a/mesa/main/framebuffer.h b/mesa/main/framebuffer.h index e9eeed2..45a4703 100644 --- a/mesa/main/framebuffer.h +++ b/mesa/main/framebuffer.h @@ -47,9 +47,6 @@ _mesa_reference_framebuffer(struct gl_framebuffer **ptr, struct gl_framebuffer *fb); extern void -_mesa_unreference_framebuffer(struct gl_framebuffer **fb); - -extern void _mesa_resize_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height); diff --git a/mesa/main/glheader.h b/mesa/main/glheader.h index d17be37..81d4ccf 100644 --- a/mesa/main/glheader.h +++ b/mesa/main/glheader.h @@ -1,28 +1,8 @@ -/** - * \file glheader.h - * Top-most include file. - * - * This is the top-most include file of the Mesa sources. - * It includes gl.h and all system headers which are needed. - * Other Mesa source files should \e not directly include any system - * headers. This allows system-dependent hacks/workarounds to be - * collected in one place. - * - * \note Actually, a lot of system-dependent stuff is now in imports.[ch]. - * - * If you touch this file, everything gets recompiled! - * - * This file should be included before any other header in the .c files. - * - * Put compiler/OS/assembly pragmas and macros here to avoid - * cluttering other source files. - */ - /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 7.5 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -43,88 +23,22 @@ */ -#ifndef GLHEADER_H -#define GLHEADER_H - -#include <assert.h> -#include <ctype.h> -#if defined(__alpha__) && defined(CCPML) -#include <cpml.h> /* use Compaq's Fast Math Library on Alpha */ -#else -#include <math.h> -#endif -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#if defined(__linux__) && defined(__i386__) -#include <fpu_control.h> -#endif -#include <float.h> -#include <stdarg.h> - - -/* Get typedefs for uintptr_t and friends */ -#if defined(__MINGW32__) || defined(__NetBSD__) -# include <stdint.h> -#elif defined(_WIN32) -# include <BaseTsd.h> -# if _MSC_VER == 1200 - typedef UINT_PTR uintptr_t; -# endif -#elif defined(__INTERIX) -/* Interix 3.x has a gcc that shadows this. */ -# ifndef _UINTPTR_T_DEFINED - typedef unsigned long uintptr_t; -# define _UINTPTR_T_DEFINED -# endif -#else -# include <inttypes.h> -#endif - +/** + * \file glheader.h + * Wrapper for GL/gl.h and GL/glext.h + */ -/* Sun compilers define __i386 instead of the gcc-style __i386__ */ -#ifdef __SUNPRO_C -# if !defined(__i386__) && defined(__i386) -# define __i386__ -# elif !defined(__amd64__) && defined(__amd64) -# define __amd64__ -# elif !defined(__sparc__) && defined(__sparc) -# define __sparc__ -# endif -# if !defined(__volatile) -# define __volatile volatile -# endif -#endif -#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) -# define __WIN32__ -# define finite _finite -#endif +#ifndef GLHEADER_H +#define GLHEADER_H -#if defined(__WATCOMC__) -# define finite _finite -# pragma disable_message(201) /* Disable unreachable code warnings */ -#endif #ifdef WGLAPI -# undef WGLAPI +#undef WGLAPI #endif + #if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) -# if !defined(__GNUC__) /* mingw environment */ -# pragma warning( disable : 4068 ) /* unknown pragma */ -# pragma warning( disable : 4710 ) /* function 'foo' not inlined */ -# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */ -# pragma warning( disable : 4127 ) /* conditional expression is constant */ -# if defined(MESA_MINWARN) -# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ -# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ -# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ -# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */ -# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ -# endif -# endif # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define WGLAPI __declspec(dllexport) # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ @@ -135,34 +49,10 @@ #endif /* WIN32 / CYGWIN bracket */ -/* - * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN. - * Do not use them unless absolutely necessary! - * Try to use a runtime test instead. - * For now, only used by some DRI hardware drivers for color/texel packing. - */ -#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN -#if defined(__linux__) -#include <byteswap.h> -#define CPU_TO_LE32( x ) bswap_32( x ) -#elif defined(__APPLE__) -#include <CoreFoundation/CFByteOrder.h> -#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) -#else /*__linux__ __APPLE__*/ -#include <sys/endian.h> -#define CPU_TO_LE32( x ) bswap32( x ) -#endif /*__linux__*/ -#define MESA_BIG_ENDIAN 1 -#else -#define CPU_TO_LE32( x ) ( x ) -#define MESA_LITTLE_ENDIAN 1 -#endif -#define LE32_TO_CPU( x ) CPU_TO_LE32( x ) - - #define GL_GLEXT_PROTOTYPES #include "GL/gl.h" #include "GL/glext.h" +#include "GL/internal/glcore.h" #ifndef GL_FIXED @@ -184,129 +74,15 @@ #endif -#if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP) -#define CAPI _cdecl -#endif - - -/* This is a macro on IRIX */ -#ifdef _P -#undef _P -#endif - - -/* Turn off macro checking systems used by other libraries */ -#ifdef CHECK -#undef CHECK +#ifndef GL_PROGRAM_BINARY_LENGTH_OES +#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 #endif -/* Create a macro so that asm functions can be linked into compilers other - * than GNU C - */ -#ifndef _ASMAPI -#if defined(WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/ -#define _ASMAPI __cdecl -#else -#define _ASMAPI -#endif -#ifdef PTR_DECL_IN_FRONT -#define _ASMAPIP * _ASMAPI -#else -#define _ASMAPIP _ASMAPI * -#endif -#endif - -#ifdef USE_X86_ASM -#define _NORMAPI _ASMAPI -#define _NORMAPIP _ASMAPIP -#else -#define _NORMAPI -#define _NORMAPIP * -#endif - - -/* Function inlining */ -#if defined(__GNUC__) -# define INLINE __inline__ -#elif defined(__MSC__) -# define INLINE __inline -#elif defined(_MSC_VER) -# define INLINE __inline -#elif defined(__ICL) -# define INLINE __inline -#elif defined(__INTEL_COMPILER) -# define INLINE inline -#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) -# define INLINE __inline -#elif defined(__SUNPRO_C) && defined(__C99FEATURES__) -# define INLINE inline -# define __inline inline -# define __inline__ inline -#elif (__STDC_VERSION__ >= 199901L) /* C99 */ -# define INLINE inline -#else -# define INLINE -#endif - - -/* If we build the library with gcc's -fvisibility=hidden flag, we'll - * use the PUBLIC macro to mark functions that are to be exported. - * - * We also need to define a USED attribute, so the optimizer doesn't - * inline a static function that we later use in an alias. - ajax - */ -#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 -# define PUBLIC __attribute__((visibility("default"))) -# define USED __attribute__((used)) -#else -# define PUBLIC -# define USED -#endif - - -/* Some compilers don't like some of Mesa's const usage */ -#ifdef NO_CONST -# define CONST -#else -# define CONST const -#endif - - -#if !defined(_WIN32_WCE) -#if defined(BUILD_FOR_SNAP) && defined(CHECKED) -# define ASSERT(X) _CHECK(X) -#elif defined(DEBUG) -# define ASSERT(X) assert(X) -#else -# define ASSERT(X) -#endif -#endif - - -#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900) -# define __builtin_expect(x, y) x -#endif - -/* The __FUNCTION__ gcc variable is generally only used for debugging. - * If we're not using gcc, define __FUNCTION__ as a cpp symbol here. - * Don't define it if using a newer Windows compiler. +/** + * Special, internal token */ -#ifndef __FUNCTION__ -# if defined(__VMS) -# define __FUNCTION__ "VMS$NL:" -# elif ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \ - (!defined(_MSC_VER) || _MSC_VER < 1300) -# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \ - (defined(__SUNPRO_C) && defined(__C99FEATURES__)) -# define __FUNCTION__ __func__ -# else -# define __FUNCTION__ "<unknown>" -# endif -# endif -#endif - +#define GL_SHADER_PROGRAM_MESA 0x9999 -#include "config.h" #endif /* GLHEADER_H */ diff --git a/mesa/main/image.h b/mesa/main/image.h index 0e0bbd9..b26c27e 100644 --- a/mesa/main/image.h +++ b/mesa/main/image.h @@ -198,6 +198,13 @@ _mesa_unpack_color_span_float( GLcontext *ctx, const struct gl_pixelstore_attrib *srcPacking, GLbitfield transferOps ); +extern void +_mesa_unpack_dudv_span_byte( GLcontext *ctx, + GLuint n, GLenum dstFormat, GLbyte dest[], + GLenum srcFormat, GLenum srcType, + const GLvoid *source, + const struct gl_pixelstore_attrib *srcPacking, + GLbitfield transferOps ); extern void _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, diff --git a/mesa/main/imports.h b/mesa/main/imports.h index e560bc0..7b61e22 100644 --- a/mesa/main/imports.h +++ b/mesa/main/imports.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.1 + * Version: 7.5 * * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * @@ -36,10 +36,8 @@ #define IMPORTS_H -/* XXX some of the stuff in glheader.h should be moved into this file. - */ +#include "compiler.h" #include "glheader.h" -#include <GL/internal/glcore.h> #ifdef __cplusplus @@ -48,26 +46,6 @@ extern "C" { /**********************************************************************/ -/** \name General macros */ -/*@{*/ - -#ifndef NULL -#define NULL 0 -#endif - - -/** gcc -pedantic warns about long string literals, LONGSTRING silences that */ -#if !defined(__GNUC__) || (__GNUC__ < 2) || \ - ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)) -# define LONGSTRING -#else -# define LONGSTRING __extension__ -#endif - -/*@}*/ - - -/**********************************************************************/ /** Memory macros */ /*@{*/ @@ -130,49 +108,11 @@ typedef union { GLfloat f; GLint i; } fi_type; #define MAX_GLUSHORT 0xffff #define MAX_GLUINT 0xffffffff -#ifndef M_PI -#define M_PI (3.1415926536) -#endif - -#ifndef M_E -#define M_E (2.7182818284590452354) -#endif - -#ifndef ONE_DIV_LN2 -#define ONE_DIV_LN2 (1.442695040888963456) -#endif - -#ifndef ONE_DIV_SQRT_LN2 -#define ONE_DIV_SQRT_LN2 (1.201122408786449815) -#endif - -#ifndef FLT_MAX_EXP -#define FLT_MAX_EXP 128 -#endif - /* Degrees to radians conversion: */ #define DEG2RAD (M_PI/180.0) /*** - *** USE_IEEE: Determine if we're using IEEE floating point - ***/ -#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \ - defined(__s390x__) || defined(__powerpc__) || \ - defined(__x86_64__) || \ - defined(ia64) || defined(__ia64__) || \ - defined(__hppa__) || defined(hpux) || \ - defined(__mips) || defined(_MIPS_ARCH) || \ - defined(__arm__) || \ - defined(__sh__) || defined(__m32r__) || \ - (defined(__sun) && defined(_IEEE_754)) || \ - (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS))) -#define USE_IEEE -#define IEEE_ONE 0x3f800000 -#endif - - -/*** *** SQRTF: single-precision square root ***/ #if 0 /* _mesa_sqrtf() not accurate enough - temporarily disabled */ @@ -316,15 +256,7 @@ static INLINE int GET_FLOAT_BITS( float x ) /*** *** IROUND: return (as an integer) float rounded to nearest integer ***/ -#if defined(USE_SPARC_ASM) && defined(__GNUC__) && defined(__sparc__) -static INLINE int iround(float f) -{ - int r; - __asm__ ("fstoi %1, %0" : "=f" (r) : "f" (f)); - return r; -} -#define IROUND(x) iround(x) -#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \ +#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \ (!(defined(__BEOS__) || defined(__HAIKU__)) || \ (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))) static INLINE int iround(float f) @@ -509,113 +441,6 @@ _mesa_is_pow_two(int x) #endif -/*** - *** START_FAST_MATH: Set x86 FPU to faster, 32-bit precision mode (and save - *** original mode to a temporary). - *** END_FAST_MATH: Restore x86 FPU to original mode. - ***/ -#if defined(__GNUC__) && defined(__i386__) -/* - * Set the x86 FPU control word to guarentee only 32 bits of precision - * are stored in registers. Allowing the FPU to store more introduces - * differences between situations where numbers are pulled out of memory - * vs. situations where the compiler is able to optimize register usage. - * - * In the worst case, we force the compiler to use a memory access to - * truncate the float, by specifying the 'volatile' keyword. - */ -/* Hardware default: All exceptions masked, extended double precision, - * round to nearest (IEEE compliant): - */ -#define DEFAULT_X86_FPU 0x037f -/* All exceptions masked, single precision, round to nearest: - */ -#define FAST_X86_FPU 0x003f -/* The fldcw instruction will cause any pending FP exceptions to be - * raised prior to entering the block, and we clear any pending - * exceptions before exiting the block. Hence, asm code has free - * reign over the FPU while in the fast math block. - */ -#if defined(NO_FAST_MATH) -#define START_FAST_MATH(x) \ -do { \ - static GLuint mask = DEFAULT_X86_FPU; \ - __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \ - __asm__ ( "fldcw %0" : : "m" (mask) ); \ -} while (0) -#else -#define START_FAST_MATH(x) \ -do { \ - static GLuint mask = FAST_X86_FPU; \ - __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \ - __asm__ ( "fldcw %0" : : "m" (mask) ); \ -} while (0) -#endif -/* Restore original FPU mode, and clear any exceptions that may have - * occurred in the FAST_MATH block. - */ -#define END_FAST_MATH(x) \ -do { \ - __asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) ); \ -} while (0) - -#elif defined(__WATCOMC__) && defined(__386__) -#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */ -#define FAST_X86_FPU 0x003f /* See GCC comments above */ -void _watcom_start_fast_math(unsigned short *x,unsigned short *mask); -#pragma aux _watcom_start_fast_math = \ - "fnstcw word ptr [eax]" \ - "fldcw word ptr [ecx]" \ - parm [eax] [ecx] \ - modify exact []; -void _watcom_end_fast_math(unsigned short *x); -#pragma aux _watcom_end_fast_math = \ - "fnclex" \ - "fldcw word ptr [eax]" \ - parm [eax] \ - modify exact []; -#if defined(NO_FAST_MATH) -#define START_FAST_MATH(x) \ -do { \ - static GLushort mask = DEFAULT_X86_FPU; \ - _watcom_start_fast_math(&x,&mask); \ -} while (0) -#else -#define START_FAST_MATH(x) \ -do { \ - static GLushort mask = FAST_X86_FPU; \ - _watcom_start_fast_math(&x,&mask); \ -} while (0) -#endif -#define END_FAST_MATH(x) _watcom_end_fast_math(&x) - -#elif defined(_MSC_VER) && defined(_M_IX86) -#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */ -#define FAST_X86_FPU 0x003f /* See GCC comments above */ -#if defined(NO_FAST_MATH) -#define START_FAST_MATH(x) do {\ - static GLuint mask = DEFAULT_X86_FPU;\ - __asm fnstcw word ptr [x]\ - __asm fldcw word ptr [mask]\ -} while(0) -#else -#define START_FAST_MATH(x) do {\ - static GLuint mask = FAST_X86_FPU;\ - __asm fnstcw word ptr [x]\ - __asm fldcw word ptr [mask]\ -} while(0) -#endif -#define END_FAST_MATH(x) do {\ - __asm fnclex\ - __asm fldcw word ptr [x]\ -} while(0) - -#else -#define START_FAST_MATH(x) x = 0 -#define END_FAST_MATH(x) (void)(x) -#endif - - /** * Return 1 if this is a little endian machine, 0 if big endian. */ @@ -709,14 +534,10 @@ extern double _mesa_pow(double x, double y); extern int -_mesa_ffs(int i); +_mesa_ffs(int32_t i); extern int -#ifdef __MINGW32__ -_mesa_ffsll(long i); -#else -_mesa_ffsll(long long i); -#endif +_mesa_ffsll(int64_t i); extern unsigned int _mesa_bitcount(unsigned int n); diff --git a/mesa/main/macros.h b/mesa/main/macros.h index 2630855..4ca7957 100644 --- a/mesa/main/macros.h +++ b/mesa/main/macros.h @@ -54,34 +54,59 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; #define FLOAT_TO_BYTE(X) ( (((GLint) (255.0F * (X))) - 1) / 2 ) -/** Convert GLushort in [0,65536] to GLfloat in [0.0,1.0] */ +/** Convert GLbyte in [-128,127] to GLfloat in [-1.0,1.0], texture/fb data */ +#define BYTE_TO_FLOAT_TEX(B) ((B) == -128 ? -1.0F : (B) * (1.0F/127.0F)) + +/** Convert GLfloat in [-1.0,1.0] to GLbyte in [-128,127], texture/fb data */ +#define FLOAT_TO_BYTE_TEX(X) ( (GLint) (127.0F * (X)) ) + + +/** Convert GLushort in [0,65535] to GLfloat in [0.0,1.0] */ #define USHORT_TO_FLOAT(S) ((GLfloat) (S) * (1.0F / 65535.0F)) +/** Convert GLfloat in [0.0,1.0] to GLushort in [0, 65535] */ +#define FLOAT_TO_USHORT(X) ((GLuint) ((X) * 65535.0F)) + + /** Convert GLshort in [-32768,32767] to GLfloat in [-1.0,1.0] */ #define SHORT_TO_FLOAT(S) ((2.0F * (S) + 1.0F) * (1.0F/65535.0F)) -/** Convert GLfloat in [0.0,1.0] to GLshort in [-32768,32767] */ +/** Convert GLfloat in [-1.0,1.0] to GLshort in [-32768,32767] */ #define FLOAT_TO_SHORT(X) ( (((GLint) (65535.0F * (X))) - 1) / 2 ) +/** Convert GLshort in [-32768,32767] to GLfloat in [-1.0,1.0], texture/fb data */ +#define SHORT_TO_FLOAT_TEX(S) ((S) == -32768 ? -1.0F : (S) * (1.0F/32767.0F)) + +/** Convert GLfloat in [-1.0,1.0] to GLshort in [-32768,32767], texture/fb data */ +#define FLOAT_TO_SHORT_TEX(X) ( (GLint) (32767.0F * (X)) ) + + /** Convert GLuint in [0,4294967295] to GLfloat in [0.0,1.0] */ -#define UINT_TO_FLOAT(U) ((GLfloat) (U) * (1.0F / 4294967295.0F)) +#define UINT_TO_FLOAT(U) ((GLfloat) (U) * (1.0F / 4294967295.0)) /** Convert GLfloat in [0.0,1.0] to GLuint in [0,4294967295] */ #define FLOAT_TO_UINT(X) ((GLuint) ((X) * 4294967295.0)) /** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0] */ -#define INT_TO_FLOAT(I) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0F)) +#define INT_TO_FLOAT(I) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0)) /** Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647] */ /* causes overflow: -#define FLOAT_TO_INT(X) ( (((GLint) (4294967294.0F * (X))) - 1) / 2 ) +#define FLOAT_TO_INT(X) ( (((GLint) (4294967294.0 * (X))) - 1) / 2 ) */ /* a close approximation: */ #define FLOAT_TO_INT(X) ( (GLint) (2147483647.0 * (X)) ) +/** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0], texture/fb data */ +#define INT_TO_FLOAT_TEX(I) ((I) == -2147483648 ? -1.0F : (I) * (1.0F/2147483647.0)) + +/** Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647], texture/fb data */ +#define FLOAT_TO_INT_TEX(X) ( (GLint) (2147483647.0 * (X)) ) + + #define BYTE_TO_UBYTE(b) ((GLubyte) ((b) < 0 ? 0 : (GLubyte) (b))) #define SHORT_TO_UBYTE(s) ((GLubyte) ((s) < 0 ? 0 : (GLubyte) ((s) >> 7))) #define USHORT_TO_UBYTE(s) ((GLubyte) ((s) >> 8)) @@ -95,7 +120,7 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; #define INT_TO_USHORT(i) ((i) < 0 ? 0 : ((GLushort) ((i) >> 15))) #define UINT_TO_USHORT(i) ((i) < 0 ? 0 : ((GLushort) ((i) >> 16))) #define UNCLAMPED_FLOAT_TO_USHORT(us, f) \ - us = ( (GLushort) IROUND( CLAMP((f), 0.0, 1.0) * 65535.0F) ) + us = ( (GLushort) IROUND( CLAMP((f), 0.0F, 1.0F) * 65535.0F) ) #define CLAMPED_FLOAT_TO_USHORT(us, f) \ us = ( (GLushort) IROUND( (f) * 65535.0F) ) diff --git a/mesa/main/matrix.h b/mesa/main/matrix.h index 3876986..a53d104 100644 --- a/mesa/main/matrix.h +++ b/mesa/main/matrix.h @@ -1,13 +1,9 @@ -/** - * \file matrix.h - * Matrix operations. - */ - /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 7.5 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -99,15 +95,6 @@ _mesa_MultTransposeMatrixfARB( const GLfloat *m ); extern void GLAPIENTRY _mesa_MultTransposeMatrixdARB( const GLdouble *m ); -extern void GLAPIENTRY -_mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height ); - -extern void -_mesa_set_viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height ); - -extern void GLAPIENTRY -_mesa_DepthRange( GLclampd nearval, GLclampd farval ); - extern void _mesa_init_matrix( GLcontext * ctx ); @@ -115,16 +102,10 @@ _mesa_init_matrix( GLcontext * ctx ); extern void _mesa_init_transform( GLcontext *ctx ); -extern void -_mesa_init_viewport( GLcontext *ctx ); - extern void _mesa_free_matrix_data( GLcontext *ctx ); extern void -_mesa_free_viewport_data( GLcontext *ctx ); - -extern void _mesa_update_modelview_project( GLcontext *ctx, GLuint newstate ); diff --git a/mesa/main/mfeatures.h b/mesa/main/mfeatures.h index 3819da3..62c3ead 100644 --- a/mesa/main/mfeatures.h +++ b/mesa/main/mfeatures.h @@ -60,6 +60,8 @@ #define FEATURE_ARB_occlusion_query _HAVE_FULL_GL #define FEATURE_ARB_fragment_program _HAVE_FULL_GL +#define FEATURE_ARB_framebuffer_object _HAVE_FULL_GL +#define FEATURE_ARB_pixel_buffer_object _HAVE_FULL_GL #define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL #define FEATURE_ARB_vertex_program _HAVE_FULL_GL #define FEATURE_ARB_vertex_shader _HAVE_FULL_GL @@ -74,7 +76,6 @@ #define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL #define FEATURE_EXT_timer_query _HAVE_FULL_GL #define FEATURE_ATI_fragment_shader _HAVE_FULL_GL -#define FEATURE_MESA_program_debug _HAVE_FULL_GL #define FEATURE_NV_fence _HAVE_FULL_GL #define FEATURE_NV_fragment_program _HAVE_FULL_GL #define FEATURE_NV_vertex_program _HAVE_FULL_GL diff --git a/mesa/main/mtypes.h b/mesa/main/mtypes.h index f5826ca..3b0ebcb 100644 --- a/mesa/main/mtypes.h +++ b/mesa/main/mtypes.h @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 7.3 + * Version: 7.5 * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * Copyright (C) 1999-2008 VMware, Inc. All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -30,22 +30,16 @@ * Please try to mark derived values with a leading underscore ('_'). */ -#ifndef TYPES_H -#define TYPES_H +#ifndef MTYPES_H +#define MTYPES_H -#include "glheader.h" -#include <GL/internal/glcore.h> /* __GLcontextModes (GLvisual) */ -#include "config.h" /* Hardwired parameters */ +#include "main/glheader.h" +#include "main/config.h" +#include "main/compiler.h" +#include "main/mfeatures.h" #include "glapi/glapi.h" #include "math/m_matrix.h" /* GLmatrix */ -#include "bitset.h" - - -/** - * Special, internal token - */ -#define GL_SHADER_PROGRAM_MESA 0x9999 /** @@ -84,47 +78,17 @@ /** - * Fixed point data type. - */ -typedef int GLfixed; -/* - * Fixed point arithmetic macros - */ -#ifndef FIXED_FRAC_BITS -#define FIXED_FRAC_BITS 11 -#endif - -#define FIXED_SHIFT FIXED_FRAC_BITS -#define FIXED_ONE (1 << FIXED_SHIFT) -#define FIXED_HALF (1 << (FIXED_SHIFT-1)) -#define FIXED_FRAC_MASK (FIXED_ONE - 1) -#define FIXED_INT_MASK (~FIXED_FRAC_MASK) -#define FIXED_EPSILON 1 -#define FIXED_SCALE ((float) FIXED_ONE) -#define FIXED_DBL_SCALE ((double) FIXED_ONE) -#define FloatToFixed(X) (IROUND((X) * FIXED_SCALE)) -#define FixedToDouble(X) ((X) * (1.0 / FIXED_DBL_SCALE)) -#define IntToFixed(I) ((I) << FIXED_SHIFT) -#define FixedToInt(X) ((X) >> FIXED_SHIFT) -#define FixedToUns(X) (((unsigned int)(X)) >> FIXED_SHIFT) -#define FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK) -#define FixedFloor(X) ((X) & FIXED_INT_MASK) -#define FixedToFloat(X) ((X) * (1.0F / FIXED_SCALE)) -#define PosFloatToFixed(X) FloatToFixed(X) -#define SignedFloatToFixed(X) FloatToFixed(X) - - - -/** * \name Some forward type declarations */ /*@{*/ struct _mesa_HashTable; +struct gl_attrib_node; struct gl_pixelstore_attrib; struct gl_program_cache; struct gl_texture_format; struct gl_texture_image; struct gl_texture_object; +struct st_context; typedef struct __GLcontextRec GLcontext; typedef struct __GLcontextModesRec GLvisual; typedef struct gl_framebuffer GLframebuffer; @@ -139,7 +103,7 @@ typedef struct gl_framebuffer GLframebuffer; * In GL_ARB_vertex_shader / OpenGL 2.0 the aliasing is disallowed (the * generic attributes are distinct/separate). */ -enum +typedef enum { VERT_ATTRIB_POS = 0, VERT_ATTRIB_WEIGHT = 1, @@ -175,7 +139,7 @@ enum VERT_ATTRIB_GENERIC14 = 30, VERT_ATTRIB_GENERIC15 = 31, VERT_ATTRIB_MAX = 32 -}; +} gl_vert_attrib; /** * Bitflags for vertex attributes. @@ -223,32 +187,33 @@ enum /** * Indexes for vertex program result attributes */ -/*@{*/ -#define VERT_RESULT_HPOS 0 -#define VERT_RESULT_COL0 1 -#define VERT_RESULT_COL1 2 -#define VERT_RESULT_FOGC 3 -#define VERT_RESULT_TEX0 4 -#define VERT_RESULT_TEX1 5 -#define VERT_RESULT_TEX2 6 -#define VERT_RESULT_TEX3 7 -#define VERT_RESULT_TEX4 8 -#define VERT_RESULT_TEX5 9 -#define VERT_RESULT_TEX6 10 -#define VERT_RESULT_TEX7 11 -#define VERT_RESULT_PSIZ 12 -#define VERT_RESULT_BFC0 13 -#define VERT_RESULT_BFC1 14 -#define VERT_RESULT_EDGE 15 -#define VERT_RESULT_VAR0 16 /**< shader varying */ -#define VERT_RESULT_MAX (VERT_RESULT_VAR0 + MAX_VARYING) -/*@}*/ +typedef enum +{ + VERT_RESULT_HPOS = 0, + VERT_RESULT_COL0 = 1, + VERT_RESULT_COL1 = 2, + VERT_RESULT_FOGC = 3, + VERT_RESULT_TEX0 = 4, + VERT_RESULT_TEX1 = 5, + VERT_RESULT_TEX2 = 6, + VERT_RESULT_TEX3 = 7, + VERT_RESULT_TEX4 = 8, + VERT_RESULT_TEX5 = 9, + VERT_RESULT_TEX6 = 10, + VERT_RESULT_TEX7 = 11, + VERT_RESULT_PSIZ = 12, + VERT_RESULT_BFC0 = 13, + VERT_RESULT_BFC1 = 14, + VERT_RESULT_EDGE = 15, + VERT_RESULT_VAR0 = 16 /**< shader varying */, + VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING) +} gl_vert_result; /** * Indexes for fragment program input attributes. */ -enum +typedef enum { FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, @@ -264,7 +229,7 @@ enum FRAG_ATTRIB_TEX7 = 11, FRAG_ATTRIB_VAR0 = 12, /**< shader varying */ FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING) -}; +} gl_frag_attrib; /** * Bitflags for fragment program input attributes. @@ -301,41 +266,41 @@ enum /** * Fragment program results */ -enum +typedef enum { - FRAG_RESULT_COLR = 0, - FRAG_RESULT_COLH = 1, - FRAG_RESULT_DEPR = 2, - FRAG_RESULT_DATA0 = 3, + FRAG_RESULT_DEPTH = 0, + FRAG_RESULT_COLOR = 1, + FRAG_RESULT_DATA0 = 2, FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS) -}; +} gl_frag_result; /** * Indexes for all renderbuffers */ -enum { - BUFFER_FRONT_LEFT = 0, /* the four standard color buffers */ - BUFFER_BACK_LEFT = 1, - BUFFER_FRONT_RIGHT = 2, - BUFFER_BACK_RIGHT = 3, - BUFFER_AUX0 = 4, /* optional aux buffer */ - BUFFER_AUX1 = 5, - BUFFER_AUX2 = 6, - BUFFER_AUX3 = 7, - BUFFER_DEPTH = 8, - BUFFER_STENCIL = 9, - BUFFER_ACCUM = 10, - BUFFER_COLOR0 = 11, /* generic renderbuffers */ - BUFFER_COLOR1 = 12, - BUFFER_COLOR2 = 13, - BUFFER_COLOR3 = 14, - BUFFER_COLOR4 = 15, - BUFFER_COLOR5 = 16, - BUFFER_COLOR6 = 17, - BUFFER_COLOR7 = 18, - BUFFER_COUNT = 19 -}; +typedef enum +{ + /* the four standard color buffers */ + BUFFER_FRONT_LEFT, + BUFFER_BACK_LEFT, + BUFFER_FRONT_RIGHT, + BUFFER_BACK_RIGHT, + BUFFER_DEPTH, + BUFFER_STENCIL, + BUFFER_ACCUM, + /* optional aux buffer */ + BUFFER_AUX0, + /* generic renderbuffers */ + BUFFER_COLOR0, + BUFFER_COLOR1, + BUFFER_COLOR2, + BUFFER_COLOR3, + BUFFER_COLOR4, + BUFFER_COLOR5, + BUFFER_COLOR6, + BUFFER_COLOR7, + BUFFER_COUNT +} gl_buffer_index; /** * Bit flags for all renderbuffers @@ -368,9 +333,6 @@ enum { BUFFER_BIT_FRONT_RIGHT | \ BUFFER_BIT_BACK_RIGHT | \ BUFFER_BIT_AUX0 | \ - BUFFER_BIT_AUX1 | \ - BUFFER_BIT_AUX2 | \ - BUFFER_BIT_AUX3 | \ BUFFER_BIT_COLOR0 | \ BUFFER_BIT_COLOR1 | \ BUFFER_BIT_COLOR2 | \ @@ -382,12 +344,13 @@ enum { /** The pixel transfer path has three color tables: */ -/*@{*/ -#define COLORTABLE_PRECONVOLUTION 0 -#define COLORTABLE_POSTCONVOLUTION 1 -#define COLORTABLE_POSTCOLORMATRIX 2 -#define COLORTABLE_MAX 3 -/*@}*/ +typedef enum +{ + COLORTABLE_PRECONVOLUTION, + COLORTABLE_POSTCONVOLUTION, + COLORTABLE_POSTCOLORMATRIX, + COLORTABLE_MAX +} gl_colortable_index; /** @@ -497,7 +460,7 @@ struct gl_light GLfloat Diffuse[4]; /**< diffuse color */ GLfloat Specular[4]; /**< specular color */ GLfloat EyePosition[4]; /**< position in eye coordinates */ - GLfloat EyeDirection[4]; /**< spotlight dir in eye coordinates */ + GLfloat SpotDirection[4]; /**< spotlight direction in eye coordinates */ GLfloat SpotExponent; GLfloat SpotCutoff; /**< in degrees */ GLfloat _CosCutoffNeg; /**< = cos(SpotCutoff) */ @@ -516,7 +479,7 @@ struct gl_light GLfloat _Position[4]; /**< position in eye/obj coordinates */ GLfloat _VP_inf_norm[3]; /**< Norm direction to infinite light */ GLfloat _h_inf_norm[3]; /**< Norm( _VP_inf_norm + <0,0,1> ) */ - GLfloat _NormDirection[4]; /**< normalized spotlight direction */ + GLfloat _NormSpotDirection[4]; /**< normalized spotlight direction */ GLfloat _VP_inf_spot_attenuation; GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; /**< to replace a pow() call */ @@ -624,9 +587,7 @@ struct gl_current_attrib * \note Index and Edgeflag current values are stored as floats in the * SIX and SEVEN attribute slots. */ - /*@{*/ GLfloat Attrib[VERT_ATTRIB_MAX][4]; /**< Position, color, texcoords, etc */ - /*@}*/ /** * \name Current raster position attributes (always valid). @@ -659,84 +620,6 @@ struct gl_depthbuffer_attrib /** - * glEnable()/glDisable() attribute group (GL_ENABLE_BIT). - */ -struct gl_enable_attrib -{ - GLboolean AlphaTest; - GLboolean AutoNormal; - GLboolean Blend; - GLbitfield ClipPlanes; - GLboolean ColorMaterial; - GLboolean ColorTable[COLORTABLE_MAX]; - GLboolean Convolution1D; - GLboolean Convolution2D; - GLboolean Separable2D; - GLboolean CullFace; - GLboolean DepthTest; - GLboolean Dither; - GLboolean Fog; - GLboolean Histogram; - GLboolean Light[MAX_LIGHTS]; - GLboolean Lighting; - GLboolean LineSmooth; - GLboolean LineStipple; - GLboolean IndexLogicOp; - GLboolean ColorLogicOp; - GLboolean Map1Color4; - GLboolean Map1Index; - GLboolean Map1Normal; - GLboolean Map1TextureCoord1; - GLboolean Map1TextureCoord2; - GLboolean Map1TextureCoord3; - GLboolean Map1TextureCoord4; - GLboolean Map1Vertex3; - GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ - GLboolean Map2Color4; - GLboolean Map2Index; - GLboolean Map2Normal; - GLboolean Map2TextureCoord1; - GLboolean Map2TextureCoord2; - GLboolean Map2TextureCoord3; - GLboolean Map2TextureCoord4; - GLboolean Map2Vertex3; - GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ - GLboolean MinMax; - GLboolean Normalize; - GLboolean PixelTexture; - GLboolean PointSmooth; - GLboolean PolygonOffsetPoint; - GLboolean PolygonOffsetLine; - GLboolean PolygonOffsetFill; - GLboolean PolygonSmooth; - GLboolean PolygonStipple; - GLboolean RescaleNormals; - GLboolean Scissor; - GLboolean Stencil; - GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */ - GLboolean MultisampleEnabled; /* GL_ARB_multisample */ - GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */ - GLboolean SampleAlphaToOne; /* GL_ARB_multisample */ - GLboolean SampleCoverage; /* GL_ARB_multisample */ - GLboolean SampleCoverageInvert; /* GL_ARB_multisample */ - GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ - GLuint Texture[MAX_TEXTURE_UNITS]; - GLuint TexGen[MAX_TEXTURE_UNITS]; - /* SGI_texture_color_table */ - GLboolean TextureColorTable[MAX_TEXTURE_UNITS]; - /* GL_ARB_vertex_program / GL_NV_vertex_program */ - GLboolean VertexProgram; - GLboolean VertexProgramPointSize; - GLboolean VertexProgramTwoSide; - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - GLboolean PointSprite; - GLboolean FragmentShaderATI; -}; - - -/** * Evaluator attribute group (GL_EVAL_BIT). */ struct gl_eval_attrib @@ -823,11 +706,11 @@ struct gl_hint_attrib */ struct gl_histogram_attrib { - GLuint Width; /**< number of table entries */ - GLint Format; /**< GL_ALPHA, GL_RGB, etc */ - GLuint Count[HISTOGRAM_TABLE_SIZE][4]; /**< the histogram */ - GLboolean Sink; /**< terminate image transfer? */ - GLubyte RedSize; /**< Bits per counter */ + GLuint Width; /**< number of table entries */ + GLint Format; /**< GL_ALPHA, GL_RGB, etc */ + GLuint Count[HISTOGRAM_TABLE_SIZE][4]; /**< the histogram */ + GLboolean Sink; /**< terminate image transfer? */ + GLubyte RedSize; /**< Bits per counter */ GLubyte GreenSize; GLubyte BlueSize; GLubyte AlphaSize; @@ -901,7 +784,7 @@ struct gl_light_attrib /*@{*/ GLboolean _NeedEyeCoords; GLboolean _NeedVertices; /**< Use fast shader? */ - GLbitfield _Flags; /**< LIGHT_* flags, see above */ + GLbitfield _Flags; /**< LIGHT_* flags, see above */ GLfloat _BaseColor[2][3]; /*@}*/ }; @@ -1006,13 +889,15 @@ struct gl_pixel_attrib /*--- Begin Pixel Transfer State ---*/ /* Fields are in the order in which they're applied... */ - /* Scale & Bias (index shift, offset) */ + /** Scale & Bias (index shift, offset) */ + /*@{*/ GLfloat RedBias, RedScale; GLfloat GreenBias, GreenScale; GLfloat BlueBias, BlueScale; GLfloat AlphaBias, AlphaScale; GLfloat DepthBias, DepthScale; GLint IndexShift, IndexOffset; + /*@}*/ /* Pixel Maps */ /* Note: actual pixel maps are not part of this attrib group */ @@ -1028,7 +913,7 @@ struct gl_pixel_attrib GLboolean Convolution1DEnabled; GLboolean Convolution2DEnabled; GLboolean Separable2DEnabled; - GLfloat ConvolutionBorderColor[3][4]; + GLfloat ConvolutionBorderColor[3][4]; /**< RGBA */ GLenum ConvolutionBorderMode[3]; GLfloat ConvolutionFilterScale[3][4]; /**< RGBA */ GLfloat ConvolutionFilterBias[3][4]; /**< RGBA */ @@ -1047,12 +932,12 @@ struct gl_pixel_attrib /*--- End Pixel Transfer State ---*/ - /* Pixel Zoom */ + /** glPixelZoom */ GLfloat ZoomX, ZoomY; /** GL_SGI_texture_color_table */ - GLfloat TextureColorTableScale[4]; - GLfloat TextureColorTableBias[4]; + GLfloat TextureColorTableScale[4]; /**< RGBA */ + GLfloat TextureColorTableBias[4]; /**< RGBA */ }; @@ -1127,6 +1012,7 @@ struct gl_stencil_attrib GLboolean Enabled; /**< Enabled flag */ GLboolean TestTwoSide; /**< GL_EXT_stencil_two_side */ GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 2) */ + GLboolean _Enabled; /**< Enabled and stencil buffer present */ GLboolean _TestTwoSide; GLubyte _BackFace; /**< Current back stencil state (1 or 2) */ GLenum Function[3]; /**< Stencil function */ @@ -1140,33 +1026,36 @@ struct gl_stencil_attrib }; -#define NUM_TEXTURE_TARGETS 7 /* 1D, 2D, 3D, CUBE, RECT, 1D_STACK, and 2D_STACK */ - /** - * An index for each type of texture object + * An index for each type of texture object. These correspond to the GL + * target target enums, such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, etc. + * Note: the order is from highest priority to lowest priority. */ -/*@{*/ -#define TEXTURE_1D_INDEX 0 -#define TEXTURE_2D_INDEX 1 -#define TEXTURE_3D_INDEX 2 -#define TEXTURE_CUBE_INDEX 3 -#define TEXTURE_RECT_INDEX 4 -#define TEXTURE_1D_ARRAY_INDEX 5 -#define TEXTURE_2D_ARRAY_INDEX 6 -/*@}*/ +typedef enum +{ + TEXTURE_2D_ARRAY_INDEX, + TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, + TEXTURE_3D_INDEX, + TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, + TEXTURE_1D_INDEX, + NUM_TEXTURE_TARGETS +} gl_texture_index; + /** * Bit flags for each type of texture object * Used for Texture.Unit[]._ReallyEnabled flags. */ /*@{*/ -#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX) -#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX) -#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX) +#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX) +#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX) #define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX) +#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX) #define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX) -#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX) -#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX) +#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX) +#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX) /*@}*/ @@ -1201,27 +1090,12 @@ struct gl_stencil_attrib /*@}*/ -/* A selection of state flags to make driver and module's lives easier. */ -#define ENABLE_TEXGEN0 0x1 -#define ENABLE_TEXGEN1 0x2 -#define ENABLE_TEXGEN2 0x4 -#define ENABLE_TEXGEN3 0x8 -#define ENABLE_TEXGEN4 0x10 -#define ENABLE_TEXGEN5 0x20 -#define ENABLE_TEXGEN6 0x40 -#define ENABLE_TEXGEN7 0x80 -#define ENABLE_TEXMAT0 0x1 /* Ie. not the identity matrix */ -#define ENABLE_TEXMAT1 0x2 -#define ENABLE_TEXMAT2 0x4 -#define ENABLE_TEXMAT3 0x8 -#define ENABLE_TEXMAT4 0x10 -#define ENABLE_TEXMAT5 0x20 -#define ENABLE_TEXMAT6 0x40 -#define ENABLE_TEXMAT7 0x80 +/** Tex-gen enabled for texture unit? */ +#define ENABLE_TEXGEN(unit) (1 << (unit)) -#define ENABLE_TEXGEN(i) (ENABLE_TEXGEN0 << (i)) -#define ENABLE_TEXMAT(i) (ENABLE_TEXMAT0 << (i)) +/** Non-identity texture matrix for texture unit? */ +#define ENABLE_TEXMAT(unit) (1 << (unit)) /** @@ -1397,15 +1271,16 @@ struct gl_texture_image /** * Indexes for cube map faces. */ -/*@{*/ -#define FACE_POS_X 0 -#define FACE_NEG_X 1 -#define FACE_POS_Y 2 -#define FACE_NEG_Y 3 -#define FACE_POS_Z 4 -#define FACE_NEG_Z 5 -#define MAX_FACES 6 -/*@}*/ +typedef enum +{ + FACE_POS_X = 0, + FACE_NEG_X = 1, + FACE_POS_Y = 2, + FACE_NEG_Y = 3, + FACE_POS_Z = 4, + FACE_NEG_Z = 5, + MAX_FACES = 6 +} gl_face_index; /** @@ -1421,7 +1296,6 @@ struct gl_texture_object GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */ GLfloat Priority; /**< in [0,1] */ GLfloat BorderColor[4]; /**< unclamped */ - GLchan _BorderChan[4]; /**< clamped, as GLchan */ GLenum WrapS; /**< S-axis texture image wrap mode */ GLenum WrapT; /**< T-axis texture image wrap mode */ GLenum WrapR; /**< R-axis texture image wrap mode */ @@ -1433,21 +1307,18 @@ struct gl_texture_object GLint BaseLevel; /**< min mipmap level, OpenGL 1.2 */ GLint MaxLevel; /**< max mipmap level, OpenGL 1.2 */ GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ - GLboolean CompareFlag; /**< GL_SGIX_shadow */ - GLenum CompareOperator; /**< GL_SGIX_shadow */ - GLfloat ShadowAmbient; /**< GL_ARB_shadow_ambient */ GLenum CompareMode; /**< GL_ARB_shadow */ GLenum CompareFunc; /**< GL_ARB_shadow */ - GLenum _Function; /**< Comparison function derived from - * \c CompareOperator, \c CompareMode, and - * \c CompareFunc. - */ + GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */ GLenum DepthMode; /**< GL_ARB_depth_texture */ GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */ GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */ GLint CropRect[4]; /**< GL_OES_draw_texture */ + GLenum Swizzle[4]; /**< GL_EXT_texture_swizzle */ + GLuint _Swizzle; /**< same as Swizzle, but SWIZZLE_* format */ GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */ GLboolean _Complete; /**< Is texture object complete? */ + GLboolean _RenderToTexture; /**< Any rendering to this texture? */ /** Actual texture images, indexed by [cube face] and [mipmap level] */ struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; @@ -1466,25 +1337,39 @@ struct gl_texture_object }; +/** Up to four combiner sources are possible with GL_NV_texture_env_combine4 */ +#define MAX_COMBINER_TERMS 4 + + /** * Texture combine environment state. - * - * \todo - * If GL_NV_texture_env_combine4 is ever supported, the arrays in this - * structure will need to be expanded for 4 elements. */ struct gl_tex_env_combine_state { GLenum ModeRGB; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */ GLenum ModeA; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */ - GLenum SourceRGB[3]; /**< GL_PRIMARY_COLOR, GL_TEXTURE, etc. */ - GLenum SourceA[3]; /**< GL_PRIMARY_COLOR, GL_TEXTURE, etc. */ - GLenum OperandRGB[3]; /**< SRC_COLOR, ONE_MINUS_SRC_COLOR, etc */ - GLenum OperandA[3]; /**< SRC_ALPHA, ONE_MINUS_SRC_ALPHA, etc */ + /** Source terms: GL_PRIMARY_COLOR, GL_TEXTURE, etc */ + GLenum SourceRGB[MAX_COMBINER_TERMS]; + GLenum SourceA[MAX_COMBINER_TERMS]; + /** Source operands: GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, etc */ + GLenum OperandRGB[MAX_COMBINER_TERMS]; + GLenum OperandA[MAX_COMBINER_TERMS]; GLuint ScaleShiftRGB; /**< 0, 1 or 2 */ GLuint ScaleShiftA; /**< 0, 1 or 2 */ - GLuint _NumArgsRGB; /**< Number of inputs used for the combine mode. */ - GLuint _NumArgsA; /**< Number of inputs used for the combine mode. */ + GLuint _NumArgsRGB; /**< Number of inputs used for the RGB combiner */ + GLuint _NumArgsA; /**< Number of inputs used for the A combiner */ +}; + + +/** + * Texture coord generation state. + */ +struct gl_texgen +{ + GLenum Mode; /**< GL_EYE_LINEAR, GL_SPHERE_MAP, etc */ + GLbitfield _ModeBit; /**< TEXGEN_x bit corresponding to Mode */ + GLfloat ObjectPlane[4]; + GLfloat EyePlane[4]; }; @@ -1500,29 +1385,17 @@ struct gl_texture_unit GLenum EnvMode; /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */ GLfloat EnvColor[4]; + + struct gl_texgen GenS; + struct gl_texgen GenT; + struct gl_texgen GenR; + struct gl_texgen GenQ; GLbitfield TexGenEnabled; /**< Bitwise-OR of [STRQ]_BIT values */ - /** \name Tex coord generation mode - * Either GL_OBJECT_LINEAR, GL_EYE_LINEAR or GL_SPHERE_MAP. */ - /*@{*/ - GLenum GenModeS; - GLenum GenModeT; - GLenum GenModeR; - GLenum GenModeQ; - /*@}*/ - GLbitfield _GenBitS; - GLbitfield _GenBitT; - GLbitfield _GenBitR; - GLbitfield _GenBitQ; - GLbitfield _GenFlags; /**< bitwise or of _GenBit[STRQ] */ - GLfloat ObjectPlaneS[4]; - GLfloat ObjectPlaneT[4]; - GLfloat ObjectPlaneR[4]; - GLfloat ObjectPlaneQ[4]; - GLfloat EyePlaneS[4]; - GLfloat EyePlaneT[4]; - GLfloat EyePlaneR[4]; - GLfloat EyePlaneQ[4]; + GLbitfield _GenFlags; /**< Bitwise-OR of Gen[STRQ]._ModeBit */ + GLfloat LodBias; /**< for biasing mipmap levels */ + GLenum BumpTarget; + GLfloat RotMatrix[4]; /* 2x2 matrix */ /** * \name GL_EXT_texture_env_combine @@ -1556,32 +1429,34 @@ struct gl_texture_unit }; - /** * Texture attribute group (GL_TEXTURE_BIT). */ struct gl_texture_attrib { - /** - * name multitexture - */ - /**@{*/ - GLuint CurrentUnit; /**< Active texture unit [0, MaxTextureImageUnits-1] */ - GLbitfield _EnabledUnits; /**< one bit set for each really-enabled unit */ - GLbitfield _EnabledCoordUnits; /**< one bit per enabled coordinate unit */ - GLbitfield _GenFlags; /**< for texgen */ - GLbitfield _TexGenEnabled; - GLbitfield _TexMatEnabled; - /**@}*/ - + GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */ struct gl_texture_unit Unit[MAX_TEXTURE_UNITS]; - /** Proxy texture objects */ struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; /** GL_EXT_shared_texture_palette */ GLboolean SharedPalette; struct gl_color_table Palette; + + /** Texture units/samplers used by vertex or fragment texturing */ + GLbitfield _EnabledUnits; + + /** Texture coord units/sets used for fragment texturing */ + GLbitfield _EnabledCoordUnits; + + /** Texture coord units that have texgen enabled */ + GLbitfield _TexGenEnabled; + + /** Texture coord units that have non-identity matrices */ + GLbitfield _TexMatEnabled; + + /** Bitwise-OR of all Texture.Unit[i]._GenFlags */ + GLbitfield _GenFlags; }; @@ -1617,17 +1492,6 @@ struct gl_viewport_attrib /** - * Node for the attribute stack. - */ -struct gl_attrib_node -{ - GLbitfield kind; - void *data; - struct gl_attrib_node *next; -}; - - -/** * GL_ARB_vertex/pixel_buffer_object buffer object */ struct gl_buffer_object @@ -1637,13 +1501,14 @@ struct gl_buffer_object GLenum Usage; GLenum Access; GLvoid *Pointer; /**< Only valid while buffer is mapped */ + GLintptr Offset; /**< mapped offset */ + GLsizeiptr Length; /**< mapped length */ GLsizeiptrARB Size; /**< Size of storage in bytes */ GLubyte *Data; /**< Location of storage either in RAM or VRAM. */ GLboolean OnCard; /**< Is buffer in VRAM? (hardware drivers) */ }; - /** * Client pixel packing/unpacking attributes */ @@ -1653,8 +1518,8 @@ struct gl_pixelstore_attrib GLint RowLength; GLint SkipPixels; GLint SkipRows; - GLint ImageHeight; /**< for GL_EXT_texture3D */ - GLint SkipImages; /**< for GL_EXT_texture3D */ + GLint ImageHeight; + GLint SkipImages; GLboolean SwapBytes; GLboolean LsbFirst; GLboolean ClientStorage; /**< GL_APPLE_client_storage */ @@ -1663,7 +1528,6 @@ struct gl_pixelstore_attrib }; - /** * Client vertex array attributes */ @@ -1671,6 +1535,7 @@ struct gl_client_array { GLint Size; /**< components per element (1,2,3,4) */ GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */ + GLenum Format; /**< default: GL_RGBA, but may be GL_BGRA */ GLsizei Stride; /**< user-specified stride */ GLsizei StrideB; /**< actual stride in bytes */ const GLubyte *Ptr; /**< Points to array data */ @@ -1692,6 +1557,9 @@ struct gl_array_object /** Name of the array object as received from glGenVertexArrayAPPLE. */ GLuint Name; + GLint RefCount; + _glthread_Mutex Mutex; + /** Conventional vertex arrays */ /*@{*/ struct gl_client_array Vertex; @@ -1742,7 +1610,7 @@ struct gl_array_attrib struct gl_feedback { GLenum Type; - GLbitfield _Mask; /* FB_* bits */ + GLbitfield _Mask; /**< FB_* bits */ GLfloat *Buffer; GLuint BufferSize; GLuint Count; @@ -1840,24 +1708,24 @@ struct gl_evaluators * be "uniform" variables since they can only be set outside glBegin/End. * They're also all stored in the same Parameters array. */ -enum register_file -{ - PROGRAM_TEMPORARY = 0, /**< machine->Temporary[] */ - PROGRAM_LOCAL_PARAM = 1, /**< gl_program->LocalParams[] */ - PROGRAM_ENV_PARAM = 2, /**< gl_program->Parameters[] */ - PROGRAM_STATE_VAR = 3, /**< gl_program->Parameters[] */ - PROGRAM_INPUT = 4, /**< machine->Inputs[] */ - PROGRAM_OUTPUT = 5, /**< machine->Outputs[] */ - PROGRAM_NAMED_PARAM = 6, /**< gl_program->Parameters[] */ - PROGRAM_CONSTANT = 7, /**< gl_program->Parameters[] */ - PROGRAM_UNIFORM = 8, /**< gl_program->Parameters[] */ - PROGRAM_VARYING = 9, /**< machine->Inputs[]/Outputs[] */ - PROGRAM_WRITE_ONLY = 10, /**< A dummy, write-only register */ - PROGRAM_ADDRESS = 11, /**< machine->AddressReg */ - PROGRAM_SAMPLER = 12, /**< for shader samplers, compile-time only */ - PROGRAM_UNDEFINED = 13, /**< Invalid value */ +typedef enum +{ + PROGRAM_TEMPORARY, /**< machine->Temporary[] */ + PROGRAM_INPUT, /**< machine->Inputs[] */ + PROGRAM_OUTPUT, /**< machine->Outputs[] */ + PROGRAM_VARYING, /**< machine->Inputs[]/Outputs[] */ + PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */ + PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */ + PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */ + PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */ + PROGRAM_CONSTANT, /**< gl_program->Parameters[] */ + PROGRAM_UNIFORM, /**< gl_program->Parameters[] */ + PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */ + PROGRAM_ADDRESS, /**< machine->AddressReg */ + PROGRAM_SAMPLER, /**< for shader samplers, compile-time only */ + PROGRAM_UNDEFINED, /**< Invalid/TBD value */ PROGRAM_FILE_MAX -}; +} gl_register_file; /** Vertex and fragment instructions */ @@ -1966,14 +1834,14 @@ struct gl_program_state */ struct gl_vertex_program_state { - GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */ - GLboolean _Enabled; /**< Enabled and _valid_ user program? */ - GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ - GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ + GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */ + GLboolean _Enabled; /**< Enabled and _valid_ user program? */ + GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ + GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ struct gl_vertex_program *Current; /**< User-bound vertex program */ - /** Currently enabled and valid vertex program (including internal programs, - * user-defined vertex programs and GLSL vertex shaders). + /** Currently enabled and valid vertex program (including internal + * programs, user-defined vertex programs and GLSL vertex shaders). * This is the program we must use when rendering. */ struct gl_vertex_program *_Current; @@ -1993,12 +1861,7 @@ struct gl_vertex_program_state /** Cache of fixed-function programs */ struct gl_program_cache *Cache; -#if FEATURE_MESA_program_debug - GLprogramcallbackMESA Callback; - GLvoid *CallbackData; - GLboolean CallbackEnabled; - GLuint CurrentPosition; -#endif + GLboolean _Overriden; }; @@ -2011,8 +1874,8 @@ struct gl_fragment_program_state GLboolean _Enabled; /**< Enabled and _valid_ user program? */ struct gl_fragment_program *Current; /**< User-bound fragment program */ - /** Currently enabled and valid fragment program (including internal programs, - * user-defined fragment programs and GLSL fragment shaders). + /** Currently enabled and valid fragment program (including internal + * programs, user-defined fragment programs and GLSL fragment shaders). * This is the program we must use when rendering. */ struct gl_fragment_program *_Current; @@ -2027,13 +1890,6 @@ struct gl_fragment_program_state /** Cache of fixed-function programs */ struct gl_program_cache *Cache; - -#if FEATURE_MESA_program_debug - GLprogramcallbackMESA Callback; - GLvoid *CallbackData; - GLboolean CallbackEnabled; - GLuint CurrentPosition; -#endif }; @@ -2107,6 +1963,8 @@ struct gl_query_state /** Set by #pragma directives */ struct gl_sl_pragmas { + GLboolean IgnoreOptimize; /**< ignore #pragma optimize(on/off) ? */ + GLboolean IgnoreDebug; /**< ignore #pragma debug(on/off) ? */ GLboolean Optimize; /**< defaults on */ GLboolean Debug; /**< defaults off */ }; @@ -2123,6 +1981,7 @@ struct gl_shader GLboolean DeletePending; GLboolean CompileStatus; GLboolean Main; /**< shader defines main() */ + GLboolean UnresolvedRefs; const GLchar *Source; /**< Source code string */ struct gl_program *Program; /**< Post-compile assembly code */ GLchar *InfoLog; @@ -2158,6 +2017,13 @@ struct gl_shader_program }; +#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ +#define GLSL_LOG 0x2 /**< Write shaders to files */ +#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ +#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ +#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ + + /** * Context state for GLSL vertex/fragment shaders. */ @@ -2166,9 +2032,12 @@ struct gl_shader_state struct gl_shader_program *CurrentProgram; /**< The user-bound program */ /** Driver-selectable options: */ GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */ + GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */ GLboolean EmitCondCodes; /**< Use condition codes? */ GLboolean EmitComments; /**< Annotated instructions */ void *MemPool; + GLbitfield Flags; /**< Mask of GLSL_x flags */ + struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */ }; @@ -2185,6 +2054,9 @@ struct gl_shared_state /** Default texture objects (shared by all texture units) */ struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS]; + /** Fallback texture used when a bound texture is incomplete */ + struct gl_texture_object *FallbackTex; + /** * \name Thread safety and statechange notification for texture * objects. @@ -2260,7 +2132,9 @@ struct gl_renderbuffer GLenum _ActualFormat; /**< The driver-chosen format */ GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or GL_STENCIL_INDEX. */ - GLenum DataType; /**< Type of values passed to the Get/Put functions */ + GLenum ColorEncoding; /**< GL_LINEAR or GL_SRGB */ + GLenum ComponentType; /**< GL_FLOAT, GL_INT, GL_UNSIGNED_INT, + GL_UNSIGNED_NORMALIZED or GL_INDEX */ GLubyte RedBits; /**< Bits of red per pixel */ GLubyte GreenBits; GLubyte BlueBits; @@ -2268,6 +2142,9 @@ struct gl_renderbuffer GLubyte IndexBits; GLubyte DepthBits; GLubyte StencilBits; + GLubyte NumSamples; + + GLenum DataType; /**< Type of values passed to the Get/Put functions */ GLvoid *Data; /**< This may not be used by some kinds of RBs */ /* Used to wrap one renderbuffer around another: */ @@ -2342,9 +2219,8 @@ struct gl_renderbuffer /** - * A renderbuffer attachment point points to either a texture object - * (and specifies a mipmap level, cube face or 3D texture slice) or - * points to a renderbuffer. + * A renderbuffer attachment points to either a texture object (and specifies + * a mipmap level, cube face or 3D texture slice) or points to a renderbuffer. */ struct gl_renderbuffer_attachment { @@ -2389,9 +2265,11 @@ struct gl_framebuffer GLint RefCount; GLboolean DeletePending; - GLvisual Visual; /**< The framebuffer's visual. - Immutable if this is a window system buffer. - Computed from attachments if user-made FBO. */ + /** + * The framebuffer's visual. Immutable if this is a window system buffer. + * Computed from attachments if user-made FBO. + */ + GLvisual Visual; GLboolean Initialized; @@ -2410,9 +2288,10 @@ struct gl_framebuffer GLfloat _MRD; /**< minimum resolvable difference in Z values */ /*@}*/ - GLenum _Status; /* One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */ + /** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */ + GLenum _Status; - /* Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */ + /** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */ struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; /* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER @@ -2474,50 +2353,60 @@ struct gl_program_constants */ struct gl_constants { - GLint MaxTextureLevels; /**< Maximum number of allowed mipmap levels. */ - GLint Max3DTextureLevels; /**< Maximum number of allowed mipmap levels for 3D texture targets. */ - GLint MaxCubeTextureLevels; /**< Maximum number of allowed mipmap levels for GL_ARB_texture_cube_map */ - GLint MaxArrayTextureLayers; /**< Maximum number of layers in an array texture. */ - GLint MaxTextureRectSize; /* GL_NV_texture_rectangle */ + GLint MaxTextureLevels; /**< Max mipmap levels. */ + GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */ + GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */ + GLint MaxArrayTextureLayers; /**< Max layers in array textures */ + GLint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */ GLuint MaxTextureCoordUnits; GLuint MaxTextureImageUnits; - GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */ - GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ - GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */ + GLuint MaxVertexTextureImageUnits; + GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */ + GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ + GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */ + GLuint MaxArrayLockSize; + GLint SubPixelBits; - GLfloat MinPointSize, MaxPointSize; /* aliased */ - GLfloat MinPointSizeAA, MaxPointSizeAA; /* antialiased */ + + GLfloat MinPointSize, MaxPointSize; /**< aliased */ + GLfloat MinPointSizeAA, MaxPointSizeAA; /**< antialiased */ GLfloat PointSizeGranularity; - GLfloat MinLineWidth, MaxLineWidth; /* aliased */ - GLfloat MinLineWidthAA, MaxLineWidthAA; /* antialiased */ + GLfloat MinLineWidth, MaxLineWidth; /**< aliased */ + GLfloat MinLineWidthAA, MaxLineWidthAA; /**< antialiased */ GLfloat LineWidthGranularity; + GLuint MaxColorTableSize; GLuint MaxConvolutionWidth; GLuint MaxConvolutionHeight; + GLuint MaxClipPlanes; GLuint MaxLights; - GLfloat MaxShininess; /* GL_NV_light_max_exponent */ - GLfloat MaxSpotExponent; /* GL_NV_light_max_exponent */ + GLfloat MaxShininess; /**< GL_NV_light_max_exponent */ + GLfloat MaxSpotExponent; /**< GL_NV_light_max_exponent */ + GLuint MaxViewportWidth, MaxViewportHeight; - struct gl_program_constants VertexProgram; /* GL_ARB_vertex_program */ - struct gl_program_constants FragmentProgram; /* GL_ARB_fragment_program */ - /* shared by vertex and fragment program: */ + + struct gl_program_constants VertexProgram; /**< GL_ARB_vertex_program */ + struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */ GLuint MaxProgramMatrices; GLuint MaxProgramMatrixStackDepth; - /* vertex array / buffer object bounds checking */ + + /** vertex array / buffer object bounds checking */ GLboolean CheckArrayBounds; - /* GL_ARB_draw_buffers */ - GLuint MaxDrawBuffers; - /* GL_OES_read_format */ - GLenum ColorReadFormat; - GLenum ColorReadType; - /* GL_EXT_framebuffer_object */ - GLuint MaxColorAttachments; - GLuint MaxRenderbufferSize; - /* GL_ARB_vertex_shader */ - GLuint MaxVertexTextureImageUnits; - GLuint MaxVarying; /**< Number of float[4] vectors */ + + GLuint MaxDrawBuffers; /**< GL_ARB_draw_buffers */ + + GLenum ColorReadFormat; /**< GL_OES_read_format */ + GLenum ColorReadType; /**< GL_OES_read_format */ + + GLuint MaxColorAttachments; /**< GL_EXT_framebuffer_object */ + GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */ + GLuint MaxSamples; /**< GL_ARB_framebuffer_object */ + + GLuint MaxVarying; /**< Number of float[4] varying parameters */ + + GLbitfield SupportedBumpUnits; /**> units supporting GL_ATI_envmap_bumpmap as targets */ }; @@ -2527,18 +2416,13 @@ struct gl_constants */ struct gl_extensions { - /** - * \name Flags to quickly test if certain extensions are available. - * - * Not every extension needs to have such a flag, but it's encouraged. - */ - /*@{*/ GLboolean dummy; /* don't remove this! */ GLboolean ARB_depth_texture; GLboolean ARB_draw_buffers; GLboolean ARB_fragment_program; GLboolean ARB_fragment_program_shadow; GLboolean ARB_fragment_shader; + GLboolean ARB_framebuffer_object; GLboolean ARB_half_float_pixel; GLboolean ARB_imaging; GLboolean ARB_multisample; @@ -2549,6 +2433,7 @@ struct gl_extensions GLboolean ARB_shading_language_100; GLboolean ARB_shading_language_120; GLboolean ARB_shadow; + GLboolean ARB_shadow_ambient; /* or GL_ARB_shadow_ambient */ GLboolean ARB_texture_border_clamp; GLboolean ARB_texture_compression; GLboolean ARB_texture_cube_map; @@ -2609,13 +2494,16 @@ struct gl_extensions GLboolean EXT_texture_lod_bias; GLboolean EXT_texture_mirror_clamp; GLboolean EXT_texture_sRGB; + GLboolean EXT_texture_swizzle; GLboolean EXT_timer_query; GLboolean EXT_vertex_array; + GLboolean EXT_vertex_array_bgra; GLboolean EXT_vertex_array_set; /* vendor extensions */ GLboolean APPLE_client_storage; GLboolean APPLE_packed_pixels; GLboolean APPLE_vertex_array_object; + GLboolean ATI_envmap_bumpmap; GLboolean ATI_texture_mirror_once; GLboolean ATI_texture_env_combine3; GLboolean ATI_fragment_shader; @@ -2624,15 +2512,16 @@ struct gl_extensions GLboolean IBM_multimode_draw_arrays; GLboolean MESA_pack_invert; GLboolean MESA_packed_depth_stencil; - GLboolean MESA_program_debug; GLboolean MESA_resize_buffers; GLboolean MESA_ycbcr_texture; GLboolean MESA_texture_array; + GLboolean MESA_texture_signed_rgba; GLboolean NV_blend_square; GLboolean NV_fragment_program; GLboolean NV_light_max_exponent; GLboolean NV_point_sprite; GLboolean NV_texgen_reflection; + GLboolean NV_texture_env_combine4; GLboolean NV_texture_rectangle; GLboolean NV_vertex_program; GLboolean NV_vertex_program1_1; @@ -2643,12 +2532,9 @@ struct gl_extensions GLboolean SGIS_generate_mipmap; GLboolean SGIS_texture_edge_clamp; GLboolean SGIS_texture_lod; - GLboolean SGIX_shadow; - GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */ GLboolean TDFX_texture_compression_FXT1; GLboolean S3_s3tc; - /*@}*/ - /* The extension string */ + /** The extension string */ const GLubyte *String; }; @@ -2668,7 +2554,6 @@ struct gl_matrix_stack /** * \name Bits for image transfer operations - * * \sa __GLcontextRec::ImageTransferState. */ /*@{*/ @@ -2683,7 +2568,7 @@ struct gl_matrix_stack #define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100 #define IMAGE_HISTOGRAM_BIT 0x200 #define IMAGE_MIN_MAX_BIT 0x400 -#define IMAGE_CLAMP_BIT 0x800 /* extra */ +#define IMAGE_CLAMP_BIT 0x800 /** Pixel Transfer ops up to convolution */ @@ -2736,6 +2621,8 @@ struct gl_matrix_stack #define _NEW_MULTISAMPLE 0x2000000 /**< __GLcontextRec::Multisample */ #define _NEW_TRACK_MATRIX 0x4000000 /**< __GLcontextRec::VertexProgram */ #define _NEW_PROGRAM 0x8000000 /**< __GLcontextRec::VertexProgram */ +#define _NEW_CURRENT_ATTRIB 0x10000000 /**< __GLcontextRec::Current */ +#define _NEW_PROGRAM_CONSTANTS 0x20000000 #define _NEW_ALL ~0 /*@}*/ @@ -2818,6 +2705,10 @@ struct gl_matrix_stack /*@}*/ +/** + * Composite state flags + */ +/*@{*/ #define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \ _NEW_TEXTURE | \ _NEW_POINT | \ @@ -2827,17 +2718,12 @@ struct gl_matrix_stack #define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT | \ _NEW_TEXTURE) -#define _IMAGE_NEW_TRANSFER_STATE (_NEW_PIXEL | _NEW_COLOR_MATRIX) - +#define _MESA_NEW_TRANSFER_STATE (_NEW_PIXEL | \ + _NEW_COLOR_MATRIX) +/*@}*/ -/* - * Forward declaration of display list data types: - */ -union node; -typedef union node Node; - /* This has to be included here. */ #include "dd.h" @@ -2868,21 +2754,31 @@ struct gl_tnl_module /*@}*/ }; -/* Strictly this is a tnl/ private concept, but it doesn't seem + +/** + * Display list flags. + * Strictly this is a tnl-private concept, but it doesn't seem * worthwhile adding a tnl private structure just to hold this one bit * of information: */ -#define MESA_DLIST_DANGLING_REFS 0x1 +#define DLIST_DANGLING_REFS 0x1 + + +/** Opaque declaration of display list payload data type */ +union gl_dlist_node; -/* Provide a location where information about a display list can be + +/** + * Provide a location where information about a display list can be * collected. Could be extended with driverPrivate structures, * etc. in the future. */ -struct mesa_display_list +struct gl_display_list { - Node *node; - GLuint id; - GLbitfield flags; + GLuint Name; + GLbitfield Flags; /**< DLIST_x flags */ + /** The dlist commands are in a linked list of nodes */ + union gl_dlist_node *Head; }; @@ -2893,10 +2789,8 @@ struct gl_dlist_state { GLuint CallDepth; /**< Current recursion calling depth */ - struct mesa_display_list *CurrentList; - Node *CurrentListPtr; /**< Head of list being compiled */ - GLuint CurrentListNum; /**< Number of the list being compiled */ - Node *CurrentBlock; /**< Pointer to current block of nodes */ + struct gl_display_list *CurrentList; /**< List currently being compiled */ + union gl_dlist_node *CurrentBlock; /**< Pointer to current block of nodes */ GLuint CurrentPos; /**< Index into current block of nodes */ GLvertexformat ListVtxfmt; @@ -2912,6 +2806,13 @@ struct gl_dlist_state GLubyte ActiveEdgeFlag; GLboolean CurrentEdgeFlag; + + struct { + /* State known to have been set by the currently-compiling display + * list. Used to eliminate some redundant state changes. + */ + GLenum ShadeModel; + } Current; }; @@ -3038,21 +2939,15 @@ struct __GLcontextRec struct gl_color_table ColorTable[COLORTABLE_MAX]; struct gl_color_table ProxyColorTable[COLORTABLE_MAX]; -#if 0 - struct gl_color_table PostConvolutionColorTable; - struct gl_color_table ProxyPostConvolutionColorTable; - struct gl_color_table PostColorMatrixColorTable; - struct gl_color_table ProxyPostColorMatrixColorTable; -#endif - struct gl_program_state Program; /**< for vertex or fragment progs */ - struct gl_vertex_program_state VertexProgram; /**< GL_ARB/NV_vertex_program */ - struct gl_fragment_program_state FragmentProgram; /**< GL_ARB/NV_vertex_program */ - struct gl_ati_fragment_shader_state ATIFragmentShader; /**< GL_ATI_fragment_shader */ - - struct gl_query_state Query; /**< GL_ARB_occlusion_query */ + struct gl_program_state Program; /**< general program state */ + struct gl_vertex_program_state VertexProgram; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; struct gl_shader_state Shader; /**< GLSL shader object state */ + + struct gl_query_state Query; /**< occlusion, timer queries */ /*@}*/ #if FEATURE_EXT_framebuffer_object @@ -3060,11 +2955,20 @@ struct __GLcontextRec #endif GLenum ErrorValue; /**< Last error code */ + + /** + * Recognize and silence repeated error debug messages in buggy apps. + */ + const char *ErrorDebugFmtString; + GLuint ErrorDebugCount; + GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */ GLbitfield NewState; /**< bitwise-or of _NEW_* flags */ GLboolean ViewportInitialized; /**< has viewport size been initialized? */ + GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */ + /** \name Derived state */ /*@{*/ /** Bitwise-or of DD_* flags. Note that this bitfield may be used before @@ -3076,9 +2980,8 @@ struct __GLcontextRec GLfloat _ModelViewInvScale; GLboolean _NeedEyeCoords; GLboolean _ForceEyeCoords; - GLenum _CurrentProgram; /* currently executing program */ - GLuint TextureStateTimestamp; /* detect changes to shared state */ + GLuint TextureStateTimestamp; /**< detect changes to shared state */ struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */ struct gl_shine_tab *_ShineTabList; /**< MRU list of inactive shine tables */ @@ -3097,6 +3000,12 @@ struct __GLcontextRec /** software compression/decompression supported or not */ GLboolean Mesa_DXTn; + /** + * Use dp4 (rather than mul/mad) instructions for position + * transformation? + */ + GLboolean mvp_with_dp4; + /** Core tnl module support */ struct gl_tnl_module TnlModule; @@ -3110,7 +3019,7 @@ struct __GLcontextRec void *swsetup_context; void *swtnl_context; void *swtnl_im; - void *acache_context; + struct st_context *st; void *aelt_context; /*@}*/ }; @@ -3148,8 +3057,6 @@ enum _verbose VERBOSE_PRIMS = 0x0400, VERBOSE_VERTS = 0x0800, VERBOSE_DISASSEM = 0x1000, - VERBOSE_GLSL = 0x2000, - VERBOSE_GLSL_DUMP = 0x4000 }; @@ -3160,7 +3067,4 @@ enum _debug -#define Elements(x) sizeof(x)/sizeof(*(x)) - - -#endif /* TYPES_H */ +#endif /* MTYPES_H */ diff --git a/mesa/main/depthstencil.h b/mesa/main/polygon.h index 3dde081..78e8394 100644 --- a/mesa/main/depthstencil.h +++ b/mesa/main/polygon.h @@ -1,6 +1,11 @@ +/** + * \file polygon.h + * Polygon operations. + */ + /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 6.5.1 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * @@ -23,34 +28,39 @@ */ -#ifndef DEPTHSTENCIL_H -#define DEPTHSTENCIL_H +#ifndef POLYGON_H +#define POLYGON_H -extern struct gl_renderbuffer * -_mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx, - struct gl_renderbuffer *dsrb); +#include "mtypes.h" -extern struct gl_renderbuffer * -_mesa_new_s8_renderbuffer_wrapper(GLcontext *ctx, - struct gl_renderbuffer *dsrb); +extern void +_mesa_polygon_stipple(GLcontext *ctx, const GLubyte *pattern); -extern void -_mesa_extract_stencil(GLcontext *ctx, - struct gl_renderbuffer *dsRb, - struct gl_renderbuffer *stencilRb); +extern void GLAPIENTRY +_mesa_CullFace( GLenum mode ); +extern void GLAPIENTRY +_mesa_FrontFace( GLenum mode ); -extern void -_mesa_insert_stencil(GLcontext *ctx, - struct gl_renderbuffer *dsRb, - struct gl_renderbuffer *stencilRb); +extern void GLAPIENTRY +_mesa_PolygonMode( GLenum face, GLenum mode ); +extern void GLAPIENTRY +_mesa_PolygonOffset( GLfloat factor, GLfloat units ); -extern void -_mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb); +extern void GLAPIENTRY +_mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ); + +extern void GLAPIENTRY +_mesa_PolygonStipple( const GLubyte *mask ); + +extern void GLAPIENTRY +_mesa_GetPolygonStipple( GLubyte *mask ); +extern void +_mesa_init_polygon( GLcontext * ctx ); -#endif /* DEPTHSTENCIL_H */ +#endif diff --git a/mesa/main/state.h b/mesa/main/state.h index bb7cb8f..29db08a 100644 --- a/mesa/main/state.h +++ b/mesa/main/state.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.1 + * Version: 7.3 * * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * @@ -29,13 +29,21 @@ #include "mtypes.h" extern void -_mesa_update_state( GLcontext *ctx ); +_mesa_update_state(GLcontext *ctx); /* As above but can only be called between _mesa_lock_context_textures() and * _mesa_unlock_context_textures(). */ extern void -_mesa_update_state_locked( GLcontext *ctx ); +_mesa_update_state_locked(GLcontext *ctx); + + +extern void +_mesa_set_varying_vp_inputs(GLcontext *ctx, GLbitfield varying_inputs); + + +extern void +_mesa_set_vp_override(GLcontext *ctx, GLboolean flag); #endif diff --git a/mesa/main/texenv.h b/mesa/main/texenv.h index bdff7fd..1e9c5fa 100644 --- a/mesa/main/texenv.h +++ b/mesa/main/texenv.h @@ -48,5 +48,16 @@ _mesa_TexEnvi( GLenum target, GLenum pname, GLint param ); extern void GLAPIENTRY _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param ); +extern void GLAPIENTRY +_mesa_TexBumpParameterivATI( GLenum pname, const GLint *param ); + +extern void GLAPIENTRY +_mesa_TexBumpParameterfvATI( GLenum pname, const GLfloat *param ); + +extern void GLAPIENTRY +_mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param ); + +extern void GLAPIENTRY +_mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param ); #endif /* TEXENV_H */ diff --git a/mesa/main/texformat.h b/mesa/main/texformat.h index b1604d4..5aa1d75 100644 --- a/mesa/main/texformat.h +++ b/mesa/main/texformat.h @@ -3,6 +3,7 @@ * Version: 6.5.1 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (c) 2008 VMware, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -98,9 +99,15 @@ enum _format { /*@{*/ MESA_FORMAT_SRGB8, MESA_FORMAT_SRGBA8, + MESA_FORMAT_SARGB8, MESA_FORMAT_SL8, MESA_FORMAT_SLA8, +#if FEATURE_texture_s3tc MESA_FORMAT_SRGB_DXT1, + MESA_FORMAT_SRGBA_DXT1, + MESA_FORMAT_SRGBA_DXT3, + MESA_FORMAT_SRGBA_DXT5, +#endif /*@}*/ #endif @@ -108,12 +115,16 @@ enum _format { * \name Compressed texture formats. */ /*@{*/ +#if FEATURE_texture_fxt1 MESA_FORMAT_RGB_FXT1, MESA_FORMAT_RGBA_FXT1, +#endif +#if FEATURE_texture_s3tc MESA_FORMAT_RGB_DXT1, MESA_FORMAT_RGBA_DXT1, MESA_FORMAT_RGBA_DXT3, MESA_FORMAT_RGBA_DXT5, +#endif /*@}*/ /** @@ -150,7 +161,16 @@ enum _format { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, MESA_FORMAT_INTENSITY_FLOAT32, - MESA_FORMAT_INTENSITY_FLOAT16 + MESA_FORMAT_INTENSITY_FLOAT16, + /*@}*/ + + /** + * \name Signed fixed point texture formats. + */ + /*@{*/ + MESA_FORMAT_DUDV8, + MESA_FORMAT_SIGNED_RGBA8888, + MESA_FORMAT_SIGNED_RGBA8888_REV /*@}*/ }; @@ -170,9 +190,15 @@ extern const struct gl_texture_format _mesa_texformat_intensity; /*@{*/ extern const struct gl_texture_format _mesa_texformat_srgb8; extern const struct gl_texture_format _mesa_texformat_srgba8; +extern const struct gl_texture_format _mesa_texformat_sargb8; extern const struct gl_texture_format _mesa_texformat_sl8; extern const struct gl_texture_format _mesa_texformat_sla8; +#if FEATURE_texture_s3tc extern const struct gl_texture_format _mesa_texformat_srgb_dxt1; +extern const struct gl_texture_format _mesa_texformat_srgba_dxt1; +extern const struct gl_texture_format _mesa_texformat_srgba_dxt3; +extern const struct gl_texture_format _mesa_texformat_srgba_dxt5; +#endif /*@}*/ #endif @@ -192,6 +218,13 @@ extern const struct gl_texture_format _mesa_texformat_intensity_float32; extern const struct gl_texture_format _mesa_texformat_intensity_float16; /*@}*/ +/** Signed fixed point texture formats */ +/*@{*/ +extern const struct gl_texture_format _mesa_texformat_dudv8; +extern const struct gl_texture_format _mesa_texformat_signed_rgba8888; +extern const struct gl_texture_format _mesa_texformat_signed_rgba8888_rev; +/*@}*/ + /** \name Assorted hardware-friendly formats */ /*@{*/ extern const struct gl_texture_format _mesa_texformat_rgba8888; @@ -229,12 +262,16 @@ extern const struct gl_texture_format _mesa_texformat_ycbcr_rev; /** \name Compressed formats */ /*@{*/ +#if FEATURE_texture_fxt1 extern const struct gl_texture_format _mesa_texformat_rgb_fxt1; extern const struct gl_texture_format _mesa_texformat_rgba_fxt1; +#endif +#if FEATURE_texture_s3tc extern const struct gl_texture_format _mesa_texformat_rgb_dxt1; extern const struct gl_texture_format _mesa_texformat_rgba_dxt1; extern const struct gl_texture_format _mesa_texformat_rgba_dxt3; extern const struct gl_texture_format _mesa_texformat_rgba_dxt5; +#endif /*@}*/ /** \name The null format */ diff --git a/mesa/main/texgetimage.h b/mesa/main/texgetimage.h new file mode 100644 index 0000000..01f486e --- /dev/null +++ b/mesa/main/texgetimage.h @@ -0,0 +1,46 @@ +/* + * Mesa 3-D graphics library + * Version: 7.5 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (c) 2009 VMware, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef TEXGETIMAGE_H +#define TEXGETIMAGE_H + + +extern void +_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + +extern void +_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, + GLvoid *img, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + +#endif /* TEXGETIMAGE_H */ diff --git a/mesa/main/texobj.h b/mesa/main/texobj.h index d5374c5..2599c08 100644 --- a/mesa/main/texobj.h +++ b/mesa/main/texobj.h @@ -65,6 +65,9 @@ extern void _mesa_test_texobj_completeness( const GLcontext *ctx, struct gl_texture_object *obj ); +extern struct gl_texture_object * +_mesa_get_fallback_texture(GLcontext *ctx); + extern void _mesa_unlock_context_textures( GLcontext *ctx ); diff --git a/mesa/main/texstore.h b/mesa/main/texstore.h index 951d0a1..313f2d6 100644 --- a/mesa/main/texstore.h +++ b/mesa/main/texstore.h @@ -3,6 +3,7 @@ * Version: 6.5.1 * * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * Copyright (c) 2008 VMware, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -73,10 +74,12 @@ extern GLboolean _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS); #if FEATURE_EXT_texture_sRGB extern GLboolean _mesa_texstore_srgb8(TEXSTORE_PARAMS); extern GLboolean _mesa_texstore_srgba8(TEXSTORE_PARAMS); +extern GLboolean _mesa_texstore_sargb8(TEXSTORE_PARAMS); extern GLboolean _mesa_texstore_sl8(TEXSTORE_PARAMS); extern GLboolean _mesa_texstore_sla8(TEXSTORE_PARAMS); #endif - +extern GLboolean _mesa_texstore_dudv8(TEXSTORE_PARAMS); +extern GLboolean _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS); extern GLchan * _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, @@ -207,19 +210,6 @@ _mesa_store_compressed_texsubimage3d(GLcontext *ctx, GLenum target, struct gl_texture_image *texImage); -extern void -_mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, - GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - - -extern void -_mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, - GLvoid *img, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage); - extern const GLvoid * _mesa_validate_pbo_teximage(GLcontext *ctx, GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth, diff --git a/mesa/main/varray.h b/mesa/main/varray.h index 6385689..97d5c82 100644 --- a/mesa/main/varray.h +++ b/mesa/main/varray.h @@ -156,6 +156,20 @@ _mesa_LockArraysEXT(GLint first, GLsizei count); extern void GLAPIENTRY _mesa_UnlockArraysEXT( void ); + +extern void GLAPIENTRY +_mesa_DrawArrays(GLenum mode, GLint first, GLsizei count); + +extern void GLAPIENTRY +_mesa_DrawElements(GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices); + +extern void GLAPIENTRY +_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, + GLenum type, const GLvoid *indices); + + + extern void _mesa_init_varray( GLcontext * ctx ); diff --git a/mesa/main/viewport.h b/mesa/main/viewport.h new file mode 100644 index 0000000..f08fef2 --- /dev/null +++ b/mesa/main/viewport.h @@ -0,0 +1,52 @@ +/* + * Mesa 3-D graphics library + * Version: 7.5 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef VIEWPORT_H +#define VIEWPORT_H + + +extern void GLAPIENTRY +_mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); + + +extern void +_mesa_set_viewport(GLcontext *ctx, GLint x, GLint y, + GLsizei width, GLsizei height); + + +extern void GLAPIENTRY +_mesa_DepthRange(GLclampd nearval, GLclampd farval); + + +extern void +_mesa_init_viewport(GLcontext *ctx); + + +extern void +_mesa_free_viewport_data(GLcontext *ctx); + + +#endif diff --git a/mesa/math/m_matrix.h b/mesa/math/m_matrix.h index a8d9000..3bc5de6 100644 --- a/mesa/math/m_matrix.h +++ b/mesa/math/m_matrix.h @@ -200,6 +200,9 @@ do { \ } while (0) +extern void +_mesa_transform_vector(GLfloat u[4], const GLfloat v[4], const GLfloat m[16]); + /*@}*/ diff --git a/mesa/math/m_xform.h b/mesa/math/m_xform.h index 24e8ddb..7ef76e0 100644 --- a/mesa/math/m_xform.h +++ b/mesa/math/m_xform.h @@ -42,10 +42,6 @@ extern void -_mesa_transform_vector(GLfloat u[4], CONST GLfloat v[4], CONST GLfloat m[16]); - - -extern void _math_init_transformation(void); @@ -148,18 +144,6 @@ typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec, CONST GLvector4f *from_vec ); -extern GLvector4f *_mesa_project_points( GLvector4f *to, - CONST GLvector4f *from ); - -extern void _mesa_transform_bounds3( GLubyte *orMask, GLubyte *andMask, - CONST GLfloat m[16], - CONST GLfloat src[][3] ); - -extern void _mesa_transform_bounds2( GLubyte *orMask, GLubyte *andMask, - CONST GLfloat m[16], - CONST GLfloat src[][3] ); - - extern dotprod_func _mesa_dotprod_tab[5]; extern vec_copy_func _mesa_copy_tab[0x10]; extern vec_copy_func _mesa_copy_clean_tab[5]; @@ -173,9 +157,6 @@ extern normal_func _mesa_normal_tab[0xf]; extern transform_func *_mesa_transform_tab[5]; -extern void _mesa_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16], - CONST GLfloat P[4], GLuint sz ); - #define TransformRaw( to, mat, from ) \ ( _mesa_transform_tab[(from)->size][(mat)->type]( to, (mat)->m, from ), \ diff --git a/mesa/shader/atifragshader.h b/mesa/shader/atifragshader.h index 32fb3a8..e1dc20e 100644 --- a/mesa/shader/atifragshader.h +++ b/mesa/shader/atifragshader.h @@ -8,6 +8,8 @@ #ifndef ATIFRAGSHADER_H #define ATIFRAGSHADER_H +#include "main/mtypes.h" + #define MAX_NUM_INSTRUCTIONS_PER_PASS_ATI 8 #define MAX_NUM_PASSES_ATI 2 #define MAX_NUM_FRAGMENT_REGISTERS_ATI 6 diff --git a/mesa/shader/prog_execute.h b/mesa/shader/prog_execute.h index 8ceb7b0..adefc54 100644 --- a/mesa/shader/prog_execute.h +++ b/mesa/shader/prog_execute.h @@ -73,7 +73,7 @@ struct gl_program_machine extern void -_mesa_get_program_register(GLcontext *ctx, enum register_file file, +_mesa_get_program_register(GLcontext *ctx, gl_register_file file, GLuint index, GLfloat val[4]); extern GLboolean diff --git a/mesa/shader/prog_instruction.h b/mesa/shader/prog_instruction.h index 0ef0251..40ad998 100644 --- a/mesa/shader/prog_instruction.h +++ b/mesa/shader/prog_instruction.h @@ -38,6 +38,9 @@ #define PROG_INSTRUCTION_H +#include "main/mfeatures.h" + + /** * Swizzle indexes. * Do not change! @@ -258,37 +261,15 @@ struct prog_src_register GLuint Swizzle:12; GLuint RelAddr:1; - /** - * \name Source register "sign" control. - * - * The ARB and NV extensions allow varrying degrees of control over the - * sign of the source vector components. These values allow enough control - * for all flavors of the extensions. - */ - /*@{*/ - /** - * Per-component negation for the SWZ instruction. For non-SWZ - * instructions the only possible values are NEGATE_XYZW and NEGATE_NONE. - * - * \since - * ARB_vertex_program, ARB_fragment_program - */ - GLuint NegateBase:4; - - /** - * Take the component-wise absolute value. - * - * \since - * NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, - * NV_vertex_program2_option. - */ + /** Take the component-wise absolute value */ GLuint Abs:1; /** - * Post-absolute value negation (all components). + * Post-Abs negation. + * This will either be NEGATE_NONE or NEGATE_XYZW, except for the SWZ + * instruction which allows per-component negation. */ - GLuint NegateAbs:1; - /*@}*/ + GLuint Negate:4; }; @@ -341,14 +322,6 @@ struct prog_dst_register struct prog_instruction { gl_inst_opcode Opcode; -#if FEATURE_MESA_program_debug - GLshort StringPos; -#endif - /** - * Arbitrary data. Used for the PRINT, CAL, and BRA instructions. - */ - void *Data; - struct prog_src_register SrcReg[3]; struct prog_dst_register DstReg; @@ -388,7 +361,7 @@ struct prog_instruction GLuint SaturateMode:2; /** - * Per-instruction selectable precision. + * Per-instruction selectable precision: FLOAT32, FLOAT16, FIXED12. * * \since * NV_fragment_program, NV_fragment_program_option. @@ -396,43 +369,36 @@ struct prog_instruction GLuint Precision:3; /** - * \name Texture source controls. - * - * The texture source controls are only used with the \c TEX, \c TXD, - * \c TXL, and \c TXP instructions. - * - * \since - * ARB_fragment_program, NV_fragment_program, NV_vertex_program3. + * \name Extra fields for TEX, TXB, TXD, TXL, TXP instructions. */ /*@{*/ - /** - * Source texture unit. OpenGL supports a maximum of 32 texture - * units. - */ + /** Source texture unit. */ GLuint TexSrcUnit:5; - /** - * Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX. - */ + /** Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX */ GLuint TexSrcTarget:3; + + /** True if tex instruction should do shadow comparison */ + GLuint TexShadow:1; /*@}*/ /** * For BRA and CAL instructions, the location to jump to. * For BGNLOOP, points to ENDLOOP (and vice-versa). * For BRK, points to BGNLOOP (which points to ENDLOOP). - * For IF, points to else or endif. - * For ELSE, points to endif. + * For IF, points to ELSE or ENDIF. + * For ELSE, points to ENDIF. */ GLint BranchTarget; - /** - * For TEX instructions in shaders, the sampler to use for the - * texture lookup. - */ - GLint Sampler; - + /** for debugging purposes */ const char *Comment; + + /** Arbitrary data. Used for OPCODE_PRINT and some drivers */ + void *Data; + + /** for driver use (try to remove someday) */ + GLint Aux; }; @@ -462,6 +428,9 @@ _mesa_num_inst_dst_regs(gl_inst_opcode opcode); extern GLboolean _mesa_is_tex_instruction(gl_inst_opcode opcode); +extern GLboolean +_mesa_check_soa_dependencies(const struct prog_instruction *inst); + extern const char * _mesa_opcode_string(gl_inst_opcode opcode); diff --git a/mesa/shader/prog_parameter.h b/mesa/shader/prog_parameter.h index 200f2c0..01f5a0e 100644 --- a/mesa/shader/prog_parameter.h +++ b/mesa/shader/prog_parameter.h @@ -54,7 +54,7 @@ struct gl_program_parameter { const char *Name; /**< Null-terminated string */ - enum register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ + gl_register_file Type; /**< PROGRAM_NAMED_PARAM, CONSTANT or STATE_VAR */ GLenum DataType; /**< GL_FLOAT, GL_FLOAT_VEC2, etc */ GLuint Size; /**< Number of components (1..4) */ GLboolean Used; /**< Helper flag for GLSL uniform tracking */ @@ -102,7 +102,7 @@ _mesa_num_parameters(const struct gl_program_parameter_list *list) extern GLint _mesa_add_parameter(struct gl_program_parameter_list *paramList, - enum register_file type, const char *name, + gl_register_file type, const char *name, GLuint size, GLenum datatype, const GLfloat *values, const gl_state_index state[STATE_LENGTH], GLbitfield flags); @@ -161,11 +161,11 @@ _mesa_lookup_parameter_constant(const struct gl_program_parameter_list *list, extern GLuint _mesa_longest_parameter_name(const struct gl_program_parameter_list *list, - enum register_file type); + gl_register_file type); extern GLuint _mesa_num_parameters_of_type(const struct gl_program_parameter_list *list, - enum register_file type); + gl_register_file type); #endif /* PROG_PARAMETER_H */ diff --git a/mesa/shader/prog_print.h b/mesa/shader/prog_print.h index cd9e388..d55661c 100644 --- a/mesa/shader/prog_print.h +++ b/mesa/shader/prog_print.h @@ -47,6 +47,9 @@ const char * _mesa_writemask_string(GLuint writeMask); extern void +_mesa_print_swizzle(GLuint swizzle); + +extern void _mesa_print_alu_instruction(const struct prog_instruction *inst, const char *opcode_string, GLuint numRegs); @@ -62,8 +65,9 @@ extern void _mesa_print_program(const struct gl_program *prog); extern void -_mesa_print_program_opt(const struct gl_program *prog, gl_prog_print_mode mode, - GLboolean lineNumbers); +_mesa_fprint_program_opt(FILE *f, + const struct gl_program *prog, gl_prog_print_mode mode, + GLboolean lineNumbers); extern void _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog); @@ -72,4 +76,8 @@ extern void _mesa_print_parameter_list(const struct gl_program_parameter_list *list); +extern void +_mesa_write_shader_to_file(const struct gl_shader *shader); + + #endif /* PROG_PRINT_H */ diff --git a/mesa/shader/prog_statevars.h b/mesa/shader/prog_statevars.h index 909bce0..1180d9e 100644 --- a/mesa/shader/prog_statevars.h +++ b/mesa/shader/prog_statevars.h @@ -104,6 +104,7 @@ typedef enum gl_state_index_ { STATE_LOCAL, STATE_INTERNAL, /* Mesa additions */ + STATE_CURRENT_ATTRIB, /* ctx->Current vertex attrib value */ STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */ @@ -116,6 +117,9 @@ typedef enum gl_state_index_ { STATE_PCM_SCALE, /**< Post color matrix RGBA scale */ STATE_PCM_BIAS, /**< Post color matrix RGBA bias */ STATE_SHADOW_AMBIENT, /**< ARB_shadow_ambient fail value; token[2] is texture unit index */ + STATE_FB_SIZE, /**< (width-1, height-1, 0, 0) */ + STATE_ROT_MATRIX_0, /**< ATI_envmap_bumpmap, rot matrix row 0 */ + STATE_ROT_MATRIX_1, /**< ATI_envmap_bumpmap, rot matrix row 1 */ STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */ } gl_state_index; @@ -130,7 +134,7 @@ extern GLbitfield _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]); -extern const char * +extern char * _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]); diff --git a/mesa/shader/programopt.h b/mesa/shader/programopt.h index 11572e6..96acaf9 100644 --- a/mesa/shader/programopt.h +++ b/mesa/shader/programopt.h @@ -40,6 +40,6 @@ extern void _mesa_count_texture_instructions(struct gl_program *prog); extern void -_mesa_remove_output_reads(struct gl_program *prog, enum register_file type); +_mesa_remove_output_reads(struct gl_program *prog, gl_register_file type); #endif /* PROGRAMOPT_H */ diff --git a/mesa/swrast/s_context.h b/mesa/swrast/s_context.h index a511d1c..9059f9b 100644 --- a/mesa/swrast/s_context.h +++ b/mesa/swrast/s_context.h @@ -52,7 +52,7 @@ typedef void (*texture_sample_func)(GLcontext *ctx, const struct gl_texture_object *tObj, GLuint n, const GLfloat texcoords[][4], - const GLfloat lambda[], GLchan rgba[][4]); + const GLfloat lambda[], GLfloat rgba[][4]); typedef void (_ASMAPIP blend_func)( GLcontext *ctx, GLuint n, const GLubyte mask[], @@ -131,7 +131,7 @@ typedef struct GLfloat _BackfaceSign; /** +1 or -1 */ GLfloat _BackfaceCullSign; /** +1, 0, or -1 */ GLboolean _PreferPixelFog; /* Compute fog blend factor per fragment? */ - GLboolean _AnyTextureCombine; + GLboolean _TextureCombinePrimary; GLboolean _FogEnabled; GLboolean _DeferredTexture; GLenum _FogMode; /* either GL_FOG_MODE or fragment program's fog mode */ @@ -157,6 +157,7 @@ typedef struct GLbitfield NewState; GLuint StateChanges; GLenum Primitive; /* current primitive being drawn (ala glBegin) */ + GLboolean SpecularVertexAdd; /**< Add specular/secondary color per vertex */ void (*InvalidateState)( GLcontext *ctx, GLbitfield new_state ); @@ -221,7 +222,7 @@ typedef struct /** Buffer for saving the sampled texture colors. * Needed for GL_ARB_texture_env_crossbar implementation. */ - GLchan *TexelBuffer; + GLfloat *TexelBuffer; validate_texture_image_func ValidateTextureImage; @@ -238,21 +239,43 @@ extern void _swrast_update_texture_samplers(GLcontext *ctx); -#define SWRAST_CONTEXT(ctx) ((SWcontext *)ctx->swrast_context) +/** Return SWcontext for the given GLcontext */ +static INLINE SWcontext * +SWRAST_CONTEXT(GLcontext *ctx) +{ + return (SWcontext *) ctx->swrast_context; +} + +/** const version of above */ +static INLINE const SWcontext * +CONST_SWRAST_CONTEXT(const GLcontext *ctx) +{ + return (const SWcontext *) ctx->swrast_context; +} + + +/** + * Called prior to framebuffer reading/writing. + * For drivers that rely on swrast for fallback rendering, this is the + * driver's opportunity to map renderbuffers and textures. + */ +static INLINE void +swrast_render_start(GLcontext *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderStart) + swrast->Driver.SpanRenderStart(ctx); +} -#define RENDER_START(SWctx, GLctx) \ - do { \ - if ((SWctx)->Driver.SpanRenderStart) { \ - (*(SWctx)->Driver.SpanRenderStart)(GLctx); \ - } \ - } while (0) -#define RENDER_FINISH(SWctx, GLctx) \ - do { \ - if ((SWctx)->Driver.SpanRenderFinish) { \ - (*(SWctx)->Driver.SpanRenderFinish)(GLctx); \ - } \ - } while (0) +/** Called after framebuffer reading/writing */ +static INLINE void +swrast_render_finish(GLcontext *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderFinish) + swrast->Driver.SpanRenderFinish(ctx); +} @@ -267,6 +290,34 @@ _swrast_update_texture_samplers(GLcontext *ctx); /* + * Fixed point arithmetic macros + */ +#ifndef FIXED_FRAC_BITS +#define FIXED_FRAC_BITS 11 +#endif + +#define FIXED_SHIFT FIXED_FRAC_BITS +#define FIXED_ONE (1 << FIXED_SHIFT) +#define FIXED_HALF (1 << (FIXED_SHIFT-1)) +#define FIXED_FRAC_MASK (FIXED_ONE - 1) +#define FIXED_INT_MASK (~FIXED_FRAC_MASK) +#define FIXED_EPSILON 1 +#define FIXED_SCALE ((float) FIXED_ONE) +#define FIXED_DBL_SCALE ((double) FIXED_ONE) +#define FloatToFixed(X) (IROUND((X) * FIXED_SCALE)) +#define FixedToDouble(X) ((X) * (1.0 / FIXED_DBL_SCALE)) +#define IntToFixed(I) ((I) << FIXED_SHIFT) +#define FixedToInt(X) ((X) >> FIXED_SHIFT) +#define FixedToUns(X) (((unsigned int)(X)) >> FIXED_SHIFT) +#define FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK) +#define FixedFloor(X) ((X) & FIXED_INT_MASK) +#define FixedToFloat(X) ((X) * (1.0F / FIXED_SCALE)) +#define PosFloatToFixed(X) FloatToFixed(X) +#define SignedFloatToFixed(X) FloatToFixed(X) + + + +/* * XXX these macros are just bandages for now in order to make * CHAN_BITS==32 compile cleanly. * These should probably go elsewhere at some point. diff --git a/mesa/swrast/s_span.h b/mesa/swrast/s_span.h index c4b47df..0eabae2 100644 --- a/mesa/swrast/s_span.h +++ b/mesa/swrast/s_span.h @@ -1,8 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 6.5 + * Version: 7.5 * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -106,6 +107,9 @@ typedef struct sw_span /** Number of fragments in the span */ GLuint end; + /** for clipping left edge of spans */ + GLuint leftClip; + /** This flag indicates that mask[] array is effectively filled with ones */ GLboolean writeAll; @@ -165,6 +169,7 @@ do { \ (S).arrayMask = 0x0; \ (S).arrayAttribs = 0x0; \ (S).end = 0; \ + (S).leftClip = 0; \ (S).facing = 0; \ (S).array = SWRAST_CONTEXT(ctx)->SpanArrays; \ } while (0) diff --git a/mesa/swrast/swrast.h b/mesa/swrast/swrast.h index 047f799..c319ca6 100644 --- a/mesa/swrast/swrast.h +++ b/mesa/swrast/swrast.h @@ -75,6 +75,12 @@ typedef struct { } SWvertex; +/** + * Fixed point data type. + */ +typedef int GLfixed; + + #define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0 @@ -260,12 +266,6 @@ extern void _swrast_eject_texture_images(GLcontext *ctx); -#if FEATURE_MESA_program_debug -extern void -_swrast_get_program_register(GLcontext *, enum register_file file, - GLuint index, GLfloat val[4]); -#endif /* FEATURE_MESA_program_debug */ - /** * The driver interface for the software rasterizer. diff --git a/mesa/tnl/t_context.h b/mesa/tnl/t_context.h index 0a6ce04..c19eb3d 100644 --- a/mesa/tnl/t_context.h +++ b/mesa/tnl/t_context.h @@ -50,6 +50,7 @@ #define _T_CONTEXT_H #include "main/glheader.h" +#include "main/bitset.h" #include "main/mtypes.h" #include "math/m_matrix.h" diff --git a/mesa/tnl/t_vp_build.h b/mesa/tnl/t_vp_build.h index d1c147f..d6ebc66 100644 --- a/mesa/tnl/t_vp_build.h +++ b/mesa/tnl/t_vp_build.h @@ -29,6 +29,13 @@ #include "main/mtypes.h" +#define TNL_FIXED_FUNCTION_STATE_FLAGS (_NEW_PROGRAM | \ + _NEW_LIGHT | \ + _NEW_TEXTURE | \ + _NEW_TEXTURE_MATRIX | \ + _NEW_TRANSFORM | \ + _NEW_FOG | \ + _NEW_POINT) extern void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ); diff --git a/mesa/tnl/tnl.h b/mesa/tnl/tnl.h index 9a1717b..4d628aa 100644 --- a/mesa/tnl/tnl.h +++ b/mesa/tnl/tnl.h @@ -81,6 +81,8 @@ _tnl_draw_prims( GLcontext *ctx, GLuint min_index, GLuint max_index); +extern void +_mesa_load_tracked_matrices(GLcontext *ctx); extern void _tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]); diff --git a/mesa/tnl_dd/t_dd_vb.c b/mesa/tnl_dd/t_dd_vb.c index 3cedd90..b3937c2 100644 --- a/mesa/tnl_dd/t_dd_vb.c +++ b/mesa/tnl_dd/t_dd_vb.c @@ -188,6 +188,9 @@ void TAG(translate_vertex)(GLcontext *ctx, } +/* prototype to silence warning */ +void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v ); + void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v ) { diff --git a/mesa/vbo/vbo.h b/mesa/vbo/vbo.h index 4c51b44..5362226 100644 --- a/mesa/vbo/vbo.h +++ b/mesa/vbo/vbo.h @@ -117,4 +117,22 @@ void vbo_rebase_prims( GLcontext *ctx, void vbo_use_buffer_objects(GLcontext *ctx); +void vbo_set_draw_func(GLcontext *ctx, vbo_draw_func func); + + +void GLAPIENTRY +_vbo_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a); + +void GLAPIENTRY +_vbo_Normal3f(GLfloat x, GLfloat y, GLfloat z); + +void GLAPIENTRY +_vbo_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); + +void GLAPIENTRY +_vbo_Materialfv(GLenum face, GLenum pname, const GLfloat *params); + +void GLAPIENTRY +_vbo_VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + #endif diff --git a/mesa/vbo/vbo_context.h b/mesa/vbo/vbo_context.h index bf405eb..5c85161 100644 --- a/mesa/vbo/vbo_context.h +++ b/mesa/vbo/vbo_context.h @@ -102,6 +102,8 @@ static INLINE GLuint get_program_mode( GLcontext *ctx ) { if (!ctx->VertexProgram._Current) return VP_NONE; + else if (ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) + return VP_NONE; else if (ctx->VertexProgram._Current->IsNVProgram) return VP_NV; else diff --git a/mesa/vbo/vbo_exec.h b/mesa/vbo/vbo_exec.h index ddbcbe1..100bb8a 100644 --- a/mesa/vbo/vbo_exec.h +++ b/mesa/vbo/vbo_exec.h @@ -43,7 +43,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* Wierd implementation stuff: */ -#define VBO_VERT_BUFFER_SIZE (1024*16) /* dwords == 64k */ +#define VBO_VERT_BUFFER_SIZE (1024*64) /* bytes */ #define VBO_MAX_ATTR_CODEGEN 16 #define ERROR_ATTRIB 16 @@ -78,14 +78,15 @@ struct vbo_exec_context struct { struct gl_buffer_object *bufferobj; - GLubyte *buffer_map; - GLuint vertex_size; + GLuint vertex_size; /* in dwords */ struct _mesa_prim prim[VBO_MAX_PRIM]; GLuint prim_count; - GLfloat *vbptr; /* cursor, points into buffer */ + GLfloat *buffer_map; + GLfloat *buffer_ptr; /* cursor, points into buffer */ + GLuint buffer_used; /* in bytes */ GLfloat vertex[VBO_ATTRIB_MAX*4]; /* current vertex */ GLuint vert_count; @@ -140,6 +141,9 @@ struct vbo_exec_context void vbo_exec_init( GLcontext *ctx ); void vbo_exec_destroy( GLcontext *ctx ); void vbo_exec_invalidate_state( GLcontext *ctx, GLuint new_state ); +void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap ); + +void vbo_exec_BeginVertices( GLcontext *ctx ); void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags ); @@ -151,7 +155,8 @@ void vbo_exec_array_destroy( struct vbo_exec_context *exec ); void vbo_exec_vtx_init( struct vbo_exec_context *exec ); void vbo_exec_vtx_destroy( struct vbo_exec_context *exec ); -void vbo_exec_vtx_flush( struct vbo_exec_context *exec ); +void vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ); +void vbo_exec_vtx_map( struct vbo_exec_context *exec ); void vbo_exec_vtx_wrap( struct vbo_exec_context *exec ); void vbo_exec_eval_update( struct vbo_exec_context *exec ); diff --git a/mesa/vbo/vbo_save.h b/mesa/vbo/vbo_save.h index b7e9baa..86bbd24 100644 --- a/mesa/vbo/vbo_save.h +++ b/mesa/vbo/vbo_save.h @@ -64,6 +64,13 @@ struct vbo_save_vertex_list { GLubyte attrsz[VBO_ATTRIB_MAX]; GLuint vertex_size; + /* Copy of the final vertex from node->vertex_store->bufferobj. + * Keep this in regular (non-VBO) memory to avoid repeated + * map/unmap of the VBO when updating GL current data. + */ + GLfloat *current_data; + GLuint current_size; + GLuint buffer_offset; GLuint count; GLuint wrap_count; /* number of copied vertices at start */ @@ -130,7 +137,7 @@ struct vbo_save_context { struct vbo_save_vertex_store *vertex_store; struct vbo_save_primitive_store *prim_store; - GLfloat *vbptr; /* cursor, points into buffer */ + GLfloat *buffer_ptr; /* cursor, points into buffer */ GLfloat vertex[VBO_ATTRIB_MAX*4]; /* current values */ GLfloat *attrptr[VBO_ATTRIB_MAX]; GLuint vert_count; @@ -166,7 +173,7 @@ void vbo_loopback_vertex_list( GLcontext *ctx, void vbo_save_EndList( GLcontext *ctx ); void vbo_save_NewList( GLcontext *ctx, GLuint list, GLenum mode ); void vbo_save_EndCallList( GLcontext *ctx ); -void vbo_save_BeginCallList( GLcontext *ctx, struct mesa_display_list *list ); +void vbo_save_BeginCallList( GLcontext *ctx, struct gl_display_list *list ); void vbo_save_SaveFlushVertices( GLcontext *ctx ); GLboolean vbo_save_NotifyBegin( GLcontext *ctx, GLenum mode ); |