Merge commit 'origin/master' into gallium-0.2
[mesa.git] / src / mesa / main / texcompress_s3tc.c
index c823967b7a0853e9a3247a92618cb159fb4a5b3e..4f329cdf59be64bf470f03f57adc2603de8ed885 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.2
+ * Version:  6.5.3
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -245,7 +245,7 @@ texstore_rgb_dxt1(TEXSTORE_PARAMS)
                               dst, dstRowStride);
    }
    else {
-      _mesa_problem(ctx, "external dxt library not available");
+      _mesa_warning(ctx, "external dxt library not available");
    }
 
    if (tempImage)
@@ -307,7 +307,7 @@ texstore_rgba_dxt1(TEXSTORE_PARAMS)
                               dst, dstRowStride);
    }
    else {
-      _mesa_problem(ctx, "external dxt library not available");
+      _mesa_warning(ctx, "external dxt library not available");
    }
 
    if (tempImage)
@@ -368,7 +368,7 @@ texstore_rgba_dxt3(TEXSTORE_PARAMS)
                               dst, dstRowStride);
    }
    else {
-      _mesa_problem(ctx, "external dxt library not available");
+      _mesa_warning(ctx, "external dxt library not available");
    }
 
    if (tempImage)
@@ -429,7 +429,7 @@ texstore_rgba_dxt5(TEXSTORE_PARAMS)
                               dst, dstRowStride);
    }
    else {
-      _mesa_problem(ctx, "external dxt library not available");
+      _mesa_warning(ctx, "external dxt library not available");
    }
 
    if (tempImage)
@@ -577,6 +577,32 @@ const struct gl_texture_format _mesa_texformat_rgb_dxt1 = {
    NULL                                        /* StoreTexel */
 };
 
+#if FEATURE_EXT_texture_sRGB
+const struct gl_texture_format _mesa_texformat_srgb_dxt1 = {
+   MESA_FORMAT_SRGB_DXT1,              /* MesaFormat */
+   GL_RGB,                             /* BaseFormat */
+   GL_UNSIGNED_NORMALIZED_ARB,         /* DataType */
+   4, /*approx*/                       /* RedBits */
+   4, /*approx*/                       /* GreenBits */
+   4, /*approx*/                       /* BlueBits */
+   0,                                  /* AlphaBits */
+   0,                                  /* LuminanceBits */
+   0,                                  /* IntensityBits */
+   0,                                  /* IndexBits */
+   0,                                  /* DepthBits */
+   0,                                  /* StencilBits */
+   0,                                  /* TexelBytes */
+   texstore_rgb_dxt1,                  /* StoreTexImageFunc */
+   NULL, /*impossible*/                /* FetchTexel1D */
+   fetch_texel_2d_rgb_dxt1,            /* FetchTexel2D */
+   NULL, /*impossible*/                /* FetchTexel3D */
+   NULL, /*impossible*/                /* FetchTexel1Df */
+   fetch_texel_2d_f_rgb_dxt1,          /* FetchTexel2Df */
+   NULL, /*impossible*/                /* FetchTexel3Df */
+   NULL                                        /* StoreTexel */
+};
+#endif
+
 const struct gl_texture_format _mesa_texformat_rgba_dxt1 = {
    MESA_FORMAT_RGBA_DXT1,              /* MesaFormat */
    GL_RGBA,                            /* BaseFormat */