diff options
Diffstat (limited to 'mesalib/src/mapi')
-rw-r--r-- | mesalib/src/mapi/glapi/Makefile.am | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/Makefile.sources | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/SConscript | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 401 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/Makefile.am | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/NV_vdpau_interop.xml | 1 | ||||
-rwxr-xr-x | mesalib/src/mapi/glapi/gen/glX_proto_recv.py | 1 | ||||
-rwxr-xr-x | mesalib/src/mapi/glapi/gen/glX_proto_send.py | 1 | ||||
-rwxr-xr-x | mesalib/src/mapi/glapi/gen/gl_API.xml | 25 | ||||
-rwxr-xr-x | mesalib/src/mapi/glapi/gen/gl_functions.py | 2 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/gl_genexec.py | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/glapi.h | 26 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/glthread.c | 7 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/glthread.h | 28 |
14 files changed, 446 insertions, 51 deletions
diff --git a/mesalib/src/mapi/glapi/Makefile.am b/mesalib/src/mapi/glapi/Makefile.am index bf653a305..e425bacea 100644 --- a/mesalib/src/mapi/glapi/Makefile.am +++ b/mesalib/src/mapi/glapi/Makefile.am @@ -27,6 +27,7 @@ include ../Makefile.sources AM_CPPFLAGS = \ $(DEFINES) \ + $(SELINUX_CFLAGS) \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/mapi \ -I$(top_builddir)/src/mapi \ diff --git a/mesalib/src/mapi/glapi/Makefile.sources b/mesalib/src/mapi/glapi/Makefile.sources index 58d28c52c..100e6347e 100644 --- a/mesalib/src/mapi/glapi/Makefile.sources +++ b/mesalib/src/mapi/glapi/Makefile.sources @@ -6,7 +6,6 @@ GLAPI_SOURCES = \ glapi_gentable.c \ glapi_getproc.c \ glapi_nop.c \ - glthread.c \ glapi.c X86_API = \ diff --git a/mesalib/src/mapi/glapi/SConscript b/mesalib/src/mapi/glapi/SConscript index 152818d22..bc1c43aa8 100644 --- a/mesalib/src/mapi/glapi/SConscript +++ b/mesalib/src/mapi/glapi/SConscript @@ -34,7 +34,6 @@ glapi_sources = [ 'glapi_entrypoint.c', 'glapi_getproc.c', 'glapi_nop.c', - 'glthread.c', 'glapi.c', ] diff --git a/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml b/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml new file mode 100644 index 000000000..80234ea5e --- /dev/null +++ b/mesalib/src/mapi/glapi/gen/ARB_separate_shader_objects.xml @@ -0,0 +1,401 @@ +<?xml version="1.0"?> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> + +<!-- Note: no GLX protocol info yet. --> + +<OpenGLAPI> + <category name="ARB_separate_shader_objects" number="97"> + <enum name="ACTIVE_PROGRAM" value="0x8259"/> + <enum name="PROGRAM_PIPELINE_BINDING" value="0x825A"/> + <enum name="VERTEX_SHADER_BIT" value="0x00000001"/> + <enum name="FRAGMENT_SHADER_BIT" value="0x00000002"/> + <enum name="GEOMETRY_SHADER_BIT" value="0x00000004"/> + <enum name="TESS_CONTROL_SHADER_BIT" value="0x00000008"/> + <enum name="TESS_EVALUATION_SHADER_BIT" value="0x00000010"/> + <enum name="ALL_SHADER_BITS" value="0xFFFFFFFF"/> + <enum name="PROGRAM_SEPARABLE" value="0x8258"/> + + <function name="UseProgramStages" offset="assign"> + <param name="pipeline" type="GLuint" /> + <param name="stages" type="GLbitfield" /> + <param name="program" type="GLuint" /> + </function> + <function name="ActiveShaderProgram" offset="assign"> + <param name="pipeline" type="GLuint" /> + <param name="program" type="GLuint" /> + </function> + <function name="CreateShaderProgramv" offset="assign"> + <param name="type" type="GLenum" /> + <param name="count" type="GLsizei" /> + <param name="strings" type="const GLchar * const *" /> + <return type="GLuint"/> + </function> + <function name="BindProgramPipeline" offset="assign"> + <param name="pipeline" type="GLuint" /> + </function> + <function name="DeleteProgramPipelines" offset="assign"> + <param name="n" type="GLsizei" /> + <param name="pipelines" type="const GLuint *" /> + </function> + <function name="GenProgramPipelines" offset="assign"> + <param name="n" type="GLsizei" /> + <param name="pipelines" type="GLuint *" /> + </function> + <function name="IsProgramPipeline" offset="assign"> + <param name="pipeline" type="GLuint" /> + <return type="GLboolean"/> + </function> + <!-- Function already included on ARB_get_program_binary.xml. Keep a commented + version here for completeness --> + <!-- + <function name="ProgramParameteri" offset="assign" es2="3.0"> + <param name="program" type="GLuint"/> + <param name="pname" type="GLenum"/> + <param name="value" type="GLint"/> + </function> + --> + <function name="GetProgramPipelineiv" offset="assign"> + <param name="pipeline" type="GLuint" /> + <param name="pname" type="GLenum" /> + <param name="params" type="GLint *" /> + </function> + <function name="ProgramUniform1i" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLint" /> + </function> + <function name="ProgramUniform2i" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLint" /> + <param name="y" type="GLint" /> + </function> + <function name="ProgramUniform3i" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLint" /> + <param name="y" type="GLint" /> + <param name="z" type="GLint" /> + </function> + <function name="ProgramUniform4i" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLint" /> + <param name="y" type="GLint" /> + <param name="z" type="GLint" /> + <param name="w" type="GLint" /> + </function> + <function name="ProgramUniform1ui" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLuint" /> + </function> + <function name="ProgramUniform2ui" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLuint" /> + <param name="y" type="GLuint" /> + </function> + <function name="ProgramUniform3ui" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLuint" /> + <param name="y" type="GLuint" /> + <param name="z" type="GLuint" /> + </function> + <function name="ProgramUniform4ui" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLuint" /> + <param name="y" type="GLuint" /> + <param name="z" type="GLuint" /> + <param name="w" type="GLuint" /> + </function> + <function name="ProgramUniform1f" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLfloat" /> + </function> + <function name="ProgramUniform2f" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLfloat" /> + <param name="y" type="GLfloat" /> + </function> + <function name="ProgramUniform3f" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLfloat" /> + <param name="y" type="GLfloat" /> + <param name="z" type="GLfloat" /> + </function> + <function name="ProgramUniform4f" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLfloat" /> + <param name="y" type="GLfloat" /> + <param name="z" type="GLfloat" /> + <param name="w" type="GLfloat" /> + </function> + <function name="ProgramUniform1iv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLint *" /> + </function> + <function name="ProgramUniform2iv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLint *" /> + </function> + <function name="ProgramUniform3iv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLint *" /> + </function> + <function name="ProgramUniform4iv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLint *" /> + </function> + <function name="ProgramUniform1uiv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLuint *" /> + </function> + <function name="ProgramUniform2uiv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLuint *" /> + </function> + <function name="ProgramUniform3uiv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLuint *" /> + </function> + <function name="ProgramUniform4uiv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLuint *" /> + </function> + <function name="ProgramUniform1fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniform2fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniform3fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniform4fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix2fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix3fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix4fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix2x3fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix3x2fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix2x4fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix4x2fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix3x4fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ProgramUniformMatrix4x3fv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLfloat *" /> + </function> + <function name="ValidateProgramPipeline" offset="assign"> + <param name="pipeline" type="GLuint" /> + </function> + <function name="GetProgramPipelineInfoLog" offset="assign"> + <param name="pipeline" type="GLuint" /> + <param name="bufSize" type="GLsizei" /> + <param name="length" type="GLsizei *" /> + <param name="infoLog" type="GLchar *" /> + </function> + + <!-- depends on GL_ARB_gpu_shader_fp64 + <function name="ProgramUniform1d" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLdouble" /> + </function> + <function name="ProgramUniform2d" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLdouble" /> + <param name="y" type="GLdouble" /> + </function> + <function name="ProgramUniform3d" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="x" type="GLdouble" /> + <param name="y" type="GLdouble" /> + <param name="z" type="GLdouble" /> + </function> + <function name="ProgramUniform4d" offset="assign"> + <param name="program" type="GLuint" /> + <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="ProgramUniformMatrix2x3dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix3x2dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix2x4dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix4x2dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix3x4dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix4x3dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix2dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix3dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniformMatrix4dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="transpose" type="GLboolean" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniform1dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniform2dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniform3dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <param name="count" type="GLsizei" /> + <param name="value" type="const GLdouble *" /> + </function> + <function name="ProgramUniform4dv" offset="assign"> + <param name="program" type="GLuint" /> + <param name="location" type="GLint" /> + <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 9e6fe5261..7b3c118f0 100644 --- a/mesalib/src/mapi/glapi/gen/Makefile.am +++ b/mesalib/src/mapi/glapi/gen/Makefile.am @@ -113,6 +113,7 @@ API_XML = \ ARB_sample_shading.xml \ ARB_sampler_objects.xml \ ARB_seamless_cube_map.xml \ + ARB_separate_shader_objects.xml \ ARB_shader_atomic_counters.xml \ ARB_shader_image_load_store.xml \ ARB_sync.xml \ diff --git a/mesalib/src/mapi/glapi/gen/NV_vdpau_interop.xml b/mesalib/src/mapi/glapi/gen/NV_vdpau_interop.xml index cf5f0eddd..0b19e1a85 100644 --- a/mesalib/src/mapi/glapi/gen/NV_vdpau_interop.xml +++ b/mesalib/src/mapi/glapi/gen/NV_vdpau_interop.xml @@ -29,6 +29,7 @@ </function> <function name="VDPAUIsSurfaceNV" offset="assign"> + <return type="GLboolean"/> <param name="surface" type="GLintptr"/> </function> diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_recv.py b/mesalib/src/mapi/glapi/gen/glX_proto_recv.py index 84526581a..086fc97d7 100755 --- a/mesalib/src/mapi/glapi/gen/glX_proto_recv.py +++ b/mesalib/src/mapi/glapi/gen/glX_proto_recv.py @@ -97,7 +97,6 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): print '#include "singlesize.h"' print '#include "glapi.h"' print '#include "glapitable.h"' - print '#include "glthread.h"' print '#include "dispatch.h"' print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_send.py b/mesalib/src/mapi/glapi/gen/glX_proto_send.py index 8b804418b..a98f63e99 100755 --- a/mesalib/src/mapi/glapi/gen/glX_proto_send.py +++ b/mesalib/src/mapi/glapi/gen/glX_proto_send.py @@ -167,7 +167,6 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): print '#include "glxclient.h"' print '#include "indirect_size.h"' print '#include "glapi.h"' - print '#include "glthread.h"' print '#include <GL/glxproto.h>' print '#include <X11/Xlib-xcb.h>' print '#include <xcb/xcb.h>' diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml index d5467a823..8f175e6be 100755 --- a/mesalib/src/mapi/glapi/gen/gl_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml @@ -8275,7 +8275,11 @@ </function> </category> -<!-- ARB extensions #95...#108 --> +<!-- ARB extensions #95...#96 --> + +<xi:include href="ARB_separate_shader_objects.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> + +<!-- ARB extensions #98...#108 --> <xi:include href="ARB_ES2_compatibility.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> @@ -8492,6 +8496,25 @@ <xi:include href="ARB_texture_storage_multisample.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> +<!-- ARB extension 142 - 143. --> + +<category name="GL_ARB_buffer_storage" number="144"> + <enum name="MAP_PERSISTENT_BIT" value="0x40" /> + <enum name="MAP_COHERENT_BIT" value="0x80" /> + <enum name="DYNAMIC_STORAGE_BIT" value="0x100" /> + <enum name="CLIENT_STORAGE_BIT" value="0x200" /> + <enum name="BUFFER_IMMUTABLE_STORAGE" value="0x821F" /> + <enum name="BUFFER_STORAGE_FLAGS" value="0x8220" /> + <enum name="CLIENT_MAPPED_BUFFER_BARRIER_BIT" value="0x4000" /> + + <function name="BufferStorage" offset="assign"> + <param name="target" type="GLenum"/> + <param name="size" type="GLsizeiptr"/> + <param name="data" type="const GLvoid *"/> + <param name="flags" type="GLbitfield"/> + </function> +</category> + <!-- Non-ARB extensions sorted by extension number. --> <category name="GL_EXT_blend_color" number="2"> diff --git a/mesalib/src/mapi/glapi/gen/gl_functions.py b/mesalib/src/mapi/glapi/gen/gl_functions.py index 3db72bba8..cd408ade2 100755 --- a/mesalib/src/mapi/glapi/gen/gl_functions.py +++ b/mesalib/src/mapi/glapi/gen/gl_functions.py @@ -43,7 +43,7 @@ class PrintFunctionTable(gl_XML.gl_print_base): print """ #include "glapitable.h" #include "glapi.h" -#include "glthread.h" +#include "u_thread.h" #include "dispatch.h" """ return diff --git a/mesalib/src/mapi/glapi/gen/gl_genexec.py b/mesalib/src/mapi/glapi/gen/gl_genexec.py index 1765a51ad..460919397 100644 --- a/mesalib/src/mapi/glapi/gen/gl_genexec.py +++ b/mesalib/src/mapi/glapi/gen/gl_genexec.py @@ -86,6 +86,7 @@ header = """/** #include "main/multisample.h" #include "main/objectlabel.h" #include "main/performance_monitor.h" +#include "main/pipelineobj.h" #include "main/pixel.h" #include "main/pixelstore.h" #include "main/points.h" diff --git a/mesalib/src/mapi/glapi/glapi.h b/mesalib/src/mapi/glapi/glapi.h index b10f19a63..67bf1f42e 100644 --- a/mesalib/src/mapi/glapi/glapi.h +++ b/mesalib/src/mapi/glapi/glapi.h @@ -44,13 +44,14 @@ #ifndef _GLAPI_H #define _GLAPI_H -#include "glthread.h" +#include "u_thread.h" #ifdef __cplusplus extern "C" { #endif + #ifdef _GLAPI_NO_EXPORTS # define _GLAPI_EXPORT #else /* _GLAPI_NO_EXPORTS */ @@ -69,7 +70,6 @@ extern "C" { #include "GL/gl.h" #include "GL/glext.h" -#include "glthread.h" struct _glapi_table; @@ -84,8 +84,8 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); #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 /* @@ -100,12 +100,14 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); **/ #if defined (GLX_USE_TLS) -_GLAPI_EXPORT extern __thread struct _glapi_table * _glapi_tls_Dispatch; +_GLAPI_EXPORT extern __thread struct _glapi_table * _glapi_tls_Dispatch + ; -_GLAPI_EXPORT extern const void *_glapi_Context; -_GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch; +_GLAPI_EXPORT extern __thread void * _glapi_tls_Context + ; -_GLAPI_EXPORT extern __thread void * _glapi_tls_Context; +_GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch; +_GLAPI_EXPORT extern const void *_glapi_Context; # define GET_DISPATCH() _glapi_tls_Dispatch # define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_tls_Context @@ -118,20 +120,22 @@ _GLAPI_EXPORT extern __thread void * _glapi_tls_Context; #define SERVEXTERN _declspec(dllexport) #endif -SERVEXTERN void *_glapi_Context; SERVEXTERN struct _glapi_table *_glapi_Dispatch; +SERVEXTERN void *_glapi_Context; # ifdef THREADS # define GET_DISPATCH() \ (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch()) - # define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) \ (likely(_glapi_Context) ? _glapi_Context : _glapi_get_context()) + # else + # define GET_DISPATCH() _glapi_Dispatch # define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_Context + # endif #endif /* defined (GLX_USE_TLS) */ @@ -183,8 +187,10 @@ _glapi_get_proc_address(const char *funcName); extern struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix); -#endif + #ifdef __cplusplus } #endif + +#endif /* _GLAPI_H */ diff --git a/mesalib/src/mapi/glapi/glthread.c b/mesalib/src/mapi/glapi/glthread.c deleted file mode 100644 index 239090ecf..000000000 --- a/mesalib/src/mapi/glapi/glthread.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "glapi/glapi.h" - -unsigned long _GLAPI_EXPORT -_glthread_GetID(void) -{ - return u_thread_self(); -} diff --git a/mesalib/src/mapi/glapi/glthread.h b/mesalib/src/mapi/glapi/glthread.h deleted file mode 100644 index 2399abb2b..000000000 --- a/mesalib/src/mapi/glapi/glthread.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef GLTHREAD_H -#define GLTHREAD_H - -#include "u_thread.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name) -#define _glthread_INIT_MUTEX(name) u_mutex_init(name) -#define _glthread_DESTROY_MUTEX(name) u_mutex_destroy(name) -#define _glthread_LOCK_MUTEX(name) u_mutex_lock(name) -#define _glthread_UNLOCK_MUTEX(name) u_mutex_unlock(name) - -#define _glthread_InitTSD(tsd) u_tsd_init(tsd); -#define _glthread_DestroyTSD(tsd) u_tsd_destroy(tsd); -#define _glthread_GetTSD(tsd) u_tsd_get(tsd); -#define _glthread_SetTSD(tsd, ptr) u_tsd_set(tsd, ptr); - -typedef struct u_tsd _glthread_TSD; -typedef u_mutex _glthread_Mutex; - -#ifdef __cplusplus -} -#endif - -#endif /* GLTHREAD_H */ |