From 35a2227547e072f1473a3c2d9c2cfc32462c6cc8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 23 Jan 2000 17:49:54 +0000 Subject: [PATCH] added #ifdef SVGA, work-around asm code problem --- src/mesa/drivers/svga/svgamesa.c | 2 +- src/mesa/drivers/svga/svgamesa15.c | 5 ++++- src/mesa/drivers/svga/svgamesa16.c | 5 ++++- src/mesa/drivers/svga/svgamesa24.c | 14 +++++++++++++- src/mesa/drivers/svga/svgamesa32.c | 14 +++++++++++++- src/mesa/drivers/svga/svgamesa8.c | 6 +++++- 6 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c index 09e3fec33c7..4e726fa48d3 100644 --- a/src/mesa/drivers/svga/svgamesa.c +++ b/src/mesa/drivers/svga/svgamesa.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa.c,v 1.2 2000/01/22 20:08:36 brianp Exp $ */ +/* $Id: svgamesa.c,v 1.3 2000/01/23 17:49:54 brianp Exp $ */ /* * Mesa 3-D graphics library diff --git a/src/mesa/drivers/svga/svgamesa15.c b/src/mesa/drivers/svga/svgamesa15.c index f5a4df515ba..80966d7ca49 100644 --- a/src/mesa/drivers/svga/svgamesa15.c +++ b/src/mesa/drivers/svga/svgamesa15.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa15.c,v 1.2 2000/01/22 20:08:36 brianp Exp $ */ +/* $Id: svgamesa15.c,v 1.3 2000/01/23 17:49:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,6 +27,7 @@ * Additional authors: Slawomir Szczyrba (Mesa 3.2) */ +#ifdef SVGA #include "svgapix.h" @@ -176,3 +177,5 @@ void __read_rgba_pixels15( const GLcontext *ctx, rgba[i][BCOMP] = ((pix )<<3) & 0xff; } } + +#endif diff --git a/src/mesa/drivers/svga/svgamesa16.c b/src/mesa/drivers/svga/svgamesa16.c index 423483dca0c..061f40a9b70 100644 --- a/src/mesa/drivers/svga/svgamesa16.c +++ b/src/mesa/drivers/svga/svgamesa16.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa16.c,v 1.2 2000/01/22 20:08:36 brianp Exp $ */ +/* $Id: svgamesa16.c,v 1.3 2000/01/23 17:49:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,6 +27,7 @@ * Additional authors: Slawomir Szczyrba (Mesa 3.2) */ +#ifdef SVGA #include "svgapix.h" @@ -176,3 +177,5 @@ void __read_rgba_pixels16( const GLcontext *ctx, rgba[i][BCOMP] = ((pix )<<3) & 0xff; } } + +#endif diff --git a/src/mesa/drivers/svga/svgamesa24.c b/src/mesa/drivers/svga/svgamesa24.c index 6e31c06713a..c4b78079f48 100644 --- a/src/mesa/drivers/svga/svgamesa24.c +++ b/src/mesa/drivers/svga/svgamesa24.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa24.c,v 1.2 2000/01/22 20:08:36 brianp Exp $ */ +/* $Id: svgamesa24.c,v 1.3 2000/01/23 17:49:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,11 +27,13 @@ * Additional authors: Slawomir Szczyrba (Mesa 3.2) */ +#ifdef SVGA #include "svgapix.h" _RGB * rgbBuffer; +#if 0 inline int RGB2BGR24(int c) { asm("rorw $8, %0\n" @@ -41,8 +43,16 @@ inline int RGB2BGR24(int c) : "=q"(c):"0"(c)); return c; } +#else +int RGB2BGR24(int c) +{ + /* XXX this isn't right */ + return c; +} +#endif + int __svga_drawpixel24(int x, int y, GLubyte r, GLubyte g, GLubyte b) { unsigned long offset; @@ -199,3 +209,5 @@ void __read_rgba_pixels24( const GLcontext *ctx, *((GLint*)rgba[i]) = RGB2BGR24(__svga_getpixel24( x[i], y[i])); } } + +#endif diff --git a/src/mesa/drivers/svga/svgamesa32.c b/src/mesa/drivers/svga/svgamesa32.c index 204d582cf3d..a67188f65c6 100644 --- a/src/mesa/drivers/svga/svgamesa32.c +++ b/src/mesa/drivers/svga/svgamesa32.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa32.c,v 1.2 2000/01/22 20:08:36 brianp Exp $ */ +/* $Id: svgamesa32.c,v 1.3 2000/01/23 17:49:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,11 +27,13 @@ * Additional authors: Slawomir Szczyrba (Mesa 3.2) */ +#ifdef SVGA #include "svgapix.h" GLint * intBuffer; +#if 0 inline int RGB2BGR32(int c) { asm("rorw $8, %0\n" @@ -41,6 +43,13 @@ inline int RGB2BGR32(int c) : "=q"(c):"0"(c)); return c; } +#else +int RGB2BGR32(int c) +{ + /* XXX this isn't right */ + return c; +} +#endif int __svga_drawpixel32(int x, int y, unsigned long c) { @@ -174,3 +183,6 @@ void __read_rgba_pixels32( const GLcontext *ctx, *((GLint*)rgba[i]) = RGB2BGR32(__svga_getpixel32( x[i], y[i] )); } } + +#endif + diff --git a/src/mesa/drivers/svga/svgamesa8.c b/src/mesa/drivers/svga/svgamesa8.c index ed613735592..dc9df3f4128 100644 --- a/src/mesa/drivers/svga/svgamesa8.c +++ b/src/mesa/drivers/svga/svgamesa8.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa8.c,v 1.2 2000/01/22 20:08:36 brianp Exp $ */ +/* $Id: svgamesa8.c,v 1.3 2000/01/23 17:49:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,6 +27,8 @@ * Additional authors: Slawomir Szczyrba (Mesa 3.2) */ +#ifdef SVGA + #include "svgapix.h" @@ -157,3 +159,5 @@ void __read_ci32_pixels8( const GLcontext *ctx, } } + +#endif -- 2.30.2