summaryrefslogtreecommitdiff
path: root/src/mesa/glapi
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2010-03-10 15:49:30 +0100
committerMichal Krol <michal@vmware.com>2010-03-10 15:49:30 +0100
commit3ce4375912c8ea488460e593e07c5bb15b92dca9 (patch)
tree1011fa439bd829fd46a44fd99478135848800e73 /src/mesa/glapi
parentf59f28093ea827bd234d8e1a36bdd56a9fce5f09 (diff)
parent9b348d0ed125a22be3f318ac60cef6f201edfdab (diff)
Merge branch 'master' into gallium-sampler-view
Conflicts: src/gallium/auxiliary/Makefile src/gallium/auxiliary/SConscript src/gallium/auxiliary/tgsi/tgsi_exec.c src/gallium/auxiliary/util/u_blitter.c src/gallium/drivers/i915/i915_context.h src/gallium/drivers/i965/brw_context.h src/gallium/drivers/llvmpipe/lp_context.h src/gallium/drivers/nv50/nv50_context.h src/gallium/drivers/nv50/nv50_state_validate.c src/gallium/drivers/nv50/nv50_tex.c src/gallium/drivers/r300/r300_blit.c src/gallium/drivers/r300/r300_context.h src/gallium/drivers/r300/r300_emit.c src/gallium/drivers/r300/r300_state.c src/gallium/drivers/softpipe/sp_context.h src/gallium/drivers/svga/svga_context.h src/gallium/drivers/svga/svga_pipe_sampler.c
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r--src/mesa/glapi/Makefile158
-rw-r--r--src/mesa/glapi/dispatch.h37
-rw-r--r--src/mesa/glapi/gen/APPLE_object_purgeable.xml37
-rw-r--r--src/mesa/glapi/gen/APPLE_vertex_array_object.xml (renamed from src/mesa/glapi/APPLE_vertex_array_object.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_copy_buffer.xml (renamed from src/mesa/glapi/ARB_copy_buffer.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_depth_clamp.xml (renamed from src/mesa/glapi/ARB_depth_clamp.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml (renamed from src/mesa/glapi/ARB_draw_elements_base_vertex.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_framebuffer_object.xml (renamed from src/mesa/glapi/ARB_framebuffer_object.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_map_buffer_range.xml (renamed from src/mesa/glapi/ARB_map_buffer_range.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_seamless_cube_map.xml (renamed from src/mesa/glapi/ARB_seamless_cube_map.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_sync.xml (renamed from src/mesa/glapi/ARB_sync.xml)0
-rw-r--r--src/mesa/glapi/gen/ARB_vertex_array_object.xml (renamed from src/mesa/glapi/ARB_vertex_array_object.xml)0
-rw-r--r--src/mesa/glapi/gen/EXT_draw_buffers2.xml (renamed from src/mesa/glapi/EXT_draw_buffers2.xml)0
-rw-r--r--src/mesa/glapi/gen/EXT_framebuffer_object.xml (renamed from src/mesa/glapi/EXT_framebuffer_object.xml)0
-rw-r--r--src/mesa/glapi/gen/EXT_packed_depth_stencil.xml (renamed from src/mesa/glapi/EXT_packed_depth_stencil.xml)0
-rw-r--r--src/mesa/glapi/gen/EXT_provoking_vertex.xml (renamed from src/mesa/glapi/EXT_provoking_vertex.xml)0
-rw-r--r--src/mesa/glapi/gen/EXT_texture_array.xml (renamed from src/mesa/glapi/EXT_texture_array.xml)0
-rw-r--r--src/mesa/glapi/gen/Makefile203
-rw-r--r--src/mesa/glapi/gen/NV_conditional_render.xml (renamed from src/mesa/glapi/NV_conditional_render.xml)0
-rw-r--r--src/mesa/glapi/gen/OES_EGL_image.xml20
-rw-r--r--src/mesa/glapi/gen/extension_helper.py (renamed from src/mesa/glapi/extension_helper.py)2
-rw-r--r--src/mesa/glapi/gen/glX_API.xml (renamed from src/mesa/glapi/glX_API.xml)0
-rw-r--r--src/mesa/glapi/gen/glX_XML.py (renamed from src/mesa/glapi/glX_XML.py)0
-rw-r--r--src/mesa/glapi/gen/glX_doc.py (renamed from src/mesa/glapi/glX_doc.py)0
-rw-r--r--src/mesa/glapi/gen/glX_proto_common.py (renamed from src/mesa/glapi/glX_proto_common.py)0
-rw-r--r--src/mesa/glapi/gen/glX_proto_recv.py (renamed from src/mesa/glapi/glX_proto_recv.py)2
-rw-r--r--src/mesa/glapi/gen/glX_proto_send.py (renamed from src/mesa/glapi/glX_proto_send.py)4
-rw-r--r--src/mesa/glapi/gen/glX_proto_size.py (renamed from src/mesa/glapi/glX_proto_size.py)0
-rw-r--r--src/mesa/glapi/gen/glX_server_table.py (renamed from src/mesa/glapi/glX_server_table.py)0
-rw-r--r--src/mesa/glapi/gen/gl_API.dtd (renamed from src/mesa/glapi/gl_API.dtd)0
-rw-r--r--src/mesa/glapi/gen/gl_API.xml (renamed from src/mesa/glapi/gl_API.xml)3
-rw-r--r--src/mesa/glapi/gen/gl_SPARC_asm.py (renamed from src/mesa/glapi/gl_SPARC_asm.py)0
-rw-r--r--src/mesa/glapi/gen/gl_XML.py (renamed from src/mesa/glapi/gl_XML.py)4
-rw-r--r--src/mesa/glapi/gen/gl_and_glX_API.xml (renamed from src/mesa/glapi/gl_and_glX_API.xml)0
-rw-r--r--src/mesa/glapi/gen/gl_apitemp.py (renamed from src/mesa/glapi/gl_apitemp.py)0
-rw-r--r--src/mesa/glapi/gen/gl_enums.py (renamed from src/mesa/glapi/gl_enums.py)4
-rw-r--r--src/mesa/glapi/gen/gl_offsets.py (renamed from src/mesa/glapi/gl_offsets.py)0
-rw-r--r--src/mesa/glapi/gen/gl_procs.py (renamed from src/mesa/glapi/gl_procs.py)0
-rw-r--r--src/mesa/glapi/gen/gl_table.py (renamed from src/mesa/glapi/gl_table.py)0
-rw-r--r--src/mesa/glapi/gen/gl_x86-64_asm.py (renamed from src/mesa/glapi/gl_x86-64_asm.py)4
-rw-r--r--src/mesa/glapi/gen/gl_x86_asm.py (renamed from src/mesa/glapi/gl_x86_asm.py)2
-rw-r--r--src/mesa/glapi/gen/license.py (renamed from src/mesa/glapi/license.py)0
-rw-r--r--src/mesa/glapi/gen/mesadef.py (renamed from src/mesa/glapi/mesadef.py)6
-rwxr-xr-xsrc/mesa/glapi/gen/next_available_offset.sh (renamed from src/mesa/glapi/next_available_offset.sh)0
-rw-r--r--src/mesa/glapi/gen/remap_helper.py (renamed from src/mesa/glapi/remap_helper.py)2
-rw-r--r--src/mesa/glapi/gen/typeexpr.py (renamed from src/mesa/glapi/typeexpr.py)0
-rw-r--r--src/mesa/glapi/glapi.c401
-rw-r--r--src/mesa/glapi/glapi.h65
-rw-r--r--src/mesa/glapi/glapi_dispatch.c102
-rw-r--r--src/mesa/glapi/glapi_entrypoint.c331
-rw-r--r--src/mesa/glapi/glapi_getproc.c292
-rw-r--r--src/mesa/glapi/glapi_nop.c6
-rw-r--r--src/mesa/glapi/glapi_priv.h66
-rw-r--r--src/mesa/glapi/glapidispatch.h47
-rw-r--r--src/mesa/glapi/glapioffsets.h22
-rw-r--r--src/mesa/glapi/glapitable.h15
-rw-r--r--src/mesa/glapi/glapitemp.h58
-rw-r--r--src/mesa/glapi/glprocs.h640
-rw-r--r--src/mesa/glapi/glthread.c101
-rw-r--r--src/mesa/glapi/glthread.h162
60 files changed, 1523 insertions, 1273 deletions
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile
deleted file mode 100644
index da679607d7..0000000000
--- a/src/mesa/glapi/Makefile
+++ /dev/null
@@ -1,158 +0,0 @@
-# This file isn't used during a normal compilation since we don't want to
-# require Python in order to compile Mesa.
-# Instead, when the Mesa developers update/change the API interface it's
-# up to him/her to re-run this makefile and check in the newly generated files.
-
-
-TOP = ../../..
-include $(TOP)/configs/current
-
-OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h glapidispatch.h \
- ../main/enums.c \
- ../main/remap_helper.h \
- ../x86/glapi_x86.S \
- ../x86-64/glapi_x86-64.S \
- ../sparc/glapi_sparc.S \
- ../../glx/indirect.c \
- ../../glx/indirect.h \
- ../../glx/indirect_init.c \
- ../../glx/indirect_size.h \
- ../../glx/indirect_size.c
-
-
-GLX_DIR = $(XORG_BASE)/glx
-
-SERVER_GLAPI_FILES = \
- $(GLX_DIR)/glapi.h \
- $(GLX_DIR)/glapi.c \
- $(GLX_DIR)/glapi_nop.c \
- $(GLX_DIR)/glthread.c \
- $(GLX_DIR)/glthread.h
-
-SERVER_OUTPUTS = \
- $(GLX_DIR)/indirect_dispatch.c \
- $(GLX_DIR)/indirect_dispatch_swap.c \
- $(GLX_DIR)/indirect_dispatch.h \
- $(GLX_DIR)/indirect_reqsize.c \
- $(GLX_DIR)/indirect_reqsize.h \
- $(GLX_DIR)/indirect_size.h \
- $(GLX_DIR)/indirect_size_get.c \
- $(GLX_DIR)/indirect_size_get.h \
- $(GLX_DIR)/indirect_table.c \
- $(GLX_DIR)/glapitemp.h \
- $(GLX_DIR)/glapitable.h \
- $(GLX_DIR)/glapioffsets.h \
- $(GLX_DIR)/glapidispatch.h \
- $(GLX_DIR)/glprocs.h \
- $(SERVER_GLAPI_FILES)
-
-API_XML = gl_API.xml \
- ARB_copy_buffer.xml \
- ARB_depth_clamp.xml \
- ARB_draw_elements_base_vertex.xml \
- ARB_framebuffer_object.xml \
- ARB_map_buffer_range.xml \
- ARB_seamless_cube_map.xml \
- ARB_sync.xml \
- ARB_vertex_array_object.xml \
- APPLE_vertex_array_object.xml \
- EXT_draw_buffers2.xml \
- EXT_framebuffer_object.xml \
- EXT_packed_depth_stencil.xml \
- EXT_provoking_vertex.xml \
- EXT_texture_array.xml \
- NV_conditional_render.xml
-
-COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py
-COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
-
-all: check-xorg-source $(OUTPUTS) $(SERVER_OUTPUTS)
-
-check-xorg-source:
- @if ! test -d $(GLX_DIR); then \
- echo "ERROR: Must specify path to xserver checkout; set XORG_BASE."; \
- exit 1; \
- fi
-
-$(GLX_DIR)/%.c: %.c
- cp $< $@
-
-$(GLX_DIR)/%.h: %.h
- cp $< $@
-
-glprocs.h $(GLX_DIR)/glprocs.h: gl_procs.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-glapitemp.h $(GLX_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-glapioffsets.h $(GLX_DIR)/glapioffsets.h: gl_offsets.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-glapitable.h $(GLX_DIR)/glapitable.h: gl_table.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-glapidispatch.h $(GLX_DIR)/glapidispatch.h: gl_table.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
-
-../main/enums.c: gl_enums.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-../main/remap_helper.h: remap_helper.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-../x86/glapi_x86.S: gl_x86_asm.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-../x86-64/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-../sparc/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
- $(PYTHON2) $(PYTHON_FLAGS) $< > $@
-
-../../glx/indirect.c: glX_proto_send.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
-
-../../glx/indirect.h: glX_proto_send.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@
-
-../../glx/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@
-
-../../glx/indirect_size.h $(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
- | $(INDENT) $(INDENT_FLAGS) > $@
-
-../../glx/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \
- | $(INDENT) $(INDENT_FLAGS) > $@
-
-$(GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@
-
-$(GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@
-
-$(GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
-
-$(GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
- | $(INDENT) $(INDENT_FLAGS) > $@
-
-$(GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
-
-$(GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
- | $(INDENT) $(INDENT_FLAGS) -l200 > $@
-
-$(GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@
-
-$(GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX)
- $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@
-
-clean:
- -rm -f *~ *.pyo
- -rm -f $(OUTPUTS)
diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h
deleted file mode 100644
index 27f80a5062..0000000000
--- a/src/mesa/glapi/dispatch.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * (C) Copyright IBM Corporation 2005
- * 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, sub license,
- * 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 (including the next
- * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
- * IBM,
- * AND/OR THEIR SUPPLIERS 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 _DISPATCH_H
-#define _DISPATCH_H
-
-#ifdef IN_DRI_DRIVER
-#define _GLAPI_USE_REMAP_TABLE
-#endif
-
-#include "glapi/glapitable.h"
-#include "glapi/glapioffsets.h"
-#include "glapi/glapidispatch.h"
-
-#endif /* _DISPATCH_H */
diff --git a/src/mesa/glapi/gen/APPLE_object_purgeable.xml b/src/mesa/glapi/gen/APPLE_object_purgeable.xml
new file mode 100644
index 0000000000..62fa64ad21
--- /dev/null
+++ b/src/mesa/glapi/gen/APPLE_object_purgeable.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+<category name="GL_APPLE_object_purgeable" number="371">
+ <enum name="RELEASED_APPLE" value="0x8A19"/>
+ <enum name="VOLATILE_APPLE" value="0x8A1A"/>
+ <enum name="RETAINED_APPLE" value="0x8A1B"/>
+ <enum name="UNDEFINED_APPLE" value="0x8A1C"/>
+ <enum name="PURGEABLE_APPLE" count="1" value="0x8A1D">
+ <size name="GetObjectParameterivAPPLE" count="1" mode="get"/>
+ </enum>
+
+ <enum name="BUFFER_OBJECT_APPLE" value="0x85B3"/>
+
+ <function name="ObjectPurgeableAPPLE" offset="assign">
+ <param name="objectType" type="GLenum"/>
+ <param name="name" type="GLuint"/>
+ <param name="option" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="ObjectUnpurgeableAPPLE" offset="assign">
+ <param name="objectType" type="GLenum"/>
+ <param name="name" type="GLuint"/>
+ <param name="option" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="GetObjectParameterivAPPLE" offset="assign">
+ <param name="objectType" type="GLenum"/>
+ <param name="name" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="value" type="GLint *" output="true"/>
+ </function>
+</category>
+</OpenGLAPI>
diff --git a/src/mesa/glapi/APPLE_vertex_array_object.xml b/src/mesa/glapi/gen/APPLE_vertex_array_object.xml
index bd8427eaf6..bd8427eaf6 100644
--- a/src/mesa/glapi/APPLE_vertex_array_object.xml
+++ b/src/mesa/glapi/gen/APPLE_vertex_array_object.xml
diff --git a/src/mesa/glapi/ARB_copy_buffer.xml b/src/mesa/glapi/gen/ARB_copy_buffer.xml
index 719816d817..719816d817 100644
--- a/src/mesa/glapi/ARB_copy_buffer.xml
+++ b/src/mesa/glapi/gen/ARB_copy_buffer.xml
diff --git a/src/mesa/glapi/ARB_depth_clamp.xml b/src/mesa/glapi/gen/ARB_depth_clamp.xml
index 157c9a86b1..157c9a86b1 100644
--- a/src/mesa/glapi/ARB_depth_clamp.xml
+++ b/src/mesa/glapi/gen/ARB_depth_clamp.xml
diff --git a/src/mesa/glapi/ARB_draw_elements_base_vertex.xml b/src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml
index f4067f4c8d..f4067f4c8d 100644
--- a/src/mesa/glapi/ARB_draw_elements_base_vertex.xml
+++ b/src/mesa/glapi/gen/ARB_draw_elements_base_vertex.xml
diff --git a/src/mesa/glapi/ARB_framebuffer_object.xml b/src/mesa/glapi/gen/ARB_framebuffer_object.xml
index e6bdcd6e50..e6bdcd6e50 100644
--- a/src/mesa/glapi/ARB_framebuffer_object.xml
+++ b/src/mesa/glapi/gen/ARB_framebuffer_object.xml
diff --git a/src/mesa/glapi/ARB_map_buffer_range.xml b/src/mesa/glapi/gen/ARB_map_buffer_range.xml
index afcb9b6ba6..afcb9b6ba6 100644
--- a/src/mesa/glapi/ARB_map_buffer_range.xml
+++ b/src/mesa/glapi/gen/ARB_map_buffer_range.xml
diff --git a/src/mesa/glapi/ARB_seamless_cube_map.xml b/src/mesa/glapi/gen/ARB_seamless_cube_map.xml
index 3cdc84d2b9..3cdc84d2b9 100644
--- a/src/mesa/glapi/ARB_seamless_cube_map.xml
+++ b/src/mesa/glapi/gen/ARB_seamless_cube_map.xml
diff --git a/src/mesa/glapi/ARB_sync.xml b/src/mesa/glapi/gen/ARB_sync.xml
index 4e4eebac32..4e4eebac32 100644
--- a/src/mesa/glapi/ARB_sync.xml
+++ b/src/mesa/glapi/gen/ARB_sync.xml
diff --git a/src/mesa/glapi/ARB_vertex_array_object.xml b/src/mesa/glapi/gen/ARB_vertex_array_object.xml
index 3b4ab64f55..3b4ab64f55 100644
--- a/src/mesa/glapi/ARB_vertex_array_object.xml
+++ b/src/mesa/glapi/gen/ARB_vertex_array_object.xml
diff --git a/src/mesa/glapi/EXT_draw_buffers2.xml b/src/mesa/glapi/gen/EXT_draw_buffers2.xml
index efbe61f74e..efbe61f74e 100644
--- a/src/mesa/glapi/EXT_draw_buffers2.xml
+++ b/src/mesa/glapi/gen/EXT_draw_buffers2.xml
diff --git a/src/mesa/glapi/EXT_framebuffer_object.xml b/src/mesa/glapi/gen/EXT_framebuffer_object.xml
index 4f418f7b64..4f418f7b64 100644
--- a/src/mesa/glapi/EXT_framebuffer_object.xml
+++ b/src/mesa/glapi/gen/EXT_framebuffer_object.xml
diff --git a/src/mesa/glapi/EXT_packed_depth_stencil.xml b/src/mesa/glapi/gen/EXT_packed_depth_stencil.xml
index 5be810302f..5be810302f 100644
--- a/src/mesa/glapi/EXT_packed_depth_stencil.xml
+++ b/src/mesa/glapi/gen/EXT_packed_depth_stencil.xml
diff --git a/src/mesa/glapi/EXT_provoking_vertex.xml b/src/mesa/glapi/gen/EXT_provoking_vertex.xml
index 71d2c72909..71d2c72909 100644
--- a/src/mesa/glapi/EXT_provoking_vertex.xml
+++ b/src/mesa/glapi/gen/EXT_provoking_vertex.xml
diff --git a/src/mesa/glapi/EXT_texture_array.xml b/src/mesa/glapi/gen/EXT_texture_array.xml
index b5b8bd406f..b5b8bd406f 100644
--- a/src/mesa/glapi/EXT_texture_array.xml
+++ b/src/mesa/glapi/gen/EXT_texture_array.xml
diff --git a/src/mesa/glapi/gen/Makefile b/src/mesa/glapi/gen/Makefile
new file mode 100644
index 0000000000..8aa74ce434
--- /dev/null
+++ b/src/mesa/glapi/gen/Makefile
@@ -0,0 +1,203 @@
+# This file isn't used during a normal compilation since we don't want to
+# require Python in order to compile Mesa.
+# Instead, when the Mesa developers update/change the API interface it's
+# up to him/her to re-run this makefile and check in the newly generated files.
+
+
+TOP = ../../../..
+include $(TOP)/configs/current
+
+MESA_DIR = $(TOP)/src/mesa
+MESA_GLAPI_DIR = $(TOP)/src/mesa/glapi
+MESA_GLX_DIR = $(TOP)/src/glx
+
+MESA_GLAPI_OUTPUTS = \
+ $(MESA_GLAPI_DIR)/glprocs.h \
+ $(MESA_GLAPI_DIR)/glapitemp.h \
+ $(MESA_GLAPI_DIR)/glapioffsets.h \
+ $(MESA_GLAPI_DIR)/glapitable.h \
+ $(MESA_GLAPI_DIR)/glapidispatch.h
+
+MESA_GLAPI_ASM_OUTPUTS = \
+ $(MESA_DIR)/x86/glapi_x86.S \
+ $(MESA_DIR)/x86-64/glapi_x86-64.S \
+ $(MESA_DIR)/sparc/glapi_sparc.S
+
+MESA_OUTPUTS = \
+ $(MESA_GLAPI_OUTPUTS) \
+ $(MESA_GLAPI_ASM_OUTPUTS) \
+ $(MESA_DIR)/main/enums.c \
+ $(MESA_DIR)/main/remap_helper.h \
+ $(MESA_GLX_DIR)/indirect.c \
+ $(MESA_GLX_DIR)/indirect.h \
+ $(MESA_GLX_DIR)/indirect_init.c \
+ $(MESA_GLX_DIR)/indirect_size.h \
+ $(MESA_GLX_DIR)/indirect_size.c
+
+######################################################################
+
+XORG_GLX_DIR = $(XORG_BASE)/glx
+XORG_GLAPI_DIR = $(XORG_BASE)/glx/glapi
+
+XORG_GLAPI_FILES = \
+ $(XORG_GLAPI_DIR)/glapi.h \
+ $(XORG_GLAPI_DIR)/glapi.c \
+ $(XORG_GLAPI_DIR)/glapi_getproc.c \
+ $(XORG_GLAPI_DIR)/glapi_nop.c \
+ $(XORG_GLAPI_DIR)/glthread.c \
+ $(XORG_GLAPI_DIR)/glthread.h
+
+XORG_GLAPI_OUTPUTS = \
+ $(XORG_GLAPI_DIR)/glprocs.h \
+ $(XORG_GLAPI_DIR)/glapitemp.h \
+ $(XORG_GLAPI_DIR)/glapioffsets.h \
+ $(XORG_GLAPI_DIR)/glapitable.h \
+ $(XORG_GLAPI_DIR)/glapidispatch.h
+
+XORG_OUTPUTS = \
+ $(XORG_GLAPI_FILES) \
+ $(XORG_GLAPI_OUTPUTS) \
+ $(XORG_GLX_DIR)/indirect_dispatch.c \
+ $(XORG_GLX_DIR)/indirect_dispatch_swap.c \
+ $(XORG_GLX_DIR)/indirect_dispatch.h \
+ $(XORG_GLX_DIR)/indirect_reqsize.c \
+ $(XORG_GLX_DIR)/indirect_reqsize.h \
+ $(XORG_GLX_DIR)/indirect_size.h \
+ $(XORG_GLX_DIR)/indirect_size_get.c \
+ $(XORG_GLX_DIR)/indirect_size_get.h \
+ $(XORG_GLX_DIR)/indirect_table.c
+
+######################################################################
+
+API_XML = \
+ gl_API.xml \
+ ARB_copy_buffer.xml \
+ ARB_depth_clamp.xml \
+ ARB_draw_elements_base_vertex.xml \
+ ARB_framebuffer_object.xml \
+ ARB_map_buffer_range.xml \
+ ARB_seamless_cube_map.xml \
+ ARB_sync.xml \
+ ARB_vertex_array_object.xml \
+ APPLE_object_purgeable.xml \
+ APPLE_vertex_array_object.xml \
+ EXT_draw_buffers2.xml \
+ EXT_framebuffer_object.xml \
+ EXT_packed_depth_stencil.xml \
+ EXT_provoking_vertex.xml \
+ EXT_texture_array.xml \
+ NV_conditional_render.xml \
+ OES_EGL_image.xml
+
+COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py
+
+COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
+
+######################################################################
+
+all: mesa xorg
+
+mesa: $(MESA_OUTPUTS)
+
+xorg: check-xorg-source $(XORG_OUTPUTS)
+
+check-xorg-source:
+ @if ! test -d $(XORG_GLX_DIR); then \
+ echo "ERROR: Must specify path to xserver checkout; set XORG_BASE."; \
+ exit 1; \
+ fi
+
+clean:
+ -rm -f *~ *.pyo
+ -rm -f $(MESA_OUTPUTS)
+
+######################################################################
+
+$(XORG_GLAPI_DIR)/%.c: $(MESA_GLAPI_DIR)/%.c
+ cp $< $@
+
+$(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h
+ cp $< $@
+
+######################################################################
+
+$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_GLAPI_DIR)/glapioffsets.h: gl_offsets.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_GLAPI_DIR)/glapidispatch.h: gl_table.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
+
+######################################################################
+
+$(MESA_DIR)/x86/glapi_x86.S: gl_x86_asm.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_DIR)/x86-64/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_DIR)/sparc/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+######################################################################
+
+$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
+ $(PYTHON2) $(PYTHON_FLAGS) $< > $@
+
+######################################################################
+
+$(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
+
+$(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@
+
+$(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@
+
+$(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
+ | $(INDENT) $(INDENT_FLAGS) > $@
+
+$(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \
+ | $(INDENT) $(INDENT_FLAGS) > $@
+
+######################################################################
+
+$(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@
+
+$(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@
+
+$(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
+
+$(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
+ | $(INDENT) $(INDENT_FLAGS) > $@
+
+$(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
+
+$(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
+ | $(INDENT) $(INDENT_FLAGS) -l200 > $@
+
+$(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@
+
+$(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@
diff --git a/src/mesa/glapi/NV_conditional_render.xml b/src/mesa/glapi/gen/NV_conditional_render.xml
index 8bb31dd1fc..8bb31dd1fc 100644
--- a/src/mesa/glapi/NV_conditional_render.xml
+++ b/src/mesa/glapi/gen/NV_conditional_render.xml
diff --git a/src/mesa/glapi/gen/OES_EGL_image.xml b/src/mesa/glapi/gen/OES_EGL_image.xml
new file mode 100644
index 0000000000..1cb43d49a4
--- /dev/null
+++ b/src/mesa/glapi/gen/OES_EGL_image.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_OES_EGL_image">
+
+ <function name="EGLImageTargetTexture2DOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="writeOffset" type="GLvoid *"/>
+ </function>
+
+ <function name="EGLImageTargetRenderbufferStorageOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="writeOffset" type="GLvoid *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/glapi/extension_helper.py b/src/mesa/glapi/gen/extension_helper.py
index 83471d89f5..2c83b4e0d1 100644
--- a/src/mesa/glapi/extension_helper.py
+++ b/src/mesa/glapi/gen/extension_helper.py
@@ -151,7 +151,7 @@ class PrintGlExtensionGlue(gl_XML.gl_print_base):
def printRealHeader(self):
print '#include "utils.h"'
- print '#include "glapi/dispatch.h"'
+ print '#include "main/dispatch.h"'
print ''
return
diff --git a/src/mesa/glapi/glX_API.xml b/src/mesa/glapi/gen/glX_API.xml
index 9e02aa498e..9e02aa498e 100644
--- a/src/mesa/glapi/glX_API.xml
+++ b/src/mesa/glapi/gen/glX_API.xml
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/gen/glX_XML.py
index 4c2e0f95bf..4c2e0f95bf 100644
--- a/src/mesa/glapi/glX_XML.py
+++ b/src/mesa/glapi/gen/glX_XML.py
diff --git a/src/mesa/glapi/glX_doc.py b/src/mesa/glapi/gen/glX_doc.py
index e9fbbe6f16..e9fbbe6f16 100644
--- a/src/mesa/glapi/glX_doc.py
+++ b/src/mesa/glapi/gen/glX_doc.py
diff --git a/src/mesa/glapi/glX_proto_common.py b/src/mesa/glapi/gen/glX_proto_common.py
index 6f094e22b3..6f094e22b3 100644
--- a/src/mesa/glapi/glX_proto_common.py
+++ b/src/mesa/glapi/gen/glX_proto_common.py
diff --git a/src/mesa/glapi/glX_proto_recv.py b/src/mesa/glapi/gen/glX_proto_recv.py
index f423c6db08..31745fcef7 100644
--- a/src/mesa/glapi/glX_proto_recv.py
+++ b/src/mesa/glapi/gen/glX_proto_recv.py
@@ -92,7 +92,7 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
print '#include "glapi.h"'
print '#include "glapitable.h"'
print '#include "glthread.h"'
- print '#include "dispatch.h"'
+ print '#include "glapidispatch.h"'
print ''
print '#define __GLX_PAD(x) (((x) + 3) & ~3)'
print ''
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/gen/glX_proto_send.py
index daca1b767a..c52b85bfb4 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/gen/glX_proto_send.py
@@ -166,7 +166,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
print '#include "indirect.h"'
print '#include "glxclient.h"'
print '#include "indirect_size.h"'
- print '#include "dispatch.h"'
+ print '#include "glapidispatch.h"'
print '#include "glapi.h"'
print '#include "glthread.h"'
print '#include <GL/glxproto.h>'
@@ -182,7 +182,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto):
self.printFastcall()
self.printNoinline()
print ''
- print '#if !defined __GNUC__ || __GNUC__ < 3'
+ print '#ifndef __GNUC__'
print '# define __builtin_expect(x, y) x'
print '#endif'
print ''
diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/gen/glX_proto_size.py
index 95cb5110cc..95cb5110cc 100644
--- a/src/mesa/glapi/glX_proto_size.py
+++ b/src/mesa/glapi/gen/glX_proto_size.py
diff --git a/src/mesa/glapi/glX_server_table.py b/src/mesa/glapi/gen/glX_server_table.py
index f3962f875b..f3962f875b 100644
--- a/src/mesa/glapi/glX_server_table.py
+++ b/src/mesa/glapi/gen/glX_server_table.py
diff --git a/src/mesa/glapi/gl_API.dtd b/src/mesa/glapi/gen/gl_API.dtd
index 30c646c924..30c646c924 100644
--- a/src/mesa/glapi/gl_API.dtd
+++ b/src/mesa/glapi/gen/gl_API.dtd
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gen/gl_API.xml
index fbf8b0c3e4..4a4d0d5382 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gen/gl_API.xml
@@ -11978,6 +11978,7 @@
</function>
</category>
+<xi:include href="APPLE_object_purgeable.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<category name="GL_APPLE_ycbcr_422" number="275">
@@ -12502,4 +12503,6 @@
</function>
</category>
+<xi:include href="OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
</OpenGLAPI>
diff --git a/src/mesa/glapi/gl_SPARC_asm.py b/src/mesa/glapi/gen/gl_SPARC_asm.py
index 33e752df38..33e752df38 100644
--- a/src/mesa/glapi/gl_SPARC_asm.py
+++ b/src/mesa/glapi/gen/gl_SPARC_asm.py
diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gen/gl_XML.py
index a10a35e513..660c8cfb71 100644
--- a/src/mesa/glapi/gl_XML.py
+++ b/src/mesa/glapi/gen/gl_XML.py
@@ -184,7 +184,7 @@ class gl_print_base:
The name is also added to the file's undef_list.
"""
self.undef_list.append("PURE")
- print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+ print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -224,7 +224,7 @@ class gl_print_base:
"""
self.undef_list.append(S)
- print """# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+ print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define %s __attribute__((visibility("%s")))
# else
# define %s
diff --git a/src/mesa/glapi/gl_and_glX_API.xml b/src/mesa/glapi/gen/gl_and_glX_API.xml
index 34c977e9c0..34c977e9c0 100644
--- a/src/mesa/glapi/gl_and_glX_API.xml
+++ b/src/mesa/glapi/gen/gl_and_glX_API.xml
diff --git a/src/mesa/glapi/gl_apitemp.py b/src/mesa/glapi/gen/gl_apitemp.py
index 41a40fbeb6..41a40fbeb6 100644
--- a/src/mesa/glapi/gl_apitemp.py
+++ b/src/mesa/glapi/gen/gl_apitemp.py
diff --git a/src/mesa/glapi/gl_enums.py b/src/mesa/glapi/gen/gl_enums.py
index acaa06ab37..3a9ea3c86c 100644
--- a/src/mesa/glapi/gl_enums.py
+++ b/src/mesa/glapi/gen/gl_enums.py
@@ -70,7 +70,7 @@ typedef int (*cfunc)(const void *, const void *);
*/
static int compar_name( const char *a, const enum_elt *b )
{
- return _mesa_strcmp( a, & enum_string_table[ b->offset ] );
+ return strcmp( a, & enum_string_table[ b->offset ] );
}
/**
@@ -105,7 +105,7 @@ const char *_mesa_lookup_enum_by_nr( int nr )
}
else {
/* this is not re-entrant safe, no big deal here */
- _mesa_sprintf(token_tmp, "0x%x", nr);
+ sprintf(token_tmp, "0x%x", nr);
return token_tmp;
}
}
diff --git a/src/mesa/glapi/gl_offsets.py b/src/mesa/glapi/gen/gl_offsets.py
index 54867b3463..54867b3463 100644
--- a/src/mesa/glapi/gl_offsets.py
+++ b/src/mesa/glapi/gen/gl_offsets.py
diff --git a/src/mesa/glapi/gl_procs.py b/src/mesa/glapi/gen/gl_procs.py
index 5de61fbdfe..5de61fbdfe 100644
--- a/src/mesa/glapi/gl_procs.py
+++ b/src/mesa/glapi/gen/gl_procs.py
diff --git a/src/mesa/glapi/gl_table.py b/src/mesa/glapi/gen/gl_table.py
index 3bd7569e92..3bd7569e92 100644
--- a/src/mesa/glapi/gl_table.py
+++ b/src/mesa/glapi/gen/gl_table.py
diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gen/gl_x86-64_asm.py
index 31c1a2b93a..e6e78c42f3 100644
--- a/src/mesa/glapi/gl_x86-64_asm.py
+++ b/src/mesa/glapi/gen/gl_x86-64_asm.py
@@ -124,7 +124,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print ''
print '#include "x86/assyntax.h"'
print ''
- print '#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303'
+ print '#ifdef __GNUC__'
print '# pragma GCC visibility push(default)'
print '# define HIDDEN(x) .hidden x'
print '#else'
@@ -138,7 +138,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))'
print '# endif'
print ''
- print '#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gen/gl_x86_asm.py
index d210f3a248..a48724ee61 100644
--- a/src/mesa/glapi/gl_x86_asm.py
+++ b/src/mesa/glapi/gen/gl_x86_asm.py
@@ -79,7 +79,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print '#define GLOBL_FN(x) GLOBL x'
print '#endif'
print ''
- print '#if defined(PTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
diff --git a/src/mesa/glapi/license.py b/src/mesa/glapi/gen/license.py
index 02181648e4..02181648e4 100644
--- a/src/mesa/glapi/license.py
+++ b/src/mesa/glapi/gen/license.py
diff --git a/src/mesa/glapi/mesadef.py b/src/mesa/glapi/gen/mesadef.py
index 342c9cde46..38b0246ba5 100644
--- a/src/mesa/glapi/mesadef.py
+++ b/src/mesa/glapi/gen/mesadef.py
@@ -113,8 +113,6 @@ def PrintTail():
print '\t_mesa_buffer_data'
print '\t_mesa_buffer_map'
print '\t_mesa_buffer_subdata'
- print '\t_mesa_bzero'
- print '\t_mesa_calloc'
print '\t_mesa_choose_tex_format'
print '\t_mesa_compressed_texture_size'
print '\t_mesa_create_framebuffer'
@@ -128,14 +126,11 @@ def PrintTail():
print '\t_mesa_enable_1_5_extensions'
print '\t_mesa_enable_sw_extensions'
print '\t_mesa_error'
- print '\t_mesa_free'
print '\t_mesa_free_context_data'
print '\t_mesa_get_current_context'
print '\t_mesa_init_default_imports'
print '\t_mesa_initialize_context'
print '\t_mesa_make_current'
- print '\t_mesa_memcpy'
- print '\t_mesa_memset'
print '\t_mesa_new_buffer_object'
print '\t_mesa_new_texture_object'
print '\t_mesa_problem'
@@ -152,7 +147,6 @@ def PrintTail():
print '\t_mesa_store_texsubimage1d'
print '\t_mesa_store_texsubimage2d'
print '\t_mesa_store_texsubimage3d'
- print '\t_mesa_strcmp'
print '\t_mesa_test_proxy_teximage'
print '\t_mesa_Viewport'
print '\t_mesa_meta_CopyColorSubTable'
diff --git a/src/mesa/glapi/next_available_offset.sh b/src/mesa/glapi/gen/next_available_offset.sh
index e7d6c2f4af..e7d6c2f4af 100755
--- a/src/mesa/glapi/next_available_offset.sh
+++ b/src/mesa/glapi/gen/next_available_offset.sh
diff --git a/src/mesa/glapi/remap_helper.py b/src/mesa/glapi/gen/remap_helper.py
index d93c7a4285..8b50526d2b 100644
--- a/src/mesa/glapi/remap_helper.py
+++ b/src/mesa/glapi/gen/remap_helper.py
@@ -64,7 +64,7 @@ class PrintGlRemap(gl_XML.gl_print_base):
def printRealHeader(self):
- print '#include "glapi/dispatch.h"'
+ print '#include "main/dispatch.h"'
print ''
return
diff --git a/src/mesa/glapi/typeexpr.py b/src/mesa/glapi/gen/typeexpr.py
index 8ba7de4862..8ba7de4862 100644
--- a/src/mesa/glapi/typeexpr.py
+++ b/src/mesa/glapi/gen/typeexpr.py
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 469523d57c..ce85cf6a87 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -51,27 +51,15 @@
#ifdef HAVE_DIX_CONFIG_H
-
#include <dix-config.h>
-#define PUBLIC
-
+#include "glapi/mesa.h"
#else
-
#include "main/glheader.h"
-
-#endif
-
#include "main/compiler.h"
-
-#include <stdlib.h>
-#include <string.h>
-#ifdef DEBUG
-#include <assert.h>
#endif
#include "glapi/glapi.h"
-#include "glapi/glapioffsets.h"
-#include "glapi/glapitable.h"
+#include "glapi/glapi_priv.h"
extern _glapi_proc __glapi_noop_table[];
@@ -117,39 +105,23 @@ PUBLIC __thread void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
+
PUBLIC const void *_glapi_Context = NULL;
#else
#if defined(THREADS)
-#ifdef WIN32_THREADS
-/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
-#define CHECK_MULTITHREAD_LOCK()
-#define CHECK_MULTITHREAD_UNLOCK()
-#else
-_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
-#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
-#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
-#endif
-
static GLboolean ThreadSafe = GL_FALSE; /**< In thread-safe mode? */
+
_glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */
-static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
-#if defined(WIN32_THREADS)
-void FreeTSD(_glthread_TSD *p);
-void FreeAllTSD(void)
-{
- FreeTSD(&_gl_DispatchTSD);
- FreeTSD(&ContextTSD);
-}
-#endif /* defined(WIN32_THREADS) */
+static _glthread_TSD ContextTSD; /**< Per-thread context pointer */
#endif /* defined(THREADS) */
-PUBLIC struct _glapi_table *_glapi_Dispatch =
- (struct _glapi_table *) __glapi_noop_table;
+PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table;
+
PUBLIC void *_glapi_Context = NULL;
#endif /* defined(GLX_USE_TLS) */
@@ -157,6 +129,36 @@ PUBLIC void *_glapi_Context = NULL;
+#if defined(THREADS) && !defined(GLX_USE_TLS)
+
+void
+_glapi_init_multithread(void)
+{
+ _glthread_InitTSD(&_gl_DispatchTSD);
+ _glthread_InitTSD(&ContextTSD);
+}
+
+void
+_glapi_destroy_multithread(void)
+{
+#ifdef WIN32_THREADS
+ _glthread_DestroyTSD(&_gl_DispatchTSD);
+ _glthread_DestroyTSD(&ContextTSD);
+#endif
+}
+
+/**
+ * Mutex for multithread check.
+ */
+#ifdef WIN32_THREADS
+/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
+#define CHECK_MULTITHREAD_LOCK()
+#define CHECK_MULTITHREAD_UNLOCK()
+#else
+_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex);
+#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex)
+#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex)
+#endif
/**
* We should call this periodically from a function such as glXMakeCurrent
@@ -165,7 +167,6 @@ PUBLIC void *_glapi_Context = NULL;
PUBLIC void
_glapi_check_multithread(void)
{
-#if defined(THREADS) && !defined(GLX_USE_TLS)
static unsigned long knownID;
static GLboolean firstCall = GL_TRUE;
@@ -174,9 +175,7 @@ _glapi_check_multithread(void)
CHECK_MULTITHREAD_LOCK();
if (firstCall) {
- /* initialize TSDs */
- (void) _glthread_GetTSD(&ContextTSD);
- (void) _glthread_GetTSD(&_gl_DispatchTSD);
+ _glapi_init_multithread();
knownID = _glthread_GetID();
firstCall = GL_FALSE;
@@ -187,9 +186,21 @@ _glapi_check_multithread(void)
_glapi_set_context(NULL);
}
CHECK_MULTITHREAD_UNLOCK();
-#endif
}
+#else
+
+void
+_glapi_init_multithread(void) { }
+
+void
+_glapi_destroy_multithread(void) { }
+
+PUBLIC void
+_glapi_check_multithread(void) { }
+
+#endif
+
/**
@@ -223,198 +234,12 @@ _glapi_get_context(void)
#if defined(GLX_USE_TLS)
return _glapi_tls_Context;
#elif defined(THREADS)
- if (ThreadSafe) {
- return _glthread_GetTSD(&ContextTSD);
- }
- else {
- return _glapi_Context;
- }
+ return (ThreadSafe) ? _glthread_GetTSD(&ContextTSD) : _glapi_Context;
#else
return _glapi_Context;
#endif
}
-#ifdef USE_X86_ASM
-
-#if defined( GLX_USE_TLS )
-extern GLubyte gl_dispatch_functions_start[];
-extern GLubyte gl_dispatch_functions_end[];
-#else
-extern const GLubyte gl_dispatch_functions_start[];
-#endif
-
-#endif /* USE_X86_ASM */
-
-
-#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-#elif defined(USE_X86_ASM)
-# if defined(THREADS) && !defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 32
-# else
-# define DISPATCH_FUNCTION_SIZE 16
-# endif
-#endif
-
-#ifdef USE_SPARC_ASM
-#ifdef GLX_USE_TLS
-extern unsigned int __glapi_sparc_tls_stub;
-#else
-extern unsigned int __glapi_sparc_pthread_stub;
-#endif
-#endif
-
-#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
-# define NEED_FUNCTION_POINTER
-#endif
-
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
-/**
- * Perform platform-specific GL API entry-point fixups.
- */
-static void
-init_glapi_relocs( void )
-{
-#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
- extern unsigned long _x86_get_dispatch(void);
- char run_time_patch[] = {
- 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
- };
- GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
- const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
- GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
-
- *offset = _x86_get_dispatch();
- while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
- (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
- curr_func += DISPATCH_FUNCTION_SIZE;
- }
-#endif
-#ifdef USE_SPARC_ASM
- extern void __glapi_sparc_icache_flush(unsigned int *);
- static const unsigned int template[] = {
-#ifdef GLX_USE_TLS
- 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
- 0x8730e00a, /* srl %g3, 10, %g3 */
- 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
-#ifdef __arch64__
- 0xc259c002, /* ldx [%g7 + %g2], %g1 */
- 0xc2584003, /* ldx [%g1 + %g3], %g1 */
-#else
- 0xc201c002, /* ld [%g7 + %g2], %g1 */
- 0xc2004003, /* ld [%g1 + %g3], %g1 */
-#endif
- 0x81c04000, /* jmp %g1 */
- 0x01000000, /* nop */
-#else
-#ifdef __arch64__
- 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
- 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
- 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
- 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
- 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
- 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
- 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
-#else
- 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
- 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
- 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
-#endif
- 0x80a06000, /* --> cmp %g1, 0 */
- 0x02800005, /* --> be +4*5 */
- 0x01000000, /* --> nop */
-#ifdef __arch64__
- 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
-#else
- 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
-#endif
- 0x81c04000, /* --> jmp %g1 */
- 0x01000000, /* --> nop */
-#ifdef __arch64__
- 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
-#else
- 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
-#endif
- 0xa0100003, /* --> mov %g3, %l0 */
- 0x40000000, /* --> call _glapi_get_dispatch */
- 0x01000000, /* --> nop */
- 0x82100008, /* --> mov %o0, %g1 */
- 0x86100010, /* --> mov %l0, %g3 */
- 0x10bffff7, /* --> ba -4*9 */
- 0x81e80000, /* --> restore */
-#endif
- };
-#ifdef GLX_USE_TLS
- extern unsigned long __glapi_sparc_get_dispatch(void);
- unsigned int *code = &__glapi_sparc_tls_stub;
- unsigned long dispatch = __glapi_sparc_get_dispatch();
-#else
- unsigned int *code = &__glapi_sparc_pthread_stub;
- unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
- unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
- int idx;
-#endif
-
-#if defined(GLX_USE_TLS)
- code[0] = template[0] | (dispatch >> 10);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | (dispatch & 0x3ff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- code[4] = template[4];
- code[5] = template[5];
- __glapi_sparc_icache_flush(&code[4]);
- code[6] = template[6];
- __glapi_sparc_icache_flush(&code[6]);
-#else
-#if defined(__arch64__)
- code[0] = template[0] | (dispatch >> (32 + 10));
- code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- code[4] = template[4];
- code[5] = template[5];
- __glapi_sparc_icache_flush(&code[4]);
- code[6] = template[6] | (dispatch & 0x3ff);
- idx = 7;
-#else
- code[0] = template[0] | (dispatch >> 10);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] | (dispatch & 0x3ff);
- idx = 3;
-#endif
- code[idx + 0] = template[idx + 0];
- __glapi_sparc_icache_flush(&code[idx - 1]);
- code[idx + 1] = template[idx + 1];
- code[idx + 2] = template[idx + 2];
- __glapi_sparc_icache_flush(&code[idx + 1]);
- code[idx + 3] = template[idx + 3];
- code[idx + 4] = template[idx + 4];
- __glapi_sparc_icache_flush(&code[idx + 3]);
- code[idx + 5] = template[idx + 5];
- code[idx + 6] = template[idx + 6];
- __glapi_sparc_icache_flush(&code[idx + 5]);
- code[idx + 7] = template[idx + 7];
- code[idx + 8] = template[idx + 8] |
- (((call_dest - ((unsigned long) &code[idx + 8]))
- >> 2) & 0x3fffffff);
- __glapi_sparc_icache_flush(&code[idx + 7]);
- code[idx + 9] = template[idx + 9];
- code[idx + 10] = template[idx + 10];
- __glapi_sparc_icache_flush(&code[idx + 9]);
- code[idx + 11] = template[idx + 11];
- code[idx + 12] = template[idx + 12];
- __glapi_sparc_icache_flush(&code[idx + 11]);
- code[idx + 13] = template[idx + 13];
- __glapi_sparc_icache_flush(&code[idx + 13]);
-#endif
-#endif
-}
-#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */
/**
@@ -425,17 +250,15 @@ init_glapi_relocs( void )
PUBLIC void
_glapi_set_dispatch(struct _glapi_table *dispatch)
{
-#if defined(PTHREADS) || defined(GLX_USE_TLS)
- static pthread_once_t once_control = PTHREAD_ONCE_INIT;
- pthread_once( & once_control, init_glapi_relocs );
-#endif
+ init_glapi_relocs_once();
- if (!dispatch) {
+ if (dispatch == NULL) {
/* use the no-op functions */
dispatch = (struct _glapi_table *) __glapi_noop_table;
}
#ifdef DEBUG
else {
+ _glapi_check_table_not_null(dispatch);
_glapi_check_table(dispatch);
}
#endif
@@ -445,9 +268,9 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
#elif defined(THREADS)
_glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch);
_glapi_Dispatch = (ThreadSafe) ? NULL : dispatch;
-#else /*THREADS*/
+#else
_glapi_Dispatch = dispatch;
-#endif /*THREADS*/
+#endif
}
@@ -458,117 +281,13 @@ _glapi_set_dispatch(struct _glapi_table *dispatch)
PUBLIC struct _glapi_table *
_glapi_get_dispatch(void)
{
- struct _glapi_table * api;
#if defined(GLX_USE_TLS)
- api = _glapi_tls_Dispatch;
+ return _glapi_tls_Dispatch;
#elif defined(THREADS)
- api = (ThreadSafe)
+ return (ThreadSafe)
? (struct _glapi_table *) _glthread_GetTSD(&_gl_DispatchTSD)
: _glapi_Dispatch;
#else
- api = _glapi_Dispatch;
-#endif
- return api;
-}
-
-
-
-
-/*
- * The dispatch table size (number of entries) is the size of the
- * _glapi_table struct plus the number of dynamic entries we can add.
- * The extra slots can be filled in by DRI drivers that register new extension
- * functions.
- */
-#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)
-
-
-/**
- * Return size of dispatch table struct as number of functions (or
- * slots).
- */
-PUBLIC GLuint
-_glapi_get_dispatch_table_size(void)
-{
- return DISPATCH_TABLE_SIZE;
-}
-
-
-/**
- * Make sure there are no NULL pointers in the given dispatch table.
- * Intended for debugging purposes.
- */
-void
-_glapi_check_table(const struct _glapi_table *table)
-{
-#ifdef EXTRA_DEBUG
- const GLuint entries = _glapi_get_dispatch_table_size();
- const void **tab = (const void **) table;
- GLuint i;
- for (i = 1; i < entries; i++) {
- assert(tab[i]);
- }
-
- /* Do some spot checks to be sure that the dispatch table
- * slots are assigned correctly.
- */
- {
- GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
- char *BeginFunc = (char*) &table->Begin;
- GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
- assert(BeginOffset == _gloffset_Begin);
- assert(BeginOffset == offset);
- }
- {
- GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
- char *viewportFunc = (char*) &table->Viewport;
- GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
- assert(viewportOffset == _gloffset_Viewport);
- assert(viewportOffset == offset);
- }
- {
- GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
- char *VertexPointerFunc = (char*) &table->VertexPointer;
- GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
- assert(VertexPointerOffset == _gloffset_VertexPointer);
- assert(VertexPointerOffset == offset);
- }
- {
- GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
- char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
- GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
- assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
- assert(ResetMinMaxOffset == offset);
- }
- {
- GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
- char *blendColorFunc = (char*) &table->BlendColor;
- GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
- assert(blendColorOffset == _gloffset_BlendColor);
- assert(blendColorOffset == offset);
- }
- {
- GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
- char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
- GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
- assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
- assert(secondaryColor3fOffset == offset);
- }
- {
- GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV");
- char *pointParameterivFunc = (char*) &table->PointParameterivNV;
- GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
- assert(pointParameterivOffset == _gloffset_PointParameterivNV);
- assert(pointParameterivOffset == offset);
- }
- {
- GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
- char *setFenceFunc = (char*) &table->SetFenceNV;
- GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
- assert(setFenceOffset == _gloffset_SetFenceNV);
- assert(setFenceOffset == offset);
- }
-#else
- (void) table;
+ return _glapi_Dispatch;
#endif
}
diff --git a/src/mesa/glapi/glapi.h b/src/mesa/glapi/glapi.h
index f802a61d3b..7dcf2e8910 100644
--- a/src/mesa/glapi/glapi.h
+++ b/src/mesa/glapi/glapi.h
@@ -44,8 +44,6 @@
#ifndef _GLAPI_H
#define _GLAPI_H
-#define GL_GLEXT_PROTOTYPES
-
#include "glthread.h"
@@ -59,40 +57,61 @@ typedef void (*_glapi_proc)(void); /* generic function pointer */
#define _glapi_get_dispatch _mglapi_get_dispatch
#define _glapi_set_context _mglapi_set_context
#define _glapi_get_context _mglapi_get_context
-#define _glapi_Context _mglapi_Context
#define _glapi_Dispatch _mglapi_Dispatch
+#define _glapi_Context _mglapi_Context
#endif
-/*
- * Number of extension functions which we can dynamically add at runtime.
- */
-#define MAX_EXTENSION_FUNCS 300
+#if defined(__GNUC__)
+# define likely(x) __builtin_expect(!!(x), 1)
+# define unlikely(x) __builtin_expect(!!(x), 0)
+#else
+# define likely(x) (x)
+# define unlikely(x) (x)
+#endif
/**
- ** Define the GET_CURRENT_CONTEXT() macro.
+ ** Define the GET_DISPATCH() and GET_CURRENT_CONTEXT() macros.
+ **
** \param C local variable which will hold the current context.
**/
#if defined (GLX_USE_TLS)
-extern const void *_glapi_Context;
extern const struct _glapi_table *_glapi_Dispatch;
+extern const void *_glapi_Context;
+
+extern __thread struct _glapi_table * _glapi_tls_Dispatch
+ __attribute__((tls_model("initial-exec")));
+
extern __thread void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
+# define GET_DISPATCH() _glapi_tls_Dispatch
+
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
#else
-extern void *_glapi_Context;
extern struct _glapi_table *_glapi_Dispatch;
+extern void *_glapi_Context;
+
# ifdef THREADS
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
+
+# define GET_DISPATCH() \
+ (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch())
+
+# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) \
+ (likely(_glapi_Context) ? _glapi_Context : _glapi_get_context())
+
# else
+
+# define GET_DISPATCH() _glapi_Dispatch
+
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
+
# endif
#endif /* defined (GLX_USE_TLS) */
@@ -103,6 +122,14 @@ extern struct _glapi_table *_glapi_Dispatch;
**/
extern void
+_glapi_init_multithread(void);
+
+
+extern void
+_glapi_destroy_multithread(void);
+
+
+extern void
_glapi_check_multithread(void);
@@ -122,26 +149,10 @@ extern struct _glapi_table *
_glapi_get_dispatch(void);
-extern int
-_glapi_begin_dispatch_override(struct _glapi_table *override);
-
-
-extern void
-_glapi_end_dispatch_override(int layer);
-
-
-struct _glapi_table *
-_glapi_get_override_dispatch(int layer);
-
-
extern unsigned int
_glapi_get_dispatch_table_size(void);
-extern void
-_glapi_check_table(const struct _glapi_table *table);
-
-
extern int
_glapi_add_dispatch( const char * const * function_names,
const char * parameter_signature );
diff --git a/src/mesa/glapi/glapi_dispatch.c b/src/mesa/glapi/glapi_dispatch.c
new file mode 100644
index 0000000000..32b9535e3f
--- /dev/null
+++ b/src/mesa/glapi/glapi_dispatch.c
@@ -0,0 +1,102 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.3
+ *
+ * Copyright (C) 1999-2004 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"),
+ * 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 glapi_dispatch.c
+ *
+ * This file generates all the gl* function entrypoints. This code is not
+ * used if optimized assembly stubs are available (e.g., using x86/glapi_x86.S
+ * on IA32 or sparc/glapi_sparc.S on SPARC).
+ *
+ * \note
+ * This file is also used to build the client-side libGL that loads DRI-based
+ * device drivers. At build-time it is symlinked to src/glx.
+ *
+ * \author Brian Paul <brian@precisioninsight.com>
+ */
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#include "glapi/mesa.h"
+#else
+#include "main/glheader.h"
+#include "main/compiler.h"
+#endif
+
+#include "glapi/glapi.h"
+#include "glapi/glapitable.h"
+#include "glapi/glapidispatch.h"
+#include "glapi/glthread.h"
+
+
+#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM))
+
+#if defined(WIN32)
+#define KEYWORD1 GLAPI
+#else
+#define KEYWORD1 PUBLIC
+#endif
+
+#define KEYWORD2 GLAPIENTRY
+
+#if defined(USE_MGL_NAMESPACE)
+#define NAME(func) mgl##func
+#else
+#define NAME(func) gl##func
+#endif
+
+#if 0 /* Use this to log GL calls to stdout (for DEBUG only!) */
+
+#define F stdout
+#define DISPATCH(FUNC, ARGS, MESSAGE) \
+ fprintf MESSAGE; \
+ CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
+ fprintf MESSAGE; \
+ return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+#else
+
+#define DISPATCH(FUNC, ARGS, MESSAGE) \
+ CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
+ return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+#endif /* logging */
+
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifdef GLX_INDIRECT_RENDERING
+/* those link to libglapi.a should provide the entry points */
+#define _GLAPI_SKIP_PROTO_ENTRY_POINTS
+#endif
+#include "glapi/glapitemp.h"
+
+#endif /* USE_X86_ASM */
diff --git a/src/mesa/glapi/glapi_entrypoint.c b/src/mesa/glapi/glapi_entrypoint.c
new file mode 100644
index 0000000000..5e6e5995f2
--- /dev/null
+++ b/src/mesa/glapi/glapi_entrypoint.c
@@ -0,0 +1,331 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * 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"),
+ * 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 glapi_entrypoint.c
+ *
+ * Arch-specific code for manipulating GL API entrypoints (dispatch stubs).
+ */
+
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#include "glapi/mesa.h"
+#else
+#include "main/glheader.h"
+#include "main/compiler.h"
+#endif
+
+#include "glapi/glapi.h"
+#include "glapi/glapi_priv.h"
+
+
+#ifdef USE_X86_ASM
+
+#if defined( GLX_USE_TLS )
+extern GLubyte gl_dispatch_functions_start[];
+extern GLubyte gl_dispatch_functions_end[];
+#else
+extern const GLubyte gl_dispatch_functions_start[];
+#endif
+
+#endif /* USE_X86_ASM */
+
+
+#if defined(DISPATCH_FUNCTION_SIZE)
+
+_glapi_proc
+get_entrypoint_address(GLuint functionOffset)
+{
+ return (_glapi_proc) (gl_dispatch_functions_start
+ + (DISPATCH_FUNCTION_SIZE * functionOffset));
+}
+
+#endif
+
+
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+
+/**
+ * Perform platform-specific GL API entry-point fixups.
+ */
+static void
+init_glapi_relocs( void )
+{
+#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT)
+ extern unsigned long _x86_get_dispatch(void);
+ char run_time_patch[] = {
+ 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */
+ };
+ GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */
+ const GLubyte * const get_disp = (const GLubyte *) run_time_patch;
+ GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start;
+
+ *offset = _x86_get_dispatch();
+ while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) {
+ (void) memcpy( curr_func, get_disp, sizeof(run_time_patch));
+ curr_func += DISPATCH_FUNCTION_SIZE;
+ }
+#endif
+#ifdef USE_SPARC_ASM
+ extern void __glapi_sparc_icache_flush(unsigned int *);
+ static const unsigned int template[] = {
+#ifdef GLX_USE_TLS
+ 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
+ 0x8730e00a, /* srl %g3, 10, %g3 */
+ 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
+#ifdef __arch64__
+ 0xc259c002, /* ldx [%g7 + %g2], %g1 */
+ 0xc2584003, /* ldx [%g1 + %g3], %g1 */
+#else
+ 0xc201c002, /* ld [%g7 + %g2], %g1 */
+ 0xc2004003, /* ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* jmp %g1 */
+ 0x01000000, /* nop */
+#else
+#ifdef __arch64__
+ 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */
+ 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */
+ 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */
+ 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */
+ 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */
+ 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#else
+ 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */
+ 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */
+ 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */
+#endif
+ 0x80a06000, /* --> cmp %g1, 0 */
+ 0x02800005, /* --> be +4*5 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */
+#else
+ 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */
+#endif
+ 0x81c04000, /* --> jmp %g1 */
+ 0x01000000, /* --> nop */
+#ifdef __arch64__
+ 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */
+#else
+ 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */
+#endif
+ 0xa0100003, /* --> mov %g3, %l0 */
+ 0x40000000, /* --> call _glapi_get_dispatch */
+ 0x01000000, /* --> nop */
+ 0x82100008, /* --> mov %o0, %g1 */
+ 0x86100010, /* --> mov %l0, %g3 */
+ 0x10bffff7, /* --> ba -4*9 */
+ 0x81e80000, /* --> restore */
+#endif
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ extern unsigned long __glapi_sparc_get_dispatch(void);
+ unsigned int *code = &__glapi_sparc_tls_stub;
+ unsigned long dispatch = __glapi_sparc_get_dispatch();
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned int *code = &__glapi_sparc_pthread_stub;
+ unsigned long dispatch = (unsigned long) &_glapi_Dispatch;
+ unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch;
+ int idx;
+#endif
+
+#if defined(GLX_USE_TLS)
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6];
+ __glapi_sparc_icache_flush(&code[6]);
+#else
+#if defined(__arch64__)
+ code[0] = template[0] | (dispatch >> (32 + 10));
+ code[1] = template[1] | ((dispatch & 0xffffffff) >> 10);
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | ((dispatch >> 32) & 0x3ff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ code[4] = template[4];
+ code[5] = template[5];
+ __glapi_sparc_icache_flush(&code[4]);
+ code[6] = template[6] | (dispatch & 0x3ff);
+ idx = 7;
+#else
+ code[0] = template[0] | (dispatch >> 10);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] | (dispatch & 0x3ff);
+ idx = 3;
+#endif
+ code[idx + 0] = template[idx + 0];
+ __glapi_sparc_icache_flush(&code[idx - 1]);
+ code[idx + 1] = template[idx + 1];
+ code[idx + 2] = template[idx + 2];
+ __glapi_sparc_icache_flush(&code[idx + 1]);
+ code[idx + 3] = template[idx + 3];
+ code[idx + 4] = template[idx + 4];
+ __glapi_sparc_icache_flush(&code[idx + 3]);
+ code[idx + 5] = template[idx + 5];
+ code[idx + 6] = template[idx + 6];
+ __glapi_sparc_icache_flush(&code[idx + 5]);
+ code[idx + 7] = template[idx + 7];
+ code[idx + 8] = template[idx + 8] |
+ (((call_dest - ((unsigned long) &code[idx + 8]))
+ >> 2) & 0x3fffffff);
+ __glapi_sparc_icache_flush(&code[idx + 7]);
+ code[idx + 9] = template[idx + 9];
+ code[idx + 10] = template[idx + 10];
+ __glapi_sparc_icache_flush(&code[idx + 9]);
+ code[idx + 11] = template[idx + 11];
+ code[idx + 12] = template[idx + 12];
+ __glapi_sparc_icache_flush(&code[idx + 11]);
+ code[idx + 13] = template[idx + 13];
+ __glapi_sparc_icache_flush(&code[idx + 13]);
+#endif
+#endif
+}
+
+void
+init_glapi_relocs_once( void )
+{
+ static pthread_once_t once_control = PTHREAD_ONCE_INIT;
+ pthread_once( & once_control, init_glapi_relocs );
+}
+
+#else
+
+void
+init_glapi_relocs_once( void ) { }
+
+#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */
+
+
+#ifdef USE_SPARC_ASM
+extern void __glapi_sparc_icache_flush(unsigned int *);
+#endif
+
+/**
+ * Generate a dispatch function (entrypoint) which jumps through
+ * the given slot number (offset) in the current dispatch table.
+ * We need assembly language in order to accomplish this.
+ */
+_glapi_proc
+generate_entrypoint(GLuint functionOffset)
+{
+#if defined(USE_X86_ASM)
+ /* 32 is chosen as something of a magic offset. For x86, the dispatch
+ * at offset 32 is the first one where the offset in the
+ * "jmp OFFSET*4(%eax)" can't be encoded in a single byte.
+ */
+ const GLubyte * const template_func = gl_dispatch_functions_start
+ + (DISPATCH_FUNCTION_SIZE * 32);
+ GLubyte * const code = (GLubyte *) malloc(DISPATCH_FUNCTION_SIZE);
+
+
+ if ( code != NULL ) {
+ (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE);
+ fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset );
+ }
+
+ return (_glapi_proc) code;
+#elif defined(USE_SPARC_ASM)
+
+#if defined(PTHREADS) || defined(GLX_USE_TLS)
+ static const unsigned int template[] = {
+ 0x07000000, /* sethi %hi(0), %g3 */
+ 0x8210000f, /* mov %o7, %g1 */
+ 0x40000000, /* call */
+ 0x9e100001, /* mov %g1, %o7 */
+ };
+#ifdef GLX_USE_TLS
+ extern unsigned int __glapi_sparc_tls_stub;
+ unsigned long call_dest = (unsigned long ) &__glapi_sparc_tls_stub;
+#else
+ extern unsigned int __glapi_sparc_pthread_stub;
+ unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub;
+#endif
+ unsigned int *code = (unsigned int *) malloc(sizeof(template));
+ if (code) {
+ code[0] = template[0] | (functionOffset & 0x3fffff);
+ code[1] = template[1];
+ __glapi_sparc_icache_flush(&code[0]);
+ code[2] = template[2] |
+ (((call_dest - ((unsigned long) &code[2]))
+ >> 2) & 0x3fffffff);
+ code[3] = template[3];
+ __glapi_sparc_icache_flush(&code[2]);
+ }
+ return (_glapi_proc) code;
+#endif
+
+#else
+ (void) functionOffset;
+ return NULL;
+#endif /* USE_*_ASM */
+}
+
+
+/**
+ * This function inserts a new dispatch offset into the assembly language
+ * stub that was generated with the preceeding function.
+ */
+void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+{
+#if defined(USE_X86_ASM)
+ GLubyte * const code = (GLubyte *) entrypoint;
+
+#if DISPATCH_FUNCTION_SIZE == 32
+ *((unsigned int *)(code + 11)) = 4 * offset;
+ *((unsigned int *)(code + 22)) = 4 * offset;
+#elif DISPATCH_FUNCTION_SIZE == 16 && defined( GLX_USE_TLS )
+ *((unsigned int *)(code + 8)) = 4 * offset;
+#elif DISPATCH_FUNCTION_SIZE == 16
+ *((unsigned int *)(code + 7)) = 4 * offset;
+#else
+# error Invalid DISPATCH_FUNCTION_SIZE!
+#endif
+
+#elif defined(USE_SPARC_ASM)
+ unsigned int *code = (unsigned int *) entrypoint;
+ code[0] &= ~0x3fffff;
+ code[0] |= (offset * sizeof(void *)) & 0x3fffff;
+ __glapi_sparc_icache_flush(&code[0]);
+#else
+
+ /* an unimplemented architecture */
+ (void) entrypoint;
+ (void) offset;
+
+#endif /* USE_*_ASM */
+}
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c
index eecfb9c1ae..46b466920b 100644
--- a/src/mesa/glapi/glapi_getproc.c
+++ b/src/mesa/glapi/glapi_getproc.c
@@ -30,47 +30,21 @@
*/
-#include <stdlib.h>
-#include <string.h>
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#include "glapi/mesa.h"
+#else
#include "main/glheader.h"
#include "main/compiler.h"
+#endif
+
#include "glapi/glapi.h"
-#include "glapi/glapioffsets.h"
+#include "glapi/glapi_priv.h"
#include "glapi/glapitable.h"
+#include "glapi/glapioffsets.h"
-static void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
-
-
-/**
- * strdup() is actually not a standard ANSI C or POSIX routine.
- * Irix will not define it if ANSI mode is in effect.
- */
-static char *
-str_dup(const char *str)
-{
- char *copy;
- copy = (char*) malloc(strlen(str) + 1);
- if (!copy)
- return NULL;
- strcpy(copy, str);
- return copy;
-}
-
-
-
-#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-#elif defined(USE_X86_ASM)
-# if defined(THREADS) && !defined(GLX_USE_TLS)
-# define DISPATCH_FUNCTION_SIZE 32
-# else
-# define DISPATCH_FUNCTION_SIZE 16
-# endif
-#endif
-
-#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer)
+#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server)
# define NEED_FUNCTION_POINTER
#endif
@@ -89,7 +63,7 @@ find_entry( const char * n )
for (i = 0; static_functions[i].Name_offset >= 0; i++) {
const char *testName = gl_string_table + static_functions[i].Name_offset;
#ifdef MANGLE
- /* skip the "m" prefix on the name */
+ /* skip the prefix on the name */
if (strcmp(testName, n + 1) == 0)
#else
if (strcmp(testName, n) == 0)
@@ -117,18 +91,7 @@ get_static_proc_offset(const char *funcName)
}
-#if !defined(XFree86Server) && !defined(XGLServer)
-#ifdef USE_X86_ASM
-
-#if defined( GLX_USE_TLS )
-extern GLubyte gl_dispatch_functions_start[];
-extern GLubyte gl_dispatch_functions_end[];
-#else
-extern const GLubyte gl_dispatch_functions_start[];
-#endif
-
-#endif /* USE_X86_ASM */
-
+#if !defined(XFree86Server)
/**
* Return dispatch function address for the named static (built-in) function.
@@ -141,12 +104,10 @@ get_static_proc_address(const char *funcName)
if (f) {
#if defined(DISPATCH_FUNCTION_SIZE) && defined(GLX_INDIRECT_RENDERING)
return (f->Address == NULL)
- ? (_glapi_proc) (gl_dispatch_functions_start
- + (DISPATCH_FUNCTION_SIZE * f->Offset))
+ ? get_entrypoint_address(f->Offset)
: f->Address;
#elif defined(DISPATCH_FUNCTION_SIZE)
- return (_glapi_proc) (gl_dispatch_functions_start
- + (DISPATCH_FUNCTION_SIZE * f->Offset));
+ return get_entrypoint_address(f->Offset);
#else
return f->Address;
#endif
@@ -156,7 +117,7 @@ get_static_proc_address(const char *funcName)
}
}
-#endif /* !defined(XFree86Server) && !defined(XGLServer) */
+#endif /* !defined(XFree86Server) */
@@ -228,103 +189,29 @@ struct _glapi_function {
};
-static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS];
-static GLuint NumExtEntryPoints = 0;
-
-#ifdef USE_SPARC_ASM
-extern void __glapi_sparc_icache_flush(unsigned int *);
-#endif
-
-/**
- * Generate a dispatch function (entrypoint) which jumps through
- * the given slot number (offset) in the current dispatch table.
- * We need assembly language in order to accomplish this.
+/*
+ * Number of extension functions which we can dynamically add at runtime.
*/
-static _glapi_proc
-generate_entrypoint(GLuint functionOffset)
-{
-#if defined(USE_X86_ASM)
- /* 32 is chosen as something of a magic offset. For x86, the dispatch
- * at offset 32 is the first one where the offset in the
- * "jmp OFFSET*4(%eax)" can't be encoded in a single byte.
- */
- const GLubyte * const template_func = gl_dispatch_functions_start
- + (DISPATCH_FUNCTION_SIZE * 32);
- GLubyte * const code = (GLubyte *) malloc(DISPATCH_FUNCTION_SIZE);
+#define MAX_EXTENSION_FUNCS 300
- if ( code != NULL ) {
- (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE);
- fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset );
- }
-
- return (_glapi_proc) code;
-#elif defined(USE_SPARC_ASM) && (defined(PTHREADS) || defined(GLX_USE_TLS))
- static const unsigned int template[] = {
- 0x07000000, /* sethi %hi(0), %g3 */
- 0x8210000f, /* mov %o7, %g1 */
- 0x40000000, /* call */
- 0x9e100001, /* mov %g1, %o7 */
- };
-#ifdef GLX_USE_TLS
- extern unsigned int __glapi_sparc_tls_stub;
- unsigned long call_dest = (unsigned long ) &__glapi_sparc_tls_stub;
-#else
- extern unsigned int __glapi_sparc_pthread_stub;
- unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub;
-#endif
- unsigned int *code = (unsigned int *) malloc(sizeof(template));
- if (code) {
- code[0] = template[0] | (functionOffset & 0x3fffff);
- code[1] = template[1];
- __glapi_sparc_icache_flush(&code[0]);
- code[2] = template[2] |
- (((call_dest - ((unsigned long) &code[2]))
- >> 2) & 0x3fffffff);
- code[3] = template[3];
- __glapi_sparc_icache_flush(&code[2]);
- }
- return (_glapi_proc) code;
-#else
- (void) functionOffset;
- return NULL;
-#endif /* USE_*_ASM */
-}
+static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS];
+static GLuint NumExtEntryPoints = 0;
/**
- * This function inserts a new dispatch offset into the assembly language
- * stub that was generated with the preceeding function.
+ * strdup() is actually not a standard ANSI C or POSIX routine.
+ * Irix will not define it if ANSI mode is in effect.
*/
-static void
-fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
+static char *
+str_dup(const char *str)
{
-#if defined(USE_X86_ASM)
- GLubyte * const code = (GLubyte *) entrypoint;
-
-#if DISPATCH_FUNCTION_SIZE == 32
- *((unsigned int *)(code + 11)) = 4 * offset;
- *((unsigned int *)(code + 22)) = 4 * offset;
-#elif DISPATCH_FUNCTION_SIZE == 16 && defined( GLX_USE_TLS )
- *((unsigned int *)(code + 8)) = 4 * offset;
-#elif DISPATCH_FUNCTION_SIZE == 16
- *((unsigned int *)(code + 7)) = 4 * offset;
-#else
-# error Invalid DISPATCH_FUNCTION_SIZE!
-#endif
-
-#elif defined(USE_SPARC_ASM)
- unsigned int *code = (unsigned int *) entrypoint;
- code[0] &= ~0x3fffff;
- code[0] |= (offset * sizeof(void *)) & 0x3fffff;
- __glapi_sparc_icache_flush(&code[0]);
-#else
-
- /* an unimplemented architecture */
- (void) entrypoint;
- (void) offset;
-
-#endif /* USE_*_ASM */
+ char *copy;
+ copy = (char*) malloc(strlen(str) + 1);
+ if (!copy)
+ return NULL;
+ strcpy(copy, str);
+ return copy;
}
@@ -537,7 +424,8 @@ _glapi_get_proc_address(const char *funcName)
GLuint i;
#ifdef MANGLE
- if (funcName[0] != 'm' || funcName[1] != 'g' || funcName[2] != 'l')
+ /* skip the prefix on the name */
+ if (funcName[1] != 'g' || funcName[2] != 'l')
return NULL;
#else
if (funcName[0] != 'g' || funcName[1] != 'l')
@@ -551,7 +439,7 @@ _glapi_get_proc_address(const char *funcName)
}
}
-#if !defined( XFree86Server ) && !defined( XGLServer )
+#if !defined( XFree86Server )
/* search static functions */
{
const _glapi_proc func = get_static_proc_address(funcName);
@@ -590,3 +478,119 @@ _glapi_get_proc_name(GLuint offset)
}
return NULL;
}
+
+
+
+/**********************************************************************
+ * GL API table functions.
+ */
+
+
+/*
+ * The dispatch table size (number of entries) is the size of the
+ * _glapi_table struct plus the number of dynamic entries we can add.
+ * The extra slots can be filled in by DRI drivers that register new extension
+ * functions.
+ */
+#define DISPATCH_TABLE_SIZE (sizeof(struct _glapi_table) / sizeof(void *) + MAX_EXTENSION_FUNCS)
+
+
+/**
+ * Return size of dispatch table struct as number of functions (or
+ * slots).
+ */
+PUBLIC GLuint
+_glapi_get_dispatch_table_size(void)
+{
+ return DISPATCH_TABLE_SIZE;
+}
+
+
+/**
+ * Make sure there are no NULL pointers in the given dispatch table.
+ * Intended for debugging purposes.
+ */
+void
+_glapi_check_table_not_null(const struct _glapi_table *table)
+{
+#ifdef EXTRA_DEBUG /* set to DEBUG for extra DEBUG */
+ const GLuint entries = _glapi_get_dispatch_table_size();
+ const void **tab = (const void **) table;
+ GLuint i;
+ for (i = 1; i < entries; i++) {
+ assert(tab[i]);
+ }
+#else
+ (void) table;
+#endif
+}
+
+
+/**
+ * Do some spot checks to be sure that the dispatch table
+ * slots are assigned correctly. For debugging only.
+ */
+void
+_glapi_check_table(const struct _glapi_table *table)
+{
+#ifdef EXTRA_DEBUG /* set to DEBUG for extra DEBUG */
+ {
+ GLuint BeginOffset = _glapi_get_proc_offset("glBegin");
+ char *BeginFunc = (char*) &table->Begin;
+ GLuint offset = (BeginFunc - (char *) table) / sizeof(void *);
+ assert(BeginOffset == _gloffset_Begin);
+ assert(BeginOffset == offset);
+ }
+ {
+ GLuint viewportOffset = _glapi_get_proc_offset("glViewport");
+ char *viewportFunc = (char*) &table->Viewport;
+ GLuint offset = (viewportFunc - (char *) table) / sizeof(void *);
+ assert(viewportOffset == _gloffset_Viewport);
+ assert(viewportOffset == offset);
+ }
+ {
+ GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer");
+ char *VertexPointerFunc = (char*) &table->VertexPointer;
+ GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *);
+ assert(VertexPointerOffset == _gloffset_VertexPointer);
+ assert(VertexPointerOffset == offset);
+ }
+ {
+ GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax");
+ char *ResetMinMaxFunc = (char*) &table->ResetMinmax;
+ GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *);
+ assert(ResetMinMaxOffset == _gloffset_ResetMinmax);
+ assert(ResetMinMaxOffset == offset);
+ }
+ {
+ GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor");
+ char *blendColorFunc = (char*) &table->BlendColor;
+ GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *);
+ assert(blendColorOffset == _gloffset_BlendColor);
+ assert(blendColorOffset == offset);
+ }
+ {
+ GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT");
+ char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT;
+ GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *);
+ assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT);
+ assert(secondaryColor3fOffset == offset);
+ }
+ {
+ GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV");
+ char *pointParameterivFunc = (char*) &table->PointParameterivNV;
+ GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *);
+ assert(pointParameterivOffset == _gloffset_PointParameterivNV);
+ assert(pointParameterivOffset == offset);
+ }
+ {
+ GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV");
+ char *setFenceFunc = (char*) &table->SetFenceNV;
+ GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *);
+ assert(setFenceOffset == _gloffset_SetFenceNV);
+ assert(setFenceOffset == offset);
+ }
+#else
+ (void) table;
+#endif
+}
diff --git a/src/mesa/glapi/glapi_nop.c b/src/mesa/glapi/glapi_nop.c
index aa84b9a169..b1a718a5f0 100644
--- a/src/mesa/glapi/glapi_nop.c
+++ b/src/mesa/glapi/glapi_nop.c
@@ -38,8 +38,14 @@
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#include "glapi/mesa.h"
+#else
#include "main/compiler.h"
#include "main/glheader.h"
+#endif
+
#include "glapi/glapi.h"
#ifdef DEBUG
diff --git a/src/mesa/glapi/glapi_priv.h b/src/mesa/glapi/glapi_priv.h
new file mode 100644
index 0000000000..7cd81ee8dc
--- /dev/null
+++ b/src/mesa/glapi/glapi_priv.h
@@ -0,0 +1,66 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * 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"),
+ * 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 _GLAPI_PRIV_H
+#define _GLAPI_PRIV_H
+
+#include "glthread.h"
+
+extern void
+_glapi_check_table_not_null(const struct _glapi_table *table);
+
+
+extern void
+_glapi_check_table(const struct _glapi_table *table);
+
+
+extern void
+init_glapi_relocs_once(void);
+
+
+extern _glapi_proc
+generate_entrypoint(GLuint functionOffset);
+
+
+extern void
+fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset);
+
+
+extern _glapi_proc
+get_entrypoint_address(GLuint functionOffset);
+
+
+#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 16
+#elif defined(USE_X86_ASM)
+# if defined(THREADS) && !defined(GLX_USE_TLS)
+# define DISPATCH_FUNCTION_SIZE 32
+# else
+# define DISPATCH_FUNCTION_SIZE 16
+# endif
+#endif
+
+
+#endif
diff --git a/src/mesa/glapi/glapidispatch.h b/src/mesa/glapi/glapidispatch.h
index 51ae7feaf6..7e0f21390f 100644
--- a/src/mesa/glapi/glapidispatch.h
+++ b/src/mesa/glapi/glapidispatch.h
@@ -2455,6 +2455,15 @@
#define CALL_TextureRangeAPPLE(disp, parameters) (*((disp)->TextureRangeAPPLE)) parameters
#define GET_TextureRangeAPPLE(disp) ((disp)->TextureRangeAPPLE)
#define SET_TextureRangeAPPLE(disp, fn) ((disp)->TextureRangeAPPLE = fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) (*((disp)->GetObjectParameterivAPPLE)) parameters
+#define GET_GetObjectParameterivAPPLE(disp) ((disp)->GetObjectParameterivAPPLE)
+#define SET_GetObjectParameterivAPPLE(disp, fn) ((disp)->GetObjectParameterivAPPLE = fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) (*((disp)->ObjectPurgeableAPPLE)) parameters
+#define GET_ObjectPurgeableAPPLE(disp) ((disp)->ObjectPurgeableAPPLE)
+#define SET_ObjectPurgeableAPPLE(disp, fn) ((disp)->ObjectPurgeableAPPLE = fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) (*((disp)->ObjectUnpurgeableAPPLE)) parameters
+#define GET_ObjectUnpurgeableAPPLE(disp) ((disp)->ObjectUnpurgeableAPPLE)
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) ((disp)->ObjectUnpurgeableAPPLE = fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) (*((disp)->StencilFuncSeparateATI)) parameters
#define GET_StencilFuncSeparateATI(disp) ((disp)->StencilFuncSeparateATI)
#define SET_StencilFuncSeparateATI(disp, fn) ((disp)->StencilFuncSeparateATI = fn)
@@ -2470,10 +2479,16 @@
#define CALL_GetQueryObjectui64vEXT(disp, parameters) (*((disp)->GetQueryObjectui64vEXT)) parameters
#define GET_GetQueryObjectui64vEXT(disp) ((disp)->GetQueryObjectui64vEXT)
#define SET_GetQueryObjectui64vEXT(disp, fn) ((disp)->GetQueryObjectui64vEXT = fn)
+#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) (*((disp)->EGLImageTargetRenderbufferStorageOES)) parameters
+#define GET_EGLImageTargetRenderbufferStorageOES(disp) ((disp)->EGLImageTargetRenderbufferStorageOES)
+#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) ((disp)->EGLImageTargetRenderbufferStorageOES = fn)
+#define CALL_EGLImageTargetTexture2DOES(disp, parameters) (*((disp)->EGLImageTargetTexture2DOES)) parameters
+#define GET_EGLImageTargetTexture2DOES(disp) ((disp)->EGLImageTargetTexture2DOES)
+#define SET_EGLImageTargetTexture2DOES(disp, fn) ((disp)->EGLImageTargetTexture2DOES = fn)
#else
-#define driDispatchRemapTable_size 395
+#define driDispatchRemapTable_size 400
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -2866,11 +2881,16 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define ProvokingVertexEXT_remap_index 387
#define GetTexParameterPointervAPPLE_remap_index 388
#define TextureRangeAPPLE_remap_index 389
-#define StencilFuncSeparateATI_remap_index 390
-#define ProgramEnvParameters4fvEXT_remap_index 391
-#define ProgramLocalParameters4fvEXT_remap_index 392
-#define GetQueryObjecti64vEXT_remap_index 393
-#define GetQueryObjectui64vEXT_remap_index 394
+#define GetObjectParameterivAPPLE_remap_index 390
+#define ObjectPurgeableAPPLE_remap_index 391
+#define ObjectUnpurgeableAPPLE_remap_index 392
+#define StencilFuncSeparateATI_remap_index 393
+#define ProgramEnvParameters4fvEXT_remap_index 394
+#define ProgramLocalParameters4fvEXT_remap_index 395
+#define GetQueryObjecti64vEXT_remap_index 396
+#define GetQueryObjectui64vEXT_remap_index 397
+#define EGLImageTargetRenderbufferStorageOES_remap_index 398
+#define EGLImageTargetTexture2DOES_remap_index 399
#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])
@@ -4042,6 +4062,15 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), driDispatchRemapTable[TextureRangeAPPLE_remap_index], parameters)
#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[TextureRangeAPPLE_remap_index])
#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TextureRangeAPPLE_remap_index], fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index], parameters)
+#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index])
+#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index], fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index], parameters)
+#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index])
+#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index], fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index], parameters)
+#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index])
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index], fn)
#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparateATI_remap_index], parameters)
#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index])
#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index], fn)
@@ -4057,6 +4086,12 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], parameters)
#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index])
#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], fn)
+#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index], parameters)
+#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index])
+#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index], fn)
+#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index], parameters)
+#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index])
+#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index], fn)
#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */
diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h
index c5d367f6f2..6d7bc2a0fa 100644
--- a/src/mesa/glapi/glapioffsets.h
+++ b/src/mesa/glapi/glapioffsets.h
@@ -832,12 +832,17 @@
#define _gloffset_ProvokingVertexEXT 795
#define _gloffset_GetTexParameterPointervAPPLE 796
#define _gloffset_TextureRangeAPPLE 797
-#define _gloffset_StencilFuncSeparateATI 798
-#define _gloffset_ProgramEnvParameters4fvEXT 799
-#define _gloffset_ProgramLocalParameters4fvEXT 800
-#define _gloffset_GetQueryObjecti64vEXT 801
-#define _gloffset_GetQueryObjectui64vEXT 802
-#define _gloffset_FIRST_DYNAMIC 803
+#define _gloffset_GetObjectParameterivAPPLE 798
+#define _gloffset_ObjectPurgeableAPPLE 799
+#define _gloffset_ObjectUnpurgeableAPPLE 800
+#define _gloffset_StencilFuncSeparateATI 801
+#define _gloffset_ProgramEnvParameters4fvEXT 802
+#define _gloffset_ProgramLocalParameters4fvEXT 803
+#define _gloffset_GetQueryObjecti64vEXT 804
+#define _gloffset_GetQueryObjectui64vEXT 805
+#define _gloffset_EGLImageTargetRenderbufferStorageOES 806
+#define _gloffset_EGLImageTargetTexture2DOES 807
+#define _gloffset_FIRST_DYNAMIC 808
#else
@@ -1231,11 +1236,16 @@
#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index]
#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index]
#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index]
+#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index]
+#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index]
+#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index]
#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
+#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index]
+#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index]
#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */
diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h
index 0c5b46d04b..149ff3f3c4 100644
--- a/src/mesa/glapi/glapitable.h
+++ b/src/mesa/glapi/glapitable.h
@@ -838,11 +838,16 @@ struct _glapi_table
void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 795 */
void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 796 */
void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 797 */
- void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 798 */
- void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 799 */
- void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 800 */
- void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 801 */
- void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 802 */
+ void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 798 */
+ GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 799 */
+ GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 800 */
+ void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 801 */
+ void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 802 */
+ void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 803 */
+ void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 804 */
+ void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 805 */
+ void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 806 */
+ void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 807 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index 2540ef6465..ea6b61159d 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -27,7 +27,7 @@
*/
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
+# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
@@ -5577,41 +5577,66 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLenum target, GLsizei lengt
DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value)
+{
+ DISPATCH(GetObjectParameterivAPPLE, (objectType, name, pname, value), (F, "glGetObjectParameterivAPPLE(0x%x, %d, 0x%x, %p);\n", objectType, name, pname, (const void *) value));
+}
+
+KEYWORD1 GLenum KEYWORD2 NAME(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ RETURN_DISPATCH(ObjectPurgeableAPPLE, (objectType, name, option), (F, "glObjectPurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option));
+}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+KEYWORD1 GLenum KEYWORD2 NAME(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option)
+{
+ RETURN_DISPATCH(ObjectUnpurgeableAPPLE, (objectType, name, option), (F, "glObjectUnpurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
{
DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_799)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_799)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_800)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_803)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_800)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_803)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLuint id, GLenum pname, GLint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_804)(GLuint id, GLenum pname, GLint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLuint id, GLenum pname, GLint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_804)(GLuint id, GLenum pname, GLint64EXT * params)
{
DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLuint id, GLenum pname, GLuint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_805)(GLuint id, GLenum pname, GLuint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLuint id, GLenum pname, GLuint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_805)(GLuint id, GLenum pname, GLuint64EXT * params)
{
DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
+KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset)
+{
+ DISPATCH(EGLImageTargetRenderbufferStorageOES, (target, writeOffset), (F, "glEGLImageTargetRenderbufferStorageOES(0x%x, %p);\n", target, (const void *) writeOffset));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset)
+{
+ DISPATCH(EGLImageTargetTexture2DOES, (target, writeOffset), (F, "glEGLImageTargetTexture2DOES(0x%x, %p);\n", target, (const void *) writeOffset));
+}
+
#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
@@ -6563,11 +6588,16 @@ _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(ProvokingVertexEXT),
TABLE_ENTRY(_dispatch_stub_796),
TABLE_ENTRY(_dispatch_stub_797),
- TABLE_ENTRY(_dispatch_stub_798),
- TABLE_ENTRY(_dispatch_stub_799),
- TABLE_ENTRY(_dispatch_stub_800),
+ TABLE_ENTRY(GetObjectParameterivAPPLE),
+ TABLE_ENTRY(ObjectPurgeableAPPLE),
+ TABLE_ENTRY(ObjectUnpurgeableAPPLE),
TABLE_ENTRY(_dispatch_stub_801),
TABLE_ENTRY(_dispatch_stub_802),
+ TABLE_ENTRY(_dispatch_stub_803),
+ TABLE_ENTRY(_dispatch_stub_804),
+ TABLE_ENTRY(_dispatch_stub_805),
+ TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES),
+ TABLE_ENTRY(EGLImageTargetTexture2DOES),
/* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered
* extension function without a current rendering context.
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index b590a7c41d..44861863e6 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -850,11 +850,16 @@ static const char gl_string_table[] =
"glProvokingVertexEXT\0"
"glGetTexParameterPointervAPPLE\0"
"glTextureRangeAPPLE\0"
+ "glGetObjectParameterivAPPLE\0"
+ "glObjectPurgeableAPPLE\0"
+ "glObjectUnpurgeableAPPLE\0"
"glStencilFuncSeparateATI\0"
"glProgramEnvParameters4fvEXT\0"
"glProgramLocalParameters4fvEXT\0"
"glGetQueryObjecti64vEXT\0"
"glGetQueryObjectui64vEXT\0"
+ "glEGLImageTargetRenderbufferStorageOES\0"
+ "glEGLImageTargetTexture2DOES\0"
"glArrayElementEXT\0"
"glBindTextureEXT\0"
"glDrawArraysEXT\0"
@@ -1206,11 +1211,11 @@ static const char gl_string_table[] =
#define gl_dispatch_stub_785 mgl_dispatch_stub_785
#define gl_dispatch_stub_796 mgl_dispatch_stub_796
#define gl_dispatch_stub_797 mgl_dispatch_stub_797
-#define gl_dispatch_stub_798 mgl_dispatch_stub_798
-#define gl_dispatch_stub_799 mgl_dispatch_stub_799
-#define gl_dispatch_stub_800 mgl_dispatch_stub_800
#define gl_dispatch_stub_801 mgl_dispatch_stub_801
#define gl_dispatch_stub_802 mgl_dispatch_stub_802
+#define gl_dispatch_stub_803 mgl_dispatch_stub_803
+#define gl_dispatch_stub_804 mgl_dispatch_stub_804
+#define gl_dispatch_stub_805 mgl_dispatch_stub_805
#endif /* USE_MGL_NAMESPACE */
@@ -1260,11 +1265,11 @@ void GLAPIENTRY gl_dispatch_stub_784(GLenum target, GLenum pname, GLint param);
void GLAPIENTRY gl_dispatch_stub_785(GLenum target, GLintptr offset, GLsizeiptr size);
void GLAPIENTRY gl_dispatch_stub_796(GLenum target, GLenum pname, GLvoid ** params);
void GLAPIENTRY gl_dispatch_stub_797(GLenum target, GLsizei length, GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_798(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_799(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_800(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_801(GLuint id, GLenum pname, GLint64EXT * params);
-void GLAPIENTRY gl_dispatch_stub_802(GLuint id, GLenum pname, GLuint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_801(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void GLAPIENTRY gl_dispatch_stub_802(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_803(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_804(GLuint id, GLenum pname, GLint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_805(GLuint id, GLenum pname, GLuint64EXT * params);
#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
static const glprocs_table_t static_functions[] = {
@@ -2066,313 +2071,318 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET(14050, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
NAME_FUNC_OFFSET(14071, gl_dispatch_stub_796, gl_dispatch_stub_796, NULL, _gloffset_GetTexParameterPointervAPPLE),
NAME_FUNC_OFFSET(14102, gl_dispatch_stub_797, gl_dispatch_stub_797, NULL, _gloffset_TextureRangeAPPLE),
- NAME_FUNC_OFFSET(14122, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, _gloffset_StencilFuncSeparateATI),
- NAME_FUNC_OFFSET(14147, gl_dispatch_stub_799, gl_dispatch_stub_799, NULL, _gloffset_ProgramEnvParameters4fvEXT),
- NAME_FUNC_OFFSET(14176, gl_dispatch_stub_800, gl_dispatch_stub_800, NULL, _gloffset_ProgramLocalParameters4fvEXT),
- NAME_FUNC_OFFSET(14207, gl_dispatch_stub_801, gl_dispatch_stub_801, NULL, _gloffset_GetQueryObjecti64vEXT),
- NAME_FUNC_OFFSET(14231, gl_dispatch_stub_802, gl_dispatch_stub_802, NULL, _gloffset_GetQueryObjectui64vEXT),
- NAME_FUNC_OFFSET(14256, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
- NAME_FUNC_OFFSET(14274, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
- NAME_FUNC_OFFSET(14291, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
- NAME_FUNC_OFFSET(14307, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
- NAME_FUNC_OFFSET(14332, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
- NAME_FUNC_OFFSET(14352, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
- NAME_FUNC_OFFSET(14372, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
- NAME_FUNC_OFFSET(14395, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
- NAME_FUNC_OFFSET(14418, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
- NAME_FUNC_OFFSET(14438, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
- NAME_FUNC_OFFSET(14455, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
- NAME_FUNC_OFFSET(14472, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
- NAME_FUNC_OFFSET(14487, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
- NAME_FUNC_OFFSET(14511, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
- NAME_FUNC_OFFSET(14530, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
- NAME_FUNC_OFFSET(14549, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
- NAME_FUNC_OFFSET(14565, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
- NAME_FUNC_OFFSET(14584, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
- NAME_FUNC_OFFSET(14607, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(14623, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(14639, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
- NAME_FUNC_OFFSET(14666, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
- NAME_FUNC_OFFSET(14693, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
- NAME_FUNC_OFFSET(14713, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14732, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14751, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14781, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14811, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14841, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14871, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
- NAME_FUNC_OFFSET(14890, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
- NAME_FUNC_OFFSET(14913, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
- NAME_FUNC_OFFSET(14938, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
- NAME_FUNC_OFFSET(14963, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
- NAME_FUNC_OFFSET(14990, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
- NAME_FUNC_OFFSET(15018, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
- NAME_FUNC_OFFSET(15045, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
- NAME_FUNC_OFFSET(15073, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
- NAME_FUNC_OFFSET(15102, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
- NAME_FUNC_OFFSET(15131, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
- NAME_FUNC_OFFSET(15157, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
- NAME_FUNC_OFFSET(15188, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
- NAME_FUNC_OFFSET(15219, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
- NAME_FUNC_OFFSET(15243, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
- NAME_FUNC_OFFSET(15266, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
- NAME_FUNC_OFFSET(15284, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
- NAME_FUNC_OFFSET(15313, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
- NAME_FUNC_OFFSET(15342, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
- NAME_FUNC_OFFSET(15357, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
- NAME_FUNC_OFFSET(15383, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
- NAME_FUNC_OFFSET(15409, glHistogram, glHistogram, NULL, _gloffset_Histogram),
- NAME_FUNC_OFFSET(15424, glMinmax, glMinmax, NULL, _gloffset_Minmax),
- NAME_FUNC_OFFSET(15436, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
- NAME_FUNC_OFFSET(15456, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
- NAME_FUNC_OFFSET(15473, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
- NAME_FUNC_OFFSET(15489, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
- NAME_FUNC_OFFSET(15508, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
- NAME_FUNC_OFFSET(15531, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
- NAME_FUNC_OFFSET(15547, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
- NAME_FUNC_OFFSET(15569, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
- NAME_FUNC_OFFSET(15587, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
- NAME_FUNC_OFFSET(15606, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
- NAME_FUNC_OFFSET(15624, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
- NAME_FUNC_OFFSET(15643, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
- NAME_FUNC_OFFSET(15661, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
- NAME_FUNC_OFFSET(15680, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
- NAME_FUNC_OFFSET(15698, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
- NAME_FUNC_OFFSET(15717, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
- NAME_FUNC_OFFSET(15735, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
- NAME_FUNC_OFFSET(15754, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
- NAME_FUNC_OFFSET(15772, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
- NAME_FUNC_OFFSET(15791, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
- NAME_FUNC_OFFSET(15809, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
- NAME_FUNC_OFFSET(15828, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
- NAME_FUNC_OFFSET(15846, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
- NAME_FUNC_OFFSET(15865, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
- NAME_FUNC_OFFSET(15883, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
- NAME_FUNC_OFFSET(15902, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
- NAME_FUNC_OFFSET(15920, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
- NAME_FUNC_OFFSET(15939, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
- NAME_FUNC_OFFSET(15957, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
- NAME_FUNC_OFFSET(15976, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
- NAME_FUNC_OFFSET(15994, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
- NAME_FUNC_OFFSET(16013, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
- NAME_FUNC_OFFSET(16031, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
- NAME_FUNC_OFFSET(16050, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
- NAME_FUNC_OFFSET(16068, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
- NAME_FUNC_OFFSET(16087, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
- NAME_FUNC_OFFSET(16105, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
- NAME_FUNC_OFFSET(16124, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
- NAME_FUNC_OFFSET(16142, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
- NAME_FUNC_OFFSET(16161, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
- NAME_FUNC_OFFSET(16184, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
- NAME_FUNC_OFFSET(16207, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
- NAME_FUNC_OFFSET(16230, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
- NAME_FUNC_OFFSET(16253, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
- NAME_FUNC_OFFSET(16276, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
- NAME_FUNC_OFFSET(16293, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
- NAME_FUNC_OFFSET(16316, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
- NAME_FUNC_OFFSET(16339, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
- NAME_FUNC_OFFSET(16362, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
- NAME_FUNC_OFFSET(16388, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
- NAME_FUNC_OFFSET(16414, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
- NAME_FUNC_OFFSET(16440, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
- NAME_FUNC_OFFSET(16464, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(16491, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(16517, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
- NAME_FUNC_OFFSET(16537, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
- NAME_FUNC_OFFSET(16557, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
- NAME_FUNC_OFFSET(16577, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
- NAME_FUNC_OFFSET(16600, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
- NAME_FUNC_OFFSET(16624, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
- NAME_FUNC_OFFSET(16647, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
- NAME_FUNC_OFFSET(16671, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
- NAME_FUNC_OFFSET(16688, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
- NAME_FUNC_OFFSET(16706, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
- NAME_FUNC_OFFSET(16723, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
- NAME_FUNC_OFFSET(16741, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
- NAME_FUNC_OFFSET(16758, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
- NAME_FUNC_OFFSET(16776, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
- NAME_FUNC_OFFSET(16793, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
- NAME_FUNC_OFFSET(16811, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
- NAME_FUNC_OFFSET(16828, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
- NAME_FUNC_OFFSET(16846, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
- NAME_FUNC_OFFSET(16863, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
- NAME_FUNC_OFFSET(16881, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
- NAME_FUNC_OFFSET(16898, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
- NAME_FUNC_OFFSET(16916, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
- NAME_FUNC_OFFSET(16933, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
- NAME_FUNC_OFFSET(16951, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
- NAME_FUNC_OFFSET(16968, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
- NAME_FUNC_OFFSET(16986, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
- NAME_FUNC_OFFSET(17005, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
- NAME_FUNC_OFFSET(17024, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
- NAME_FUNC_OFFSET(17043, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
- NAME_FUNC_OFFSET(17062, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
- NAME_FUNC_OFFSET(17082, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
- NAME_FUNC_OFFSET(17102, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
- NAME_FUNC_OFFSET(17122, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
- NAME_FUNC_OFFSET(17140, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
- NAME_FUNC_OFFSET(17157, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
- NAME_FUNC_OFFSET(17175, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
- NAME_FUNC_OFFSET(17192, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
- NAME_FUNC_OFFSET(17210, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
- NAME_FUNC_OFFSET(17228, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
- NAME_FUNC_OFFSET(17245, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
- NAME_FUNC_OFFSET(17263, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
- NAME_FUNC_OFFSET(17282, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
- NAME_FUNC_OFFSET(17301, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
- NAME_FUNC_OFFSET(17320, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
- NAME_FUNC_OFFSET(17342, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
- NAME_FUNC_OFFSET(17355, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
- NAME_FUNC_OFFSET(17368, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
- NAME_FUNC_OFFSET(17384, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
- NAME_FUNC_OFFSET(17400, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
- NAME_FUNC_OFFSET(17413, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
- NAME_FUNC_OFFSET(17436, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
- NAME_FUNC_OFFSET(17456, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
- NAME_FUNC_OFFSET(17475, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
- NAME_FUNC_OFFSET(17486, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
- NAME_FUNC_OFFSET(17498, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
- NAME_FUNC_OFFSET(17512, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
- NAME_FUNC_OFFSET(17525, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
- NAME_FUNC_OFFSET(17541, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
- NAME_FUNC_OFFSET(17552, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
- NAME_FUNC_OFFSET(17565, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
- NAME_FUNC_OFFSET(17584, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
- NAME_FUNC_OFFSET(17604, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
- NAME_FUNC_OFFSET(17617, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
- NAME_FUNC_OFFSET(17627, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
- NAME_FUNC_OFFSET(17643, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
- NAME_FUNC_OFFSET(17662, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
- NAME_FUNC_OFFSET(17680, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
- NAME_FUNC_OFFSET(17701, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
- NAME_FUNC_OFFSET(17716, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
- NAME_FUNC_OFFSET(17731, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
- NAME_FUNC_OFFSET(17745, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
- NAME_FUNC_OFFSET(17760, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
- NAME_FUNC_OFFSET(17772, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
- NAME_FUNC_OFFSET(17785, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
- NAME_FUNC_OFFSET(17797, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
- NAME_FUNC_OFFSET(17810, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
- NAME_FUNC_OFFSET(17822, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
- NAME_FUNC_OFFSET(17835, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
- NAME_FUNC_OFFSET(17847, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
- NAME_FUNC_OFFSET(17860, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
- NAME_FUNC_OFFSET(17872, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
- NAME_FUNC_OFFSET(17885, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
- NAME_FUNC_OFFSET(17897, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
- NAME_FUNC_OFFSET(17910, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
- NAME_FUNC_OFFSET(17922, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
- NAME_FUNC_OFFSET(17935, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
- NAME_FUNC_OFFSET(17947, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
- NAME_FUNC_OFFSET(17960, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
- NAME_FUNC_OFFSET(17979, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
- NAME_FUNC_OFFSET(17998, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
- NAME_FUNC_OFFSET(18017, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
- NAME_FUNC_OFFSET(18030, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
- NAME_FUNC_OFFSET(18048, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
- NAME_FUNC_OFFSET(18069, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
- NAME_FUNC_OFFSET(18087, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
- NAME_FUNC_OFFSET(18107, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(18121, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(18138, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample),
- NAME_FUNC_OFFSET(18174, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
- NAME_FUNC_OFFSET(18190, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
- NAME_FUNC_OFFSET(18209, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18227, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18248, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18270, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18289, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18311, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18334, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
- NAME_FUNC_OFFSET(18353, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
- NAME_FUNC_OFFSET(18373, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
- NAME_FUNC_OFFSET(18392, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
- NAME_FUNC_OFFSET(18412, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
- NAME_FUNC_OFFSET(18431, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
- NAME_FUNC_OFFSET(18451, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
- NAME_FUNC_OFFSET(18470, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
- NAME_FUNC_OFFSET(18490, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
- NAME_FUNC_OFFSET(18509, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
- NAME_FUNC_OFFSET(18529, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
- NAME_FUNC_OFFSET(18549, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
- NAME_FUNC_OFFSET(18570, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
- NAME_FUNC_OFFSET(18590, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
- NAME_FUNC_OFFSET(18611, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
- NAME_FUNC_OFFSET(18631, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
- NAME_FUNC_OFFSET(18652, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
- NAME_FUNC_OFFSET(18676, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
- NAME_FUNC_OFFSET(18694, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
- NAME_FUNC_OFFSET(18714, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
- NAME_FUNC_OFFSET(18732, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
- NAME_FUNC_OFFSET(18744, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
- NAME_FUNC_OFFSET(18757, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
- NAME_FUNC_OFFSET(18769, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
- NAME_FUNC_OFFSET(18782, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18802, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18826, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18840, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18857, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18872, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18890, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18904, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18921, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18936, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18954, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18968, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18985, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(19000, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(19018, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(19032, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(19049, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(19064, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(19082, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(19096, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(19113, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(19128, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(19146, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(19160, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(19177, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(19192, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(19210, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(19224, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(19241, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(19256, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(19274, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(19288, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(19305, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(19320, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(19338, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
- NAME_FUNC_OFFSET(19355, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
- NAME_FUNC_OFFSET(19375, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
- NAME_FUNC_OFFSET(19392, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(19418, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(19447, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
- NAME_FUNC_OFFSET(19462, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
- NAME_FUNC_OFFSET(19480, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
- NAME_FUNC_OFFSET(19499, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
- NAME_FUNC_OFFSET(19520, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
- NAME_FUNC_OFFSET(19536, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(19560, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(19587, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
- NAME_FUNC_OFFSET(19605, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
- NAME_FUNC_OFFSET(19624, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
- NAME_FUNC_OFFSET(19649, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
- NAME_FUNC_OFFSET(19670, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
- NAME_FUNC_OFFSET(19692, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
- NAME_FUNC_OFFSET(19718, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
- NAME_FUNC_OFFSET(19741, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
- NAME_FUNC_OFFSET(19764, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
- NAME_FUNC_OFFSET(19787, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
- NAME_FUNC_OFFSET(19805, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
- NAME_FUNC_OFFSET(19824, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
- NAME_FUNC_OFFSET(19841, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
- NAME_FUNC_OFFSET(19879, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
- NAME_FUNC_OFFSET(19908, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
- NAME_FUNC_OFFSET(19924, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
- NAME_FUNC_OFFSET(19941, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
- NAME_FUNC_OFFSET(19963, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
- NAME_FUNC_OFFSET(19981, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
- NAME_FUNC_OFFSET(20007, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
+ NAME_FUNC_OFFSET(14122, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, _gloffset_GetObjectParameterivAPPLE),
+ NAME_FUNC_OFFSET(14150, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, _gloffset_ObjectPurgeableAPPLE),
+ NAME_FUNC_OFFSET(14173, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, _gloffset_ObjectUnpurgeableAPPLE),
+ NAME_FUNC_OFFSET(14198, gl_dispatch_stub_801, gl_dispatch_stub_801, NULL, _gloffset_StencilFuncSeparateATI),
+ NAME_FUNC_OFFSET(14223, gl_dispatch_stub_802, gl_dispatch_stub_802, NULL, _gloffset_ProgramEnvParameters4fvEXT),
+ NAME_FUNC_OFFSET(14252, gl_dispatch_stub_803, gl_dispatch_stub_803, NULL, _gloffset_ProgramLocalParameters4fvEXT),
+ NAME_FUNC_OFFSET(14283, gl_dispatch_stub_804, gl_dispatch_stub_804, NULL, _gloffset_GetQueryObjecti64vEXT),
+ NAME_FUNC_OFFSET(14307, gl_dispatch_stub_805, gl_dispatch_stub_805, NULL, _gloffset_GetQueryObjectui64vEXT),
+ NAME_FUNC_OFFSET(14332, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, _gloffset_EGLImageTargetRenderbufferStorageOES),
+ NAME_FUNC_OFFSET(14371, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, _gloffset_EGLImageTargetTexture2DOES),
+ NAME_FUNC_OFFSET(14400, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
+ NAME_FUNC_OFFSET(14418, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
+ NAME_FUNC_OFFSET(14435, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
+ NAME_FUNC_OFFSET(14451, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
+ NAME_FUNC_OFFSET(14476, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
+ NAME_FUNC_OFFSET(14496, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
+ NAME_FUNC_OFFSET(14516, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
+ NAME_FUNC_OFFSET(14539, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
+ NAME_FUNC_OFFSET(14562, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
+ NAME_FUNC_OFFSET(14582, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
+ NAME_FUNC_OFFSET(14599, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
+ NAME_FUNC_OFFSET(14616, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
+ NAME_FUNC_OFFSET(14631, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
+ NAME_FUNC_OFFSET(14655, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
+ NAME_FUNC_OFFSET(14674, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
+ NAME_FUNC_OFFSET(14693, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
+ NAME_FUNC_OFFSET(14709, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
+ NAME_FUNC_OFFSET(14728, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
+ NAME_FUNC_OFFSET(14751, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
+ NAME_FUNC_OFFSET(14767, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
+ NAME_FUNC_OFFSET(14783, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
+ NAME_FUNC_OFFSET(14810, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
+ NAME_FUNC_OFFSET(14837, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
+ NAME_FUNC_OFFSET(14857, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
+ NAME_FUNC_OFFSET(14876, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
+ NAME_FUNC_OFFSET(14895, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
+ NAME_FUNC_OFFSET(14925, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
+ NAME_FUNC_OFFSET(14955, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
+ NAME_FUNC_OFFSET(14985, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
+ NAME_FUNC_OFFSET(15015, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
+ NAME_FUNC_OFFSET(15034, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
+ NAME_FUNC_OFFSET(15057, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
+ NAME_FUNC_OFFSET(15082, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
+ NAME_FUNC_OFFSET(15107, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
+ NAME_FUNC_OFFSET(15134, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
+ NAME_FUNC_OFFSET(15162, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
+ NAME_FUNC_OFFSET(15189, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
+ NAME_FUNC_OFFSET(15217, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
+ NAME_FUNC_OFFSET(15246, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
+ NAME_FUNC_OFFSET(15275, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
+ NAME_FUNC_OFFSET(15301, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
+ NAME_FUNC_OFFSET(15332, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
+ NAME_FUNC_OFFSET(15363, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
+ NAME_FUNC_OFFSET(15387, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
+ NAME_FUNC_OFFSET(15410, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
+ NAME_FUNC_OFFSET(15428, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
+ NAME_FUNC_OFFSET(15457, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
+ NAME_FUNC_OFFSET(15486, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
+ NAME_FUNC_OFFSET(15501, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
+ NAME_FUNC_OFFSET(15527, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
+ NAME_FUNC_OFFSET(15553, glHistogram, glHistogram, NULL, _gloffset_Histogram),
+ NAME_FUNC_OFFSET(15568, glMinmax, glMinmax, NULL, _gloffset_Minmax),
+ NAME_FUNC_OFFSET(15580, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
+ NAME_FUNC_OFFSET(15600, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
+ NAME_FUNC_OFFSET(15617, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
+ NAME_FUNC_OFFSET(15633, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
+ NAME_FUNC_OFFSET(15652, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
+ NAME_FUNC_OFFSET(15675, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
+ NAME_FUNC_OFFSET(15691, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
+ NAME_FUNC_OFFSET(15713, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
+ NAME_FUNC_OFFSET(15731, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
+ NAME_FUNC_OFFSET(15750, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
+ NAME_FUNC_OFFSET(15768, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
+ NAME_FUNC_OFFSET(15787, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
+ NAME_FUNC_OFFSET(15805, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
+ NAME_FUNC_OFFSET(15824, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
+ NAME_FUNC_OFFSET(15842, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
+ NAME_FUNC_OFFSET(15861, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
+ NAME_FUNC_OFFSET(15879, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
+ NAME_FUNC_OFFSET(15898, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
+ NAME_FUNC_OFFSET(15916, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
+ NAME_FUNC_OFFSET(15935, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
+ NAME_FUNC_OFFSET(15953, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
+ NAME_FUNC_OFFSET(15972, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
+ NAME_FUNC_OFFSET(15990, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
+ NAME_FUNC_OFFSET(16009, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
+ NAME_FUNC_OFFSET(16027, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
+ NAME_FUNC_OFFSET(16046, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
+ NAME_FUNC_OFFSET(16064, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
+ NAME_FUNC_OFFSET(16083, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
+ NAME_FUNC_OFFSET(16101, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
+ NAME_FUNC_OFFSET(16120, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
+ NAME_FUNC_OFFSET(16138, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
+ NAME_FUNC_OFFSET(16157, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
+ NAME_FUNC_OFFSET(16175, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
+ NAME_FUNC_OFFSET(16194, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
+ NAME_FUNC_OFFSET(16212, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
+ NAME_FUNC_OFFSET(16231, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
+ NAME_FUNC_OFFSET(16249, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
+ NAME_FUNC_OFFSET(16268, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
+ NAME_FUNC_OFFSET(16286, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
+ NAME_FUNC_OFFSET(16305, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
+ NAME_FUNC_OFFSET(16328, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
+ NAME_FUNC_OFFSET(16351, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
+ NAME_FUNC_OFFSET(16374, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
+ NAME_FUNC_OFFSET(16397, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
+ NAME_FUNC_OFFSET(16420, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
+ NAME_FUNC_OFFSET(16437, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
+ NAME_FUNC_OFFSET(16460, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
+ NAME_FUNC_OFFSET(16483, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
+ NAME_FUNC_OFFSET(16506, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
+ NAME_FUNC_OFFSET(16532, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
+ NAME_FUNC_OFFSET(16558, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
+ NAME_FUNC_OFFSET(16584, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
+ NAME_FUNC_OFFSET(16608, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
+ NAME_FUNC_OFFSET(16635, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
+ NAME_FUNC_OFFSET(16661, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
+ NAME_FUNC_OFFSET(16681, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
+ NAME_FUNC_OFFSET(16701, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
+ NAME_FUNC_OFFSET(16721, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
+ NAME_FUNC_OFFSET(16744, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
+ NAME_FUNC_OFFSET(16768, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
+ NAME_FUNC_OFFSET(16791, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
+ NAME_FUNC_OFFSET(16815, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
+ NAME_FUNC_OFFSET(16832, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
+ NAME_FUNC_OFFSET(16850, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
+ NAME_FUNC_OFFSET(16867, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
+ NAME_FUNC_OFFSET(16885, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
+ NAME_FUNC_OFFSET(16902, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
+ NAME_FUNC_OFFSET(16920, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
+ NAME_FUNC_OFFSET(16937, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
+ NAME_FUNC_OFFSET(16955, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
+ NAME_FUNC_OFFSET(16972, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
+ NAME_FUNC_OFFSET(16990, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
+ NAME_FUNC_OFFSET(17007, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
+ NAME_FUNC_OFFSET(17025, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
+ NAME_FUNC_OFFSET(17042, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
+ NAME_FUNC_OFFSET(17060, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
+ NAME_FUNC_OFFSET(17077, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
+ NAME_FUNC_OFFSET(17095, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
+ NAME_FUNC_OFFSET(17112, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
+ NAME_FUNC_OFFSET(17130, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
+ NAME_FUNC_OFFSET(17149, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
+ NAME_FUNC_OFFSET(17168, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
+ NAME_FUNC_OFFSET(17187, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
+ NAME_FUNC_OFFSET(17206, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
+ NAME_FUNC_OFFSET(17226, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
+ NAME_FUNC_OFFSET(17246, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
+ NAME_FUNC_OFFSET(17266, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
+ NAME_FUNC_OFFSET(17284, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
+ NAME_FUNC_OFFSET(17301, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
+ NAME_FUNC_OFFSET(17319, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
+ NAME_FUNC_OFFSET(17336, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
+ NAME_FUNC_OFFSET(17354, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
+ NAME_FUNC_OFFSET(17372, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
+ NAME_FUNC_OFFSET(17389, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
+ NAME_FUNC_OFFSET(17407, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
+ NAME_FUNC_OFFSET(17426, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
+ NAME_FUNC_OFFSET(17445, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
+ NAME_FUNC_OFFSET(17464, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
+ NAME_FUNC_OFFSET(17486, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
+ NAME_FUNC_OFFSET(17499, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
+ NAME_FUNC_OFFSET(17512, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
+ NAME_FUNC_OFFSET(17528, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
+ NAME_FUNC_OFFSET(17544, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
+ NAME_FUNC_OFFSET(17557, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
+ NAME_FUNC_OFFSET(17580, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
+ NAME_FUNC_OFFSET(17600, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
+ NAME_FUNC_OFFSET(17619, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
+ NAME_FUNC_OFFSET(17630, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
+ NAME_FUNC_OFFSET(17642, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
+ NAME_FUNC_OFFSET(17656, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
+ NAME_FUNC_OFFSET(17669, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
+ NAME_FUNC_OFFSET(17685, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
+ NAME_FUNC_OFFSET(17696, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
+ NAME_FUNC_OFFSET(17709, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
+ NAME_FUNC_OFFSET(17728, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
+ NAME_FUNC_OFFSET(17748, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
+ NAME_FUNC_OFFSET(17761, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
+ NAME_FUNC_OFFSET(17771, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
+ NAME_FUNC_OFFSET(17787, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
+ NAME_FUNC_OFFSET(17806, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
+ NAME_FUNC_OFFSET(17824, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
+ NAME_FUNC_OFFSET(17845, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
+ NAME_FUNC_OFFSET(17860, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
+ NAME_FUNC_OFFSET(17875, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
+ NAME_FUNC_OFFSET(17889, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
+ NAME_FUNC_OFFSET(17904, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
+ NAME_FUNC_OFFSET(17916, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
+ NAME_FUNC_OFFSET(17929, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
+ NAME_FUNC_OFFSET(17941, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
+ NAME_FUNC_OFFSET(17954, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
+ NAME_FUNC_OFFSET(17966, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
+ NAME_FUNC_OFFSET(17979, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
+ NAME_FUNC_OFFSET(17991, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
+ NAME_FUNC_OFFSET(18004, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
+ NAME_FUNC_OFFSET(18016, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
+ NAME_FUNC_OFFSET(18029, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
+ NAME_FUNC_OFFSET(18041, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
+ NAME_FUNC_OFFSET(18054, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
+ NAME_FUNC_OFFSET(18066, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
+ NAME_FUNC_OFFSET(18079, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
+ NAME_FUNC_OFFSET(18091, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
+ NAME_FUNC_OFFSET(18104, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
+ NAME_FUNC_OFFSET(18123, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
+ NAME_FUNC_OFFSET(18142, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
+ NAME_FUNC_OFFSET(18161, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
+ NAME_FUNC_OFFSET(18174, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
+ NAME_FUNC_OFFSET(18192, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
+ NAME_FUNC_OFFSET(18213, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
+ NAME_FUNC_OFFSET(18231, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
+ NAME_FUNC_OFFSET(18251, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(18265, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(18282, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample),
+ NAME_FUNC_OFFSET(18318, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
+ NAME_FUNC_OFFSET(18334, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
+ NAME_FUNC_OFFSET(18353, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18371, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18392, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18414, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18433, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18455, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18478, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
+ NAME_FUNC_OFFSET(18497, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
+ NAME_FUNC_OFFSET(18517, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
+ NAME_FUNC_OFFSET(18536, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
+ NAME_FUNC_OFFSET(18556, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
+ NAME_FUNC_OFFSET(18575, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
+ NAME_FUNC_OFFSET(18595, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
+ NAME_FUNC_OFFSET(18614, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
+ NAME_FUNC_OFFSET(18634, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
+ NAME_FUNC_OFFSET(18653, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
+ NAME_FUNC_OFFSET(18673, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
+ NAME_FUNC_OFFSET(18693, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
+ NAME_FUNC_OFFSET(18714, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
+ NAME_FUNC_OFFSET(18734, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
+ NAME_FUNC_OFFSET(18755, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
+ NAME_FUNC_OFFSET(18775, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
+ NAME_FUNC_OFFSET(18796, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
+ NAME_FUNC_OFFSET(18820, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
+ NAME_FUNC_OFFSET(18838, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
+ NAME_FUNC_OFFSET(18858, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
+ NAME_FUNC_OFFSET(18876, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
+ NAME_FUNC_OFFSET(18888, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
+ NAME_FUNC_OFFSET(18901, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
+ NAME_FUNC_OFFSET(18913, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
+ NAME_FUNC_OFFSET(18926, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18946, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18970, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18984, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(19001, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(19016, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(19034, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(19048, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(19065, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(19080, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(19098, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(19112, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(19129, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(19144, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(19162, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(19176, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(19193, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(19208, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(19226, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(19240, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(19257, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(19272, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(19290, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(19304, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(19321, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19336, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19354, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19368, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19385, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19400, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19418, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19432, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19449, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19464, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19482, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
+ NAME_FUNC_OFFSET(19499, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
+ NAME_FUNC_OFFSET(19519, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
+ NAME_FUNC_OFFSET(19536, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19562, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19591, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
+ NAME_FUNC_OFFSET(19606, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
+ NAME_FUNC_OFFSET(19624, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
+ NAME_FUNC_OFFSET(19643, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
+ NAME_FUNC_OFFSET(19664, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
+ NAME_FUNC_OFFSET(19680, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19704, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19731, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
+ NAME_FUNC_OFFSET(19749, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
+ NAME_FUNC_OFFSET(19768, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
+ NAME_FUNC_OFFSET(19793, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
+ NAME_FUNC_OFFSET(19814, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19836, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
+ NAME_FUNC_OFFSET(19862, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
+ NAME_FUNC_OFFSET(19885, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
+ NAME_FUNC_OFFSET(19908, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
+ NAME_FUNC_OFFSET(19931, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
+ NAME_FUNC_OFFSET(19949, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19968, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
+ NAME_FUNC_OFFSET(19985, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
+ NAME_FUNC_OFFSET(20023, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
+ NAME_FUNC_OFFSET(20052, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
+ NAME_FUNC_OFFSET(20068, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
+ NAME_FUNC_OFFSET(20085, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
+ NAME_FUNC_OFFSET(20107, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
+ NAME_FUNC_OFFSET(20125, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
+ NAME_FUNC_OFFSET(20151, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index 1c2c386571..f365d17bdd 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -30,9 +30,11 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
+#include "glapi/mesa.h"
+#else
+#include "main/compiler.h"
#endif
-#include "main/compiler.h"
#include "glapi/glthread.h"
@@ -114,91 +116,15 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
/*
- * Solaris/Unix International Threads -- Use only if POSIX threads
- * aren't available on your Unix platform. Solaris 2.[34] are examples
- * of platforms where this is the case. Be sure to use -mt and/or
- * -D_REENTRANT when compiling.
- */
-#ifdef SOLARIS_THREADS
-#define USE_LOCK_FOR_KEY /* undef this to try a version without
- lock for the global key... */
-
-PUBLIC unsigned long
-_glthread_GetID(void)
-{
- abort(); /* XXX not implemented yet */
- return (unsigned long) 0;
-}
-
-
-void
-_glthread_InitTSD(_glthread_TSD *tsd)
-{
- if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 ||
- (errno = thr_keycreate(&(tsd->key), free)) != 0) {
- perror(INIT_TSD_ERROR);
- exit(-1);
- }
- tsd->initMagic = INIT_MAGIC;
-}
-
-
-void *
-_glthread_GetTSD(_glthread_TSD *tsd)
-{
- void* ret;
- if (tsd->initMagic != INIT_MAGIC) {
- _glthread_InitTSD(tsd);
- }
-#ifdef USE_LOCK_FOR_KEY
- mutex_lock(&tsd->keylock);
- thr_getspecific(tsd->key, &ret);
- mutex_unlock(&tsd->keylock);
-#else
- if ((errno = thr_getspecific(tsd->key, &ret)) != 0) {
- perror(GET_TSD_ERROR);
- exit(-1);
- }
-#endif
- return ret;
-}
-
-
-void
-_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
-{
- if (tsd->initMagic != INIT_MAGIC) {
- _glthread_InitTSD(tsd);
- }
- if ((errno = thr_setspecific(tsd->key, ptr)) != 0) {
- perror(SET_TSD_ERROR);
- exit(-1);
- }
-}
-
-#undef USE_LOCK_FOR_KEY
-#endif /* SOLARIS_THREADS */
-
-
-
-/*
* Win32 Threads. The only available option for Windows 95/NT.
* Be sure that you compile using the Multithreaded runtime, otherwise
* bad things will happen.
*/
#ifdef WIN32_THREADS
-void FreeTSD(_glthread_TSD *p)
-{
- if (p->initMagic==INIT_MAGIC) {
- TlsFree(p->key);
- p->initMagic=0;
- }
-}
-
-void InsteadOf_exit(int nCode)
+static void InsteadOf_exit(int nCode)
{
- DWORD dwErr=GetLastError();
+ DWORD dwErr = GetLastError();
}
PUBLIC unsigned long
@@ -213,13 +139,24 @@ _glthread_InitTSD(_glthread_TSD *tsd)
{
tsd->key = TlsAlloc();
if (tsd->key == TLS_OUT_OF_INDEXES) {
- perror("Mesa:_glthread_InitTSD");
+ perror(INIT_TSD_ERROR);
InsteadOf_exit(-1);
}
tsd->initMagic = INIT_MAGIC;
}
+void
+_glthread_DestroyTSD(_glthread_TSD *tsd)
+{
+ if (tsd->initMagic != INIT_MAGIC) {
+ return;
+ }
+ TlsFree(tsd->key);
+ tsd->initMagic = 0x0;
+}
+
+
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
@@ -239,8 +176,8 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
_glthread_InitTSD(tsd);
}
if (TlsSetValue(tsd->key, ptr) == 0) {
- perror("Mesa:_glthread_SetTSD");
- InsteadOf_exit(-1);
+ perror(SET_TSD_ERROR);
+ InsteadOf_exit(-1);
}
}
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 8ec933a851..4fe99284a8 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -64,21 +64,12 @@
#define GLTHREAD_H
-#if defined(USE_MGL_NAMESPACE)
-#define _glapi_Dispatch _mglapi_Dispatch
+#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#ifndef THREADS
+#define THREADS
#endif
-
-
-
-#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\
- defined(WIN32_THREADS) || defined(BEOS_THREADS)) \
- && !defined(THREADS)
-# define THREADS
#endif
-#ifdef VMS
-#include <GL/vms_x_fix.h>
-#endif
/*
* POSIX threads. This should be your choice in the Unix world
@@ -116,80 +107,7 @@ typedef pthread_mutex_t _glthread_Mutex;
#define _glthread_UNLOCK_MUTEX(name) \
(void) pthread_mutex_unlock(&(name))
-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
-
-
-/*
- * Solaris threads. Use only up to Solaris 2.4.
- * Solaris 2.5 and higher provide POSIX threads.
- * Be sure to compile with -mt on the Solaris compilers, or
- * use -D_REENTRANT if using gcc.
- */
-#ifdef SOLARIS_THREADS
-#include <thread.h>
-
-typedef struct {
- thread_key_t key;
- mutex_t keylock;
- int initMagic;
-} _glthread_TSD;
-
-typedef thread_t _glthread_Thread;
-
-typedef mutex_t _glthread_Mutex;
-
-/* XXX need to really implement mutex-related macros */
-#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
-#define _glthread_INIT_MUTEX(name) (void) name
-#define _glthread_DESTROY_MUTEX(name) (void) name
-#define _glthread_LOCK_MUTEX(name) (void) name
-#define _glthread_UNLOCK_MUTEX(name) (void) name
-
-#endif /* SOLARIS_THREADS */
-
-
+#endif /* PTHREADS */
/*
@@ -209,11 +127,20 @@ typedef HANDLE _glthread_Thread;
typedef CRITICAL_SECTION _glthread_Mutex;
-#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0}
-#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name)
-#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name)
-#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name)
-#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name)
+#define _glthread_DECLARE_STATIC_MUTEX(name) \
+ /* static */ _glthread_Mutex name = { 0, 0, 0, 0, 0, 0 }
+
+#define _glthread_INIT_MUTEX(name) \
+ InitializeCriticalSection(&name)
+
+#define _glthread_DESTROY_MUTEX(name) \
+ DeleteCriticalSection(&name)
+
+#define _glthread_LOCK_MUTEX(name) \
+ EnterCriticalSection(&name)
+
+#define _glthread_UNLOCK_MUTEX(name) \
+ LeaveCriticalSection(&name)
#endif /* WIN32_THREADS */
@@ -252,22 +179,34 @@ typedef struct {
} benaphore;
typedef benaphore _glthread_Mutex;
-#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 }
-#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0
-#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0
-#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \
- if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem)
-#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem)
+#define _glthread_DECLARE_STATIC_MUTEX(name) \
+ static _glthread_Mutex name = { 0, 0 }
-#endif /* BEOS_THREADS */
+#define _glthread_INIT_MUTEX(name) \
+ name.sem = create_sem(0, #name"_benaphore"), \
+ name.lock = 0
+#define _glthread_DESTROY_MUTEX(name) \
+ delete_sem(name.sem), \
+ name.lock = 0
+#define _glthread_LOCK_MUTEX(name) \
+ if (name.sem == 0) \
+ _glthread_INIT_MUTEX(name); \
+ if (atomic_add(&(name.lock), 1) >= 1) \
+ acquire_sem(name.sem)
+
+#define _glthread_UNLOCK_MUTEX(name) \
+ if (atomic_add(&(name.lock), -1) > 1) \
+ release_sem(name.sem)
+
+#endif /* BEOS_THREADS */
-#ifndef THREADS
/*
* THREADS not defined
*/
+#ifndef THREADS
typedef unsigned _glthread_TSD;
@@ -301,6 +240,10 @@ extern void
_glthread_InitTSD(_glthread_TSD *);
+extern void
+_glthread_DestroyTSD(_glthread_TSD *); /* WIN32 only */
+
+
extern void *
_glthread_GetTSD(_glthread_TSD *);
@@ -308,26 +251,5 @@ _glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
-#if !defined __GNUC__ || __GNUC__ < 3
-# define __builtin_expect(x, y) x
-#endif
-
-#if defined(GLX_USE_TLS)
-
-extern __thread struct _glapi_table * _glapi_tls_Dispatch
- __attribute__((tls_model("initial-exec")));
-
-#define GET_DISPATCH() _glapi_tls_Dispatch
-
-#elif !defined(GL_CALL)
-# if defined(THREADS)
-# define GET_DISPATCH() \
- ((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \
- ? _glapi_Dispatch : _glapi_get_dispatch())
-# else
-# define GET_DISPATCH() _glapi_Dispatch
-# endif /* defined(THREADS) */
-#endif /* ndef GL_CALL */
-
#endif /* THREADS_H */