Enhanced the GL_RENDERER string returned.
Re-enabled SSE assembly code except for haiku target, until SSE stop crashing Haiku... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19353 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,7 +13,11 @@ if $(TARGET_PLATFORM) != haiku {
|
|||||||
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
||||||
|
|
||||||
if $(TARGET_ARCH) = x86 {
|
if $(TARGET_ARCH) = x86 {
|
||||||
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM ; #USE_SSE_ASM ;
|
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM ;
|
||||||
|
if $(TARGET_PLATFORM != haiku) {
|
||||||
|
# FIXME: Remove me when Haiku SSE support will be fixed.
|
||||||
|
defines += USE_SSE_ASM ;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||||
# defines += USE_PPC_ASM ;
|
# defines += USE_PPC_ASM ;
|
||||||
@@ -28,6 +32,8 @@ UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa ] ;
|
|||||||
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa main ] ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa main ] ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa glapi ] ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa glapi ] ;
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa tnl ] ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa tnl ] ;
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa x86 ] ;
|
||||||
|
UseHeaders [ FDirName $(HAIKU_TOP) src kits opengl mesa ppc ] ;
|
||||||
|
|
||||||
Addon Mesa\ Software\ Renderer : opengl :
|
Addon Mesa\ Software\ Renderer : opengl :
|
||||||
MesaSoftwareRenderer.cpp
|
MesaSoftwareRenderer.cpp
|
||||||
|
|||||||
@@ -24,7 +24,15 @@ extern "C" {
|
|||||||
#include "tnl/tnl.h"
|
#include "tnl/tnl.h"
|
||||||
#include "tnl/t_context.h"
|
#include "tnl/t_context.h"
|
||||||
#include "tnl/t_pipeline.h"
|
#include "tnl/t_pipeline.h"
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(USE_X86_ASM)
|
||||||
|
#include "x86/common_x86_asm.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_PPC_ASM)
|
||||||
|
#include "ppc/common_ppc_features.h"
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const char * color_space_name(color_space space);
|
extern const char * color_space_name(color_space space);
|
||||||
@@ -294,8 +302,51 @@ const GLubyte *
|
|||||||
MesaSoftwareRenderer::GetString(GLcontext *ctx, GLenum name)
|
MesaSoftwareRenderer::GetString(GLcontext *ctx, GLenum name)
|
||||||
{
|
{
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case GL_RENDERER:
|
case GL_RENDERER: {
|
||||||
return (const GLubyte *) "Haiku's OpenGL Software Renderer, powered by Mesa " MESA_VERSION_STRING ;
|
static char buffer[256] = { '\0' };
|
||||||
|
|
||||||
|
if (!buffer[0] ) {
|
||||||
|
// Let's build an renderer string
|
||||||
|
strncat(buffer, "Haiku's Mesa " MESA_VERSION_STRING " Software Renderer", sizeof(buffer));
|
||||||
|
|
||||||
|
// Append any CPU-specific information.
|
||||||
|
#ifdef USE_X86_ASM
|
||||||
|
if (_mesa_x86_cpu_features)
|
||||||
|
strncat(buffer, " x86", sizeof(buffer));
|
||||||
|
#ifdef USE_MMX_ASM
|
||||||
|
if (cpu_has_mmx)
|
||||||
|
strncat(buffer, (cpu_has_mmxext) ? "/MMX+" : "/MMX", sizeof(buffer));
|
||||||
|
#endif
|
||||||
|
#ifdef USE_3DNOW_ASM
|
||||||
|
if (cpu_has_3dnow)
|
||||||
|
strncat(buffer, (cpu_has_3dnowext) ? "/3DNow!+" : "/3DNow!", sizeof(buffer));
|
||||||
|
#endif
|
||||||
|
#ifdef USE_SSE_ASM
|
||||||
|
if (cpu_has_xmm)
|
||||||
|
strncat(buffer, (cpu_has_xmm2) ? "/SSE2" : "/SSE", sizeof(buffer));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif defined(USE_SPARC_ASM)
|
||||||
|
|
||||||
|
strncat(buffer, " SPARC", sizeof(buffer));
|
||||||
|
|
||||||
|
#elif defined(USE_PPC_ASM)
|
||||||
|
|
||||||
|
if (_mesa_ppc_cpu_features)
|
||||||
|
strncat(buffer, (cpu_has_64) ? " PowerPC 64" : " PowerPC", sizeof(buffer));
|
||||||
|
|
||||||
|
#ifdef USE_VMX_ASM
|
||||||
|
if (cpu_has_vmx)
|
||||||
|
strncat(buffer, "/Altivec", sizeof(buffer));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (! cpu_has_fpu)
|
||||||
|
strncat(buffer, "/No FPU", sizeof(buffer));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
return (const GLubyte *) buffer;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
// Let core library handle all other cases
|
// Let core library handle all other cases
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ UseHeaders [ FDirName $(SUBDIR) mesa swrast_setup ] ;
|
|||||||
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
||||||
|
|
||||||
if $(TARGET_ARCH) = x86 {
|
if $(TARGET_ARCH) = x86 {
|
||||||
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM ; #USE_SSE_ASM ;
|
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM ;
|
||||||
|
if $(TARGET_PLATFORM != haiku) {
|
||||||
|
# FIXME: Remove me when Haiku SSE support will be fixed.
|
||||||
|
defines += USE_SSE_ASM ;
|
||||||
|
}
|
||||||
} else if $(TARGET_ARCH) = ppc {
|
} else if $(TARGET_ARCH) = ppc {
|
||||||
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||||
# defines += USE_PPC_ASM ;
|
# defines += USE_PPC_ASM ;
|
||||||
|
|||||||
@@ -32,7 +32,11 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) tnl ] ;
|
|||||||
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
defines = BEOS_THREADS GNU_ASSEMBLER ;
|
||||||
|
|
||||||
if $(TARGET_ARCH) = x86 {
|
if $(TARGET_ARCH) = x86 {
|
||||||
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM ; #USE_SSE_ASM ;
|
defines += USE_X86_ASM USE_MMX_ASM USE_3DNOW_ASM ;
|
||||||
|
if $(TARGET_PLATFORM != haiku) {
|
||||||
|
# FIXME: Remove me when Haiku SSE support will be fixed.
|
||||||
|
defines += USE_SSE_ASM ;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
# Not yet supported, as current Mesa3D PPC assembly is Linux-dependent!
|
||||||
# defines += USE_PPC_ASM ;
|
# defines += USE_PPC_ASM ;
|
||||||
|
|||||||
Reference in New Issue
Block a user