]> git.pld-linux.org Git - packages/ClanLib.git/blob - really-disable-sse2.patch
- more disabling of SSE
[packages/ClanLib.git] / really-disable-sse2.patch
1 --- ClanLib-3.0.0/configure.ac~ 2013-11-05 19:52:09.000000000 +0100
2 +++ ClanLib-3.0.0/configure.ac  2013-11-05 20:42:25.891716845 +0100
3 @@ -222,6 +222,7 @@
4                 AC_MSG_RESULT([enabled])
5                 use_sse2=yes
6         else
7 +               AC_DEFINE(DISABLE_SSE2)
8                 AC_DEFINE(CL_DISABLE_SSE2)
9                 AC_MSG_RESULT([disabled])
10         fi
11 @@ -234,6 +235,7 @@
12                 use_sse2=yes
13         else
14                 AC_MSG_WARN( [ *** Compliler does not support SSE2 ])
15 +               AC_DEFINE(DISABLE_SSE2)
16                 AC_DEFINE(CL_DISABLE_SSE2)
17                 AC_MSG_RESULT([disabled])
18         fi
19 @@ -248,7 +250,7 @@
20  
21         extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -msse2"
22  else
23 -       extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -DCL_DISABLE_SSE2"
24 +       extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -DCL_DISABLE_SSE2 -DDISABLE_SSE2"
25  fi
26  extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -pthread -std=c++0x"
27  
28 --- ClanLib-3.0.0/Sources/Display/Image/pixel_converter.cpp~    2013-09-24 13:53:31.000000000 +0200
29 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_converter.cpp     2013-11-05 20:57:39.298376899 +0100
30 @@ -36,12 +36,16 @@
31  #include "pixel_reader_half_float.h"
32  #include "pixel_reader_norm.h"
33  #include "pixel_reader_special.h"
34 +#ifndef DISABLE_SSE2
35  #include "pixel_reader_sse.h"
36 +#endif
37  #include "pixel_writer_cast.h"
38  #include "pixel_writer_half_float.h"
39  #include "pixel_writer_norm.h"
40  #include "pixel_writer_special.h"
41 +#ifndef DISABLE_SSE2
42  #include "pixel_writer_sse.h"
43 +#endif
44  #include "pixel_filter_gamma.h"
45  #include "pixel_filter_premultiply_alpha.h"
46  #include "pixel_filter_swizzle.h"
47 @@ -126,8 +130,13 @@
48  
49  void PixelConverter::convert(void *output, int output_pitch, TextureFormat output_format, const void *input, int input_pitch, TextureFormat input_format, int width, int height)
50  {
51 +#ifndef DISABLE_SSE2
52         bool sse2 = System::detect_cpu_extension(System::sse2);
53         bool sse4 = System::detect_cpu_extension(System::sse4_1);
54 +#else
55 +       bool sse2 = false;
56 +       bool sse4 = false;
57 +#endif
58  
59         std::unique_ptr<PixelReader> reader = impl->create_reader(input_format, sse2);
60         std::unique_ptr<PixelWriter> writer = impl->create_writer(output_format, sse2, sse4);
61 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h~   2013-09-24 13:53:31.000000000 +0200
62 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h    2013-11-05 21:00:27.261709016 +0100
63 @@ -50,6 +50,7 @@
64         float gamma;
65  };
66  
67 +#ifndef DISABLE_SSE2
68  class PixelFilterGammaSSE2 : public PixelFilter
69  {
70  public:
71 @@ -170,5 +171,6 @@
72  private:
73         float gamma;
74  };
75 +#endif
76  
77  }
78 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_premultiply_alpha.h~       2013-09-24 13:53:31.000000000 +0200
79 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_premultiply_alpha.h        2013-11-05 21:01:03.885042084 +0100
80 @@ -46,6 +46,7 @@
81         }
82  };
83  
84 +#ifndef DISABLE_SSE2
85  class PixelFilterPremultiplyAlphaSSE2 : public PixelFilter
86  {
87  public:
88 @@ -63,5 +64,6 @@
89                 }
90         }
91  };
92 +#endif
93  
94  }
95 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_swizzle.h~ 2013-09-24 13:53:31.000000000 +0200
96 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_swizzle.h  2013-11-05 21:01:17.849463650 +0100
97 @@ -76,6 +76,7 @@
98         Vec4f red, green, blue, alpha;
99  };
100  
101 +#ifndef DISABLE_SSE2
102  class PixelFilterSwizzleSSE2 : public PixelFilter
103  {
104  public:
105 @@ -126,5 +127,6 @@
106  private:
107         __m128 red_mask, green_mask, blue_mask, alpha_mask;
108  };
109 +#endif
110  
111  }
112 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_rgb_to_ycrcb.h~    2013-09-24 13:53:31.000000000 +0200
113 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_rgb_to_ycrcb.h     2013-11-05 21:01:44.896313454 +0100
114 @@ -67,6 +67,7 @@
115  };
116  
117  
118 +#ifndef DISABLE_SSE2
119  class PixelFilterSSE2_RGBToYCrCb : public PixelFilter
120  {
121  public:
122 @@ -156,5 +157,6 @@
123                 }
124         }
125  };
126 +#endif
127  
128  }
This page took 0.067968 seconds and 4 git commands to generate.