aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fontconfig/conf.d/30-urw-aliases.conf5
-rw-r--r--fontconfig/src/fccharset.c175
-rw-r--r--fontconfig/src/fcfreetype.c32
-rw-r--r--libXau/configure.ac2
-rw-r--r--libXdmcp/configure.ac2
-rw-r--r--libXext/configure.ac2
-rw-r--r--libXft/NEWS16
-rw-r--r--libXft/README2
-rw-r--r--libXft/configure.ac2
-rw-r--r--libXinerama/configure.ac2
-rw-r--r--libXmu/configure.ac2
-rw-r--r--mesalib/docs/install.html8
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c12
-rw-r--r--mesalib/src/mesa/main/fbobject.c2
-rw-r--r--mesalib/src/mesa/main/teximage.c39
-rw-r--r--pixman/pixman/pixman-mmx.c4
16 files changed, 188 insertions, 119 deletions
diff --git a/fontconfig/conf.d/30-urw-aliases.conf b/fontconfig/conf.d/30-urw-aliases.conf
index 9d5920306..359f9fbfe 100644
--- a/fontconfig/conf.d/30-urw-aliases.conf
+++ b/fontconfig/conf.d/30-urw-aliases.conf
@@ -29,6 +29,11 @@
<family>Zapf Dingbats</family>
<accept><family>Dingbats</family></accept>
</alias>
+ <!-- workaround for Bug#19128 -->
+ <alias binding="same">
+ <family>ZapfDingbats</family>
+ <accept><family>Dingbats</family></accept>
+ </alias>
<match target="pattern">
<test name="family">
<string>Symbol</string>
diff --git a/fontconfig/src/fccharset.c b/fontconfig/src/fccharset.c
index df1d2b538..8c1d85819 100644
--- a/fontconfig/src/fccharset.c
+++ b/fontconfig/src/fccharset.c
@@ -54,28 +54,31 @@ FcCharSetDestroy (FcCharSet *fcs)
{
int i;
- if (fcs->ref == FC_REF_CONSTANT)
+ if (fcs)
{
- FcCacheObjectDereference (fcs);
- return;
- }
- if (--fcs->ref > 0)
- return;
- for (i = 0; i < fcs->num; i++)
- {
- FcMemFree (FC_MEM_CHARLEAF, sizeof (FcCharLeaf));
- free (FcCharSetLeaf (fcs, i));
- }
- if (fcs->num)
- {
- /* the numbers here are estimates */
- FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (intptr_t));
- free (FcCharSetLeaves (fcs));
- FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcChar16));
- free (FcCharSetNumbers (fcs));
+ if (fcs->ref == FC_REF_CONSTANT)
+ {
+ FcCacheObjectDereference (fcs);
+ return;
+ }
+ if (--fcs->ref > 0)
+ return;
+ for (i = 0; i < fcs->num; i++)
+ {
+ FcMemFree (FC_MEM_CHARLEAF, sizeof (FcCharLeaf));
+ free (FcCharSetLeaf (fcs, i));
+ }
+ if (fcs->num)
+ {
+ /* the numbers here are estimates */
+ FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (intptr_t));
+ free (FcCharSetLeaves (fcs));
+ FcMemFree (FC_MEM_CHARSET, fcs->num * sizeof (FcChar16));
+ free (FcCharSetNumbers (fcs));
+ }
+ FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet));
+ free (fcs);
}
- FcMemFree (FC_MEM_CHARSET, sizeof (FcCharSet));
- free (fcs);
}
/*
@@ -252,7 +255,7 @@ FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4)
FcCharLeaf *leaf;
FcChar32 *b;
- if (fcs->ref == FC_REF_CONSTANT)
+ if (fcs == NULL || fcs->ref == FC_REF_CONSTANT)
return FcFalse;
leaf = FcCharSetFindLeafCreate (fcs, ucs4);
if (!leaf)
@@ -268,7 +271,7 @@ FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4)
FcCharLeaf *leaf;
FcChar32 *b;
- if (fcs->ref == FC_REF_CONSTANT)
+ if (fcs == NULL || fcs->ref == FC_REF_CONSTANT)
return FcFalse;
leaf = FcCharSetFindLeaf (fcs, ucs4);
if (!leaf)
@@ -342,10 +345,13 @@ FcCharSetIterStart (const FcCharSet *fcs, FcCharSetIter *iter)
FcCharSet *
FcCharSetCopy (FcCharSet *src)
{
- if (src->ref != FC_REF_CONSTANT)
- src->ref++;
- else
- FcCacheObjectReference (src);
+ if (src)
+ {
+ if (src->ref != FC_REF_CONSTANT)
+ src->ref++;
+ else
+ FcCacheObjectReference (src);
+ }
return src;
}
@@ -357,6 +363,8 @@ FcCharSetEqual (const FcCharSet *a, const FcCharSet *b)
if (a == b)
return FcTrue;
+ if (!a || !b)
+ return FcFalse;
for (FcCharSetIterStart (a, &ai), FcCharSetIterStart (b, &bi);
ai.leaf && bi.leaf;
FcCharSetIterNext (a, &ai), FcCharSetIterNext (b, &bi))
@@ -394,6 +402,8 @@ FcCharSetOperate (const FcCharSet *a,
FcCharSet *fcs;
FcCharSetIter ai, bi;
+ if (!a || !b)
+ goto bail0;
fcs = FcCharSetCreate ();
if (!fcs)
goto bail0;
@@ -493,6 +503,9 @@ FcCharSetMerge (FcCharSet *a, const FcCharSet *b, FcBool *changed)
int ai = 0, bi = 0;
FcChar16 an, bn;
+ if (!a || !b)
+ return FcFalse;
+
if (a->ref == FC_REF_CONSTANT) {
if (changed)
*changed = FcFalse;
@@ -561,7 +574,11 @@ FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b)
FcBool
FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4)
{
- FcCharLeaf *leaf = FcCharSetFindLeaf (fcs, ucs4);
+ FcCharLeaf *leaf;
+
+ if (!fcs)
+ return FcFalse;
+ leaf = FcCharSetFindLeaf (fcs, ucs4);
if (!leaf)
return FcFalse;
return (leaf->map[(ucs4 & 0xff) >> 5] & (1 << (ucs4 & 0x1f))) != 0;
@@ -586,28 +603,31 @@ FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b)
FcCharSetIter ai, bi;
FcChar32 count = 0;
- FcCharSetIterStart (a, &ai);
- FcCharSetIterStart (b, &bi);
- while (ai.leaf && bi.leaf)
+ if (a && b)
{
- if (ai.ucs4 == bi.ucs4)
- {
- FcChar32 *am = ai.leaf->map;
- FcChar32 *bm = bi.leaf->map;
- int i = 256/32;
- while (i--)
- count += FcCharSetPopCount (*am++ & *bm++);
- FcCharSetIterNext (a, &ai);
- }
- else if (ai.ucs4 < bi.ucs4)
- {
- ai.ucs4 = bi.ucs4;
- FcCharSetIterSet (a, &ai);
- }
- if (bi.ucs4 < ai.ucs4)
+ FcCharSetIterStart (a, &ai);
+ FcCharSetIterStart (b, &bi);
+ while (ai.leaf && bi.leaf)
{
- bi.ucs4 = ai.ucs4;
- FcCharSetIterSet (b, &bi);
+ if (ai.ucs4 == bi.ucs4)
+ {
+ FcChar32 *am = ai.leaf->map;
+ FcChar32 *bm = bi.leaf->map;
+ int i = 256/32;
+ while (i--)
+ count += FcCharSetPopCount (*am++ & *bm++);
+ FcCharSetIterNext (a, &ai);
+ }
+ else if (ai.ucs4 < bi.ucs4)
+ {
+ ai.ucs4 = bi.ucs4;
+ FcCharSetIterSet (a, &ai);
+ }
+ if (bi.ucs4 < ai.ucs4)
+ {
+ bi.ucs4 = ai.ucs4;
+ FcCharSetIterSet (b, &bi);
+ }
}
}
return count;
@@ -619,13 +639,16 @@ FcCharSetCount (const FcCharSet *a)
FcCharSetIter ai;
FcChar32 count = 0;
- for (FcCharSetIterStart (a, &ai); ai.leaf; FcCharSetIterNext (a, &ai))
+ if (a)
{
- int i = 256/32;
- FcChar32 *am = ai.leaf->map;
+ for (FcCharSetIterStart (a, &ai); ai.leaf; FcCharSetIterNext (a, &ai))
+ {
+ int i = 256/32;
+ FcChar32 *am = ai.leaf->map;
- while (i--)
- count += FcCharSetPopCount (*am++);
+ while (i--)
+ count += FcCharSetPopCount (*am++);
+ }
}
return count;
}
@@ -636,31 +659,34 @@ FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b)
FcCharSetIter ai, bi;
FcChar32 count = 0;
- FcCharSetIterStart (a, &ai);
- FcCharSetIterStart (b, &bi);
- while (ai.leaf)
+ if (a && b)
{
- if (ai.ucs4 <= bi.ucs4)
+ FcCharSetIterStart (a, &ai);
+ FcCharSetIterStart (b, &bi);
+ while (ai.leaf)
{
- FcChar32 *am = ai.leaf->map;
- int i = 256/32;
- if (ai.ucs4 == bi.ucs4)
+ if (ai.ucs4 <= bi.ucs4)
{
- FcChar32 *bm = bi.leaf->map;
- while (i--)
- count += FcCharSetPopCount (*am++ & ~*bm++);
+ FcChar32 *am = ai.leaf->map;
+ int i = 256/32;
+ if (ai.ucs4 == bi.ucs4)
+ {
+ FcChar32 *bm = bi.leaf->map;
+ while (i--)
+ count += FcCharSetPopCount (*am++ & ~*bm++);
+ }
+ else
+ {
+ while (i--)
+ count += FcCharSetPopCount (*am++);
+ }
+ FcCharSetIterNext (a, &ai);
}
- else
+ else if (bi.leaf)
{
- while (i--)
- count += FcCharSetPopCount (*am++);
+ bi.ucs4 = ai.ucs4;
+ FcCharSetIterSet (b, &bi);
}
- FcCharSetIterNext (a, &ai);
- }
- else if (bi.leaf)
- {
- bi.ucs4 = ai.ucs4;
- FcCharSetIterSet (b, &bi);
}
}
return count;
@@ -675,7 +701,10 @@ FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b)
int ai, bi;
FcChar16 an, bn;
- if (a == b) return FcTrue;
+ if (a == b)
+ return FcTrue;
+ if (!a || !b)
+ return FcFalse;
bi = 0;
ai = 0;
while (ai < a->num && bi < b->num)
@@ -734,6 +763,8 @@ FcCharSetNextPage (const FcCharSet *a,
FcCharSetIter ai;
FcChar32 page;
+ if (!a)
+ return FC_CHARSET_DONE;
ai.ucs4 = *next;
FcCharSetIterSet (a, &ai);
if (!ai.leaf)
diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c
index e322e8ca4..ce7dc836c 100644
--- a/fontconfig/src/fcfreetype.c
+++ b/fontconfig/src/fcfreetype.c
@@ -2513,31 +2513,27 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks, int *spacing)
{
FcCharSet *cs;
- cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, -1);
/*
* Check for bitmap-only ttf fonts that are missing the glyf table.
* In that case, pick a size and look for glyphs in that size instead
*/
- if (FcCharSetCount (cs) == 0)
+ if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) &&
+ face->num_fixed_sizes > 0 &&
+ FT_Get_Sfnt_Table (face, ft_sfnt_head))
{
- /* Check for non-scalable TT fonts */
- if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) &&
- face->num_fixed_sizes > 0 &&
- FT_Get_Sfnt_Table (face, ft_sfnt_head))
- {
- FT_Int strike_index = 0;
- int i;
-
- /* Select the face closest to 16 pixels tall */
- for (i = 1; i < face->num_fixed_sizes; i++) {
- if (abs (face->available_sizes[i].height - 16) <
- abs (face->available_sizes[strike_index].height - 16))
- strike_index = i;
- }
- FcCharSetDestroy (cs);
- cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, strike_index);
+ FT_Int strike_index = 0;
+ int i;
+
+ /* Select the face closest to 16 pixels tall */
+ for (i = 1; i < face->num_fixed_sizes; i++) {
+ if (abs (face->available_sizes[i].height - 16) <
+ abs (face->available_sizes[strike_index].height - 16))
+ strike_index = i;
}
+ cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, strike_index);
}
+ else
+ cs = FcFreeTypeCharSetAndSpacingForSize (face, blanks, spacing, -1);
return cs;
}
diff --git a/libXau/configure.ac b/libXau/configure.ac
index c21fbcdb2..92ad113f7 100644
--- a/libXau/configure.ac
+++ b/libXau/configure.ac
@@ -22,7 +22,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXau], [1.0.6],
+AC_INIT([libXau], [1.0.7],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXau])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/libXdmcp/configure.ac b/libXdmcp/configure.ac
index 30e57bb65..08c046ae0 100644
--- a/libXdmcp/configure.ac
+++ b/libXdmcp/configure.ac
@@ -22,7 +22,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXdmcp], [1.1.0],
+AC_INIT([libXdmcp], [1.1.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXdmcp])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/libXext/configure.ac b/libXext/configure.ac
index dd9788abe..7f81504e3 100644
--- a/libXext/configure.ac
+++ b/libXext/configure.ac
@@ -1,7 +1,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXext], [1.3.0],
+AC_INIT([libXext], [1.3.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXext])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/libXft/NEWS b/libXft/NEWS
index 01e6dbe28..b547c7835 100644
--- a/libXft/NEWS
+++ b/libXft/NEWS
@@ -1,12 +1,22 @@
Xft
X FreeType library
- Version 2.2.0
- 2010-10-29
+ Version 2.3.0
+ 2012-03-07
-Xft version 2.1 is the first stand alone release of Xft, a library that
+Xft version 2.1 was the first stand alone release of Xft, a library that
connects X applications with the FreeType font rasterization library. Xft
uses fontconfig to locate fonts so it has no configuration files.
+Version 2.3.0
+
+Subpixel LCD text rendering improvements
+
+Dropped support for versions of freetype2, fontconfig & libXrender that
+pre-dated pkgconfig support.
+
+Raised minimum required versions to freetype2 2.1.6 & fontconfig 2.5.92.
+
+
Version 2.2.0
Dropped xft-config, now that pkg-config is well established.
diff --git a/libXft/README b/libXft/README
index b1097eb44..3dede126a 100644
--- a/libXft/README
+++ b/libXft/README
@@ -1,7 +1,7 @@
Xft
X FreeType library
-Xft version 2.1 is the first stand alone release of Xft, a library that
+Xft version 2.1 was the first stand alone release of Xft, a library that
connects X applications with the FreeType font rasterization library. Xft
uses fontconfig to locate fonts so it has no configuration files.
diff --git a/libXft/configure.ac b/libXft/configure.ac
index 61d6c4dbe..b54311ec7 100644
--- a/libXft/configure.ac
+++ b/libXft/configure.ac
@@ -27,7 +27,7 @@ AC_PREREQ([2.60])
# version. This version number will be substituted into Xft.h
# Please bump the minor library number at each release as well.
#
-AC_INIT([libXft], [2.2.0],
+AC_INIT([libXft], [2.3.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXft])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/libXinerama/configure.ac b/libXinerama/configure.ac
index 872771969..545c94696 100644
--- a/libXinerama/configure.ac
+++ b/libXinerama/configure.ac
@@ -21,7 +21,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXinerama], [1.1.1],
+AC_INIT([libXinerama], [1.1.2],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXinerama])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/libXmu/configure.ac b/libXmu/configure.ac
index 932a5c224..17fff034b 100644
--- a/libXmu/configure.ac
+++ b/libXmu/configure.ac
@@ -1,7 +1,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXmu], [1.1.0],
+AC_INIT([libXmu], [1.1.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXmu])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
diff --git a/mesalib/docs/install.html b/mesalib/docs/install.html
index 07e38bf3d..0d5bab249 100644
--- a/mesalib/docs/install.html
+++ b/mesalib/docs/install.html
@@ -38,9 +38,17 @@
<li>lex / yacc - for building the GLSL compiler.
On Linux systems, flex and bison are used.
Versions 2.5.35 and 2.4.1, respectively, (or later) should work.
+<br>
+<br>
+On Windows with MinGW, install flex and bison with:
+<pre>mingw-get install msys-flex msys-bison</pre>
</li>
<li>python - Python is needed for building the Gallium components.
Version 2.6.4 or later should work.
+<br>
+<br>
+To build OpenGL ES 1.1 and 2.0 you'll also need
+<a href="http://xmlsoft.org/sources/win32/python/libxml2-python-2.7.7.win32-py2.7.exe">libxml2-python</a>.
</li>
</ul>
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 6c8495ddb..95336fc28 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -174,15 +174,19 @@ struct save_state
struct gl_query_object *CondRenderQuery;
GLenum CondRenderMode;
+#if FEATURE_feedback
/** MESA_META_SELECT_FEEDBACK */
GLenum RenderMode;
struct gl_selection Select;
struct gl_feedback Feedback;
+#endif
/** Miscellaneous (always disabled) */
GLboolean Lighting;
GLboolean RasterDiscard;
+#if FEATURE_EXT_transform_feedback
GLboolean TransformFeedbackNeedsResume;
+#endif
};
/**
@@ -425,6 +429,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
memset(save, 0, sizeof(*save));
save->SavedState = state;
+#if FEATURE_EXT_transform_feedback
/* Pausing transform feedback needs to be done early, or else we won't be
* able to change other state.
*/
@@ -433,6 +438,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
!ctx->TransformFeedback.CurrentObject->Paused;
if (save->TransformFeedbackNeedsResume)
_mesa_PauseTransformFeedback();
+#endif
if (state & MESA_META_ALPHA_TEST) {
save->AlphaEnabled = ctx->Color.AlphaEnabled;
@@ -700,6 +706,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_EndConditionalRender();
}
+#if FEATURE_feedback
if (state & MESA_META_SELECT_FEEDBACK) {
save->RenderMode = ctx->RenderMode;
if (ctx->RenderMode == GL_SELECT) {
@@ -710,6 +717,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_RenderMode(GL_RENDER);
}
}
+#endif
/* misc */
{
@@ -984,6 +992,7 @@ _mesa_meta_end(struct gl_context *ctx)
save->CondRenderMode);
}
+#if FEATURE_feedback
if (state & MESA_META_SELECT_FEEDBACK) {
if (save->RenderMode == GL_SELECT) {
_mesa_RenderMode(GL_SELECT);
@@ -993,6 +1002,7 @@ _mesa_meta_end(struct gl_context *ctx)
ctx->Feedback = save->Feedback;
}
}
+#endif
/* misc */
if (save->Lighting) {
@@ -1001,8 +1011,10 @@ _mesa_meta_end(struct gl_context *ctx)
if (save->RasterDiscard) {
_mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_TRUE);
}
+#if FEATURE_EXT_transform_feedback
if (save->TransformFeedbackNeedsResume)
_mesa_ResumeTransformFeedback();
+#endif
}
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 6ee062d0b..281b1ca2f 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -1994,7 +1994,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
}
if ((level < 0) ||
- (level >= _mesa_max_texture_levels(ctx, texObj->Target))) {
+ (level >= _mesa_max_texture_levels(ctx, textarget))) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glFramebufferTexture%sEXT(level)", caller);
return;
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 4fb81e62d..cf0a0cb2a 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -915,7 +915,6 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
- case GL_TEXTURE_CUBE_MAP_ARB:
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
return ctx->Extensions.ARB_texture_cube_map
? ctx->Const.MaxCubeTextureLevels : 0;
@@ -2422,7 +2421,7 @@ _mesa_choose_texture_format(struct gl_context *ctx,
/**
* Adjust pixel unpack params and image dimensions to strip off the
- * texture border.
+ * one-pixel texture border.
*
* Gallium and intel don't support texture borders. They've seldem been used
* and seldom been implemented correctly anyway.
@@ -2430,34 +2429,37 @@ _mesa_choose_texture_format(struct gl_context *ctx,
* \param unpackNew returns the new pixel unpack parameters
*/
static void
-strip_texture_border(GLint *border,
+strip_texture_border(GLenum target,
GLint *width, GLint *height, GLint *depth,
const struct gl_pixelstore_attrib *unpack,
struct gl_pixelstore_attrib *unpackNew)
{
- assert(*border > 0); /* sanity check */
+ assert(width);
+ assert(height);
+ assert(depth);
*unpackNew = *unpack;
if (unpackNew->RowLength == 0)
unpackNew->RowLength = *width;
- if (depth && unpackNew->ImageHeight == 0)
+ if (unpackNew->ImageHeight == 0)
unpackNew->ImageHeight = *height;
- unpackNew->SkipPixels += *border;
- if (height)
- unpackNew->SkipRows += *border;
- if (depth)
- unpackNew->SkipImages += *border;
-
assert(*width >= 3);
- *width = *width - 2 * *border;
- if (height && *height >= 3)
- *height = *height - 2 * *border;
- if (depth && *depth >= 3)
- *depth = *depth - 2 * *border;
- *border = 0;
+ unpackNew->SkipPixels++; /* skip the border */
+ *width = *width - 2; /* reduce the width by two border pixels */
+
+ /* The min height of a texture with a border is 3 */
+ if (*height >= 3 && target != GL_TEXTURE_1D_ARRAY) {
+ unpackNew->SkipRows++; /* skip the border */
+ *height = *height - 2; /* reduce the height by two border pixels */
+ }
+
+ if (*depth >= 3 && target != GL_TEXTURE_2D_ARRAY) {
+ unpackNew->SkipImages++; /* skip the border */
+ *depth = *depth - 2; /* reduce the depth by two border pixels */
+ }
}
/**
@@ -2542,8 +2544,9 @@ teximage(struct gl_context *ctx, GLuint dims,
* rarely-tested software fallback rendering.
*/
if (border && ctx->Const.StripTextureBorder) {
- strip_texture_border(&border, &width, &height, &depth, unpack,
+ strip_texture_border(target, &width, &height, &depth, unpack,
&unpack_no_border);
+ border = 0;
unpack = &unpack_no_border;
}
diff --git a/pixman/pixman/pixman-mmx.c b/pixman/pixman/pixman-mmx.c
index 4cf554934..6fae7f75d 100644
--- a/pixman/pixman/pixman-mmx.c
+++ b/pixman/pixman/pixman-mmx.c
@@ -57,6 +57,9 @@ _mm_empty (void)
#endif
#if defined __GNUC__ && defined USE_X86_MMX
+# ifdef __SUNPRO_C
+# include <xmmintrin.h>
+# else
/* We have to compile with -msse to use xmmintrin.h, but that causes SSE
* instructions to be generated that we don't want. Just duplicate the
* functions we want to use. */
@@ -82,6 +85,7 @@ _mm_shuffle_pi16 (__m64 __A, int8_t const __N)
return ret;
}
+# endif
#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \
(((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | (fp0))