aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fontconfig/doc/fontconfig-devel.sgml2
-rw-r--r--fontconfig/doc/fontconfig-user.sgml2
-rw-r--r--fontconfig/fontconfig/fontconfig.h2
-rw-r--r--mesalib/docs/autoconf.html37
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_cpu_detect.c5
-rw-r--r--mesalib/src/glsl/builtin_functions.cpp4
-rw-r--r--mesalib/src/mesa/main/errors.c2
-rw-r--r--mesalib/src/mesa/main/syncobj.c2
-rw-r--r--mesalib/src/mesa/program/prog_statevars.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c2
-rw-r--r--pixman/pixman/pixman-access.c50
-rw-r--r--pixman/pixman/pixman-bits-image.c18
-rw-r--r--pixman/pixman/pixman-mmx.c35
-rw-r--r--pixman/pixman/pixman-private.h2
-rw-r--r--pixman/pixman/pixman-sse2.c43
-rw-r--r--pixman/test/affine-test.c4
-rw-r--r--pixman/test/scaling-test.c4
17 files changed, 76 insertions, 141 deletions
diff --git a/fontconfig/doc/fontconfig-devel.sgml b/fontconfig/doc/fontconfig-devel.sgml
index a7b853021..7306d7924 100644
--- a/fontconfig/doc/fontconfig-devel.sgml
+++ b/fontconfig/doc/fontconfig-devel.sgml
@@ -170,7 +170,7 @@ convenience for the application's rendering mechanism.
the file
ftface FC_FT_FACE FT_Face Use the specified FreeType
face object
- rasterizer FC_RASTERIZER String Which rasterizer is in use
+ rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated)
outline FC_OUTLINE Bool Whether the glyphs are outlines
scalable FC_SCALABLE Bool Whether glyphs can be scaled
scale FC_SCALE Double Scale factor for point->pixel
diff --git a/fontconfig/doc/fontconfig-user.sgml b/fontconfig/doc/fontconfig-user.sgml
index eeff69add..775d1f725 100644
--- a/fontconfig/doc/fontconfig-user.sgml
+++ b/fontconfig/doc/fontconfig-user.sgml
@@ -116,7 +116,7 @@ convenience for the applications' rendering mechanism.
file String The filename holding the font
index Int The index of the font within the file
ftface FT_Face Use the specified FreeType face object
- rasterizer String Which rasterizer is in use
+ rasterizer String Which rasterizer is in use (deprecated)
outline Bool Whether the glyphs are outlines
scalable Bool Whether glyphs can be scaled
scale Double Scale factor for point->pixel conversions
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index 079177d4c..58912f572 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -91,7 +91,7 @@ typedef int FcBool;
#define FC_FILE "file" /* String */
#define FC_INDEX "index" /* Int */
#define FC_FT_FACE "ftface" /* FT_Face */
-#define FC_RASTERIZER "rasterizer" /* String */
+#define FC_RASTERIZER "rasterizer" /* String (deprecated) */
#define FC_OUTLINE "outline" /* Bool */
#define FC_SCALABLE "scalable" /* Bool */
#define FC_SCALE "scale" /* double */
diff --git a/mesalib/docs/autoconf.html b/mesalib/docs/autoconf.html
index a07a3ee14..d4e8a35d8 100644
--- a/mesalib/docs/autoconf.html
+++ b/mesalib/docs/autoconf.html
@@ -123,24 +123,6 @@ directories.</p>
There are also a few general options for altering the Mesa build:
</p>
<dl>
-<dt><code>--with-x</code></dt>
-<dd><p>When the X11 development libraries are
-needed, the <code>pkg-config</code> utility <a href="#pkg-config">will
-be used</a> for locating them. If they cannot be found through
-<code>pkg-config</code> a fallback routing using <code>imake</code> will
-be used. In this case, the <code>--with-x</code>,
-<code>--x-includes</code> and <code>--x-libraries</code> options can
-control the use of X for Mesa.</p>
-</dd>
-
-<dt><code>--enable-gl-osmesa</code></dt>
-<dd><p>The <a href="osmesa.html">OSMesa
-library</a> can be built on top of libGL for drivers that provide it.
-This option controls whether to build libOSMesa. By default, this is
-enabled for the Xlib driver and disabled otherwise. Note that this
-option is different than using OSMesa as the driver.</p>
-</dd>
-
<dt><code>--enable-debug</code></dt>
<dd><p>This option will enable compiler
options and macros to aid in debugging the Mesa libraries.</p>
@@ -155,12 +137,12 @@ assembly will not be used.</p>
<dt><code>--enable-32-bit</code></dt>
<dt><code>--enable-64-bit</code></dt>
-<dd><p>By default, the
-build will compile code as directed by the environment variables
+<dd><p>By default, the build will compile code as directed by the environment
+variables
<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is
<code>gcc</code>, these options offer a helper to add the compiler flags
to force 32- or 64-bit code generation as used on the x86 and x86_64
-architectures.</p>
+architectures. Note that these options are mutually exclusive.</p>
</dd>
</dl>
@@ -171,19 +153,19 @@ architectures.</p>
There are several different driver modes that Mesa can use. These are
described in more detail in the <a href="install.html">basic
installation instructions</a>. The Mesa driver is controlled through the
-configure option --with-driver. There are currently three supported
-options in the configure script.
+configure options <code>--enable-xlib-glx</code>, <code>--enable-osmesa</code>,
+and <code>--enable-dri</code>.
</p>
-<h3 id="xlib">Xlib</h3><p>This is the default mode for building Mesa.
+<h3 id="xlib">Xlib</h3><p>
It uses Xlib as a software renderer to do all rendering. It corresponds
-to the option <code>--with-driver=xlib</code>. The libX11 and libXext
+to the option <code>--enable-xlib-glx</code>. The libX11 and libXext
libraries, as well as the X11 development headers, will be need to
support the Xlib driver.
<h3 id="dri">DRI</h3><p>This mode uses the DRI hardware drivers for
accelerated OpenGL rendering. Enable the DRI drivers with the option
-<code>--with-driver=dri</code>. See the <a href="install.html">basic
+<code>--enable-dri</code>. See the <a href="install.html">basic
installation instructions</a> for details on prerequisites for the DRI
drivers.
@@ -223,7 +205,8 @@ and <code>/usr/local/lib</code>, respectively.
<h3 id="osmesa">OSMesa </h3><p> No libGL is built in this
mode. Instead, the driver code is built into the Off-Screen Mesa
(OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
-page for more details.
+page for more details. It corresponds to the option
+<code>--enable-osmesa</code>.
<!-- OSMesa specific options -->
<dl>
diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c
index 2ff40bb00..d2d1313f8 100644
--- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -283,8 +283,11 @@ static INLINE boolean sse2_has_daz(void)
fxarea.mxcsr_mask = 0;
#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO))
__asm __volatile ("fxsave %0" : "+m" (fxarea));
-#elif (defined(PIPE_CC_MSVC) || defined(PIPE_CC_ICL))
+#elif (defined(PIPE_CC_MSVC) && _MSC_VER >= 1700) || defined(PIPE_CC_ICL)
+ /* 1700 = Visual Studio 2012 */
_fxsave(&fxarea);
+#else
+ fxarea.mxcsr_mask = 0;
#endif
return !!(fxarea.mxcsr_mask & (1 << 6));
}
diff --git a/mesalib/src/glsl/builtin_functions.cpp b/mesalib/src/glsl/builtin_functions.cpp
index 5d8f171b9..ce78df12e 100644
--- a/mesalib/src/glsl/builtin_functions.cpp
+++ b/mesalib/src/glsl/builtin_functions.cpp
@@ -525,6 +525,9 @@ private:
* @{
*/
builtin_builder::builtin_builder()
+ : shader(NULL),
+ gl_ModelViewProjectionMatrix(NULL),
+ gl_Vertex(NULL)
{
mem_ctx = NULL;
}
@@ -1850,6 +1853,7 @@ builtin_builder::add_function(const char *name, ...)
f->add_signature(sig);
}
+ va_end(ap);
shader->symbols->add_function(f);
}
diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c
index e1a9fe2f5..28357e0e8 100644
--- a/mesalib/src/mesa/main/errors.c
+++ b/mesalib/src/mesa/main/errors.c
@@ -856,7 +856,7 @@ _mesa_PushDebugGroup(GLenum source, GLuint id, GLsizei length,
length = strlen(message);
emptySlot = &ctx->Debug.DebugGroupMsgs[ctx->Debug.GroupStackDepth];
store_message_details(emptySlot, gl_enum_to_debug_source(source),
- gl_enum_to_debug_source(GL_DEBUG_TYPE_PUSH_GROUP),
+ gl_enum_to_debug_type(GL_DEBUG_TYPE_PUSH_GROUP),
id,
gl_enum_to_debug_severity(GL_DEBUG_SEVERITY_NOTIFICATION),
length, message);
diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c
index 92c7cb0e1..987d4f57c 100644
--- a/mesalib/src/mesa/main/syncobj.c
+++ b/mesalib/src/mesa/main/syncobj.c
@@ -71,7 +71,7 @@
static struct gl_sync_object *
_mesa_new_sync_object(struct gl_context *ctx, GLenum type)
{
- struct gl_sync_object *s = MALLOC_STRUCT(gl_sync_object);
+ struct gl_sync_object *s = CALLOC_STRUCT(gl_sync_object);
(void) ctx;
(void) type;
diff --git a/mesalib/src/mesa/program/prog_statevars.c b/mesalib/src/mesa/program/prog_statevars.c
index f6073be13..145c07c67 100644
--- a/mesalib/src/mesa/program/prog_statevars.c
+++ b/mesalib/src/mesa/program/prog_statevars.c
@@ -256,8 +256,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
value[0] = ctx->Fog.Density;
value[1] = ctx->Fog.Start;
value[2] = ctx->Fog.End;
- value[3] = (ctx->Fog.End == ctx->Fog.Start)
- ? 1.0f : (GLfloat)(1.0 / (ctx->Fog.End - ctx->Fog.Start));
+ value[3] = 1.0f / (ctx->Fog.End - ctx->Fog.Start);
return;
case STATE_CLIPPLANE:
{
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index 098e6c02c..b1fd91a0e 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -189,7 +189,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb,
/* validate the fb */
do {
- if (!stfb->iface->validate(stfb->iface, stfb->statts,
+ if (!stfb->iface->validate(&st->iface, stfb->iface, stfb->statts,
stfb->num_statts, textures))
return;
diff --git a/pixman/pixman/pixman-access.c b/pixman/pixman/pixman-access.c
index b5c8e4017..4f0642d77 100644
--- a/pixman/pixman/pixman-access.c
+++ b/pixman/pixman/pixman-access.c
@@ -294,14 +294,14 @@ convert_pixel (pixman_format_code_t from, pixman_format_code_t to, uint32_t pixe
}
static force_inline uint32_t
-convert_pixel_to_a8r8g8b8 (pixman_image_t *image,
+convert_pixel_to_a8r8g8b8 (bits_image_t *image,
pixman_format_code_t format,
uint32_t pixel)
{
if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_GRAY ||
PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_COLOR)
{
- return image->bits.indexed->rgba[pixel];
+ return image->indexed->rgba[pixel];
}
else
{
@@ -332,7 +332,7 @@ convert_pixel_from_a8r8g8b8 (pixman_image_t *image,
}
static force_inline uint32_t
-fetch_and_convert_pixel (pixman_image_t * image,
+fetch_and_convert_pixel (bits_image_t * image,
const uint8_t * bits,
int offset,
pixman_format_code_t format)
@@ -417,7 +417,7 @@ convert_and_store_pixel (bits_image_t * image,
#define MAKE_ACCESSORS(format) \
static void \
- fetch_scanline_ ## format (pixman_image_t *image, \
+ fetch_scanline_ ## format (bits_image_t *image, \
int x, \
int y, \
int width, \
@@ -425,7 +425,7 @@ convert_and_store_pixel (bits_image_t * image,
const uint32_t *mask) \
{ \
uint8_t *bits = \
- (uint8_t *)(image->bits.bits + y * image->bits.rowstride); \
+ (uint8_t *)(image->bits + y * image->rowstride); \
int i; \
\
for (i = 0; i < width; ++i) \
@@ -461,8 +461,8 @@ convert_and_store_pixel (bits_image_t * image,
uint8_t *bits = \
(uint8_t *)(image->bits + line * image->rowstride); \
\
- return fetch_and_convert_pixel ((pixman_image_t *)image, \
- bits, offset, PIXMAN_ ## format); \
+ return fetch_and_convert_pixel ( \
+ image, bits, offset, PIXMAN_ ## format); \
} \
\
static const void *const __dummy__ ## format
@@ -583,14 +583,14 @@ to_srgb (float f)
}
static void
-fetch_scanline_a8r8g8b8_sRGB_float (pixman_image_t *image,
+fetch_scanline_a8r8g8b8_sRGB_float (bits_image_t * image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
@@ -612,14 +612,14 @@ fetch_scanline_a8r8g8b8_sRGB_float (pixman_image_t *image,
/* Expects a float buffer */
static void
-fetch_scanline_a2r10g10b10_float (pixman_image_t *image,
+fetch_scanline_a2r10g10b10_float (bits_image_t * image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
@@ -643,14 +643,14 @@ fetch_scanline_a2r10g10b10_float (pixman_image_t *image,
/* Expects a float buffer */
static void
-fetch_scanline_x2r10g10b10_float (pixman_image_t *image,
+fetch_scanline_x2r10g10b10_float (bits_image_t *image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
@@ -673,14 +673,14 @@ fetch_scanline_x2r10g10b10_float (pixman_image_t *image,
/* Expects a float buffer */
static void
-fetch_scanline_a2b10g10r10_float (pixman_image_t *image,
+fetch_scanline_a2b10g10r10_float (bits_image_t *image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
@@ -704,14 +704,14 @@ fetch_scanline_a2b10g10r10_float (pixman_image_t *image,
/* Expects a float buffer */
static void
-fetch_scanline_x2b10g10r10_float (pixman_image_t *image,
+fetch_scanline_x2b10g10r10_float (bits_image_t *image,
int x,
int y,
int width,
uint32_t * b,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
argb_t *buffer = (argb_t *)b;
@@ -733,14 +733,14 @@ fetch_scanline_x2b10g10r10_float (pixman_image_t *image,
}
static void
-fetch_scanline_yuy2 (pixman_image_t *image,
+fetch_scanline_yuy2 (bits_image_t *image,
int x,
int line,
int width,
uint32_t * buffer,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + image->bits.rowstride * line;
+ const uint32_t *bits = image->bits + image->rowstride * line;
int i;
for (i = 0; i < width; i++)
@@ -767,7 +767,7 @@ fetch_scanline_yuy2 (pixman_image_t *image,
}
static void
-fetch_scanline_yv12 (pixman_image_t *image,
+fetch_scanline_yv12 (bits_image_t *image,
int x,
int line,
int width,
@@ -1121,30 +1121,30 @@ store_scanline_generic_float (bits_image_t * image,
}
static void
-fetch_scanline_generic_float (pixman_image_t *image,
+fetch_scanline_generic_float (bits_image_t * image,
int x,
int y,
int width,
uint32_t * buffer,
const uint32_t *mask)
{
- image->bits.fetch_scanline_32 (image, x, y, width, buffer, NULL);
+ image->fetch_scanline_32 (image, x, y, width, buffer, NULL);
- pixman_expand_to_float ((argb_t *)buffer, buffer, image->bits.format, width);
+ pixman_expand_to_float ((argb_t *)buffer, buffer, image->format, width);
}
/* The 32_sRGB paths should be deleted after narrow processing
* is no longer invoked for formats that are considered wide.
* (Also see fetch_pixel_generic_lossy_32) */
static void
-fetch_scanline_a8r8g8b8_32_sRGB (pixman_image_t *image,
+fetch_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
int x,
int y,
int width,
uint32_t *buffer,
const uint32_t *mask)
{
- const uint32_t *bits = image->bits.bits + y * image->bits.rowstride;
+ const uint32_t *bits = image->bits + y * image->rowstride;
const uint32_t *pixel = (uint32_t *)bits + x;
const uint32_t *end = pixel + width;
uint32_t tmp;
diff --git a/pixman/pixman/pixman-bits-image.c b/pixman/pixman/pixman-bits-image.c
index 75a39a115..7b9a97335 100644
--- a/pixman/pixman/pixman-bits-image.c
+++ b/pixman/pixman/pixman-bits-image.c
@@ -1253,9 +1253,9 @@ bits_image_fetch_untransformed_repeat_none (bits_image_t *image,
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_float ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_float (image, x, y, w, buffer, NULL);
else
- image->fetch_scanline_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_32 (image, x, y, w, buffer, NULL);
width -= w;
buffer += w * (wide? 4 : 1);
@@ -1301,9 +1301,9 @@ bits_image_fetch_untransformed_repeat_normal (bits_image_t *image,
w = MIN (width, image->width - x);
if (wide)
- image->fetch_scanline_float ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_float (image, x, y, w, buffer, NULL);
else
- image->fetch_scanline_32 ((pixman_image_t *)image, x, y, w, buffer, NULL);
+ image->fetch_scanline_32 (image, x, y, w, buffer, NULL);
buffer += w * (wide? 4 : 1);
x += w;
@@ -1528,7 +1528,7 @@ dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
int width = iter->width;
uint32_t * buffer = iter->buffer;
- image->bits.fetch_scanline_32 (image, x, y, width, buffer, mask);
+ image->bits.fetch_scanline_32 (&image->bits, x, y, width, buffer, mask);
if (image->common.alpha_map)
{
uint32_t *alpha;
@@ -1541,8 +1541,7 @@ dest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
y -= image->common.alpha_origin_y;
image->common.alpha_map->fetch_scanline_32 (
- (pixman_image_t *)image->common.alpha_map,
- x, y, width, alpha, mask);
+ image->common.alpha_map, x, y, width, alpha, mask);
for (i = 0; i < width; ++i)
{
@@ -1567,7 +1566,7 @@ dest_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
argb_t * buffer = (argb_t *)iter->buffer;
image->fetch_scanline_float (
- (pixman_image_t *)image, x, y, width, (uint32_t *)buffer, mask);
+ image, x, y, width, (uint32_t *)buffer, mask);
if (image->common.alpha_map)
{
argb_t *alpha;
@@ -1580,8 +1579,7 @@ dest_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
y -= image->common.alpha_origin_y;
image->common.alpha_map->fetch_scanline_float (
- (pixman_image_t *)image->common.alpha_map,
- x, y, width, (uint32_t *)alpha, mask);
+ image->common.alpha_map, x, y, width, (uint32_t *)alpha, mask);
for (i = 0; i < width; ++i)
buffer[i].a = alpha[i].a;
diff --git a/pixman/pixman/pixman-mmx.c b/pixman/pixman/pixman-mmx.c
index c94d282a9..a0f59ef11 100644
--- a/pixman/pixman/pixman-mmx.c
+++ b/pixman/pixman/pixman-mmx.c
@@ -3561,7 +3561,6 @@ mmx_composite_over_reverse_n_8888 (pixman_implementation_t *imp,
#define BILINEAR_DECLARE_VARIABLES \
const __m64 mm_wt = _mm_set_pi16 (wt, wt, wt, wt); \
const __m64 mm_wb = _mm_set_pi16 (wb, wb, wb, wb); \
- const __m64 mm_BSHIFT = _mm_set_pi16 (BSHIFT, BSHIFT, BSHIFT, BSHIFT); \
const __m64 mm_addc7 = _mm_set_pi16 (0, 1, 0, 1); \
const __m64 mm_xorc7 = _mm_set_pi16 (0, BMSK, 0, BMSK); \
const __m64 mm_ux = _mm_set_pi16 (unit_x, unit_x, unit_x, unit_x); \
@@ -3581,35 +3580,15 @@ do { \
__m64 hi = _mm_add_pi16 (t_hi, b_hi); \
__m64 lo = _mm_add_pi16 (t_lo, b_lo); \
vx += unit_x; \
- if (BILINEAR_INTERPOLATION_BITS < 8) \
- { \
- /* calculate horizontal weights */ \
- __m64 mm_wh = _mm_add_pi16 (mm_addc7, _mm_xor_si64 (mm_xorc7, \
+ /* calculate horizontal weights */ \
+ __m64 mm_wh = _mm_add_pi16 (mm_addc7, _mm_xor_si64 (mm_xorc7, \
_mm_srli_pi16 (mm_x, \
16 - BILINEAR_INTERPOLATION_BITS))); \
- /* horizontal interpolation */ \
- __m64 p = _mm_unpacklo_pi16 (lo, hi); \
- __m64 q = _mm_unpackhi_pi16 (lo, hi); \
- lo = _mm_madd_pi16 (p, mm_wh); \
- hi = _mm_madd_pi16 (q, mm_wh); \
- } \
- else \
- { \
- /* calculate horizontal weights */ \
- __m64 mm_wh_lo = _mm_sub_pi16 (mm_BSHIFT, _mm_srli_pi16 (mm_x, \
- 16 - BILINEAR_INTERPOLATION_BITS)); \
- __m64 mm_wh_hi = _mm_srli_pi16 (mm_x, \
- 16 - BILINEAR_INTERPOLATION_BITS); \
- /* horizontal interpolation */ \
- __m64 mm_lo_lo = _mm_mullo_pi16 (lo, mm_wh_lo); \
- __m64 mm_lo_hi = _mm_mullo_pi16 (hi, mm_wh_hi); \
- __m64 mm_hi_lo = _mm_mulhi_pu16 (lo, mm_wh_lo); \
- __m64 mm_hi_hi = _mm_mulhi_pu16 (hi, mm_wh_hi); \
- lo = _mm_add_pi32 (_mm_unpacklo_pi16 (mm_lo_lo, mm_hi_lo), \
- _mm_unpacklo_pi16 (mm_lo_hi, mm_hi_hi)); \
- hi = _mm_add_pi32 (_mm_unpackhi_pi16 (mm_lo_lo, mm_hi_lo), \
- _mm_unpackhi_pi16 (mm_lo_hi, mm_hi_hi)); \
- } \
+ /* horizontal interpolation */ \
+ __m64 p = _mm_unpacklo_pi16 (lo, hi); \
+ __m64 q = _mm_unpackhi_pi16 (lo, hi); \
+ lo = _mm_madd_pi16 (p, mm_wh); \
+ hi = _mm_madd_pi16 (q, mm_wh); \
mm_x = _mm_add_pi16 (mm_x, mm_ux); \
/* shift and pack the result */ \
hi = _mm_srli_pi32 (hi, BILINEAR_INTERPOLATION_BITS * 2); \
diff --git a/pixman/pixman/pixman-private.h b/pixman/pixman/pixman-private.h
index 964660508..120196ddf 100644
--- a/pixman/pixman/pixman-private.h
+++ b/pixman/pixman/pixman-private.h
@@ -57,7 +57,7 @@ struct argb_t
float b;
};
-typedef void (*fetch_scanline_t) (pixman_image_t *image,
+typedef void (*fetch_scanline_t) (bits_image_t *image,
int x,
int y,
int width,
diff --git a/pixman/pixman/pixman-sse2.c b/pixman/pixman/pixman-sse2.c
index dde923524..a629565ef 100644
--- a/pixman/pixman/pixman-sse2.c
+++ b/pixman/pixman/pixman-sse2.c
@@ -5554,7 +5554,6 @@ FAST_NEAREST_MAINLOOP_COMMON (sse2_8888_n_8888_normal_OVER,
scaled_nearest_scanline_sse2_8888_n_8888_OVER,
uint32_t, uint32_t, uint32_t, NORMAL, TRUE, TRUE)
-#if BILINEAR_INTERPOLATION_BITS < 8
# define BILINEAR_DECLARE_VARIABLES \
const __m128i xmm_wt = _mm_set_epi16 (wt, wt, wt, wt, wt, wt, wt, wt); \
const __m128i xmm_wb = _mm_set_epi16 (wb, wb, wb, wb, wb, wb, wb, wb); \
@@ -5564,21 +5563,10 @@ FAST_NEAREST_MAINLOOP_COMMON (sse2_8888_n_8888_normal_OVER,
const __m128i xmm_zero = _mm_setzero_si128 (); \
__m128i xmm_x = _mm_set_epi16 (vx, -(vx + 1), vx, -(vx + 1), \
vx, -(vx + 1), vx, -(vx + 1))
-#else
-# define BILINEAR_DECLARE_VARIABLES \
- const __m128i xmm_wt = _mm_set_epi16 (wt, wt, wt, wt, wt, wt, wt, wt); \
- const __m128i xmm_wb = _mm_set_epi16 (wb, wb, wb, wb, wb, wb, wb, wb); \
- const __m128i xmm_addc = _mm_set_epi16 (0, 0, 0, 0, 1, 1, 1, 1); \
- const __m128i xmm_ux = _mm_set_epi16 (unit_x, unit_x, unit_x, unit_x, \
- -unit_x, -unit_x, -unit_x, -unit_x); \
- const __m128i xmm_zero = _mm_setzero_si128 (); \
- __m128i xmm_x = _mm_set_epi16 (vx, vx, vx, vx, \
- -(vx + 1), -(vx + 1), -(vx + 1), -(vx + 1))
-#endif
#define BILINEAR_INTERPOLATE_ONE_PIXEL(pix) \
do { \
- __m128i xmm_wh, xmm_lo, xmm_hi, a; \
+ __m128i xmm_wh, a; \
/* fetch 2x2 pixel block into sse2 registers */ \
__m128i tltr = _mm_loadl_epi64 ( \
(__m128i *)&src_top[pixman_fixed_to_int (vx)]); \
@@ -5590,28 +5578,13 @@ do { \
xmm_wt), \
_mm_mullo_epi16 (_mm_unpacklo_epi8 (blbr, xmm_zero), \
xmm_wb)); \
- if (BILINEAR_INTERPOLATION_BITS < 8) \
- { \
- /* calculate horizontal weights */ \
- xmm_wh = _mm_add_epi16 (xmm_addc, _mm_srli_epi16 (xmm_x, \
- 16 - BILINEAR_INTERPOLATION_BITS)); \
- xmm_x = _mm_add_epi16 (xmm_x, xmm_ux); \
- /* horizontal interpolation */ \
- a = _mm_madd_epi16 (_mm_unpackhi_epi16 (_mm_shuffle_epi32 ( \
- a, _MM_SHUFFLE (1, 0, 3, 2)), a), xmm_wh); \
- } \
- else \
- { \
- /* calculate horizontal weights */ \
- xmm_wh = _mm_add_epi16 (xmm_addc, _mm_srli_epi16 (xmm_x, \
- 16 - BILINEAR_INTERPOLATION_BITS)); \
- xmm_x = _mm_add_epi16 (xmm_x, xmm_ux); \
- /* horizontal interpolation */ \
- xmm_lo = _mm_mullo_epi16 (a, xmm_wh); \
- xmm_hi = _mm_mulhi_epu16 (a, xmm_wh); \
- a = _mm_add_epi32 (_mm_unpacklo_epi16 (xmm_lo, xmm_hi), \
- _mm_unpackhi_epi16 (xmm_lo, xmm_hi)); \
- } \
+ /* calculate horizontal weights */ \
+ xmm_wh = _mm_add_epi16 (xmm_addc, _mm_srli_epi16 (xmm_x, \
+ 16 - BILINEAR_INTERPOLATION_BITS)); \
+ xmm_x = _mm_add_epi16 (xmm_x, xmm_ux); \
+ /* horizontal interpolation */ \
+ a = _mm_madd_epi16 (_mm_unpackhi_epi16 (_mm_shuffle_epi32 ( \
+ a, _MM_SHUFFLE (1, 0, 3, 2)), a), xmm_wh); \
/* shift and pack the result */ \
a = _mm_srli_epi32 (a, BILINEAR_INTERPOLATION_BITS * 2); \
a = _mm_packs_epi32 (a, a); \
diff --git a/pixman/test/affine-test.c b/pixman/test/affine-test.c
index 2506250db..c1649ed5e 100644
--- a/pixman/test/affine-test.c
+++ b/pixman/test/affine-test.c
@@ -306,9 +306,7 @@ test_composite (int testnum,
return crc32;
}
-#if BILINEAR_INTERPOLATION_BITS == 8
-#define CHECKSUM 0x2CDF1F07
-#elif BILINEAR_INTERPOLATION_BITS == 7
+#if BILINEAR_INTERPOLATION_BITS == 7
#define CHECKSUM 0xBC00B1DF
#elif BILINEAR_INTERPOLATION_BITS == 4
#define CHECKSUM 0xA227306B
diff --git a/pixman/test/scaling-test.c b/pixman/test/scaling-test.c
index a8cb4c47b..b4142a796 100644
--- a/pixman/test/scaling-test.c
+++ b/pixman/test/scaling-test.c
@@ -375,9 +375,7 @@ test_composite (int testnum,
return crc32;
}
-#if BILINEAR_INTERPOLATION_BITS == 8
-#define CHECKSUM 0x9096E6B6
-#elif BILINEAR_INTERPOLATION_BITS == 7
+#if BILINEAR_INTERPOLATION_BITS == 7
#define CHECKSUM 0xCE8EC6BA
#elif BILINEAR_INTERPOLATION_BITS == 4
#define CHECKSUM 0xAB1D39BE