]> git.pld-linux.org Git - packages/ClanLib.git/commitdiff
- more sse
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 5 Nov 2013 20:12:28 +0000 (21:12 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 5 Nov 2013 20:12:28 +0000 (21:12 +0100)
really-disable-sse2.patch

index 19330f313868a3ed416dc682366830957c23ff6b..9c5c3590ead43aee8d95fa006b5de666d4f41112 100644 (file)
  
        std::unique_ptr<PixelReader> reader = impl->create_reader(input_format, sse2);
        std::unique_ptr<PixelWriter> writer = impl->create_writer(output_format, sse2, sse4);
+@@ -162,9 +162,11 @@
+       switch (format)
+       {
+       case tf_bgra8:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelReader>(new PixelReaderSSE2_bgra8());
+               else
++#endif
+                       return std::unique_ptr<PixelReader>(new PixelReader_bgra8());
+       case tf_bgr8:
+               return std::unique_ptr<PixelReader>(new PixelReader_bgr8());
+@@ -216,9 +218,11 @@
+       case tf_rgb5_a1:
+               return std::unique_ptr<PixelReader>(new PixelReader_rgb5_a1());
+       case tf_rgba8:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba8());
+               else
++#endif
+                       return std::unique_ptr<PixelReader>(new PixelReader_4norm<unsigned char>());
+       case tf_rgba8_snorm:
+               return std::unique_ptr<PixelReader>(new PixelReader_4norm<char>());
+@@ -227,18 +231,22 @@
+       case tf_rgba12:
+               break;
+       case tf_rgba16:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba16());
+               else
++#endif
+                       return std::unique_ptr<PixelReader>(new PixelReader_4norm<unsigned short>());
+       case tf_rgba16_snorm:
+               return std::unique_ptr<PixelReader>(new PixelReader_4norm<short>());
+       case tf_srgb8:
+               return std::unique_ptr<PixelReader>(new PixelReader_3norm<unsigned char>()); // TBD: should we add a 2.2 gamma filter?
+       case tf_srgb8_alpha8:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba8());
+               else
++#endif
+                       return std::unique_ptr<PixelReader>(new PixelReader_4norm<char>()); // TBD: should we add a 2.2 gamma filter?
+       case tf_r16f:
+               return std::unique_ptr<PixelReader>(new PixelReader_1hf());
+@@ -341,9 +349,11 @@
+       switch (format)
+       {
+       case tf_bgra8:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_bgra8());
+               else
++#endif
+                       return std::unique_ptr<PixelWriter>(new PixelWriter_bgra8());
+       case tf_bgr8:
+               return std::unique_ptr<PixelWriter>(new PixelWriter_bgr8());
+@@ -395,9 +405,11 @@
+       case tf_rgb5_a1:
+               return std::unique_ptr<PixelWriter>(new PixelWriter_rgb5_a1());
+       case tf_rgba8:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_rgba8());
+               else
++#endif
+                       return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<unsigned char>());
+       case tf_rgba8_snorm:
+               return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<char>());
+@@ -419,9 +431,11 @@
+       case tf_srgb8:
+               return std::unique_ptr<PixelWriter>(new PixelWriter_3norm<unsigned char>()); // TBD: should we add a 2.2 gamma filter?
+       case tf_srgb8_alpha8:
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_rgba8());
+               else
++#endif
+                       return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<char>()); // TBD: should we add a 2.2 gamma filter?
+       case tf_r16f:
+               return std::unique_ptr<PixelWriter>(new PixelWriter_1hf());
+@@ -525,41 +539,51 @@
+       if (input_is_ycrcb)
+       {
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSSE2_YCrCbToRGB()));
+               else
++#endif
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterYCrCbToRGB()));
+       }
+       if (premultiply_alpha)
+       {
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterPremultiplyAlphaSSE2()));
+               else
++#endif
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterPremultiplyAlpha()));
+       }
+       if (gamma != 1.0f)
+       {
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterGammaSSE2(gamma)));
+               else
++#endif
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterGamma(gamma)));
+       }
+       if (swizzle != Vec4i(0,1,2,3))
+       {
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSwizzleSSE2(swizzle)));
+               else
++#endif
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSwizzle(swizzle)));
+       }
+       if (output_is_ycrcb)
+       {
++#ifndef DISABLE_SSE2
+               if (sse2)
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSSE2_RGBToYCrCb()));
+               else
++#endif
+                       filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterRGBToYCrCb()));
+       }
 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h~  2013-09-24 13:53:31.000000000 +0200
 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h   2013-11-05 21:00:27.261709016 +0100
 @@ -50,6 +50,7 @@
This page took 0.063445 seconds and 4 git commands to generate.