deactivated SSE for now

cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18778 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2006-09-08 12:56:41 +00:00
parent 14b15d4423
commit 1b6515a714
4 changed files with 144 additions and 140 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ 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 ; #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 ;
+17 -13
View File
@@ -9,7 +9,7 @@
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved. * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*/ */
#define CALLED() printf("CALLED %s\n",__PRETTY_FUNCTION__) #define CALLED() //printf("CALLED %s\n",__PRETTY_FUNCTION__)
#include "MesaSoftRenderer.h" #include "MesaSoftRenderer.h"
extern "C" { extern "C" {
@@ -182,6 +182,7 @@ MesaSoftRenderer::SwapBuffers(bool VSync = false)
_mesa_notifySwapBuffers(fContext); _mesa_notifySwapBuffers(fContext);
if (fBitmap) { if (fBitmap) {
CALLED();
GLView()->LockLooper(); GLView()->LockLooper();
GLView()->DrawBitmap(fBitmap); GLView()->DrawBitmap(fBitmap);
GLView()->UnlockLooper(); GLView()->UnlockLooper();
@@ -332,6 +333,7 @@ MesaSoftRenderer::Clear(GLcontext *ctx, GLbitfield mask,
GLboolean all, GLint x, GLint y, GLboolean all, GLint x, GLint y,
GLint width, GLint height) GLint width, GLint height)
{ {
CALLED();
if (mask & DD_FRONT_LEFT_BIT) if (mask & DD_FRONT_LEFT_BIT)
ClearFront(ctx, all, x, y, width, height); ClearFront(ctx, all, x, y, width, height);
if (mask & DD_BACK_LEFT_BIT) if (mask & DD_BACK_LEFT_BIT)
@@ -340,8 +342,6 @@ MesaSoftRenderer::Clear(GLcontext *ctx, GLbitfield mask,
mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT); mask &= ~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT);
if (mask) if (mask)
_swrast_Clear( ctx, mask, all, x, y, width, height ); _swrast_Clear( ctx, mask, all, x, y, width, height );
return;
} }
@@ -367,8 +367,7 @@ MesaSoftRenderer::ClearFront(GLcontext *ctx,
if (all) { if (all) {
BRect b = bglview->Bounds(); BRect b = bglview->Bounds();
bglview->FillRect(b); bglview->FillRect(b);
} } else {
else {
// XXX untested // XXX untested
BRect b; BRect b;
b.left = x; b.left = x;
@@ -412,14 +411,12 @@ MesaSoftRenderer::ClearBack(GLcontext *ctx,
const int numPixels = mr->fWidth * mr->fHeight; const int numPixels = mr->fWidth * mr->fHeight;
if (clearPixel == 0) { if (clearPixel == 0) {
memset(start, 0, numPixels * 4); memset(start, 0, numPixels * 4);
} } else {
else {
for (int i = 0; i < numPixels; i++) { for (int i = 0; i < numPixels; i++) {
start[i] = clearPixel; start[i] = clearPixel;
} }
} }
} } else {
else {
// XXX untested // XXX untested
start += y * mr->fWidth + x; start += y * mr->fWidth + x;
for (int i = 0; i < height; i++) { for (int i = 0; i < height; i++) {
@@ -621,6 +618,7 @@ MesaSoftRenderer::WriteRGBAPixelsFront(const GLcontext *ctx,
CONST GLubyte rgba[][4], CONST GLubyte rgba[][4],
const GLubyte mask[] ) const GLubyte mask[] )
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BGLView *bglview = mr->GLView(); BGLView *bglview = mr->GLView();
assert(bglview); assert(bglview);
@@ -646,6 +644,7 @@ MesaSoftRenderer::WriteMonoRGBAPixelsFront(const GLcontext *ctx, GLuint n,
const GLchan color[4], const GLchan color[4],
const GLubyte mask[]) const GLubyte mask[])
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BGLView *bglview = mr->GLView(); BGLView *bglview = mr->GLView();
assert(bglview); assert(bglview);
@@ -756,6 +755,7 @@ MesaSoftRenderer::WriteRGBASpanBack(const GLcontext *ctx, GLuint n,
CONST GLubyte rgba[][4], CONST GLubyte rgba[][4],
const GLubyte mask[]) const GLubyte mask[])
{ {
//CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BBitmap *bitmap = mr->fBitmap; BBitmap *bitmap = mr->fBitmap;
@@ -787,6 +787,7 @@ MesaSoftRenderer::WriteRGBSpanBack(const GLcontext *ctx, GLuint n,
CONST GLubyte rgb[][3], CONST GLubyte rgb[][3],
const GLubyte mask[]) const GLubyte mask[])
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BBitmap *bitmap = mr->fBitmap; BBitmap *bitmap = mr->fBitmap;
@@ -819,6 +820,7 @@ MesaSoftRenderer::WriteMonoRGBASpanBack(const GLcontext *ctx, GLuint n,
GLint x, GLint y, GLint x, GLint y,
const GLchan color[4], const GLubyte mask[]) const GLchan color[4], const GLubyte mask[])
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BBitmap *bitmap = mr->fBitmap; BBitmap *bitmap = mr->fBitmap;
@@ -849,6 +851,7 @@ MesaSoftRenderer::WriteRGBAPixelsBack(const GLcontext *ctx,
CONST GLubyte rgba[][4], CONST GLubyte rgba[][4],
const GLubyte mask[] ) const GLubyte mask[] )
{ {
//CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BBitmap *bitmap = mr->fBitmap; BBitmap *bitmap = mr->fBitmap;
@@ -876,8 +879,7 @@ MesaSoftRenderer::WriteRGBAPixelsBack(const GLcontext *ctx,
pixel[BE_ACOMP] = rgba[i][ACOMP]; pixel[BE_ACOMP] = rgba[i][ACOMP];
} }
} }
} } else {
else {
for (GLuint i = 0; i < n; i++) { for (GLuint i = 0; i < n; i++) {
GLubyte *pixel = (GLubyte *) bitmap->Bits() GLubyte *pixel = (GLubyte *) bitmap->Bits()
+ ((mr->fBottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; + ((mr->fBottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4;
@@ -897,6 +899,7 @@ MesaSoftRenderer::WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n,
const GLchan color[4], const GLchan color[4],
const GLubyte mask[]) const GLubyte mask[])
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
BBitmap *bitmap = mr->fBitmap; BBitmap *bitmap = mr->fBitmap;
@@ -923,8 +926,7 @@ MesaSoftRenderer::WriteMonoRGBAPixelsBack(const GLcontext *ctx, GLuint n,
*((uint32 *) ptr) = pixel_color; *((uint32 *) ptr) = pixel_color;
} }
} }
} } else {
else {
for (GLuint i = 0; i < n; i++) { for (GLuint i = 0; i < n; i++) {
GLubyte * ptr = (GLubyte *) bitmap->Bits() GLubyte * ptr = (GLubyte *) bitmap->Bits()
+ ((mr->fBottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4; + ((mr->fBottom - y[i]) * bitmap->BytesPerRow()) + x[i] * 4;
@@ -995,6 +997,7 @@ void
MesaSoftRenderer::ReadRGBASpanBack( const GLcontext *ctx, GLuint n, MesaSoftRenderer::ReadRGBASpanBack( const GLcontext *ctx, GLuint n,
GLint x, GLint y, GLubyte rgba[][4] ) GLint x, GLint y, GLubyte rgba[][4] )
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
const BBitmap *bitmap = mr->fBitmap; const BBitmap *bitmap = mr->fBitmap;
assert(bitmap); assert(bitmap);
@@ -1027,6 +1030,7 @@ MesaSoftRenderer::ReadRGBAPixelsBack( const GLcontext *ctx,
GLuint n, const GLint x[], const GLint y[], GLuint n, const GLint x[], const GLint y[],
GLubyte rgba[][4], const GLubyte mask[] ) GLubyte rgba[][4], const GLubyte mask[] )
{ {
CALLED();
MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx; MesaSoftRenderer *mr = (MesaSoftRenderer *) ctx->DriverCtx;
const BBitmap *bitmap = mr->fBitmap; const BBitmap *bitmap = mr->fBitmap;
assert(bitmap); assert(bitmap);
+1 -1
View File
@@ -24,7 +24,7 @@ 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 ; #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 ;
+1 -1
View File
@@ -32,7 +32,7 @@ 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 ; #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 ;