pkgsrc/graphics/MesaLib/patches/patch-src_mapi_entry__x86-64__tls.h
tnn 7fc9f783fd Update to mesa-11.0.0 (2015-09-12)
Tested on:
- NetBSD 7.0/i386 EeePC 1001PXD with i915 (Pineview)
- NetBSD 7.99.21/amd64 with Radeon HD 5450 (Evergreen/Cedar)

pkgsrc changes:
- make i386 & x86_64 glx-tls dispatch assembly stubs aware of that the
  dispatch table pointer may be NULL due to TLS implementation limitations
- work around run time loader issue on NetBSD (#50277)
- TLS dispatch support is now enabled again on NetBSD
- llvm option now requires libLLVM 3.7.0 with AMDGPU target
- build xatracker library on x86, useful for xf86-video-vmware acceleration
- always use shared glapi
- always include dri3 support (it will still use dri2 if dri3 not supported)

New in Mesa 11:
- New hardware support for AMD GCN 1.2 GPUs: Tonga, Iceland, Carrizo, Fiji
- OpenGL 4.1 on radeonsi, nvc0
- OpenGL ES 3.0 on freedreno (a3xx, a4xx)
- GL_AMD_vertex_shader_viewport_index on radeonsi
- GL_ARB_conditional_render_inverted on r600, radeonsi
- GL_ARB_depth_buffer_float on a4xx
- GL_ARB_derivative_control on radeonsi
- GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend on a4xx
- GL_ARB_fragment_layer_viewport on radeonsi
- GL_ARB_framebuffer_no_attachments on i965
- GL_ARB_get_texture_sub_image for all drivers
- GL_ARB_gpu_shader5 on radeonsi
- GL_ARB_gpu_shader_fp64 on llvmpipe, radeonsi
- GL_ARB_shader_image_load_store on i965
- GL_ARB_shader_precision on radeonsi, nvc0
- GL_ARB_shader_image_size on i965
- GL_ARB_shader_stencil_export on llvmpipe
- GL_ARB_shader_subroutine on core profile all drivers
- GL_ARB_tessellation_shader on nvc0, radeonsi
- GL_ARB_transform_feedback2, GL_ARB_transform_feedback_instanced,
  GL_EXT_transform_feedback on a3xx, a4xx
- GL_ARB_vertex_attrib_64bit on llvmpipe, radeonsi
- GL_ARB_viewport_array on radeonsi
- GL_EXT_depth_bounds_test on radeonsi, nv30, nv50, nvc0
- GL_EXT_texture_compression_s3tc on freedreno (a3xx)
- GL_NV_read_depth (GLES) on all drivers
- GL_NV_read_depth_stencil (GLES) on all drivers
- GL_NV_read_stencil (GLES) on all drivers
- GL_OES_texture_float on all r300, r600, radeonsi, nv30, nv50, nvc0, softpipe,
  llvmpipe
- GL_OES_texture_half_float on all r300, r600, radeonsi, nv30, nv50, nvc0,
  softpipe, llvmpipe
- GL_OES_texture_float_linear on all r300, r600, radeonsi, nv30, nv50, nvc0,
  softpipe, llvmpipe
- GL_OES_texture_half_float_linear on all r300, r600, radeonsi, nv30, nv50,
  nvc0, softpipe, llvmpipe
- GL_EXT_draw_buffers2 on a4xx
- GLX_ARB_create_context_robustness on r600, radeonsi
- EGL_EXT_create_context_robustness on r600, radeonsi
- EGL_KHR_gl_colorspace on r600, radeonsi, nv50, nvc0
- EGL_KHR_gl_texture_3D_image on r600, radeonsi, nv50, nvc0
- EGL 1.5 on r600, radeonsi, nv50, nvc0
2015-09-26 08:45:02 +00:00

40 lines
1.3 KiB
C

$NetBSD: patch-src_mapi_entry__x86-64__tls.h,v 1.2 2015/09/26 08:45:02 tnn Exp $
NetBSD only supports zero-initialized initial-exec tls variables in conjuction
with dlopen(3) at the moment.
Fix --enable-glx-tls with clang. From FreeBSD.
--- src/mapi/entry_x86-64_tls.h.orig 2015-09-11 17:41:47.000000000 +0000
+++ src/mapi/entry_x86-64_tls.h
@@ -36,10 +36,19 @@ __asm__(".text\n"
".balign 32\n" \
func ":"
+#ifdef __NetBSD__
#define STUB_ASM_CODE(slot) \
"movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
"movq %fs:(%rax), %r11\n\t" \
+ "testq %r11, %r11\n\t" \
+ "cmoveq table_noop_array@GOTPCREL(%rip), %r11\n\t" \
"jmp *(8 * " slot ")(%r11)"
+#else
+#define STUB_ASM_CODE(slot) \
+ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
+ "movq %fs:(%rax), %r11\n\t" \
+ "jmp *(8 * " slot ")(%r11)"
+#endif
#define MAPI_TMP_STUB_ASM_GCC
#include "mapi_tmp.h"
@@ -61,8 +70,8 @@ entry_patch_public(void)
{
}
-static char
-x86_64_entry_start[];
+extern char
+x86_64_entry_start[] __attribute__((visibility("hidden")));
mapi_func
entry_get_public(int slot)