aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texcompress_s3tc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-22 19:42:40 +0000
committermarha <marha@users.sourceforge.net>2010-11-22 19:42:40 +0000
commit85ef9930f56bf15181f9a0b238f03d55303cf411 (patch)
tree63b43286956ebd1c35c96e9b3d5305aabdf71a0f /mesalib/src/mesa/main/texcompress_s3tc.c
parent94810d19989336862251dbf69c3f3acb18a9b06d (diff)
downloadvcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.tar.gz
vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.tar.bz2
vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.zip
Updated to mesalib 7.9
Diffstat (limited to 'mesalib/src/mesa/main/texcompress_s3tc.c')
-rw-r--r--mesalib/src/mesa/main/texcompress_s3tc.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c
index fcd28a4b4..45a2f9c17 100644
--- a/mesalib/src/mesa/main/texcompress_s3tc.c
+++ b/mesalib/src/mesa/main/texcompress_s3tc.c
@@ -36,10 +36,10 @@
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
-#include "context.h"
#include "convolve.h"
#include "dlopen.h"
#include "image.h"
+#include "macros.h"
#include "texcompress.h"
#include "texcompress_s3tc.h"
#include "texstore.h"
@@ -48,7 +48,7 @@
#if FEATURE_texture_s3tc
-#ifdef __MINGW32__
+#if defined(_WIN32) || defined(WIN32)
#define DXTN_LIBNAME "dxtn.dll"
#define RTLD_LAZY 0
#define RTLD_GLOBAL 0
@@ -78,7 +78,7 @@ nonlinear_to_linear(GLubyte cs8)
table[i] = cs / 12.92f;
}
else {
- table[i] = (GLfloat) _mesa_pow((cs + 0.055) / 1.055, 2.4);
+ table[i] = (GLfloat) pow((cs + 0.055) / 1.055, 2.4);
}
}
tableReady = GL_TRUE;
@@ -149,7 +149,6 @@ _mesa_init_texture_s3tc( GLcontext *ctx )
}
if (dxtlibhandle) {
ctx->Mesa_DXTn = GL_TRUE;
- _mesa_warning(ctx, "software DXTn compression/decompression available");
}
#else
(void) ctx;
@@ -168,7 +167,8 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1);
+ ASSERT(dstFormat == MESA_FORMAT_RGB_DXT1 ||
+ dstFormat == MESA_FORMAT_SRGB_DXT1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -231,7 +231,8 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 8; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT1 ||
+ dstFormat == MESA_FORMAT_SRGBA_DXT1);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -293,7 +294,8 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT3 ||
+ dstFormat == MESA_FORMAT_SRGBA_DXT3);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);
@@ -354,7 +356,8 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
const GLint texWidth = dstRowStride * 4 / 16; /* a bit of a hack */
const GLchan *tempImage = NULL;
- ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5);
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_DXT5 ||
+ dstFormat == MESA_FORMAT_SRGBA_DXT5);
ASSERT(dstXoffset % 4 == 0);
ASSERT(dstYoffset % 4 == 0);
ASSERT(dstZoffset % 4 == 0);