* Reworked Mesa's GL API dispatching/implementation separation:
Before, it was spread in libmesa.a *and* mesa_arch_$(TARGET_ARCH).o, the later was broken for non-x86 targets. Now, GL API dispatching is entirely in glapi-dispatching.o, while libmesa.a contains only the software GL implementation. * This should fix PPC libGL.so build - UNTESTED * Added SPARC assembly code introduced by Mesa 7.2 and sooner - UNTESTED * Removed a non-longer need workaround in glthread.h. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30050 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
bf9a383524
commit
c146f64a63
|
@ -29,6 +29,8 @@ UseHeaders [ FDirName $(SUBDIR) mesa swrast_setup ] ;
|
|||
} else if $(TARGET_ARCH) = ppc {
|
||||
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||
# defines += USE_PPC_ASM ;
|
||||
} else if $(TARGET_ARCH) = sparc {
|
||||
defines += USE_SPARC_ASM ;
|
||||
}
|
||||
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
|
@ -44,8 +46,8 @@ SharedLibrary libGL.so :
|
|||
|
||||
:
|
||||
|
||||
# Mesa optimized GL dispatching code (if any) for this target architecture
|
||||
<opengl>mesa_arch_$(TARGET_ARCH).o
|
||||
# Mesa GL API dispatching code
|
||||
<mesa>glapi-dispatching.o
|
||||
|
||||
# GLU API is included in libGL.so under BeOS R5, not a separate libglu.so library
|
||||
<opengl>sgi-glu.o
|
||||
|
@ -53,8 +55,6 @@ SharedLibrary libGL.so :
|
|||
# GLUT API is included in libGL.so under Haiku, not a separate libglut.so library
|
||||
<opengl>glut.o
|
||||
|
||||
libmesa.a # For GL API dispatching, mostly
|
||||
|
||||
# External libs:
|
||||
be
|
||||
game # BWindowScreen needed by BGLScreen stub class
|
||||
|
|
|
@ -62,9 +62,11 @@ actions MkMaTypes1
|
|||
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM USE_SSE_ASM ;
|
||||
} else {
|
||||
} else if $(TARGET_ARCH) = ppc {
|
||||
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||
# defines += USE_PPC_ASM ;
|
||||
} else if $(TARGET_ARCH) = sparc {
|
||||
defines += USE_SPARC_ASM ;
|
||||
}
|
||||
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
|
@ -115,18 +117,21 @@ if $(TARGET_ARCH) = x86 {
|
|||
|
||||
arch_sources =
|
||||
common_ppc.c
|
||||
t_vtx_generic.c
|
||||
;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) ppc ] ;
|
||||
|
||||
} else if $(TARGET_ARCH) = sparc {
|
||||
|
||||
arch_sources =
|
||||
sparc.c
|
||||
t_vtx_generic.c
|
||||
clip.S
|
||||
norm.S
|
||||
xform.S
|
||||
;
|
||||
|
||||
} else {
|
||||
arch_sources = t_vtx_generic.c ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) sparc ] ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -330,24 +335,27 @@ StaticLibrary libmesa.a :
|
|||
vbo_split_copy.c
|
||||
vbo_split_inplace.c
|
||||
|
||||
# arch specific assembly optimization
|
||||
$(arch_sources)
|
||||
|
||||
# glapi
|
||||
glapi.c
|
||||
glthread.c
|
||||
;
|
||||
|
||||
|
||||
local arch_sources ;
|
||||
# Use the faster GL API dispatching assembly code for the platform, if any!
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
# On x86 platform, use the faster GL API dispatching assembly code!
|
||||
arch_sources = glapi_x86.S ;
|
||||
} else if $(TARGET_ARCH) = sparc {
|
||||
arch_sources = glapi_sparc.S ;
|
||||
} else {
|
||||
# For non-X86 platforms, no assembly code yet.
|
||||
arch_sources = ;
|
||||
}
|
||||
|
||||
MergeObject <opengl>mesa_arch_$(TARGET_ARCH).o :
|
||||
MergeObject <mesa>glapi-dispatching.o :
|
||||
|
||||
dispatch.c
|
||||
glapi.c
|
||||
glthread.c
|
||||
|
||||
$(arch_sources)
|
||||
;
|
||||
|
||||
|
|
|
@ -221,24 +221,12 @@ typedef xmutex_rec _glthread_Mutex;
|
|||
|
||||
|
||||
/*
|
||||
* BeOS threads. R5.x required.
|
||||
* BeOS threads. R5.x or sooner required.
|
||||
*/
|
||||
#ifdef BEOS_THREADS
|
||||
|
||||
/* Problem with OS.h and this file on haiku */
|
||||
#ifndef __HAIKU__
|
||||
#include <kernel/OS.h>
|
||||
#endif
|
||||
|
||||
#include <support/TLS.h>
|
||||
|
||||
/* The only two typedefs required here
|
||||
* this is cause of the OS.h problem
|
||||
*/
|
||||
#ifdef __HAIKU__
|
||||
typedef int32 thread_id;
|
||||
typedef int32 sem_id;
|
||||
#endif
|
||||
#include <OS.h>
|
||||
#include <TLS.h>
|
||||
|
||||
typedef struct {
|
||||
int32 key;
|
||||
|
|
Loading…
Reference in New Issue