summaryrefslogtreecommitdiff
path: root/lib/mesa/src/mapi
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/mapi')
-rw-r--r--lib/mesa/src/mapi/entry_x86-64_tls.h6
-rw-r--r--lib/mesa/src/mapi/entry_x86_tls.h4
-rw-r--r--lib/mesa/src/mapi/es1api/gles1.def.in146
-rw-r--r--lib/mesa/src/mapi/es1api/meson.build12
-rw-r--r--lib/mesa/src/mapi/es2api/gles2.def.in359
-rw-r--r--lib/mesa/src/mapi/es2api/meson.build12
-rw-r--r--lib/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml6
-rw-r--r--lib/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml76
-rw-r--r--lib/mesa/src/mapi/glapi/gen/EXT_direct_state_access.xml4
-rw-r--r--lib/mesa/src/mapi/glapi/gen/EXT_external_objects.xml2
-rw-r--r--lib/mesa/src/mapi/glapi/gen/EXT_external_objects_win32.xml48
-rw-r--r--lib/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml3
-rw-r--r--lib/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml28
-rw-r--r--lib/mesa/src/mapi/glapi/gen/NV_half_float.xml88
-rw-r--r--lib/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml2
-rw-r--r--lib/mesa/src/mapi/glapi/gen/api_beginend_init_h.py80
-rw-r--r--lib/mesa/src/mapi/glapi/gen/api_exec_init.py26
-rw-r--r--lib/mesa/src/mapi/glapi/gen/api_hw_select_init_h.py47
-rw-r--r--lib/mesa/src/mapi/glapi/gen/gl_and_es_API.xml86
-rw-r--r--lib/mesa/src/mapi/glapi/gen/gl_unmarshal_table.py89
-rw-r--r--lib/mesa/src/mapi/glapi/gen/meson.build29
-rw-r--r--lib/mesa/src/mapi/glapi/glapi.h19
-rw-r--r--lib/mesa/src/mapi/glapi/glapi_entrypoint.c116
-rw-r--r--lib/mesa/src/mapi/glapi/glapi_priv.h10
-rw-r--r--lib/mesa/src/mapi/glapi/meson.build113
-rw-r--r--lib/mesa/src/mapi/glapi/tests/check_table.cpp2
-rw-r--r--lib/mesa/src/mapi/shared-glapi/meson.build4
-rw-r--r--lib/mesa/src/mapi/stub.c9
28 files changed, 1053 insertions, 373 deletions
diff --git a/lib/mesa/src/mapi/entry_x86-64_tls.h b/lib/mesa/src/mapi/entry_x86-64_tls.h
index aebe4cf4a..f2fea5189 100644
--- a/lib/mesa/src/mapi/entry_x86-64_tls.h
+++ b/lib/mesa/src/mapi/entry_x86-64_tls.h
@@ -51,7 +51,7 @@ __asm__(".text\n"
#define STUB_ASM_CODE(slot) \
ENDBR \
- "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
+ "movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax\n\t" \
"movq %fs:(%rax), %r11\n\t" \
"jmp *(8 * " slot ")(%r11)"
@@ -59,7 +59,7 @@ __asm__(".text\n"
#define STUB_ASM_CODE(slot) \
ENDBR \
- "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
+ "movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax\n\t" \
"movl %fs:(%rax), %r11d\n\t" \
"movl 4*" slot "(%r11d), %r11d\n\t" \
"jmp *%r11"
@@ -121,7 +121,7 @@ entry_generate(int slot)
char *code;
mapi_func entry;
- __asm__("movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%%rip), %0"
+ __asm__("movq _glapi_tls_Dispatch@GOTTPOFF(%%rip), %0"
: "=r" (addr));
if ((addr >> 32) != 0xffffffff)
return NULL;
diff --git a/lib/mesa/src/mapi/entry_x86_tls.h b/lib/mesa/src/mapi/entry_x86_tls.h
index bdaa97374..9829968c0 100644
--- a/lib/mesa/src/mapi/entry_x86_tls.h
+++ b/lib/mesa/src/mapi/entry_x86_tls.h
@@ -48,7 +48,7 @@ __asm__("x86_current_tls:\n\t"
"1:\n\t"
"popl %eax\n\t"
"addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t"
- "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t"
+ "movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax\n\t"
"ret");
#ifndef GLX_X86_READONLY_TEXT
@@ -70,7 +70,7 @@ __asm__(".balign 16\n"
"1:\n\t" \
"popl %eax\n\t" \
"addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" \
- "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t" \
+ "movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax\n\t" \
"movl %gs:(%eax), %eax\n\t" \
"jmp *(4 * " slot ")(%eax)"
diff --git a/lib/mesa/src/mapi/es1api/gles1.def.in b/lib/mesa/src/mapi/es1api/gles1.def.in
new file mode 100644
index 000000000..b09aff6a8
--- /dev/null
+++ b/lib/mesa/src/mapi/es1api/gles1.def.in
@@ -0,0 +1,146 @@
+; stdcall calling convention have @number suffix on 32 bits architecture for gcc
+glActiveTexture@4
+glAlphaFunc@8
+glAlphaFuncx@8
+glBindBuffer@8
+glBindTexture@8
+glBlendFunc@8
+glBufferData@16
+glBufferSubData@16
+glClear@4
+glClearColor@16
+glClearColorx@16
+glClearDepthf@4
+glClearDepthx@4
+glClearStencil@4
+glClientActiveTexture@4
+glClipPlanef@8
+glClipPlanex@8
+glColor4f@16
+glColor4ub@16
+glColor4x@16
+glColorMask@16
+glColorPointer@16
+glCompressedTexImage2D@32
+glCompressedTexSubImage2D@36
+glCopyTexImage2D@32
+glCopyTexSubImage2D@32
+glCullFace@4
+glDeleteBuffers@8
+glDeleteTextures@8
+glDepthFunc@4
+glDepthMask@4
+glDepthRangef@8
+glDepthRangex@8
+glDisable@4
+glDisableClientState@4
+glDrawArrays@12
+glDrawElements@16
+glEnable@4
+glEnableClientState@4
+glFinish@0
+glFlush@0
+glFogf@8
+glFogfv@8
+glFogx@8
+glFogxv@8
+glFrontFace@4
+glFrustumf@24
+glFrustumx@24
+glGenBuffers@8
+glGenTextures@8
+glGetBooleanv@8
+glGetBufferParameteriv@12
+glGetClipPlanef@8
+glGetClipPlanex@8
+glGetError@0
+glGetFixedv@8
+glGetFloatv@8
+glGetIntegerv@8
+glGetLightfv@12
+glGetLightxv@12
+glGetMaterialfv@12
+glGetMaterialxv@12
+glGetPointerv@8
+glGetString@4
+glGetTexEnvfv@12
+glGetTexEnviv@12
+glGetTexEnvxv@12
+glGetTexParameterfv@12
+glGetTexParameteriv@12
+glGetTexParameterxv@12
+glHint@8
+glIsBuffer@4
+glIsEnabled@4
+glIsTexture@4
+glLightModelf@8
+glLightModelfv@8
+glLightModelx@8
+glLightModelxv@8
+glLightf@12
+glLightfv@12
+glLightx@12
+glLightxv@12
+glLineWidth@4
+glLineWidthx@4
+glLoadIdentity@0
+glLoadMatrixf@4
+glLoadMatrixx@4
+glLogicOp@4
+glMaterialf@12
+glMaterialfv@12
+glMaterialx@12
+glMaterialxv@12
+glMatrixMode@4
+glMultMatrixf@4
+glMultMatrixx@4
+glMultiTexCoord4f@20
+glMultiTexCoord4x@20
+glNormal3f@12
+glNormal3x@12
+glNormalPointer@12
+glOrthof@24
+glOrthox@24
+glPixelStorei@8
+glPointParameterf@8
+glPointParameterfv@8
+glPointParameterx@8
+glPointParameterxv@8
+glPointSize@4
+glPointSizePointerOES@12
+glPointSizex@4
+glPolygonOffset@8
+glPolygonOffsetx@8
+glPopMatrix@0
+glPushMatrix@0
+glReadPixels@28
+glRotatef@16
+glRotatex@16
+glSampleCoverage@8
+glSampleCoveragex@8
+glScalef@12
+glScalex@12
+glScissor@16
+glShadeModel@4
+glStencilFunc@12
+glStencilMask@4
+glStencilOp@12
+glTexCoordPointer@16
+glTexEnvf@12
+glTexEnvfv@12
+glTexEnvi@12
+glTexEnviv@12
+glTexEnvx@12
+glTexEnvxv@12
+glTexImage2D@36
+glTexParameterf@12
+glTexParameterfv@12
+glTexParameteri@12
+glTexParameteriv@12
+glTexParameterx@12
+glTexParameterxv@12
+glTexSubImage2D@36
+glTranslatef@12
+glTranslatex@12
+glVertexPointer@16
+glViewport@16
diff --git a/lib/mesa/src/mapi/es1api/meson.build b/lib/mesa/src/mapi/es1api/meson.build
index 8b749b1a3..d0d89b464 100644
--- a/lib/mesa/src/mapi/es1api/meson.build
+++ b/lib/mesa/src/mapi/es1api/meson.build
@@ -29,12 +29,20 @@ es1_glapi_mapi_tmp_h = custom_target(
_es1_c_args = []
if with_platform_windows
- _es1_c_args += ['-D_GDI32_', '-DBUILD_GL32']
+ _es1_c_args += ['-D_GDI32_']
endif
+gles1_def = custom_target(
+ 'gles1.def',
+ input: 'gles1.def.in',
+ output : 'gles1.def',
+ command : gen_vs_module_defs_normal_command,
+)
+
libglesv1_cm = shared_library(
'GLESv1_CM' + get_option('gles-lib-suffix'),
['../entry.c', es1_glapi_mapi_tmp_h],
+ vs_module_defs : gles1_def,
c_args : [
c_msvc_compat_args,
_es1_c_args,
@@ -46,7 +54,7 @@ libglesv1_cm = shared_library(
link_args : [ld_args_gc_sections],
include_directories : [inc_src, inc_include, inc_mapi],
link_with : libglapi,
- dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl],
+ dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl, idep_mesautilc11],
soversion : host_machine.system() == 'windows' ? '' : '1',
version : '1.1.0',
darwin_versions : '3.0.0',
diff --git a/lib/mesa/src/mapi/es2api/gles2.def.in b/lib/mesa/src/mapi/es2api/gles2.def.in
new file mode 100644
index 000000000..4517ea8b7
--- /dev/null
+++ b/lib/mesa/src/mapi/es2api/gles2.def.in
@@ -0,0 +1,359 @@
+; stdcall calling convention have @number suffix on 32 bits architecture for gcc
+glActiveShaderProgram@8
+glActiveTexture@4
+glAttachShader@8
+glBeginQuery@8
+glBeginTransformFeedback@4
+glBindAttribLocation@12
+glBindBuffer@8
+glBindBufferBase@12
+glBindBufferRange@20
+glBindFramebuffer@8
+glBindImageTexture@28
+glBindProgramPipeline@4
+glBindRenderbuffer@8
+glBindSampler@8
+glBindTexture@8
+glBindTransformFeedback@8
+glBindVertexArray@4
+glBindVertexBuffer@16
+glBlendBarrier@0
+glBlendColor@16
+glBlendEquation@4
+glBlendEquationSeparate@8
+glBlendEquationSeparatei@12
+glBlendEquationi@8
+glBlendFunc@8
+glBlendFuncSeparate@16
+glBlendFuncSeparatei@20
+glBlendFunci@12
+glBlitFramebuffer@40
+glBufferData@16
+glBufferSubData@16
+glCheckFramebufferStatus@4
+glClear@4
+glClearBufferfi@16
+glClearBufferfv@12
+glClearBufferiv@12
+glClearBufferuiv@12
+glClearColor@16
+glClearDepthf@4
+glClearStencil@4
+glClientWaitSync@16
+glColorMask@16
+glColorMaski@20
+glCompileShader@4
+glCompressedTexImage2D@32
+glCompressedTexImage3D@36
+glCompressedTexSubImage2D@36
+glCompressedTexSubImage3D@44
+glCopyBufferSubData@20
+glCopyImageSubData@60
+glCopyTexImage2D@32
+glCopyTexSubImage2D@32
+glCopyTexSubImage3D@36
+glCreateProgram@0
+glCreateShader@4
+glCreateShaderProgramv@12
+glCullFace@4
+glDebugMessageCallback@8
+glDebugMessageControl@24
+glDebugMessageInsert@24
+glDeleteBuffers@8
+glDeleteFramebuffers@8
+glDeleteProgram@4
+glDeleteProgramPipelines@8
+glDeleteQueries@8
+glDeleteRenderbuffers@8
+glDeleteSamplers@8
+glDeleteShader@4
+glDeleteSync@4
+glDeleteTextures@8
+glDeleteTransformFeedbacks@8
+glDeleteVertexArrays@8
+glDepthFunc@4
+glDepthMask@4
+glDepthRangef@8
+glDetachShader@8
+glDisable@4
+glDisableVertexAttribArray@4
+glDisablei@8
+glDispatchCompute@12
+glDispatchComputeIndirect@4
+glDrawArrays@12
+glDrawArraysIndirect@8
+glDrawArraysInstanced@16
+glDrawBuffers@8
+glDrawElements@16
+glDrawElementsBaseVertex@20
+glDrawElementsIndirect@12
+glDrawElementsInstanced@20
+glDrawElementsInstancedBaseVertex@24
+glDrawRangeElements@24
+glDrawRangeElementsBaseVertex@28
+glEnable@4
+glEnableVertexAttribArray@4
+glEnablei@8
+glEndQuery@4
+glEndTransformFeedback@0
+glFenceSync@8
+glFinish@0
+glFlush@0
+glFlushMappedBufferRange@12
+glFramebufferParameteri@12
+glFramebufferRenderbuffer@16
+glFramebufferTexture2D@20
+glFramebufferTexture@16
+glFramebufferTextureLayer@20
+glFrontFace@4
+glGenBuffers@8
+glGenFramebuffers@8
+glGenProgramPipelines@8
+glGenQueries@8
+glGenRenderbuffers@8
+glGenSamplers@8
+glGenTextures@8
+glGenTransformFeedbacks@8
+glGenVertexArrays@8
+glGenerateMipmap@4
+glGetActiveAttrib@28
+glGetActiveUniform@28
+glGetActiveUniformBlockName@20
+glGetActiveUniformBlockiv@16
+glGetActiveUniformsiv@20
+glGetAttachedShaders@16
+glGetAttribLocation@8
+glGetBooleani_v@12
+glGetBooleanv@8
+glGetBufferParameteri64v@12
+glGetBufferParameteriv@12
+glGetBufferPointerv@12
+glGetDebugMessageLog@32
+glGetError@0
+glGetFloatv@8
+glGetFragDataLocation@8
+glGetFramebufferAttachmentParameteriv@16
+glGetFramebufferParameteriv@12
+glGetGraphicsResetStatus@0
+glGetInteger64i_v@12
+glGetInteger64v@8
+glGetIntegeri_v@12
+glGetIntegerv@8
+glGetInternalformativ@20
+glGetMultisamplefv@12
+glGetObjectLabel@20
+glGetObjectPtrLabel@16
+glGetPointerv@8
+glGetProgramBinary@20
+glGetProgramInfoLog@16
+glGetProgramInterfaceiv@16
+glGetProgramPipelineInfoLog@16
+glGetProgramPipelineiv@12
+glGetProgramResourceIndex@12
+glGetProgramResourceLocation@12
+glGetProgramResourceName@24
+glGetProgramResourceiv@32
+glGetProgramiv@12
+glGetQueryObjectuiv@12
+glGetQueryiv@12
+glGetRenderbufferParameteriv@12
+glGetSamplerParameterIiv@12
+glGetSamplerParameterIuiv@12
+glGetSamplerParameterfv@12
+glGetSamplerParameteriv@12
+glGetShaderInfoLog@16
+glGetShaderPrecisionFormat@16
+glGetShaderSource@16
+glGetShaderiv@12
+glGetString@4
+glGetStringi@8
+glGetSynciv@20
+glGetTexLevelParameterfv@16
+glGetTexLevelParameteriv@16
+glGetTexParameterIiv@12
+glGetTexParameterIuiv@12
+glGetTexParameterfv@12
+glGetTexParameteriv@12
+glGetTransformFeedbackVarying@28
+glGetUniformBlockIndex@8
+glGetUniformIndices@16
+glGetUniformLocation@8
+glGetUniformfv@12
+glGetUniformiv@12
+glGetUniformuiv@12
+glGetVertexAttribIiv@12
+glGetVertexAttribIuiv@12
+glGetVertexAttribPointerv@12
+glGetVertexAttribfv@12
+glGetVertexAttribiv@12
+glGetnUniformfv@16
+glGetnUniformiv@16
+glGetnUniformuiv@16
+glHint@8
+glInvalidateFramebuffer@12
+glInvalidateSubFramebuffer@28
+glIsBuffer@4
+glIsEnabled@4
+glIsEnabledi@8
+glIsFramebuffer@4
+glIsProgram@4
+glIsProgramPipeline@4
+glIsQuery@4
+glIsRenderbuffer@4
+glIsSampler@4
+glIsShader@4
+glIsSync@4
+glIsTexture@4
+glIsTransformFeedback@4
+glIsVertexArray@4
+glLineWidth@4
+glLinkProgram@4
+glMapBufferRange@16
+glMemoryBarrier@4
+glMemoryBarrierByRegion@4
+glMinSampleShading@4
+glObjectLabel@16
+glObjectPtrLabel@12
+glPatchParameteri@8
+glPauseTransformFeedback@0
+glPixelStorei@8
+glPolygonOffset@8
+glPopDebugGroup@0
+glPrimitiveBoundingBox@32
+glProgramBinary@16
+glProgramParameteri@12
+glProgramUniform1f@12
+glProgramUniform1fv@16
+glProgramUniform1i@12
+glProgramUniform1iv@16
+glProgramUniform1ui@12
+glProgramUniform1uiv@16
+glProgramUniform2f@16
+glProgramUniform2fv@16
+glProgramUniform2i@16
+glProgramUniform2iv@16
+glProgramUniform2ui@16
+glProgramUniform2uiv@16
+glProgramUniform3f@20
+glProgramUniform3fv@16
+glProgramUniform3i@20
+glProgramUniform3iv@16
+glProgramUniform3ui@20
+glProgramUniform3uiv@16
+glProgramUniform4f@24
+glProgramUniform4fv@16
+glProgramUniform4i@24
+glProgramUniform4iv@16
+glProgramUniform4ui@24
+glProgramUniform4uiv@16
+glProgramUniformMatrix2fv@20
+glProgramUniformMatrix2x3fv@20
+glProgramUniformMatrix2x4fv@20
+glProgramUniformMatrix3fv@20
+glProgramUniformMatrix3x2fv@20
+glProgramUniformMatrix3x4fv@20
+glProgramUniformMatrix4fv@20
+glProgramUniformMatrix4x2fv@20
+glProgramUniformMatrix4x3fv@20
+glPushDebugGroup@16
+glReadBuffer@4
+glReadPixels@28
+glReadnPixels@32
+glReleaseShaderCompiler@0
+glRenderbufferStorage@16
+glRenderbufferStorageMultisample@20
+glResumeTransformFeedback@0
+glSampleCoverage@8
+glSampleMaski@8
+glSamplerParameterIiv@12
+glSamplerParameterIuiv@12
+glSamplerParameterf@12
+glSamplerParameterfv@12
+glSamplerParameteri@12
+glSamplerParameteriv@12
+glScissor@16
+glShaderBinary@20
+glShaderSource@16
+glStencilFunc@12
+glStencilFuncSeparate@16
+glStencilMask@4
+glStencilMaskSeparate@8
+glStencilOp@12
+glStencilOpSeparate@16
+glTexBuffer@12
+glTexBufferRange@20
+glTexImage2D@36
+glTexImage3D@40
+glTexParameterIiv@12
+glTexParameterIuiv@12
+glTexParameterf@12
+glTexParameterfv@12
+glTexParameteri@12
+glTexParameteriv@12
+glTexStorage2D@20
+glTexStorage2DMultisample@24
+glTexStorage3D@24
+glTexStorage3DMultisample@28
+glTexSubImage2D@36
+glTexSubImage3D@44
+glTransformFeedbackVaryings@16
+glUniform1f@8
+glUniform1fv@12
+glUniform1i@8
+glUniform1iv@12
+glUniform1ui@8
+glUniform1uiv@12
+glUniform2f@12
+glUniform2fv@12
+glUniform2i@12
+glUniform2iv@12
+glUniform2ui@12
+glUniform2uiv@12
+glUniform3f@16
+glUniform3fv@12
+glUniform3i@16
+glUniform3iv@12
+glUniform3ui@16
+glUniform3uiv@12
+glUniform4f@20
+glUniform4fv@12
+glUniform4i@20
+glUniform4iv@12
+glUniform4ui@20
+glUniform4uiv@12
+glUniformBlockBinding@12
+glUniformMatrix2fv@16
+glUniformMatrix2x3fv@16
+glUniformMatrix2x4fv@16
+glUniformMatrix3fv@16
+glUniformMatrix3x2fv@16
+glUniformMatrix3x4fv@16
+glUniformMatrix4fv@16
+glUniformMatrix4x2fv@16
+glUniformMatrix4x3fv@16
+glUnmapBuffer@4
+glUseProgram@4
+glUseProgramStages@12
+glValidateProgram@4
+glValidateProgramPipeline@4
+glVertexAttrib1f@8
+glVertexAttrib1fv@8
+glVertexAttrib2f@12
+glVertexAttrib2fv@8
+glVertexAttrib3f@16
+glVertexAttrib3fv@8
+glVertexAttrib4f@20
+glVertexAttrib4fv@8
+glVertexAttribBinding@8
+glVertexAttribDivisor@8
+glVertexAttribFormat@20
+glVertexAttribI4i@20
+glVertexAttribI4iv@8
+glVertexAttribI4ui@20
+glVertexAttribI4uiv@8
+glVertexAttribIFormat@16
+glVertexAttribIPointer@20
+glVertexAttribPointer@24
+glVertexBindingDivisor@8
+glViewport@16
+glWaitSync@16
diff --git a/lib/mesa/src/mapi/es2api/meson.build b/lib/mesa/src/mapi/es2api/meson.build
index 356c5760c..1156ee92e 100644
--- a/lib/mesa/src/mapi/es2api/meson.build
+++ b/lib/mesa/src/mapi/es2api/meson.build
@@ -29,12 +29,20 @@ es2_glapi_mapi_tmp_h = custom_target(
_es2_c_args = []
if with_platform_windows
- _es2_c_args += ['-D_GDI32_', '-DBUILD_GL32']
+ _es2_c_args += ['-D_GDI32_']
endif
+gles2_def = custom_target(
+ 'gles2.def',
+ input: 'gles2.def.in',
+ output : 'gles2.def',
+ command : gen_vs_module_defs_normal_command,
+)
+
libgles2 = shared_library(
'GLESv2' + get_option('gles-lib-suffix'),
['../entry.c', es2_glapi_mapi_tmp_h],
+ vs_module_defs : gles2_def,
c_args : [
c_msvc_compat_args,
_es2_c_args,
@@ -46,7 +54,7 @@ libgles2 = shared_library(
link_args : [ld_args_gc_sections],
include_directories : [inc_src, inc_include, inc_mapi],
link_with : libglapi,
- dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl],
+ dependencies : [dep_thread, dep_libdrm, dep_m, dep_dl, idep_mesautilc11],
soversion : host_machine.system() == 'windows' ? '' : '2',
version : '2.0.0',
darwin_versions : '3.0.0',
diff --git a/lib/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml b/lib/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml
index 829fc2631..017fb3e9d 100644
--- a/lib/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml
+++ b/lib/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml
@@ -13,21 +13,21 @@
<enum name="BUFFER_OBJECT_APPLE" value="0x85B3"/>
- <function name="ObjectPurgeableAPPLE">
+ <function name="ObjectPurgeableAPPLE" exec="skip">
<param name="objectType" type="GLenum"/>
<param name="name" type="GLuint"/>
<param name="option" type="GLenum"/>
<return type="GLenum"/>
</function>
- <function name="ObjectUnpurgeableAPPLE">
+ <function name="ObjectUnpurgeableAPPLE" exec="skip">
<param name="objectType" type="GLenum"/>
<param name="name" type="GLuint"/>
<param name="option" type="GLenum"/>
<return type="GLenum"/>
</function>
- <function name="GetObjectParameterivAPPLE">
+ <function name="GetObjectParameterivAPPLE" exec="skip">
<param name="objectType" type="GLenum"/>
<param name="name" type="GLuint"/>
<param name="pname" type="GLenum"/>
diff --git a/lib/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml b/lib/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml
index 282621f22..719bc7966 100644
--- a/lib/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml
+++ b/lib/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml
@@ -7,214 +7,214 @@
<enum name="INT_2_10_10_10_REV" value = "0x8D9F"/>
- <function name="VertexP2ui" deprecated="3.1" exec="vtxfmt">
+ <function name="VertexP2ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexP3ui" deprecated="3.1" exec="vtxfmt">
+ <function name="VertexP3ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexP4ui" deprecated="3.1" exec="vtxfmt">
+ <function name="VertexP4ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexP2uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="VertexP2uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="value" type="const GLuint *" count="1"/>
</function>
- <function name="VertexP3uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="VertexP3uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="value" type="const GLuint *" count="1"/>
</function>
- <function name="VertexP4uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="VertexP4uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="value" type="const GLuint *" count="1"/>
</function>
- <function name="TexCoordP1ui" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP1ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="TexCoordP2ui" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP2ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="TexCoordP3ui" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP3ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="TexCoordP4ui" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP4ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="TexCoordP1uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP1uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="TexCoordP2uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP2uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="TexCoordP3uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP3uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="TexCoordP4uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="TexCoordP4uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="MultiTexCoordP1ui" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP1ui" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="MultiTexCoordP2ui" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP2ui" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="MultiTexCoordP3ui" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP3ui" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="MultiTexCoordP4ui" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP4ui" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="MultiTexCoordP1uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP1uiv" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="MultiTexCoordP2uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP2uiv" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="MultiTexCoordP3uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP3uiv" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="MultiTexCoordP4uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="MultiTexCoordP4uiv" deprecated="3.1" exec="beginend">
<param name="texture" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="NormalP3ui" deprecated="3.1" exec="vtxfmt">
+ <function name="NormalP3ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="GLuint"/>
</function>
- <function name="NormalP3uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="NormalP3uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="coords" type="const GLuint *" count="1"/>
</function>
- <function name="ColorP3ui" deprecated="3.1" exec="vtxfmt">
+ <function name="ColorP3ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="color" type="GLuint"/>
</function>
- <function name="ColorP4ui" deprecated="3.1" exec="vtxfmt">
+ <function name="ColorP4ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="color" type="GLuint"/>
</function>
- <function name="ColorP3uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="ColorP3uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="color" type="const GLuint *" count="1"/>
</function>
- <function name="ColorP4uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="ColorP4uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="color" type="const GLuint *" count="1"/>
</function>
- <function name="SecondaryColorP3ui" deprecated="3.1" exec="vtxfmt">
+ <function name="SecondaryColorP3ui" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="color" type="GLuint"/>
</function>
- <function name="SecondaryColorP3uiv" deprecated="3.1" exec="vtxfmt">
+ <function name="SecondaryColorP3uiv" deprecated="3.1" exec="beginend">
<param name="type" type="GLenum"/>
<param name="color" type="const GLuint *" count="1"/>
</function>
- <function name="VertexAttribP1ui" exec="vtxfmt">
+ <function name="VertexAttribP1ui" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexAttribP2ui" exec="vtxfmt">
+ <function name="VertexAttribP2ui" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexAttribP3ui" exec="vtxfmt">
+ <function name="VertexAttribP3ui" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexAttribP4ui" exec="vtxfmt">
+ <function name="VertexAttribP4ui" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="GLuint"/>
</function>
- <function name="VertexAttribP1uiv" exec="vtxfmt">
+ <function name="VertexAttribP1uiv" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="const GLuint *" count="1"/>
</function>
- <function name="VertexAttribP2uiv" exec="vtxfmt">
+ <function name="VertexAttribP2uiv" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="const GLuint *" count="1"/>
</function>
- <function name="VertexAttribP3uiv" exec="vtxfmt">
+ <function name="VertexAttribP3uiv" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
<param name="value" type="const GLuint *" count="1"/>
</function>
- <function name="VertexAttribP4uiv" exec="vtxfmt">
+ <function name="VertexAttribP4uiv" exec="beginend">
<param name="index" type="GLuint"/>
<param name="type" type="GLenum"/>
<param name="normalized" type="GLboolean"/>
diff --git a/lib/mesa/src/mapi/glapi/gen/EXT_direct_state_access.xml b/lib/mesa/src/mapi/glapi/gen/EXT_direct_state_access.xml
index b7fc5283f..a450846c2 100644
--- a/lib/mesa/src/mapi/glapi/gen/EXT_direct_state_access.xml
+++ b/lib/mesa/src/mapi/glapi/gen/EXT_direct_state_access.xml
@@ -1400,8 +1400,8 @@
<param name="program" type="GLuint" />
<param name="target" type="GLenum" />
<param name="index" type="GLuint" />
- <param name="count" type="GLsizei" />
- <param name="params" type="const GLfloat*" count="4"/>
+ <param name="count" type="GLsizei" counter="true"/>
+ <param name="params" type="const GLfloat*" count="count" count_scale="4"/>
</function>
</category>
diff --git a/lib/mesa/src/mapi/glapi/gen/EXT_external_objects.xml b/lib/mesa/src/mapi/glapi/gen/EXT_external_objects.xml
index d8e4f9a57..89bd98946 100644
--- a/lib/mesa/src/mapi/glapi/gen/EXT_external_objects.xml
+++ b/lib/mesa/src/mapi/glapi/gen/EXT_external_objects.xml
@@ -220,7 +220,7 @@
<param name="srcLayouts" type="const GLenum *" count="numTextureBarriers"/>
</function>
- <function name="SignalSemaphoreEXT" es2="3.2">
+ <function name="SignalSemaphoreEXT" es2="3.2" marshal="sync">
<param name="semaphore" type="GLuint"/>
<param name="numBufferBarriers" type="GLuint"/>
<param name="buffers" type="const GLuint *" count="numBufferBarriers"/>
diff --git a/lib/mesa/src/mapi/glapi/gen/EXT_external_objects_win32.xml b/lib/mesa/src/mapi/glapi/gen/EXT_external_objects_win32.xml
new file mode 100644
index 000000000..ae37eec0c
--- /dev/null
+++ b/lib/mesa/src/mapi/glapi/gen/EXT_external_objects_win32.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="EXT_external_objects_win32" number="505">
+
+ <enum name="GL_HANDLE_TYPE_OPAQUE_WIN32_EXT" value="0x9587"/>
+ <enum name="HANDLE_TYPE_D3D12_TILEPOOL_EXT" value="0x9589"/>
+ <enum name="HANDLE_TYPE_D3D12_RESOURCE_EXT" value="0x958A"/>
+ <enum name="HANDLE_TYPE_D3D11_IMAGE_EXT" value="0x958B"/>
+ <enum name="HANDLE_TYPE_D3D12_FENCE_EXT" value="0x9594"/>
+ <enum name="D3D12_FENCE_VALUE_EXT" value="0x9595"/>
+ <enum name="DEVICE_LUID_EXT" value="0x9599"/>
+ <enum name="DEVICE_NODE_MASK_EXT" value="0x959A"/>
+
+ <function name="ImportMemoryWin32HandleEXT" es2="3.2">
+ <param name="memory" type="GLuint"/>
+ <param name="size" type="GLuint64"/>
+ <param name="handleType" type="GLenum"/>
+ <param name="handle" type="GLvoid *"/>
+ </function>
+
+ <function name="ImportMemoryWin32NameEXT" es2="3.2">
+ <param name="memory" type="GLuint"/>
+ <param name="size" type="GLuint64"/>
+ <param name="handleType" type="GLenum"/>
+ <param name="name" type="const GLvoid *"/>
+ </function>
+
+ <function name="ImportSemaphoreWin32HandleEXT" es2="3.2">
+ <param name="semaphore" type="GLuint"/>
+ <param name="handleType" type="GLenum"/>
+ <param name="handle" type="GLvoid *"/>
+ </function>
+
+ <function name="ImportSemaphoreWin32NameEXT" es2="3.2">
+ <param name="semaphore" type="GLuint"/>
+ <param name="handleType" type="GLenum"/>
+ <param name="handle" type="const GLvoid *"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/lib/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml b/lib/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml
index 6c0e54af1..6dd90b879 100644
--- a/lib/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml
+++ b/lib/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml
@@ -109,7 +109,8 @@
<return type="GLboolean"/>
</function>
- <function name="BindFramebufferEXT">
+ <function name="BindFramebufferEXT"
+ marshal_call_after="_mesa_glthread_BindFramebuffer(ctx, target, framebuffer);">
<param name="target" type="GLenum"/>
<param name="framebuffer" type="GLuint"/>
<glx rop="4319"/>
diff --git a/lib/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml b/lib/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml
index 1561d97af..b829319ed 100644
--- a/lib/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml
+++ b/lib/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml
@@ -40,25 +40,25 @@
</enum>
- <function name="VertexAttribI1iEXT" exec="vtxfmt">
+ <function name="VertexAttribI1iEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
</function>
- <function name="VertexAttribI2iEXT" exec="vtxfmt">
+ <function name="VertexAttribI2iEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
</function>
- <function name="VertexAttribI3iEXT" exec="vtxfmt">
+ <function name="VertexAttribI3iEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
<param name="z" type="GLint"/>
</function>
- <function name="VertexAttribI4iEXT" exec="vtxfmt">
+ <function name="VertexAttribI4iEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
@@ -66,25 +66,25 @@
<param name="w" type="GLint"/>
</function>
- <function name="VertexAttribI1uiEXT" exec="vtxfmt">
+ <function name="VertexAttribI1uiEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
</function>
- <function name="VertexAttribI2uiEXT" exec="vtxfmt">
+ <function name="VertexAttribI2uiEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
</function>
- <function name="VertexAttribI3uiEXT" exec="vtxfmt">
+ <function name="VertexAttribI3uiEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
<param name="z" type="GLuint"/>
</function>
- <function name="VertexAttribI4uiEXT" exec="vtxfmt">
+ <function name="VertexAttribI4uiEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="x" type="GLuint"/>
<param name="y" type="GLuint"/>
@@ -97,17 +97,17 @@
<param name="v" type="const GLint *"/>
</function>
- <function name="VertexAttribI2ivEXT" exec="vtxfmt">
+ <function name="VertexAttribI2ivEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *" count="2"/>
</function>
- <function name="VertexAttribI3ivEXT" exec="vtxfmt">
+ <function name="VertexAttribI3ivEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *" count="3"/>
</function>
- <function name="VertexAttribI4ivEXT" exec="vtxfmt">
+ <function name="VertexAttribI4ivEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *" count="4"/>
</function>
@@ -117,17 +117,17 @@
<param name="v" type="const GLuint *"/>
</function>
- <function name="VertexAttribI2uivEXT" exec="vtxfmt">
+ <function name="VertexAttribI2uivEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *" count="2"/>
</function>
- <function name="VertexAttribI3uivEXT" exec="vtxfmt">
+ <function name="VertexAttribI3uivEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *" count="3"/>
</function>
- <function name="VertexAttribI4uivEXT" exec="vtxfmt">
+ <function name="VertexAttribI4uivEXT" exec="beginend">
<param name="index" type="GLuint"/>
<param name="v" type="const GLuint *" count="4"/>
</function>
diff --git a/lib/mesa/src/mapi/glapi/gen/NV_half_float.xml b/lib/mesa/src/mapi/glapi/gen/NV_half_float.xml
index 40965bd10..30d56923e 100644
--- a/lib/mesa/src/mapi/glapi/gen/NV_half_float.xml
+++ b/lib/mesa/src/mapi/glapi/gen/NV_half_float.xml
@@ -5,139 +5,139 @@
<category name="GL_NV_half_float" number="283">
- <function name="Vertex2hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Vertex2hNV" exec="beginend" deprecated="3.1">
<param name="x" type="GLhalfNV"/>
<param name="y" type="GLhalfNV"/>
</function>
- <function name="Vertex2hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Vertex2hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="2"/>
</function>
- <function name="Vertex3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Vertex3hNV" exec="beginend" deprecated="3.1">
<param name="x" type="GLhalfNV"/>
<param name="y" type="GLhalfNV"/>
<param name="z" type="GLhalfNV"/>
</function>
- <function name="Vertex3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Vertex3hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
- <function name="Vertex4hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Vertex4hNV" exec="beginend" deprecated="3.1">
<param name="x" type="GLhalfNV"/>
<param name="y" type="GLhalfNV"/>
<param name="z" type="GLhalfNV"/>
<param name="w" type="GLhalfNV"/>
</function>
- <function name="Vertex4hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Vertex4hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="4"/>
</function>
- <function name="Normal3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Normal3hNV" exec="beginend" deprecated="3.1">
<param name="nx" type="GLhalfNV"/>
<param name="ny" type="GLhalfNV"/>
<param name="nz" type="GLhalfNV"/>
</function>
- <function name="Normal3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Normal3hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
- <function name="Color3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Color3hNV" exec="beginend" deprecated="3.1">
<param name="red" type="GLhalfNV"/>
<param name="green" type="GLhalfNV"/>
<param name="blue" type="GLhalfNV"/>
</function>
- <function name="Color3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Color3hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
- <function name="Color4hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Color4hNV" exec="beginend" deprecated="3.1">
<param name="red" type="GLhalfNV"/>
<param name="green" type="GLhalfNV"/>
<param name="blue" type="GLhalfNV"/>
<param name="alpha" type="GLhalfNV"/>
</function>
- <function name="Color4hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="Color4hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="4"/>
</function>
- <function name="TexCoord1hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord1hNV" exec="beginend" deprecated="3.1">
<param name="s" type="GLhalfNV"/>
</function>
- <function name="TexCoord1hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord1hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="1"/>
</function>
- <function name="TexCoord2hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord2hNV" exec="beginend" deprecated="3.1">
<param name="s" type="GLhalfNV"/>
<param name="t" type="GLhalfNV"/>
</function>
- <function name="TexCoord2hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord2hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="2"/>
</function>
- <function name="TexCoord3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord3hNV" exec="beginend" deprecated="3.1">
<param name="s" type="GLhalfNV"/>
<param name="t" type="GLhalfNV"/>
<param name="r" type="GLhalfNV"/>
</function>
- <function name="TexCoord3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord3hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
- <function name="TexCoord4hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord4hNV" exec="beginend" deprecated="3.1">
<param name="s" type="GLhalfNV"/>
<param name="t" type="GLhalfNV"/>
<param name="r" type="GLhalfNV"/>
<param name="q" type="GLhalfNV"/>
</function>
- <function name="TexCoord4hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="TexCoord4hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="4"/>
</function>
- <function name="MultiTexCoord1hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord1hNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="s" type="GLhalfNV"/>
</function>
- <function name="MultiTexCoord1hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord1hvNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="v" type="const GLhalfNV *" count="1"/>
</function>
- <function name="MultiTexCoord2hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord2hNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="s" type="GLhalfNV"/>
<param name="t" type="GLhalfNV"/>
</function>
- <function name="MultiTexCoord2hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord2hvNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="v" type="const GLhalfNV *" count="2"/>
</function>
- <function name="MultiTexCoord3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord3hNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="s" type="GLhalfNV"/>
<param name="t" type="GLhalfNV"/>
<param name="r" type="GLhalfNV"/>
</function>
- <function name="MultiTexCoord3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord3hvNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
- <function name="MultiTexCoord4hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord4hNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="s" type="GLhalfNV"/>
<param name="t" type="GLhalfNV"/>
@@ -145,45 +145,45 @@
<param name="q" type="GLhalfNV"/>
</function>
- <function name="MultiTexCoord4hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="MultiTexCoord4hvNV" exec="beginend" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="v" type="const GLhalfNV *" count="4"/>
</function>
- <function name="VertexAttrib1hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib1hNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="x" type="GLhalfNV"/>
</function>
- <function name="VertexAttrib1hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib1hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="v" type="const GLhalfNV *" count="1"/>
</function>
- <function name="VertexAttrib2hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib2hNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="x" type="GLhalfNV"/>
<param name="y" type="GLhalfNV"/>
</function>
- <function name="VertexAttrib2hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib2hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="v" type="const GLhalfNV *" count="2"/>
</function>
- <function name="VertexAttrib3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib3hNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="x" type="GLhalfNV"/>
<param name="y" type="GLhalfNV"/>
<param name="z" type="GLhalfNV"/>
</function>
- <function name="VertexAttrib3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib3hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
- <function name="VertexAttrib4hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib4hNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="x" type="GLhalfNV"/>
<param name="y" type="GLhalfNV"/>
@@ -191,50 +191,50 @@
<param name="w" type="GLhalfNV"/>
</function>
- <function name="VertexAttrib4hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttrib4hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="v" type="const GLhalfNV *" count="4"/>
</function>
- <function name="VertexAttribs1hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttribs1hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="n" type="GLsizei"/>
<param name="v" type="const GLhalfNV *" count="n"/>
</function>
- <function name="VertexAttribs2hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttribs2hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="n" type="GLsizei"/>
<param name="v" type="const GLhalfNV *" count="n" count_scale="2"/>
</function>
- <function name="VertexAttribs3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttribs3hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="n" type="GLsizei"/>
<param name="v" type="const GLhalfNV *" count="n" count_scale="3"/>
</function>
- <function name="VertexAttribs4hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="VertexAttribs4hvNV" exec="beginend" deprecated="3.1">
<param name="index" type="GLuint"/>
<param name="n" type="GLsizei"/>
<param name="v" type="const GLhalfNV *" count="n" count_scale="4"/>
</function>
- <function name="FogCoordhNV" exec="vtxfmt" deprecated="3.1">
+ <function name="FogCoordhNV" exec="beginend" deprecated="3.1">
<param name="x" type="GLhalfNV"/>
</function>
- <function name="FogCoordhvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="FogCoordhvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="1"/>
</function>
- <function name="SecondaryColor3hNV" exec="vtxfmt" deprecated="3.1">
+ <function name="SecondaryColor3hNV" exec="beginend" deprecated="3.1">
<param name="red" type="GLhalfNV"/>
<param name="green" type="GLhalfNV"/>
<param name="blue" type="GLhalfNV"/>
</function>
- <function name="SecondaryColor3hvNV" exec="vtxfmt" deprecated="3.1">
+ <function name="SecondaryColor3hvNV" exec="beginend" deprecated="3.1">
<param name="v" type="const GLhalfNV *" count="3"/>
</function>
diff --git a/lib/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml b/lib/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml
index e53062f78..eaed2f7c4 100644
--- a/lib/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml
+++ b/lib/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml
@@ -11,7 +11,7 @@
<enum name="PRIMITIVE_RESTART_NV" value="0x8558"/>
<enum name="PRIMITIVE_RESTART_INDEX_NV" value="0x8559"/>
- <function name="PrimitiveRestartNV" deprecated="3.1" exec="vtxfmt"/>
+ <function name="PrimitiveRestartNV" deprecated="3.1" exec="beginend"/>
<function name="PrimitiveRestartIndexNV" alias="PrimitiveRestartIndex">
<param name="index" type="GLuint"/>
diff --git a/lib/mesa/src/mapi/glapi/gen/api_beginend_init_h.py b/lib/mesa/src/mapi/glapi/gen/api_beginend_init_h.py
new file mode 100644
index 000000000..b0aab7b5f
--- /dev/null
+++ b/lib/mesa/src/mapi/glapi/gen/api_beginend_init_h.py
@@ -0,0 +1,80 @@
+# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2021 Advanced Micro Devices, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (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 NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS 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.
+
+# This script generates the file api_beginend_init.h.
+
+import argparse
+import collections
+import license
+import gl_XML
+import sys
+import apiexec
+import re
+
+
+class PrintCode(gl_XML.gl_print_base):
+ def __init__(self):
+ super().__init__()
+
+ self.name = 'api_beginend_init_h.py'
+ self.license = license.bsd_license_template % (
+ 'Copyright (C) 2012 Intel Corporation\n'
+ 'Copyright (C) 2021 Advanced Micro Devices, Inc.',
+ 'AUTHORS')
+
+ def printBody(self, api):
+ # Collect SET_* calls by the condition under which they should
+ # be called.
+ settings_by_condition = collections.defaultdict(lambda: [])
+
+ for f in api.functionIterateAll():
+ if f.exec_flavor != 'beginend':
+ continue
+
+ condition = apiexec.get_api_condition(f)
+ if not condition:
+ continue
+
+ if (condition == '_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2' and
+ re.match('VertexAttrib[1-4].*ARB', f.name)):
+ # These functions should map to an *ES callback for GLES2.
+ settings_by_condition['_mesa_is_desktop_gl(ctx)'].append(
+ 'SET_{0}(tab, NAME({0}));'.format(f.name))
+ settings_by_condition['ctx->API == API_OPENGLES2'].append(
+ 'SET_{0}(tab, NAME_ES({0}));'.format(f.name))
+ else:
+ macro = ('NAME_CALLLIST' if f.name[0:8] == 'CallList' else
+ 'NAME_AE' if f.name == 'ArrayElement' else 'NAME')
+ settings_by_condition[condition].append(
+ 'SET_{0}(tab, {1}({0}));'.format(f.name, macro))
+
+ # Print out an if statement for each unique condition, with
+ # the SET_* calls nested inside it.
+ for condition in sorted(settings_by_condition.keys()):
+ print('if ({0}) {{'.format(condition))
+ for setting in sorted(settings_by_condition[condition]):
+ print(' {0}'.format(setting))
+ print('}')
+
+
+if __name__ == '__main__':
+ apiexec.print_glapi_file(PrintCode())
diff --git a/lib/mesa/src/mapi/glapi/gen/api_exec_init.py b/lib/mesa/src/mapi/glapi/gen/api_exec_init.py
index ec1c2ea6b..3f8622877 100644
--- a/lib/mesa/src/mapi/glapi/gen/api_exec_init.py
+++ b/lib/mesa/src/mapi/glapi/gen/api_exec_init.py
@@ -21,8 +21,8 @@
# IN THE SOFTWARE.
# This script generates the file api_exec_init.c, which contains
-# _mesa_initialize_exec_table(). It is responsible for populating all
-# entries in the "exec" dispatch table that aren't dynamic.
+# _mesa_init_dispatch(). It is responsible for populating all
+# entries in the "OutsideBeginEnd" dispatch table.
import argparse
import collections
@@ -33,7 +33,7 @@ import apiexec
exec_flavor_map = {
- 'vtxfmt': None,
+ 'beginend': None,
'dlist': '_mesa_',
'mesa': '_mesa_',
'skip': None,
@@ -53,21 +53,19 @@ header = """/**
/**
- * Initialize a context's exec table with pointers to Mesa's supported
+ * Initialize a context's OutsideBeginEnd table with pointers to Mesa's supported
* GL functions.
*
* This function depends on ctx->Version.
*
- * \param ctx GL context to which \c exec belongs.
+ * \param ctx GL context
*/
void
-_mesa_initialize_exec_table(struct gl_context *ctx)
+_mesa_init_dispatch(struct gl_context *ctx)
{
- struct _glapi_table *exec;
-
- exec = ctx->Exec;
- assert(exec != NULL);
+ struct _glapi_table *table = ctx->OutsideBeginEnd;
+ assert(table != NULL);
assert(ctx->Version > 0);
"""
@@ -107,18 +105,18 @@ class PrintCode(gl_XML.gl_print_base):
prefix = exec_flavor_map[f.exec_flavor]
if prefix is None:
# This function is not implemented, or is dispatched
- # via vtxfmt.
+ # via beginend.
continue
if f.has_no_error_variant:
no_error_condition = '_mesa_is_no_error_enabled(ctx) && ({0})'.format(condition)
error_condition = '!_mesa_is_no_error_enabled(ctx) && ({0})'.format(condition)
settings_by_condition[no_error_condition].append(
- 'SET_{0}(exec, {1}{0}_no_error);'.format(f.name, prefix, f.name))
+ 'SET_{0}(table, {1}{0}_no_error);'.format(f.name, prefix, f.name))
settings_by_condition[error_condition].append(
- 'SET_{0}(exec, {1}{0});'.format(f.name, prefix, f.name))
+ 'SET_{0}(table, {1}{0});'.format(f.name, prefix, f.name))
else:
settings_by_condition[condition].append(
- 'SET_{0}(exec, {1}{0});'.format(f.name, prefix, f.name))
+ 'SET_{0}(table, {1}{0});'.format(f.name, prefix, f.name))
# Print out an if statement for each unique condition, with
# the SET_* calls nested inside it.
for condition in sorted(settings_by_condition.keys()):
diff --git a/lib/mesa/src/mapi/glapi/gen/api_hw_select_init_h.py b/lib/mesa/src/mapi/glapi/gen/api_hw_select_init_h.py
new file mode 100644
index 000000000..666580f7b
--- /dev/null
+++ b/lib/mesa/src/mapi/glapi/gen/api_hw_select_init_h.py
@@ -0,0 +1,47 @@
+# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2021 Advanced Micro Devices, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (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 NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS 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.
+
+# This script generates the file api_hw_select_init.h.
+
+import license
+import gl_XML
+import apiexec
+
+
+class PrintCode(gl_XML.gl_print_base):
+ def __init__(self):
+ super().__init__()
+
+ self.name = 'api_hw_select_init_h.py'
+ self.license = license.bsd_license_template % (
+ 'Copyright (C) 2012 Intel Corporation\n'
+ 'Copyright (C) 2021 Advanced Micro Devices, Inc.',
+ 'AUTHORS')
+
+ def printBody(self, api):
+ for f in api.functionIterateAll():
+ if f.has_hw_select_variant:
+ print('SET_{0}(tab, NAME({0}));'.format(f.name))
+
+
+if __name__ == '__main__':
+ apiexec.print_glapi_file(PrintCode())
diff --git a/lib/mesa/src/mapi/glapi/gen/gl_and_es_API.xml b/lib/mesa/src/mapi/glapi/gen/gl_and_es_API.xml
index 6fd2c8dec..0c8a1d5a9 100644
--- a/lib/mesa/src/mapi/glapi/gen/gl_and_es_API.xml
+++ b/lib/mesa/src/mapi/glapi/gen/gl_and_es_API.xml
@@ -18,46 +18,46 @@
<type name="fixed" size="4" />
<type name="clampx" size="4" />
- <function name="AlphaFuncx" es1="1.0" desktop="false">
+ <function name="AlphaFuncx" es1="1.0" deprecated="3.1">
<param name="func" type="GLenum"/>
<param name="ref" type="GLclampx"/>
</function>
- <function name="ClearColorx" es1="1.0" desktop="false">
+ <function name="ClearColorx" es1="1.0" deprecated="3.1">
<param name="red" type="GLclampx"/>
<param name="green" type="GLclampx"/>
<param name="blue" type="GLclampx"/>
<param name="alpha" type="GLclampx"/>
</function>
- <function name="ClearDepthx" es1="1.0" desktop="false">
+ <function name="ClearDepthx" es1="1.0" deprecated="3.1">
<param name="depth" type="GLclampx"/>
</function>
- <function name="Color4x" es1="1.0" desktop="false">
+ <function name="Color4x" es1="1.0" deprecated="3.1">
<param name="red" type="GLfixed"/>
<param name="green" type="GLfixed"/>
<param name="blue" type="GLfixed"/>
<param name="alpha" type="GLfixed"/>
</function>
- <function name="DepthRangex" es1="1.0" desktop="false">
+ <function name="DepthRangex" es1="1.0" deprecated="3.1">
<param name="zNear" type="GLclampx"/>
<param name="zFar" type="GLclampx"/>
</function>
- <function name="Fogx" es1="1.0" desktop="false">
+ <function name="Fogx" es1="1.0" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="Fogxv" es1="1.0" desktop="false">
+ <function name="Fogxv" es1="1.0" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *" variable_param="pname"
marshal_count="_mesa_fog_enum_to_count(pname)"/>
</function>
- <function name="Frustumx" es1="1.0" desktop="false">
+ <function name="Frustumx" es1="1.0" deprecated="3.1">
<param name="left" type="GLfixed"/>
<param name="right" type="GLfixed"/>
<param name="bottom" type="GLfixed"/>
@@ -66,56 +66,56 @@
<param name="zFar" type="GLfixed"/>
</function>
- <function name="LightModelx" es1="1.0" desktop="false">
+ <function name="LightModelx" es1="1.0" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="LightModelxv" es1="1.0" desktop="false">
+ <function name="LightModelxv" es1="1.0" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *" variable_param="pname"
marshal_count="_mesa_light_model_enum_to_count(pname)"/>
</function>
- <function name="Lightx" es1="1.0" desktop="false">
+ <function name="Lightx" es1="1.0" deprecated="3.1">
<param name="light" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="Lightxv" es1="1.0" desktop="false">
+ <function name="Lightxv" es1="1.0" deprecated="3.1">
<param name="light" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *" variable_param="pname"
marshal_count="_mesa_light_enum_to_count(pname)"/>
</function>
- <function name="LineWidthx" es1="1.0" desktop="false">
+ <function name="LineWidthx" es1="1.0" deprecated="3.1">
<param name="width" type="GLfixed"/>
</function>
- <function name="LoadMatrixx" es1="1.0" desktop="false">
+ <function name="LoadMatrixx" es1="1.0" deprecated="3.1">
<param name="m" type="const GLfixed *" count="16"/>
</function>
- <function name="Materialx" es1="1.0" desktop="false">
+ <function name="Materialx" es1="1.0" deprecated="3.1">
<param name="face" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="Materialxv" es1="1.0" desktop="false">
+ <function name="Materialxv" es1="1.0" deprecated="3.1">
<param name="face" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *" variable_param="pname"
marshal_count="_mesa_material_enum_to_count(pname)"/>
</function>
- <function name="MultMatrixx" es1="1.0" desktop="false">
+ <function name="MultMatrixx" es1="1.0" deprecated="3.1">
<param name="m" type="const GLfixed *" count="16"/>
</function>
- <function name="MultiTexCoord4x" es1="1.0" desktop="false">
+ <function name="MultiTexCoord4x" es1="1.0" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="s" type="GLfixed"/>
<param name="t" type="GLfixed"/>
@@ -123,13 +123,13 @@
<param name="q" type="GLfixed"/>
</function>
- <function name="Normal3x" es1="1.0" desktop="false">
+ <function name="Normal3x" es1="1.0" deprecated="3.1">
<param name="nx" type="GLfixed"/>
<param name="ny" type="GLfixed"/>
<param name="nz" type="GLfixed"/>
</function>
- <function name="Orthox" es1="1.0" desktop="false">
+ <function name="Orthox" es1="1.0" deprecated="3.1">
<param name="left" type="GLfixed"/>
<param name="right" type="GLfixed"/>
<param name="bottom" type="GLfixed"/>
@@ -138,60 +138,60 @@
<param name="zFar" type="GLfixed"/>
</function>
- <function name="PointSizex" es1="1.0" desktop="false">
+ <function name="PointSizex" es1="1.0" deprecated="3.1">
<param name="size" type="GLfixed"/>
</function>
- <function name="PolygonOffsetx" es1="1.0" desktop="false">
+ <function name="PolygonOffsetx" es1="1.0" deprecated="3.1">
<param name="factor" type="GLfixed"/>
<param name="units" type="GLfixed"/>
</function>
- <function name="Rotatex" es1="1.0" desktop="false">
+ <function name="Rotatex" es1="1.0" deprecated="3.1">
<param name="angle" type="GLfixed"/>
<param name="x" type="GLfixed"/>
<param name="y" type="GLfixed"/>
<param name="z" type="GLfixed"/>
</function>
- <function name="SampleCoveragex" es1="1.0" desktop="false">
+ <function name="SampleCoveragex" es1="1.0" deprecated="3.1">
<param name="value" type="GLclampx"/>
<param name="invert" type="GLboolean"/>
</function>
- <function name="Scalex" es1="1.0" desktop="false">
+ <function name="Scalex" es1="1.0" deprecated="3.1">
<param name="x" type="GLfixed"/>
<param name="y" type="GLfixed"/>
<param name="z" type="GLfixed"/>
</function>
- <function name="TexEnvx" es1="1.0" desktop="false">
+ <function name="TexEnvx" es1="1.0" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="TexEnvxv" es1="1.0" desktop="false">
+ <function name="TexEnvxv" es1="1.0" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *" variable_param="pname"
marshal_count="_mesa_texenv_enum_to_count(pname)"/>
</function>
- <function name="TexParameterx" es1="1.0" desktop="false">
+ <function name="TexParameterx" es1="1.0" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="Translatex" es1="1.0" desktop="false">
+ <function name="Translatex" es1="1.0" deprecated="3.1">
<param name="x" type="GLfixed"/>
<param name="y" type="GLfixed"/>
<param name="z" type="GLfixed"/>
</function>
<!-- from GL_OES_single_precision -->
- <function name="Frustumf" es1="1.0" desktop="false">
+ <function name="Frustumf" es1="1.0" deprecated="3.1">
<param name="left" type="GLfloat"/>
<param name="right" type="GLfloat"/>
<param name="bottom" type="GLfloat"/>
@@ -200,7 +200,7 @@
<param name="zFar" type="GLfloat"/>
</function>
- <function name="Orthof" es1="1.0" desktop="false">
+ <function name="Orthof" es1="1.0" deprecated="3.1">
<param name="left" type="GLfloat"/>
<param name="right" type="GLfloat"/>
<param name="bottom" type="GLfloat"/>
@@ -212,57 +212,57 @@
<category name="es1.1">
<!-- from GL_OES_fixed_point -->
- <function name="ClipPlanex" es1="1.1" desktop="false">
+ <function name="ClipPlanex" es1="1.1" deprecated="3.1">
<param name="plane" type="GLenum"/>
<param name="equation" type="const GLfixed *" count="4"/>
</function>
- <function name="GetClipPlanex" es1="1.1">
+ <function name="GetClipPlanex" es1="1.1" deprecated="3.1">
<param name="plane" type="GLenum"/>
<param name="equation" type="GLfixed *" output="true" count="4"/>
</function>
- <function name="GetFixedv" es1="1.1" desktop="false">
+ <function name="GetFixedv" es1="1.1" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="params" type="GLfixed *" output="true" variable_param="pname"/>
</function>
- <function name="GetLightxv" es1="1.1" desktop="false">
+ <function name="GetLightxv" es1="1.1" deprecated="3.1">
<param name="light" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="GLfixed *" output="true" variable_param="pname"/>
</function>
- <function name="GetMaterialxv" es1="1.1" desktop="false">
+ <function name="GetMaterialxv" es1="1.1" deprecated="3.1">
<param name="face" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="GLfixed *" output="true" variable_param="pname"/>
</function>
- <function name="GetTexEnvxv" es1="1.1" desktop="false">
+ <function name="GetTexEnvxv" es1="1.1" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="GLfixed *" output="true" variable_param="pname"/>
</function>
- <function name="GetTexParameterxv" es1="1.1" desktop="false">
+ <function name="GetTexParameterxv" es1="1.1" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="GLfixed *" output="true" variable_param="pname"/>
</function>
- <function name="PointParameterx" es1="1.1" desktop="false">
+ <function name="PointParameterx" es1="1.1" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="param" type="GLfixed"/>
</function>
- <function name="PointParameterxv" es1="1.1" desktop="false">
+ <function name="PointParameterxv" es1="1.1" deprecated="3.1">
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *"
count="_mesa_point_param_enum_to_count(pname)"/>
</function>
- <function name="TexParameterxv" es1="1.1" desktop="false">
+ <function name="TexParameterxv" es1="1.1" deprecated="3.1">
<param name="target" type="GLenum"/>
<param name="pname" type="GLenum"/>
<param name="params" type="const GLfixed *" variable_param="pname"
@@ -270,12 +270,12 @@
</function>
<!-- from GL_OES_single_precision -->
- <function name="ClipPlanef" es1="1.1" desktop="false">
+ <function name="ClipPlanef" es1="1.1" deprecated="3.1">
<param name="plane" type="GLenum"/>
<param name="equation" type="const GLfloat *" count="4"/>
</function>
- <function name="GetClipPlanef" es1="1.1">
+ <function name="GetClipPlanef" es1="1.1" deprecated="3.1">
<param name="plane" type="GLenum"/>
<param name="equation" type="GLfloat *" output="true" count="4"/>
</function>
diff --git a/lib/mesa/src/mapi/glapi/gen/gl_unmarshal_table.py b/lib/mesa/src/mapi/glapi/gen/gl_unmarshal_table.py
new file mode 100644
index 000000000..06003a9bf
--- /dev/null
+++ b/lib/mesa/src/mapi/glapi/gen/gl_unmarshal_table.py
@@ -0,0 +1,89 @@
+# Copyright (C) 2012 Intel Corporation
+# Copyright (C) 2022 Advanced Micro Devices, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (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 NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS 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.
+
+import contextlib
+import gl_XML
+import license
+import marshal_XML
+import sys
+
+header = """#include "glthread_marshal.h"
+"""
+
+current_indent = 0
+
+
+def out(str):
+ if str:
+ print(' '*current_indent + str)
+ else:
+ print('')
+
+
+@contextlib.contextmanager
+def indent(delta=3):
+ global current_indent
+ current_indent += delta
+ yield
+ current_indent -= delta
+
+
+class PrintCode(gl_XML.gl_print_base):
+ def __init__(self):
+ super(PrintCode, self).__init__()
+
+ self.name = 'gl_marshal.py'
+ self.license = license.bsd_license_template % (
+ 'Copyright (C) 2012 Intel Corporation', 'INTEL CORPORATION')
+
+ def printRealHeader(self):
+ print(header)
+
+ def printRealFooter(self):
+ pass
+
+ def printBody(self, api):
+ out('const _mesa_unmarshal_func _mesa_unmarshal_dispatch[NUM_DISPATCH_CMD] = {')
+ with indent():
+ for func in api.functionIterateAll():
+ flavor = func.marshal_flavor()
+ if flavor in ('skip', 'sync'):
+ continue
+ out('[DISPATCH_CMD_{0}] = (_mesa_unmarshal_func)_mesa_unmarshal_{0},'.format(func.name))
+ out('};')
+
+
+def show_usage():
+ print('Usage: %s [file_name]' % sys.argv[0])
+ sys.exit(1)
+
+
+if __name__ == '__main__':
+ try:
+ file_name = sys.argv[1]
+ except Exception:
+ show_usage()
+
+ printer = PrintCode()
+
+ api = gl_XML.parse_GL_API(file_name, marshal_XML.marshal_item_factory())
+ printer.Print(api)
diff --git a/lib/mesa/src/mapi/glapi/gen/meson.build b/lib/mesa/src/mapi/glapi/gen/meson.build
index 1b807585d..8866701e4 100644
--- a/lib/mesa/src/mapi/glapi/gen/meson.build
+++ b/lib/mesa/src/mapi/glapi/gen/meson.build
@@ -115,6 +115,7 @@ api_xml_files = files(
'EXT_draw_buffers2.xml',
'EXT_external_objects.xml',
'EXT_external_objects_fd.xml',
+ 'EXT_external_objects_win32.xml',
'EXT_framebuffer_object.xml',
'EXT_gpu_shader4.xml',
'EXT_multisampled_render_to_texture.xml',
@@ -252,22 +253,40 @@ main_api_save_h = custom_target(
capture : true,
)
-main_api_vtxfmt_init_h = custom_target(
- 'api_vtxfmt_init.h',
- input : ['api_vtxfmt_init_h.py', 'gl_and_es_API.xml'],
- output : 'api_vtxfmt_init.h',
+main_api_beginend_init_h = custom_target(
+ 'api_beginend_init.h',
+ input : ['api_beginend_init_h.py', 'gl_and_es_API.xml'],
+ output : 'api_beginend_init.h',
command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
depend_files : files('apiexec.py') + glapi_gen_depends,
capture : true,
)
+main_api_hw_select_init_h = custom_target(
+ 'api_hw_select_init.h',
+ input : ['api_hw_select_init_h.py', 'gl_API.xml'],
+ output : 'api_hw_select_init.h',
+ command : [prog_python, '@INPUT0@', '-f', '@INPUT1@'],
+ depend_files : files('apiexec.py') + glapi_gen_depends,
+ capture : true,
+)
+
+main_unmarshal_table_c = custom_target(
+ 'unmarshal_table.c',
+ input : ['gl_unmarshal_table.py', 'gl_and_es_API.xml'],
+ output : 'unmarshal_table.c',
+ command : [prog_python, '@INPUT0@', '@INPUT1@'],
+ depend_files : files('marshal_XML.py') + glapi_gen_depends,
+ capture : true,
+)
+
main_marshal_generated_c = []
foreach x : ['0', '1', '2', '3', '4', '5', '6', '7']
main_marshal_generated_c += custom_target(
'marshal_generated' + x + '.c',
input : ['gl_marshal.py', 'gl_and_es_API.xml'],
output : 'marshal_generated' + x + '.c',
- command : [prog_python, '@INPUT0@', '-f', '@INPUT1@', '-i', x, '-n', '8'],
+ command : [prog_python, '@INPUT0@', '@INPUT1@', x, '8'],
depend_files : files('marshal_XML.py') + glapi_gen_depends,
capture : true,
)
diff --git a/lib/mesa/src/mapi/glapi/glapi.h b/lib/mesa/src/mapi/glapi/glapi.h
index 60be92a1c..d51ba0ff9 100644
--- a/lib/mesa/src/mapi/glapi/glapi.h
+++ b/lib/mesa/src/mapi/glapi/glapi.h
@@ -77,9 +77,6 @@ typedef void (*_glapi_nop_handler_proc)(const char *name);
struct _glapi_table;
-
-#if defined (USE_ELF_TLS)
-
#if DETECT_OS_WINDOWS
extern __THREAD_INITIAL_EXEC struct _glapi_table * _glapi_tls_Dispatch;
extern __THREAD_INITIAL_EXEC void * _glapi_tls_Context;
@@ -91,7 +88,7 @@ _GLAPI_EXPORT extern __THREAD_INITIAL_EXEC void * _glapi_tls_Context;
_GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch;
_GLAPI_EXPORT extern const void *_glapi_Context;
-#if defined (USE_TLS_BEHIND_FUNCTIONS)
+#if DETECT_OS_WINDOWS && !defined(MAPI_MODE_UTIL) && !defined(MAPI_MODE_GLAPI)
# define GET_DISPATCH() _glapi_get_dispatch()
# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_get_context()
#else
@@ -99,20 +96,6 @@ _GLAPI_EXPORT extern const void *_glapi_Context;
# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_tls_Context
#endif
-#else
-
-_GLAPI_EXPORT extern struct _glapi_table *_glapi_Dispatch;
-_GLAPI_EXPORT extern void *_glapi_Context;
-
-#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())
-
-#endif /* defined (USE_ELF_TLS) */
-
-
_GLAPI_EXPORT void
_glapi_destroy_multithread(void);
diff --git a/lib/mesa/src/mapi/glapi/glapi_entrypoint.c b/lib/mesa/src/mapi/glapi/glapi_entrypoint.c
index b99819afa..e2c4b997c 100644
--- a/lib/mesa/src/mapi/glapi/glapi_entrypoint.c
+++ b/lib/mesa/src/mapi/glapi/glapi_entrypoint.c
@@ -38,12 +38,8 @@
#ifdef USE_X86_ASM
-#if defined( USE_ELF_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 */
@@ -68,7 +64,7 @@ get_entrypoint_address(unsigned int functionOffset)
static void
init_glapi_relocs( void )
{
-#if defined(USE_ELF_TLS) && !defined(GLX_X86_READONLY_TEXT)
+#if !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 */
@@ -121,12 +117,7 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset)
{
GLubyte * const code = (GLubyte *) entrypoint;
-#if defined(USE_ELF_TLS)
*((unsigned int *)(code + 8)) = 4 * offset;
-#else
- *((unsigned int *)(code + 11)) = 4 * offset;
- *((unsigned int *)(code + 22)) = 4 * offset;
-#endif
}
@@ -137,9 +128,7 @@ extern void __glapi_sparc_icache_flush(unsigned int *);
static void
init_glapi_relocs( void )
{
-#if defined(HAVE_PTHREAD) || defined(USE_ELF_TLS)
static const unsigned int template[] = {
-#ifdef USE_ELF_TLS
0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */
0x8730e00a, /* srl %g3, 10, %g3 */
0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */
@@ -152,58 +141,12 @@ init_glapi_relocs( void )
#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 USE_ELF_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
-#ifdef USE_ELF_TLS
code[0] = template[0] | (dispatch >> 10);
code[1] = template[1];
__glapi_sparc_icache_flush(&code[0]);
@@ -215,72 +158,20 @@ init_glapi_relocs( void )
__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
}
_glapi_proc
generate_entrypoint(GLuint functionOffset)
{
-#if defined(HAVE_PTHREAD) || defined(USE_ELF_TLS)
static const unsigned int template[] = {
0x07000000, /* sethi %hi(0), %g3 */
0x8210000f, /* mov %o7, %g1 */
0x40000000, /* call */
0x9e100001, /* mov %g1, %o7 */
};
-#ifdef USE_ELF_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 *) u_execmem_alloc(sizeof(template));
if (code) {
code[0] = template[0] | (functionOffset & 0x3fffff);
@@ -293,7 +184,6 @@ generate_entrypoint(GLuint functionOffset)
__glapi_sparc_icache_flush(&code[2]);
}
return (_glapi_proc) code;
-#endif
}
@@ -310,12 +200,10 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
#else /* USE_*_ASM */
-#if defined(HAVE_PTHREAD) || defined(USE_ELF_TLS)
static void
init_glapi_relocs( void )
{
}
-#endif
_glapi_proc
@@ -340,8 +228,6 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset)
void
init_glapi_relocs_once( void )
{
-#if defined(HAVE_PTHREAD) || defined(USE_ELF_TLS)
static once_flag flag = ONCE_FLAG_INIT;
call_once(&flag, init_glapi_relocs);
-#endif
}
diff --git a/lib/mesa/src/mapi/glapi/glapi_priv.h b/lib/mesa/src/mapi/glapi/glapi_priv.h
index ad37c8bfd..04d8fd0c2 100644
--- a/lib/mesa/src/mapi/glapi/glapi_priv.h
+++ b/lib/mesa/src/mapi/glapi/glapi_priv.h
@@ -62,17 +62,11 @@ get_entrypoint_address(unsigned int functionOffset);
* Size (in bytes) of dispatch function (entrypoint).
*/
#if defined(USE_X86_ASM)
-# if defined(USE_ELF_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-# else
-# define DISPATCH_FUNCTION_SIZE 32
-# endif
+#define DISPATCH_FUNCTION_SIZE 16
#endif
#if defined(USE_X64_64_ASM)
-# if defined(USE_ELF_TLS)
-# define DISPATCH_FUNCTION_SIZE 16
-# endif
+#define DISPATCH_FUNCTION_SIZE 16
#endif
diff --git a/lib/mesa/src/mapi/glapi/meson.build b/lib/mesa/src/mapi/glapi/meson.build
index 270b9870b..c14c28b1f 100644
--- a/lib/mesa/src/mapi/glapi/meson.build
+++ b/lib/mesa/src/mapi/glapi/meson.build
@@ -29,62 +29,75 @@ if with_dri and ['apple', 'windows'].contains(with_dri_platform)
static_glapi_files += [glapi_gentable_c, glapitable_h]
endif
-if with_shared_glapi
- static_glapi_files += files(
- '../entry.c',
- '../entry.h',
- '../entry_x86-64_tls.h',
- '../entry_x86_tls.h',
- '../entry_x86_tsd.h',
- '../entry_ppc64le_tls.h',
- '../entry_ppc64le_tsd.h',
- '../mapi_tmp.h',
- )
- static_glapi_files += glapi_mapi_tmp_h
- static_glapi_args += [
- '-DMAPI_MODE_BRIDGE',
- '-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path()),
- gcc_lto_quirk,
- ]
- if with_platform_windows
- static_glapi_args += ['-D_GDI32_']
- endif
-else
- static_glapi_args += '-DMAPI_MODE_UTIL'
- if with_platform_windows
- static_glapi_args += ['-D_GDI32_', '-DBUILD_GL32', '-DKHRONOS_DLL_EXPORTS', '-D_GLAPI_NO_EXPORTS']
- endif
- static_glapi_files += files(
- 'glapi_dispatch.c',
- 'glapi_entrypoint.c',
- 'glapi_getproc.c',
- 'glapi_nop.c',
- 'glapi.c',
- 'glapi.h',
- 'glapi_priv.h',
- )
- static_glapi_files += files_mapi_util
- static_glapi_files += [
- glapitable_h, glapi_mapi_tmp_h, glprocs_h, glapitemp_h,
- ]
- if with_asm_arch == 'x86'
- static_glapi_files += glapi_x86_s
- elif with_asm_arch == 'x86_64'
- static_glapi_files += glapi_x86_64_s
- elif with_asm_arch == 'sparc'
- static_glapi_files += glapi_sparc_s
- endif
+bridge_glapi_files = static_glapi_files
+bridge_glapi_args = static_glapi_args
+
+bridge_glapi_files += files(
+ '../entry.c',
+ '../entry.h',
+ '../entry_x86-64_tls.h',
+ '../entry_x86_tls.h',
+ '../entry_ppc64le_tls.h',
+ '../mapi_tmp.h',
+)
+bridge_glapi_files += glapi_mapi_tmp_h
+bridge_glapi_args += [
+ '-DMAPI_MODE_BRIDGE',
+ '-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path()),
+ gcc_lto_quirk,
+]
+if with_platform_windows
+ bridge_glapi_args += ['-D_GDI32_']
+endif
+
+static_glapi_args += '-DMAPI_MODE_UTIL'
+if with_platform_windows
+ static_glapi_args += ['-D_GDI32_', '-DKHRONOS_DLL_EXPORTS', '-D_GLAPI_DLL_EXPORTS']
+endif
+static_glapi_files += files(
+ 'glapi_dispatch.c',
+ 'glapi_entrypoint.c',
+ 'glapi_getproc.c',
+ 'glapi_nop.c',
+ 'glapi.c',
+ 'glapi.h',
+ 'glapi_priv.h',
+)
+static_glapi_files += files_mapi_util
+static_glapi_files += [
+ glapitable_h, glapi_mapi_tmp_h, glprocs_h, glapitemp_h,
+]
+if with_asm_arch == 'x86'
+ static_glapi_files += glapi_x86_s
+elif with_asm_arch == 'x86_64'
+ static_glapi_files += glapi_x86_64_s
+elif with_asm_arch == 'sparc'
+ static_glapi_files += glapi_sparc_s
endif
-libglapi_static = static_library(
- 'glapi_static',
- static_glapi_files,
+
+libglapi_bridge = static_library(
+ 'glapi_bridge',
+ bridge_glapi_files,
include_directories : [inc_mesa, inc_include, inc_src, inc_mapi],
- c_args : [c_msvc_compat_args, static_glapi_args],
- dependencies : [dep_thread, dep_selinux],
+ c_args : [c_msvc_compat_args, bridge_glapi_args],
+ dependencies : [dep_thread, dep_selinux, idep_mesautilc11, idep_mesautil],
build_by_default : false,
)
+if with_shared_glapi
+ libglapi_static = libglapi_bridge
+else
+ libglapi_static = static_library(
+ 'glapi_static',
+ static_glapi_files,
+ include_directories : [inc_mesa, inc_include, inc_src, inc_mapi],
+ c_args : [c_msvc_compat_args, static_glapi_args],
+ dependencies : [dep_thread, dep_selinux, idep_mesautilc11, idep_mesautil],
+ build_by_default : false,
+ )
+endif
+
# TODO: this test doesn't compile on windows with mingw or msvc due to
# undefined symbols from libglapi_static, but that should be fixable.
if with_any_opengl and not with_shared_glapi and with_tests and not with_platform_windows
diff --git a/lib/mesa/src/mapi/glapi/tests/check_table.cpp b/lib/mesa/src/mapi/glapi/tests/check_table.cpp
index 82da3f2ed..6dad1bbcd 100644
--- a/lib/mesa/src/mapi/glapi/tests/check_table.cpp
+++ b/lib/mesa/src/mapi/glapi/tests/check_table.cpp
@@ -1290,7 +1290,7 @@ const struct name_offset known_dispatch[] = {
{ "glSecondaryColor3usv", _O(SecondaryColor3usv) },
{ "glSecondaryColorPointer", _O(SecondaryColorPointer) },
{ "glMultiDrawArrays", _O(MultiDrawArrays) },
- { "glMultiDrawElementsEXT", _O(MultiDrawElementsEXT) },
+ { "glMultiDrawElements", _O(MultiDrawElements) },
{ "glFogCoordPointer", _O(FogCoordPointer) },
{ "glFogCoordd", _O(FogCoordd) },
{ "glFogCoorddv", _O(FogCoorddv) },
diff --git a/lib/mesa/src/mapi/shared-glapi/meson.build b/lib/mesa/src/mapi/shared-glapi/meson.build
index 4a13bace6..3db5646c7 100644
--- a/lib/mesa/src/mapi/shared-glapi/meson.build
+++ b/lib/mesa/src/mapi/shared-glapi/meson.build
@@ -54,7 +54,7 @@ libglapi = shared_library(
gnu_symbol_visibility : 'hidden',
link_args : [ld_args_gc_sections],
include_directories : [inc_src, inc_include, inc_mapi],
- dependencies : [dep_thread, dep_selinux],
+ dependencies : [dep_thread, dep_selinux, idep_mesautilc11, idep_mesautil],
soversion : host_machine.system() == 'windows' ? '' : '0',
version : '0.0.0',
name_prefix : 'lib',
@@ -71,7 +71,7 @@ if with_any_opengl and with_tests
cpp_args : [cpp_msvc_compat_args],
include_directories : [inc_src, inc_include, inc_mapi],
link_with : [libglapi],
- dependencies : [dep_thread, idep_gtest],
+ dependencies : [dep_thread, idep_gtest, idep_mesautilc11],
),
suite : ['mapi'],
protocol : gtest_test_protocol,
diff --git a/lib/mesa/src/mapi/stub.c b/lib/mesa/src/mapi/stub.c
index 2aefdbe89..1836e330c 100644
--- a/lib/mesa/src/mapi/stub.c
+++ b/lib/mesa/src/mapi/stub.c
@@ -31,6 +31,7 @@
#include "c11/threads.h"
#include "util/macros.h"
+#include "util/simple_mtx.h"
#include "u_current.h"
#include "entry.h"
#include "stub.h"
@@ -118,11 +119,11 @@ stub_add_dynamic(const char *name)
struct mapi_stub *
stub_find_dynamic(const char *name, int generate)
{
- static mtx_t dynamic_mutex = _MTX_INITIALIZER_NP;
+ static simple_mtx_t dynamic_mutex = SIMPLE_MTX_INITIALIZER;
struct mapi_stub *stub = NULL;
int count, i;
-
- mtx_lock(&dynamic_mutex);
+
+ simple_mtx_lock(&dynamic_mutex);
if (generate)
assert(!stub_find_public(name));
@@ -139,7 +140,7 @@ stub_find_dynamic(const char *name, int generate)
if (generate && !stub)
stub = stub_add_dynamic(name);
- mtx_unlock(&dynamic_mutex);
+ simple_mtx_unlock(&dynamic_mutex);
return stub;
}