aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mapi')
-rw-r--r--mesalib/src/mapi/.gitignore2
-rw-r--r--mesalib/src/mapi/Makefile.am63
-rw-r--r--mesalib/src/mapi/Makefile.sources52
-rw-r--r--mesalib/src/mapi/glapi/Makefile.sources22
-rw-r--r--mesalib/src/mapi/glapi/gen/ARB_direct_state_access.xml271
-rw-r--r--mesalib/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml143
-rw-r--r--mesalib/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml24
-rw-r--r--mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml2
-rw-r--r--mesalib/src/mapi/glapi/gen/Makefile.am6
-rw-r--r--mesalib/src/mapi/glapi/gen/es_EXT.xml9
-rwxr-xr-xmesalib/src/mapi/glapi/gen/glX_proto_size.py26
-rwxr-xr-xmesalib/src/mapi/glapi/gen/gl_API.xml32
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_XML.py23
-rw-r--r--mesalib/src/mapi/glapi/gen/glapi_gen.mk40
-rw-r--r--mesalib/src/mapi/glapi/glapi_dispatch.c22
15 files changed, 615 insertions, 122 deletions
diff --git a/mesalib/src/mapi/.gitignore b/mesalib/src/mapi/.gitignore
new file mode 100644
index 000000000..0d280c9b6
--- /dev/null
+++ b/mesalib/src/mapi/.gitignore
@@ -0,0 +1,2 @@
+shared-glapi-test
+glapi-test
diff --git a/mesalib/src/mapi/Makefile.am b/mesalib/src/mapi/Makefile.am
index 80ead821c..679468291 100644
--- a/mesalib/src/mapi/Makefile.am
+++ b/mesalib/src/mapi/Makefile.am
@@ -19,10 +19,10 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = glapi/gen .
-TESTS =
+AUTOMAKE_OPTIONS = subdir-objects
-TOP = $(top_srcdir)
+SUBDIRS =
+TESTS =
BUILT_SOURCES =
CLEANFILES = $(BUILT_SOURCES)
@@ -32,6 +32,13 @@ check_PROGRAMS =
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =
+EXTRA_DIST = \
+ es1api/ABI-check \
+ es2api/ABI-check \
+ mapi_abi.py \
+ glapi/SConscript \
+ shared-glapi/SConscript
+
AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_CPPFLAGS = \
$(DEFINES) \
@@ -40,10 +47,20 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/mapi \
-I$(top_builddir)/src/mapi
-GLAPI = $(top_srcdir)/src/mapi/glapi
include Makefile.sources
-include glapi/Makefile.sources
-include glapi/gen/glapi_gen.mk
+
+glapi_gen_mapi_deps := \
+ mapi_abi.py \
+ $(wildcard glapi/gen/*.xml) \
+ $(wildcard glapi/gen/*.py)
+
+# $(1): path to an XML file
+# $(2): name of the printer
+define glapi_gen_mapi
+@$(MKDIR_P) $(dir $@)
+$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/mapi_abi.py \
+ --mode lib --printer $(2) $(1) > $@
+endef
if HAVE_SHARED_GLAPI
BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
@@ -62,9 +79,6 @@ shared_glapi_libglapi_la_LDFLAGS = \
$(GC_SECTIONS) \
$(LD_NO_UNDEFINED)
-shared-glapi/glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
- $(call glapi_gen_mapi,$<,shared-glapi)
-
TESTS += shared-glapi-test
check_PROGRAMS += shared-glapi-test
@@ -77,21 +91,24 @@ shared_glapi_test_LDADD = \
$(top_builddir)/src/gtest/libgtest.la
endif
+shared-glapi/glapi_mapi_tmp.h : glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
+ $(call glapi_gen_mapi,$<,shared-glapi)
+
if HAVE_OPENGL
noinst_LTLIBRARIES = glapi/libglapi.la
if HAVE_X86_ASM
if HAVE_X86_64_ASM
-GLAPI_ASM_SOURCES = $(X86_64_API)
+GLAPI_ASM_SOURCES = glapi/glapi_x86-64.S
else
-GLAPI_ASM_SOURCES = $(X86_API)
+GLAPI_ASM_SOURCES = glapi/glapi_x86.S
endif
endif
if HAVE_SPARC_ASM
-GLAPI_ASM_SOURCES = $(SPARC_API)
+GLAPI_ASM_SOURCES = glapi/glapi_sparc.S
endif
-glapi_libglapi_la_SOURCES = $(GLAPI_UTIL_SOURCES)
+glapi_libglapi_la_SOURCES = glapi/glapi_gentable.c
glapi_libglapi_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/src/mapi/glapi \
@@ -106,7 +123,13 @@ else
glapi_libglapi_la_CPPFLAGS += \
-DMAPI_MODE_UTIL
glapi_libglapi_la_SOURCES += \
- $(GLAPI_SOURCES) \
+ glapi/glapi_dispatch.c \
+ glapi/glapi_entrypoint.c \
+ glapi/glapi_getproc.c \
+ glapi/glapi_nop.c \
+ glapi/glapi.c \
+ glapi/glapi.h \
+ glapi/glapi_priv.h \
$(GLAPI_ASM_SOURCES) \
$(MAPI_UTIL_FILES)
@@ -158,10 +181,10 @@ es1api_libGLESv1_CM_la_LDFLAGS = \
if HAVE_SHARED_GLAPI
es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
endif
+endif
es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
$(call glapi_gen_mapi,$<,es1api)
-endif
if HAVE_OPENGL_ES2
TESTS += es2api/ABI-check
@@ -202,13 +225,15 @@ es2api_libGLESv2_la_LDFLAGS = \
if HAVE_SHARED_GLAPI
es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
endif
+endif
es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
$(call glapi_gen_mapi,$<,es2api)
-endif
-if HAVE_OPENVG
-SUBDIRS += vgapi
-endif
+# XXX: Inline vgapi's Makefile.am here.
+EXTRA_DIST += vgapi
+# if HAVE_OPENVG
+# SUBDIRS += vgapi
+# endif
include $(top_srcdir)/install-lib-links.mk
diff --git a/mesalib/src/mapi/Makefile.sources b/mesalib/src/mapi/Makefile.sources
index 4ce1afb23..41dbb24c8 100644
--- a/mesalib/src/mapi/Makefile.sources
+++ b/mesalib/src/mapi/Makefile.sources
@@ -15,38 +15,38 @@
# this mode, compile MAPI_BRIDGE_FILES with MAPI_MODE_BRIDGE defined.
MAPI_UTIL_FILES = \
- $(TOP)/src/mapi/u_compiler.h \
- $(TOP)/src/mapi/u_current.c \
- $(TOP)/src/mapi/u_current.h \
- $(TOP)/src/mapi/u_execmem.c \
- $(TOP)/src/mapi/u_execmem.h \
- $(TOP)/src/mapi/u_macros.h \
- $(TOP)/src/mapi/u_thread.h
+ u_compiler.h \
+ u_current.c \
+ u_current.h \
+ u_execmem.c \
+ u_execmem.h \
+ u_macros.h \
+ u_thread.h
MAPI_BRIDGE_FILES = \
- $(TOP)/src/mapi/entry.c \
- $(TOP)/src/mapi/entry.h \
- $(TOP)/src/mapi/entry_x86-64_tls.h \
- $(TOP)/src/mapi/entry_x86_tls.h \
- $(TOP)/src/mapi/entry_x86_tsd.h \
- $(TOP)/src/mapi/mapi_tmp.h
+ entry.c \
+ entry.h \
+ entry_x86-64_tls.h \
+ entry_x86_tls.h \
+ entry_x86_tsd.h \
+ mapi_tmp.h
MAPI_FILES = \
- $(TOP)/src/mapi/entry.c \
- $(TOP)/src/mapi/mapi.c \
- $(TOP)/src/mapi/mapi.h \
- $(TOP)/src/mapi/stub.c \
- $(TOP)/src/mapi/stub.h \
- $(TOP)/src/mapi/table.c \
- $(TOP)/src/mapi/table.h \
+ entry.c \
+ mapi.c \
+ mapi.h \
+ stub.c \
+ stub.h \
+ table.c \
+ table.h \
$(MAPI_UTIL_FILES)
MAPI_GLAPI_FILES = \
- $(TOP)/src/mapi/entry.c \
- $(TOP)/src/mapi/mapi_glapi.c \
- $(TOP)/src/mapi/stub.c \
- $(TOP)/src/mapi/stub.h \
- $(TOP)/src/mapi/table.c \
- $(TOP)/src/mapi/table.h \
+ entry.c \
+ mapi_glapi.c \
+ stub.c \
+ stub.h \
+ table.c \
+ table.h \
$(MAPI_UTIL_FILES)
diff --git a/mesalib/src/mapi/glapi/Makefile.sources b/mesalib/src/mapi/glapi/Makefile.sources
deleted file mode 100644
index df149a7d8..000000000
--- a/mesalib/src/mapi/glapi/Makefile.sources
+++ /dev/null
@@ -1,22 +0,0 @@
-# src/mapi/glapi/Makefile.sources
-
-GLAPI_UTIL_SOURCES = \
- $(top_builddir)/src/mapi/glapi/glapi_gentable.c
-
-GLAPI_SOURCES = \
- $(top_srcdir)/src/mapi/glapi/glapi_dispatch.c \
- $(top_srcdir)/src/mapi/glapi/glapi_entrypoint.c \
- $(top_srcdir)/src/mapi/glapi/glapi_getproc.c \
- $(top_srcdir)/src/mapi/glapi/glapi_nop.c \
- $(top_srcdir)/src/mapi/glapi/glapi.c \
- $(top_srcdir)/src/mapi/glapi/glapi.h \
- $(top_srcdir)/src/mapi/glapi/glapi_priv.h
-
-X86_API = \
- $(top_builddir)/src/mapi/glapi/glapi_x86.S
-
-X86_64_API = \
- $(top_builddir)/src/mapi/glapi/glapi_x86-64.S
-
-SPARC_API = \
- $(top_builddir)/src/mapi/glapi/glapi_sparc.S
diff --git a/mesalib/src/mapi/glapi/gen/ARB_direct_state_access.xml b/mesalib/src/mapi/glapi/gen/ARB_direct_state_access.xml
new file mode 100644
index 000000000..2fe1638fd
--- /dev/null
+++ b/mesalib/src/mapi/glapi/gen/ARB_direct_state_access.xml
@@ -0,0 +1,271 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+<category name="GL_ARB_direct_state_access" number="164">
+ <enum name="TEXTURE_TARGET" value="0x1006"/>
+ <enum name="QUERY_TARGET" value="0x82EA"/>
+ <enum name="TEXTURE_BINDING" value="0x82EB"/>
+
+ <!-- Texture object functions -->
+
+ <function name="CreateTextures" offset="assign">
+ <param name="target" type="GLenum" />
+ <param name="n" type="GLsizei" />
+ <param name="textures" type="GLuint *" />
+ </function>
+
+ <function name="TextureBuffer" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="internalformat" type="GLenum" />
+ <param name="buffer" type="GLuint" />
+ </function>
+
+ <function name="TextureStorage1D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="levels" type="GLsizei" />
+ <param name="internalformat" type="GLenum" />
+ <param name="width" type="GLsizei" />
+ </function>
+
+ <function name="TextureStorage2D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="levels" type="GLsizei" />
+ <param name="internalformat" type="GLenum" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ </function>
+
+ <function name="TextureStorage3D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="levels" type="GLsizei" />
+ <param name="internalformat" type="GLenum" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="depth" type="GLsizei" />
+ </function>
+
+ <function name="TextureStorage2DMultisample" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="samples" type="GLsizei" />
+ <param name="internalformat" type="GLenum" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="fixedsamplelocations" type="GLboolean" />
+ </function>
+
+ <function name="TextureStorage3DMultisample" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="samples" type="GLsizei" />
+ <param name="internalformat" type="GLenum" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="depth" type="GLsizei" />
+ <param name="fixedsamplelocations" type="GLboolean" />
+ </function>
+
+ <function name="TextureSubImage1D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="pixels" type="const GLvoid *" />
+ </function>
+
+ <function name="TextureSubImage2D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="pixels" type="const GLvoid *" />
+ </function>
+
+ <function name="TextureSubImage3D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="zoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="depth" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="pixels" type="const GLvoid *" />
+ </function>
+
+ <function name="CompressedTextureSubImage1D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="imageSize" type="GLsizei" />
+ <param name="data" type="const GLvoid *" />
+ </function>
+
+ <function name="CompressedTextureSubImage2D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="imageSize" type="GLsizei" />
+ <param name="data" type="const GLvoid *" />
+ </function>
+
+ <function name="CompressedTextureSubImage3D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="zoffset" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ <param name="depth" type="GLsizei" />
+ <param name="format" type="GLenum" />
+ <param name="imageSize" type="GLsizei" />
+ <param name="data" type="const GLvoid *" />
+ </function>
+
+ <function name="CopyTextureSubImage1D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="x" type="GLint" />
+ <param name="y" type="GLint" />
+ <param name="width" type="GLsizei" />
+ </function>
+
+ <function name="CopyTextureSubImage2D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="x" type="GLint" />
+ <param name="y" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ </function>
+
+ <function name="CopyTextureSubImage3D" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="xoffset" type="GLint" />
+ <param name="yoffset" type="GLint" />
+ <param name="zoffset" type="GLint" />
+ <param name="x" type="GLint" />
+ <param name="y" type="GLint" />
+ <param name="width" type="GLsizei" />
+ <param name="height" type="GLsizei" />
+ </function>
+
+ <function name="TextureParameterf" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="GLfloat" />
+ </function>
+
+ <function name="TextureParameterfv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="const GLfloat *" />
+ </function>
+
+ <function name="TextureParameteri" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="GLint" />
+ </function>
+
+ <function name="TextureParameterIiv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="const GLint *" />
+ </function>
+
+ <function name="TextureParameterIuiv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="const GLuint *" />
+ </function>
+
+ <function name="TextureParameteriv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="param" type="const GLint *" />
+ </function>
+
+ <function name="GenerateTextureMipmap" offset="assign">
+ <param name="texture" type="GLuint" />
+ </function>
+
+ <function name="BindTextureUnit" offset="assign">
+ <param name="unit" type="GLuint" />
+ <param name="texture" type="GLuint" />
+ </function>
+
+ <function name="GetTextureImage" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="format" type="GLenum" />
+ <param name="type" type="GLenum" />
+ <param name="bufSize" type="GLsizei" />
+ <param name="pixels" type="GLvoid *" />
+ </function>
+
+ <function name="GetCompressedTextureImage" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="bufSize" type="GLsizei" />
+ <param name="pixels" type="GLvoid *" />
+ </function>
+
+ <function name="GetTextureLevelParameterfv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLfloat *" />
+ </function>
+
+ <function name="GetTextureLevelParameteriv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="level" type="GLint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLint *" />
+ </function>
+
+ <function name="GetTextureParameterfv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLfloat *" />
+ </function>
+
+ <function name="GetTextureParameterIiv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLint *" />
+ </function>
+
+ <function name="GetTextureParameterIuiv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLuint *" />
+ </function>
+
+ <function name="GetTextureParameteriv" offset="assign">
+ <param name="texture" type="GLuint" />
+ <param name="pname" type="GLenum" />
+ <param name="params" type="GLint *" />
+ </function>
+
+</category>
+</OpenGLAPI>
diff --git a/mesalib/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml b/mesalib/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml
new file mode 100644
index 000000000..4f860ef8c
--- /dev/null
+++ b/mesalib/src/mapi/glapi/gen/ARB_gpu_shader_fp64.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_gpu_shader_fp64" number="89">
+
+ <function name="Uniform1d" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLdouble"/>
+ </function>
+
+ <function name="Uniform2d" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ </function>
+
+ <function name="Uniform3d" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ </function>
+
+ <function name="Uniform4d" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ <param name="w" type="GLdouble"/>
+ </function>
+
+ <function name="Uniform1dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="Uniform2dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="Uniform3dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="Uniform4dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix2dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix3dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix4dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix2x3dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix2x4dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix3x2dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix3x4dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix4x2dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="UniformMatrix4x3dv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLdouble *"/>
+ </function>
+
+ <function name="GetUniformdv" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="location" type="GLint"/>
+ <param name="params" type="GLdouble *"/>
+ </function>
+
+ <enum name="DOUBLE_VEC2" value="0x8FFC"/>
+ <enum name="DOUBLE_VEC3" value="0x8FFD"/>
+ <enum name="DOUBLE_VEC4" value="0x8FFE"/>
+
+ <enum name="DOUBLE_MAT2" value="0x8F46"/>
+ <enum name="DOUBLE_MAT3" value="0x8F47"/>
+ <enum name="DOUBLE_MAT4" value="0x8F48"/>
+ <enum name="DOUBLE_MAT2x3" value="0x8F49"/>
+ <enum name="DOUBLE_MAT2x4" value="0x8F4A"/>
+ <enum name="DOUBLE_MAT3x2" value="0x8F4B"/>
+ <enum name="DOUBLE_MAT3x4" value="0x8F4C"/>
+ <enum name="DOUBLE_MAT4x2" value="0x8F4D"/>
+ <enum name="DOUBLE_MAT4x3" value="0x8F4E"/>
+</category>
+
+</OpenGLAPI>
+
diff --git a/mesalib/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml b/mesalib/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml
new file mode 100644
index 000000000..5e8511783
--- /dev/null
+++ b/mesalib/src/mapi/glapi/gen/ARB_pipeline_statistics_query.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+<OpenGLAPI>
+
+<category name="GL_ARB_pipeline_statistics_query" number="171">
+
+ <enum name="VERTICES_SUBMITTED_ARB" value="0x82EE"/>
+ <enum name="PRIMITIVES_SUBMITTED_ARB" value="0x82EF"/>
+ <enum name="VERTEX_SHADER_INVOCATIONS_ARB" value="0x82F0"/>
+ <enum name="TESS_CONTROL_SHADER_PATCHES_ARB" value="0x82F1"/>
+ <enum name="TESS_EVALUATION_SHADER_INVOCATIONS_ARB" value="0x82F2"/>
+ <!-- <enum name="GEOMETRY_SHADER_INVOCATIONS" value="0x887F"/> -->
+ <enum name="GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB" value="0x82F3"/>
+ <enum name="FRAGMENT_SHADER_INVOCATIONS_ARB" value="0x82F4"/>
+ <enum name="COMPUTE_SHADER_INVOCATIONS_ARB" value="0x82F5"/>
+ <enum name="CLIPPING_INPUT_PRIMITIVES_ARB" value="0x82F6"/>
+ <enum name="CLIPPING_OUTPUT_PRIMITIVES_ARB" value="0x82F7"/>
+
+</category>
+
+</OpenGLAPI>
diff --git a/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml b/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
index d006917af..96ae2b9cb 100644
--- a/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
+++ b/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml
@@ -282,7 +282,6 @@
<param name="infoLog" type="GLchar *" />
</function>
- <!-- depends on GL_ARB_gpu_shader_fp64
<function name="ProgramUniform1d" offset="assign" static_dispatch="false">
<param name="program" type="GLuint" />
<param name="location" type="GLint" />
@@ -396,6 +395,5 @@
<param name="count" type="GLsizei" />
<param name="value" type="const GLdouble *" />
</function>
- -->
</category>
</OpenGLAPI>
diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am
index 7f76f1971..1c4b86aab 100644
--- a/mesalib/src/mapi/glapi/gen/Makefile.am
+++ b/mesalib/src/mapi/glapi/gen/Makefile.am
@@ -75,6 +75,7 @@ EXTRA_DIST= \
glX_proto_size.py \
glX_server_table.py \
remap_helper.py \
+ SConscript \
gl_API.dtd
######################################################################
@@ -106,6 +107,7 @@ API_XML = \
gl_API.xml \
es_EXT.xml \
gl_and_es_API.xml \
+ gl_and_glX_API.xml \
ARB_base_instance.xml \
ARB_blend_func_extended.xml \
ARB_clear_buffer_object.xml \
@@ -119,6 +121,7 @@ API_XML = \
ARB_debug_output.xml \
ARB_depth_buffer_float.xml \
ARB_depth_clamp.xml \
+ ARB_direct_state_access.xml \
ARB_draw_buffers.xml \
ARB_draw_buffers_blend.xml \
ARB_draw_elements_base_vertex.xml \
@@ -129,12 +132,14 @@ API_XML = \
ARB_framebuffer_object.xml \
ARB_geometry_shader4.xml \
ARB_get_program_binary.xml \
+ ARB_gpu_shader_fp64.xml \
ARB_gpu_shader5.xml \
ARB_instanced_arrays.xml \
ARB_internalformat_query.xml \
ARB_invalidate_subdata.xml \
ARB_map_buffer_range.xml \
ARB_multi_bind.xml \
+ ARB_pipeline_statistics_query.xml \
ARB_robustness.xml \
ARB_sample_shading.xml \
ARB_sampler_objects.xml \
@@ -176,6 +181,7 @@ API_XML = \
EXT_transform_feedback.xml \
INTEL_performance_query.xml \
KHR_debug.xml \
+ KHR_context_flush_control.xml \
NV_conditional_render.xml \
NV_primitive_restart.xml \
NV_texture_barrier.xml \
diff --git a/mesalib/src/mapi/glapi/gen/es_EXT.xml b/mesalib/src/mapi/glapi/gen/es_EXT.xml
index e2dc39021..3a2adeb04 100644
--- a/mesalib/src/mapi/glapi/gen/es_EXT.xml
+++ b/mesalib/src/mapi/glapi/gen/es_EXT.xml
@@ -837,4 +837,13 @@
</function>
</category>
+<!-- 151. GL_EXT_draw_buffers -->
+<category name="GL_EXT_draw_buffers" number="151">
+ <function name="DrawBuffersEXT" alias="DrawBuffers"
+ static_dispatch="false" es2="2.0">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="bufs" type="const GLenum *" count="n"/>
+ </function>
+</category>
+
</OpenGLAPI>
diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_size.py b/mesalib/src/mapi/glapi/gen/glX_proto_size.py
index d4cc6e365..26a2fdf36 100755
--- a/mesalib/src/mapi/glapi/gen/glX_proto_size.py
+++ b/mesalib/src/mapi/glapi/gen/glX_proto_size.py
@@ -289,7 +289,7 @@ class glx_server_enum_function(glx_enum_function):
print ''
print ' compsize = __gl%s_size(%s);' % (f.name, string.join(f.count_parameter_list, ","))
p = f.variable_length_parameter()
- print ' return __GLX_PAD(%s);' % (p.size_string())
+ print ' return safe_pad(%s);' % (p.size_arg_string())
print '}'
print ''
@@ -433,7 +433,7 @@ class PrintGlxReqSize_h(PrintGlxReqSize_common):
def printBody(self, api):
for func in api.functionIterateGlx():
if not func.ignore and func.has_variable_size_request():
- print 'extern PURE _X_HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap);' % (func.name)
+ print 'extern PURE _X_HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap, int reqlen);' % (func.name)
class PrintGlxReqSize_c(PrintGlxReqSize_common):
@@ -465,20 +465,18 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
print '#include "indirect_size.h"'
print '#include "indirect_reqsize.h"'
print ''
- print '#define __GLX_PAD(x) (((x) + 3) & ~3)'
- print ''
print '#if defined(__CYGWIN__) || defined(__MINGW32__)'
print '# undef HAVE_ALIAS'
print '#endif'
print '#ifdef HAVE_ALIAS'
print '# define ALIAS2(from,to) \\'
- print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\'
+ print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \\'
print ' __attribute__ ((alias( # to )));'
print '# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )'
print '#else'
print '# define ALIAS(from,to) \\'
- print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\'
- print ' { return __glX ## to ## ReqSize( pc, swap ); }'
+ print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \\'
+ print ' { return __glX ## to ## ReqSize( pc, swap, reqlen ); }'
print '#endif'
print ''
print ''
@@ -560,7 +558,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
def common_func_print_just_header(self, f):
print 'int'
- print '__glX%sReqSize( const GLbyte * pc, Bool swap )' % (f.name)
+ print '__glX%sReqSize( const GLbyte * pc, Bool swap, int reqlen )' % (f.name)
print '{'
@@ -618,6 +616,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
plus = ''
size = ''
param_offsets = {}
+ plusAdded=0
# Calculate the offset of each counter parameter and the
# size string for the variable length parameter(s). While
@@ -633,8 +632,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
if s == 0: s = 1
sig += "(%u,%u)" % (f.offset_of(p.counter), s)
- size += '%s%s' % (plus, p.size_string())
- plus = ' + '
+ if len(plus)!=0:
+ plusAdded=1
+ size += '%s%s' % (plus, p.size_arg_string())
+ plus = ', '
# If the calculated signature matches a function that has
@@ -658,7 +659,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common):
self.common_emit_fixups(fixup)
print ''
- print ' return __GLX_PAD(%s);' % (size)
+ if plusAdded:
+ print ' return safe_pad(safe_add(%s));' % (size)
+ else:
+ print ' return safe_pad(%s);' % (size)
print '}'
print ''
diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml
index 96146b7a7..a640241e9 100755
--- a/mesalib/src/mapi/glapi/gen/gl_API.xml
+++ b/mesalib/src/mapi/glapi/gen/gl_API.xml
@@ -8213,6 +8213,8 @@
<xi:include href="ARB_gpu_shader5.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="ARB_gpu_shader_fp64.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<category name="GL_ARB_transform_feedback3" number="94">
<enum name="MAX_TRANSFORM_FEEDBACK_BUFFERS" value="0x8E70"/>
<enum name="MAX_VERTEX_STREAMS" value="0x8E71"/>
@@ -8247,7 +8249,11 @@
<xi:include href="ARB_separate_shader_objects.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<!-- ARB extensions #98...#108 -->
+<category name="GL_ARB_shader_precision" number="98">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<!-- ARB extensions #99...#108 -->
<xi:include href="ARB_ES2_compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
@@ -8375,12 +8381,19 @@
<enum name="QUERY_BY_REGION_NO_WAIT_INVERTED" value="0x8E1A"/>
</category>
-<!-- ARB extensions 162 - 166 -->
+<!-- ARB extensions 162 - 163 -->
+
+<xi:include href="ARB_direct_state_access.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- ARB extensions 165 - 166 -->
<xi:include href="ARB_texture_barrier.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="KHR_context_flush_control.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<!-- ARB extension 171 -->
+<xi:include href="ARB_pipeline_statistics_query.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<!-- Non-ARB extensions sorted by extension number. -->
<category name="GL_EXT_blend_color" number="2">
@@ -12848,8 +12861,23 @@
<enum name="SKIP_DECODE_EXT" value="0x8A4A"/>
</category>
+<category name="GL_AMD_pinned_memory" number="411">
+ <enum name="EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD" value="0x9160"/>
+</category>
+
<xi:include href="INTEL_performance_query.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<category name="GL_EXT_polygon_offset_clamp" number="460">
+ <enum name="POLYGON_OFFSET_CLAMP_EXT" value="0x8E1B">
+ <size name="Get" mode="get"/>
+ </enum>
+ <function name="PolygonOffsetClampEXT" offset="assign">
+ <param name="factor" type="GLfloat"/>
+ <param name="units" type="GLfloat"/>
+ <param name="clamp" type="GLfloat"/>
+ </function>
+</category>
+
<!-- Unnumbered extensions sorted by name. -->
<category name="GL_ATI_blend_equation_separate">
diff --git a/mesalib/src/mapi/glapi/gen/gl_XML.py b/mesalib/src/mapi/glapi/gen/gl_XML.py
index 1a2bc2b91..c7b208907 100644
--- a/mesalib/src/mapi/glapi/gen/gl_XML.py
+++ b/mesalib/src/mapi/glapi/gen/gl_XML.py
@@ -584,6 +584,29 @@ class gl_parameter(object):
else:
return str(s)
+ def size_arg_string(self, use_parens = 1):
+ s = self.size()
+ if self.counter or self.count_parameter_list:
+ list = [ "compsize" ]
+
+ if self.counter and self.count_parameter_list:
+ list.append( self.counter )
+ elif self.counter:
+ list = [ self.counter ]
+
+ if s > 1:
+ list.append( str(s) )
+
+ if len(list) > 1 and use_parens :
+ return "safe_mul(%s)" % (string.join(list, " , "))
+ else:
+ return string.join(list, " , ")
+
+ elif self.is_image():
+ return "compsize"
+ else:
+ return str(s)
+
def format_string(self):
if self.type_expr.original_string == "GLenum":
diff --git a/mesalib/src/mapi/glapi/gen/glapi_gen.mk b/mesalib/src/mapi/glapi/gen/glapi_gen.mk
deleted file mode 100644
index b8bb2f465..000000000
--- a/mesalib/src/mapi/glapi/gen/glapi_gen.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# Helpers for glapi header generation
-
-glapi_gen_common_deps := \
- $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.xml) \
- $(wildcard $(top_srcdir)/src/mapi/glapi/gen/*.py)
-
-glapi_gen_mapi_script := $(top_srcdir)/src/mapi/mapi_abi.py
-glapi_gen_mapi_deps := \
- $(glapi_gen_mapi_script) \
- $(glapi_gen_common_deps)
-
-# $(1): path to an XML file
-# $(2): name of the printer
-define glapi_gen_mapi
-@$(MKDIR_P) $(dir $@)
-$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) \
- --mode lib --printer $(2) $(1) > $@
-endef
-
-glapi_gen_dispatch_script := $(top_srcdir)/src/mapi/glapi/gen/gl_table.py
-glapi_gen_dispatch_deps := $(glapi_gen_common_deps)
-
-# $(1): path to an XML file
-# $(2): empty, es1, or es2 for entry point filtering
-define glapi_gen_dispatch
-@$(MKDIR_P) $(dir $@)
-$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_dispatch_script) \
- -f $(1) -m remap_table $(if $(2),-c $(2),) > $@
-endef
-
-glapi_gen_remap_script := $(top_srcdir)/src/mapi/glapi/gen/remap_helper.py
-glapi_gen_remap_deps := $(glapi_gen_common_deps)
-
-# $(1): path to an XML file
-# $(2): empty, es1, or es2 for entry point filtering
-define glapi_gen_remap
-@$(MKDIR_P) $(dir $@)
-$(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_remap_script) \
- -f $(1) $(if $(2),-c $(2),) > $@
-endef
diff --git a/mesalib/src/mapi/glapi/glapi_dispatch.c b/mesalib/src/mapi/glapi/glapi_dispatch.c
index d2dd9654a..df907ff9d 100644
--- a/mesalib/src/mapi/glapi/glapi_dispatch.c
+++ b/mesalib/src/mapi/glapi/glapi_dispatch.c
@@ -144,6 +144,28 @@ GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLf
GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
+/* Enable frame pointer elimination on Windows, otherwise forgetting to add
+ * APIENTRY to _mesa_* entrypoints will not cause crashes on debug builds, as
+ * the initial ESP value is saved in the EBP in the function prologue, then
+ * restored on the epilogue, clobbering any corruption in the ESP pointer due
+ * to mismatch in the callee calling convention.
+ *
+ * On MSVC it's not sufficient to enable /Oy -- other optimizations must be
+ * enabled or frame pointer will be used regardless.
+ *
+ * We don't do this when NDEBUG is defined since, frame pointer omission
+ * optimization compiler flag are already specified on release builds, and
+ * because on profile builds we must have frame pointers or certain profilers
+ * might fail to unwind the stack.
+ */
+#if defined(_WIN32) && !defined(NDEBUG)
+# if defined(_MSC_VER)
+# pragma optimize( "gty", on )
+# elif defined(__GNUC__)
+# pragma GCC optimize ("omit-frame-pointer")
+# endif
+#endif
+
#include "glapi/glapitemp.h"
#endif /* USE_X86_ASM */