Commit a7476d12 authored by Helvetix Victorinox's avatar Helvetix Victorinox

Incorrectly reported the inverse of whether not the 3dNow instruction set

* app/composite/gimp-composite-3dnow.c:
  Incorrectly reported the inverse of whether not the 3dNow instruction set is
	supported by the current CPU.

* app/composite/gimp-composite-{mmx,sse}.c:
  Removed linkage of gimp_composite_divide_*.  Something is
  inexplicably broken, and this will get people working again
  while I debug.  This should close bug #125101.
parent 393856aa
2003-10-23 Helvetix Victorinox <helvetix@gimp.org>
* app/composite/gimp-composite-3dnow.c:
Incorrectly reported the inverse of whether not the 3dNow
instruction set is supported by the current CPU.
* app/composite/gimp-composite-{mmx,sse}.c:
Removed linkage of gimp_composite_divide_*. Something is
inexplicably broken, and this will get people working again
while I debug. This should close bug #125101.
2003-10-23 Sven Neumann <sven@gimp.org> 2003-10-23 Sven Neumann <sven@gimp.org>
* plug-ins/common/sample_colorize.c: made debugging output * plug-ins/common/sample_colorize.c: made debugging output
...@@ -47,8 +47,8 @@ gimp_composite_3dnow_init (void) ...@@ -47,8 +47,8 @@ gimp_composite_3dnow_init (void)
#if defined(USE_MMX) && defined(ARCH_X86) #if defined(USE_MMX) && defined(ARCH_X86)
if (cpu_accel () & CPU_ACCEL_X86_3DNOW) if (cpu_accel () & CPU_ACCEL_X86_3DNOW)
{ {
return (FALSE); return (TRUE);
} }
#endif #endif
return (TRUE); return (FALSE);
} }
...@@ -656,8 +656,8 @@ gimp_composite_multiply_any_any_any_generic (GimpCompositeContext * ctx) ...@@ -656,8 +656,8 @@ gimp_composite_multiply_any_any_any_generic (GimpCompositeContext * ctx)
* gimp_composite_divide_any_any_any_generic: * gimp_composite_divide_any_any_any_generic:
* @ctx: The compositing context. * @ctx: The compositing context.
* *
* Perform an RGB[A] divide operation between the pixel sources * Perform an RGB[A] divide operation between the pixel sources ctx->A
* ctx->A and ctx->B. * and ctx->B. ctx->A is the numerator, ctx->B the denominator.
* *
**/ **/
void void
......
...@@ -24,7 +24,6 @@ static struct install_table { ...@@ -24,7 +24,6 @@ static struct install_table {
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_mmx }, { GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_mmx }, { GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_mmx }, { GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_divide_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_mmx }, { GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_BURN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_burn_rgba8_rgba8_rgba8_mmx }, { GIMP_COMPOSITE_BURN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_burn_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_mmx }, { GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_mmx },
......
...@@ -109,17 +109,6 @@ gimp_composite_mmx_test (int iterations, int n_pixels) ...@@ -109,17 +109,6 @@ gimp_composite_mmx_test (int iterations, int n_pixels)
} }
gimp_composite_regression_timer_report ("difference", ft0, ft1); gimp_composite_regression_timer_report ("difference", ft0, ft1);
gimp_composite_context_init (&special_ctx, GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D2);
gimp_composite_context_init (&generic_ctx, GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D1);
ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx);
ft1 = gimp_composite_regression_time_function (iterations, gimp_composite_divide_rgba8_rgba8_rgba8_mmx, &special_ctx);
if (gimp_composite_regression_compare_contexts ("divide", &generic_ctx, &special_ctx))
{
printf("divide failed\n");
return (1);
}
gimp_composite_regression_timer_report ("divide", ft0, ft1);
gimp_composite_context_init (&special_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D2); gimp_composite_context_init (&special_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D2);
gimp_composite_context_init (&generic_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D1); gimp_composite_context_init (&generic_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D1);
ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx); ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx);
......
...@@ -332,11 +332,13 @@ gimp_composite_difference_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op) ...@@ -332,11 +332,13 @@ gimp_composite_difference_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
} }
void void
gimp_composite_divide_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op) xxxgimp_composite_divide_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
{ {
GimpCompositeContext op = *_op; GimpCompositeContext op = *_op;
asm volatile ("movq %0, %%mm0\n" printf("A=%d B=%d %d ", op.pixelformat_A, op.pixelformat_B, GIMP_PIXELFORMAT_RGBA8); fflush(stdout);
asm volatile (" movq %0, %%mm0\n"
"\tmovq %1, %%mm7\n" "\tmovq %1, %%mm7\n"
: :
: "m" (*rgba8_alpha_mask), "m" (*rgba8_w1) : "m" (*rgba8_alpha_mask), "m" (*rgba8_w1)
......
...@@ -24,7 +24,6 @@ static struct install_table { ...@@ -24,7 +24,6 @@ static struct install_table {
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse }, { GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse }, { GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse }, { GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_divide_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_sse }, { GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_BURN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_burn_rgba8_rgba8_rgba8_sse }, { GIMP_COMPOSITE_BURN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_burn_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse }, { GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse },
......
...@@ -109,17 +109,6 @@ gimp_composite_sse_test (int iterations, int n_pixels) ...@@ -109,17 +109,6 @@ gimp_composite_sse_test (int iterations, int n_pixels)
} }
gimp_composite_regression_timer_report ("difference", ft0, ft1); gimp_composite_regression_timer_report ("difference", ft0, ft1);
gimp_composite_context_init (&special_ctx, GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D2);
gimp_composite_context_init (&generic_ctx, GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D1);
ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx);
ft1 = gimp_composite_regression_time_function (iterations, gimp_composite_divide_rgba8_rgba8_rgba8_sse, &special_ctx);
if (gimp_composite_regression_compare_contexts ("divide", &generic_ctx, &special_ctx))
{
printf("divide failed\n");
return (1);
}
gimp_composite_regression_timer_report ("divide", ft0, ft1);
gimp_composite_context_init (&special_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D2); gimp_composite_context_init (&special_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D2);
gimp_composite_context_init (&generic_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D1); gimp_composite_context_init (&generic_ctx, GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, n_pixels, (unsigned char *) rgba8A, (unsigned char *) rgba8B, (unsigned char *) rgba8B, (unsigned char *) rgba8D1);
ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx); ft0 = gimp_composite_regression_time_function (iterations, gimp_composite_dispatch, &generic_ctx);
......
...@@ -406,7 +406,7 @@ gimp_composite_difference_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op) ...@@ -406,7 +406,7 @@ gimp_composite_difference_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op)
} }
void void
gimp_composite_divide_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op) xxxgimp_composite_divide_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op)
{ {
GimpCompositeContext op = *_op; GimpCompositeContext op = *_op;
......
...@@ -372,7 +372,7 @@ gimp_composite_init (void) ...@@ -372,7 +372,7 @@ gimp_composite_init (void)
* it succeeded in hooking in the functions with the special * it succeeded in hooking in the functions with the special
* optimisation instructions, or hardware, or whatever. * optimisation instructions, or hardware, or whatever.
*/ */
if (! (gimp_composite_options.bits & GIMP_COMPOSITE_OPTION_INITIALISED)) if (! (gimp_composite_options.bits & GIMP_COMPOSITE_OPTION_NOEXTENSIONS))
{ {
extern gboolean gimp_composite_mmx_install (); extern gboolean gimp_composite_mmx_install ();
extern gboolean gimp_composite_sse_install (); extern gboolean gimp_composite_sse_install ();
...@@ -410,8 +410,6 @@ gimp_composite_init (void) ...@@ -410,8 +410,6 @@ gimp_composite_init (void)
g_printerr (" +vis"); g_printerr (" +vis");
else else
g_printerr (" -vis"); g_printerr (" -vis");
gimp_composite_options.bits |= GIMP_COMPOSITE_OPTION_INITIALISED;
} }
g_printerr ("\n"); g_printerr ("\n");
......
...@@ -151,7 +151,7 @@ struct GimpCompositeOptions ...@@ -151,7 +151,7 @@ struct GimpCompositeOptions
}; };
#define GIMP_COMPOSITE_OPTION_USE 0x1 #define GIMP_COMPOSITE_OPTION_USE 0x1
#define GIMP_COMPOSITE_OPTION_INITIALISED 0x2 #define GIMP_COMPOSITE_OPTION_NOEXTENSIONS 0x2
#define GIMP_COMPOSITE_OPTION_VERBOSE 0x4 #define GIMP_COMPOSITE_OPTION_VERBOSE 0x4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment