tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Fix for 'Undefined PLT symbol "_glapi_check_multithread"' in GL apps
Running latest 5.0_STABLE kernel + userland + native Xorg on my amd64
machine, I noticed that glxinfo would claim direct rendering was dis-
abled even through Xorg.log said DRI was initialized fine.
Hardware is amd64 + Radeon HD 4650 (rv730), running radeonhd driver.
Adding some LIBGL_DEBUG=verbose showed errors loading swrast_dri.so after
failing to load r600_dri.so (this is legit since because there's no support
for r600+ in our Mesa), with the error in the subject.
The following diff fixes it for me (at least in the netbsd-5 tree); I'd
like to check it in pending verification of the same issues in -current.
In the meantime I thought I'd throw it out here for comments.
Thanks,
--rafal
diff --git a/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c
b/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c
index c3ebf60..bbef03b 100644
--- a/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c
+++ b/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c
@@ -221,7 +221,7 @@ PUBLIC void *_glapi_Context = NULL;
* We should call this periodically from a function such as glXMakeCurrent
* in order to test if multiple threads are being used.
*/
-void
+PUBLIC void
_glapi_check_multithread(void)
{
#if defined(THREADS) && !defined(GLX_USE_TLS)
diff --git a/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
b/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
index 1238c4c..dd530a9 100644
--- a/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
+++ b/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
@@ -563,7 +563,7 @@ _glapi_get_proc_offset(const char *funcName)
* in the name of static functions, try generating a new API entrypoint on
* the fly with assembly language.
*/
-_glapi_proc
+PUBLIC _glapi_proc
_glapi_get_proc_address(const char *funcName)
{
struct _glapi_function * entry;
diff --git a/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
b/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
index b818f4e..59a259f 100644
--- a/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
+++ b/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
@@ -36,7 +36,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "glthread.h"
-
+#include "main/glheader.h"
/*
* This file should still compile even when THREADS is not defined.
@@ -71,7 +71,7 @@
*/
#ifdef PTHREADS
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return (unsigned long) pthread_self();
@@ -125,7 +125,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
#define USE_LOCK_FOR_KEY /* undef this to try a version without
lock for the global key... */
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
abort(); /* XXX not implemented yet */
@@ -203,7 +203,7 @@ void InsteadOf_exit(int nCode)
DWORD dwErr=GetLastError();
}
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return GetCurrentThreadId();
@@ -304,7 +304,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
*/
#ifdef BEOS_THREADS
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return (unsigned long) find_thread(NULL);
@@ -346,7 +346,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
* no-op functions
*/
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return 0;
--
Time is an illusion; lunchtime, doubly so. |/\/\| Rafal Boni
-- Ford Prefect |\/\/|
rafal%pobox.com@localhost
Home |
Main Index |
Thread Index |
Old Index