default = no
HAVE_MMX=1 allow MMX specializations, provided your assembler
supports MMX instruction set. However, the true CPU
- capabilities are checked at run-time to avoid crashes.
+ capabilities are checked at run-time to avoid lockups.
default = no
HAVE_SSE=1 (see HAVE_MMX)
default = no
1. Compilation
- Q) I tried to run `make' and it exits because `gcc' complains it cannot find
- some stupid file.
+ Q) `make' barfs and exits because it cannot find some stupid file.
A) You need LFN support.
A) When compiling for Glide (FX=1), pay attention to Glide path.
compile some demo.
A) Upgrade to DJGPP 2.04.
A) Add `vsnprintf.c' to the CORE_SOURCES in `src/Makefile.DJ' (untested!).
- A) The following hack should be safe in 90% of the cases, but if anything
- goes wrong, don't come back to me crying. Anyway, patch `src/imports.c'
- with the following line:
+ A) Patch `src/mesa/main/imports.c' with the following line:
#define vsnprintf(buf, max, fmt, arg) vsprintf(buf, fmt, arg)
+ This hack should be safe in 90% of the cases, but if anything goes wrong,
+ don't come back to me crying.
Q) `make' complains about DXE3 or something, yet it builds the libraries.
A) DXE3 refers to the DJGPP dynamic modules. You'll need either the latest
/* These lookup tables are used to extract RGB values in [0,255]
* from 15/16-bit pixel values.
*/
-static unsigned char pix15r[0x10000];
-static unsigned char pix15g[0x10000];
-static unsigned char pix15b[0x10000];
+static unsigned char pix15r[0x8000];
+static unsigned char pix15g[0x8000];
+static unsigned char pix15b[0x8000];
static unsigned char pix16r[0x10000];
static unsigned char pix16g[0x10000];
static unsigned char pix16b[0x10000];
{
word32 c = ((word16 *)vl_current_read_buffer)[offset];
#if HUGE_LOOKUP
+ c &= 0x7fff;
rgba[0] = pix15r[c];
rgba[1] = pix15g[c];
rgba[2] = pix15b[c];
for (pixel = 0; pixel <= 0xffff; pixel++) {
unsigned int r, g, b;
- /* 15bit */
- r = (pixel & 0x7c00) >> 8;
- g = (pixel & 0x03E0) >> 3;
- b = (pixel & 0x001F) << 2;
+ if (pixel <= 0x7fff) {
+ /* 15bit */
+ r = (pixel & 0x7c00) >> 8;
+ g = (pixel & 0x03E0) >> 3;
+ b = (pixel & 0x001F) << 2;
- r = (unsigned int)(((double)r * 255. / 0x7c) + 0.5);
- g = (unsigned int)(((double)g * 255. / 0x7c) + 0.5);
- b = (unsigned int)(((double)b * 255. / 0x7c) + 0.5);
+ r = (unsigned int)(((double)r * 255. / 0x7c) + 0.5);
+ g = (unsigned int)(((double)g * 255. / 0x7c) + 0.5);
+ b = (unsigned int)(((double)b * 255. / 0x7c) + 0.5);
- pix15r[pixel] = r;
- pix15g[pixel] = g;
- pix15b[pixel] = b;
+ pix15r[pixel] = r;
+ pix15g[pixel] = g;
+ pix15b[pixel] = b;
+ }
/* 16bit */
r = (pixel & 0xF800) >> 8;