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
4 AC_MSG_RESULT([enabled])
7 + AC_DEFINE(DISABLE_SSE2)
8 AC_DEFINE(CL_DISABLE_SSE2)
9 AC_MSG_RESULT([disabled])
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])
21 extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -msse2"
23 - extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -DCL_DISABLE_SSE2"
24 + extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -DCL_DISABLE_SSE2 -DDISABLE_SSE2"
26 extra_CFLAGS_clanCore="$extra_CFLAGS_clanCore -pthread -std=c++0x"
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
31 #include "pixel_reader_half_float.h"
32 #include "pixel_reader_norm.h"
33 #include "pixel_reader_special.h"
35 #include "pixel_reader_sse.h"
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"
42 #include "pixel_writer_sse.h"
44 #include "pixel_filter_gamma.h"
45 #include "pixel_filter_premultiply_alpha.h"
46 #include "pixel_filter_swizzle.h"
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)
52 bool sse2 = System::detect_cpu_extension(System::sse2);
53 bool sse4 = System::detect_cpu_extension(System::sse4_1);
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);
67 return std::unique_ptr<PixelReader>(new PixelReaderSSE2_bgra8());
70 return std::unique_ptr<PixelReader>(new PixelReader_bgra8());
72 return std::unique_ptr<PixelReader>(new PixelReader_bgr8());
75 return std::unique_ptr<PixelReader>(new PixelReader_rgb5_a1());
79 return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba8());
82 return std::unique_ptr<PixelReader>(new PixelReader_4norm<unsigned char>());
84 return std::unique_ptr<PixelReader>(new PixelReader_4norm<char>());
91 return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba16());
94 return std::unique_ptr<PixelReader>(new PixelReader_4norm<unsigned short>());
96 return std::unique_ptr<PixelReader>(new PixelReader_4norm<short>());
98 return std::unique_ptr<PixelReader>(new PixelReader_3norm<unsigned char>()); // TBD: should we add a 2.2 gamma filter?
100 +#ifndef DISABLE_SSE2
102 return std::unique_ptr<PixelReader>(new PixelReaderSSE2_rgba8());
105 return std::unique_ptr<PixelReader>(new PixelReader_4norm<char>()); // TBD: should we add a 2.2 gamma filter?
107 return std::unique_ptr<PixelReader>(new PixelReader_1hf());
112 +#ifndef DISABLE_SSE2
114 return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_bgra8());
117 return std::unique_ptr<PixelWriter>(new PixelWriter_bgra8());
119 return std::unique_ptr<PixelWriter>(new PixelWriter_bgr8());
122 return std::unique_ptr<PixelWriter>(new PixelWriter_rgb5_a1());
124 +#ifndef DISABLE_SSE2
126 return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_rgba8());
129 return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<unsigned char>());
131 return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<char>());
134 return std::unique_ptr<PixelWriter>(new PixelWriter_3norm<unsigned char>()); // TBD: should we add a 2.2 gamma filter?
135 case tf_srgb8_alpha8:
136 +#ifndef DISABLE_SSE2
138 return std::unique_ptr<PixelWriter>(new PixelWriterSSE2_rgba8());
141 return std::unique_ptr<PixelWriter>(new PixelWriter_4norm<char>()); // TBD: should we add a 2.2 gamma filter?
143 return std::unique_ptr<PixelWriter>(new PixelWriter_1hf());
144 @@ -525,41 +539,51 @@
148 +#ifndef DISABLE_SSE2
150 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSSE2_YCrCbToRGB()));
153 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterYCrCbToRGB()));
156 if (premultiply_alpha)
158 +#ifndef DISABLE_SSE2
160 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterPremultiplyAlphaSSE2()));
163 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterPremultiplyAlpha()));
168 +#ifndef DISABLE_SSE2
170 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterGammaSSE2(gamma)));
173 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterGamma(gamma)));
176 if (swizzle != Vec4i(0,1,2,3))
178 +#ifndef DISABLE_SSE2
180 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSwizzleSSE2(swizzle)));
183 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSwizzle(swizzle)));
188 +#ifndef DISABLE_SSE2
190 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterSSE2_RGBToYCrCb()));
193 filters.push_back(std::shared_ptr<PixelFilter>(new PixelFilterRGBToYCrCb()));
196 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h~ 2013-09-24 13:53:31.000000000 +0200
197 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_gamma.h 2013-11-05 21:00:27.261709016 +0100
202 +#ifndef DISABLE_SSE2
203 class PixelFilterGammaSSE2 : public PixelFilter
213 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_premultiply_alpha.h~ 2013-09-24 13:53:31.000000000 +0200
214 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_premultiply_alpha.h 2013-11-05 21:01:03.885042084 +0100
219 +#ifndef DISABLE_SSE2
220 class PixelFilterPremultiplyAlphaSSE2 : public PixelFilter
230 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_swizzle.h~ 2013-09-24 13:53:31.000000000 +0200
231 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_swizzle.h 2013-11-05 21:01:17.849463650 +0100
233 Vec4f red, green, blue, alpha;
236 +#ifndef DISABLE_SSE2
237 class PixelFilterSwizzleSSE2 : public PixelFilter
242 __m128 red_mask, green_mask, blue_mask, alpha_mask;
247 --- ClanLib-3.0.0/Sources/Display/Image/pixel_filter_rgb_to_ycrcb.h~ 2013-09-24 13:53:31.000000000 +0200
248 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_filter_rgb_to_ycrcb.h 2013-11-05 21:01:44.896313454 +0100
252 #include "pixel_converter_impl.h"
253 +#ifndef DISABLE_SSE2
254 #include <emmintrin.h>
263 +#ifndef DISABLE_SSE2
264 class PixelFilterSSE2_RGBToYCrCb : public PixelFilter
274 --- ClanLib-3.0.0/Sources/Display/Image/pixel_buffer_impl.cpp~ 2013-09-24 13:53:31.000000000 +0200
275 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_buffer_impl.cpp 2013-11-05 21:22:05.346632850 +0100
277 #include "API/Display/TargetProviders/graphic_context_provider.h"
278 #include "API/Display/TargetProviders/pixel_buffer_provider.h"
279 #include "API/Display/Image/pixel_converter.h"
280 +#ifndef DISABLE_SSE2
281 #include <emmintrin.h>
286 --- ClanLib-3.0.0/Sources/Display/Image/pixel_writer_sse.h~ 2013-09-24 13:53:31.000000000 +0200
287 +++ ClanLib-3.0.0/Sources/Display/Image/pixel_writer_sse.h 2013-11-05 21:23:32.719965551 +0100
290 #include "pixel_converter_impl.h"
292 +#ifndef DISABLE_SSE2
293 #if defined(__SSE4_1__)
294 #include <smmintrin.h>
296 #include <emmintrin.h>
302 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/setup_swrender.cpp~ 2013-09-24 13:53:31.000000000 +0200
303 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/setup_swrender.cpp 2013-11-05 21:47:15.449955252 +0100
307 /////////////////////////////////////////////////////////////////////////////
308 -// CL_SetupSWRender Construction:
309 +// SetupSWRender Construction:
311 -CL_SetupSWRender::CL_SetupSWRender()
312 +SetupSWRender::SetupSWRender()
314 - if (CL_System::detect_cpu_extension(CL_System::sse2))
315 + if (System::detect_cpu_extension(System::sse2))
317 - throw CL_Exception("Sorry, this compiled clanSWRender does not support SSE2, but your CPU does support SSE2. (Update clanSWRender to contain SSE2)");
318 + throw Exception("Sorry, this compiled clanSWRender does not support SSE2, but your CPU does support SSE2. (Update clanSWRender to contain SSE2)");
320 - throw CL_Exception("Sorry, clanSWRender requires a processor capable of SSE2 instructions. (Update your CPU)");
321 + throw Exception("Sorry, clanSWRender requires a processor capable of SSE2 instructions. (Update your CPU)");
324 -CL_SetupSWRender::~CL_SetupSWRender()
325 +SetupSWRender::~SetupSWRender()
329 -void CL_SetupSWRender::set_current()
330 +void SetupSWRender::set_current()
334 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_graphic_context.cpp~ 2013-09-24 13:53:31.000000000 +0200
335 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_graphic_context.cpp 2013-11-05 21:47:35.776621770 +0100
339 /////////////////////////////////////////////////////////////////////////////
340 -// CL_GraphicContext_SWRender_Impl Class:
341 +// GraphicContext_SWRender_Impl Class:
343 -class CL_GraphicContext_SWRender_Impl
344 +class GraphicContext_SWRender_Impl
347 - CL_GraphicContext_SWRender_Impl()
348 + GraphicContext_SWRender_Impl()
352 - ~CL_GraphicContext_SWRender_Impl()
353 + ~GraphicContext_SWRender_Impl()
358 /////////////////////////////////////////////////////////////////////////////
359 -// CL_GraphicContext_SWRender Construction:
360 +// GraphicContext_SWRender Construction:
362 -CL_GraphicContext_SWRender::CL_GraphicContext_SWRender(CL_GraphicContext &gc) : CL_GraphicContext(gc),
363 - impl(new CL_GraphicContext_SWRender_Impl)
364 +GraphicContext_SWRender::GraphicContext_SWRender(GraphicContext &gc) : GraphicContext(gc),
365 + impl(new GraphicContext_SWRender_Impl)
369 -CL_GraphicContext_SWRender::~CL_GraphicContext_SWRender()
370 +GraphicContext_SWRender::~GraphicContext_SWRender()
374 /////////////////////////////////////////////////////////////////////////////
375 -// CL_GraphicContext_SWRender Attributes:
376 +// GraphicContext_SWRender Attributes:
378 -void CL_GraphicContext_SWRender::throw_if_null() const
379 +void GraphicContext_SWRender::throw_if_null() const
382 - throw CL_Exception("CL_GraphicContext_SWRender is null");
383 + throw Exception("GraphicContext_SWRender is null");
386 -CL_PixelPipeline *CL_GraphicContext_SWRender::get_pipeline() const
387 +PixelPipeline *GraphicContext_SWRender::get_pipeline() const
392 /////////////////////////////////////////////////////////////////////////////
393 -// CL_GraphicContext_SWRender Operations:
394 +// GraphicContext_SWRender Operations:
396 -void CL_GraphicContext_SWRender::draw_pixels_bicubic(int x, int y, int zoom_number, int zoom_denominator, const CL_PixelBuffer &pixels)
397 +void GraphicContext_SWRender::draw_pixels_bicubic(int x, int y, int zoom_number, int zoom_denominator, const PixelBuffer &pixels)
401 -void CL_GraphicContext_SWRender::queue_command(CL_UniquePtr<CL_PixelCommand> &command)
402 +void GraphicContext_SWRender::queue_command(UniquePtr<PixelCommand> &command)
406 /////////////////////////////////////////////////////////////////////////////
407 -// CL_GraphicContext_SWRender Implementation:
408 +// GraphicContext_SWRender Implementation:
410 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_program_object.cpp~ 2013-09-24 13:53:31.000000000 +0200
411 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_program_object.cpp 2013-11-05 21:47:48.349955014 +0100
415 /////////////////////////////////////////////////////////////////////////////
416 -// CL_ProgramObject_SWRender Construction:
417 +// ProgramObject_SWRender Construction:
419 -CL_ProgramObject_SWRender::CL_ProgramObject_SWRender(CL_SoftwareProgram *program, bool is_sprite_program)
420 +ProgramObject_SWRender::ProgramObject_SWRender(SoftwareProgram *program, bool is_sprite_program)
424 -CL_ProgramObject_SWRender::CL_ProgramObject_SWRender(const CL_ProgramObject &program_object) : CL_ProgramObject(program_object)
425 +ProgramObject_SWRender::ProgramObject_SWRender(const ProgramObject &program_object) : ProgramObject(program_object)
429 -CL_ProgramObject_SWRender::~CL_ProgramObject_SWRender()
430 +ProgramObject_SWRender::~ProgramObject_SWRender()
434 /////////////////////////////////////////////////////////////////////////////
435 -// CL_ProgramObject_SWRender Attributes:
436 +// ProgramObject_SWRender Attributes:
438 -CL_SoftwareProgram *CL_ProgramObject_SWRender::get_program() const
439 +SoftwareProgram *ProgramObject_SWRender::get_program() const
444 -bool CL_ProgramObject_SWRender::is_sprite_program() const
445 +bool ProgramObject_SWRender::is_sprite_program() const
450 -CL_SWRenderProgramObjectProvider *CL_ProgramObject_SWRender::get_provider() const
451 +SWRenderProgramObjectProvider *ProgramObject_SWRender::get_provider() const
456 /////////////////////////////////////////////////////////////////////////////
457 -// CL_ProgramObject_SWRender Operations:
458 +// ProgramObject_SWRender Operations:
460 /////////////////////////////////////////////////////////////////////////////
461 -// CL_ProgramObject_SWRender Implementation:
462 +// ProgramObject_SWRender Implementation:
464 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_target.cpp~ 2013-09-24 13:53:31.000000000 +0200
465 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_target.cpp 2013-11-05 21:47:58.379954940 +0100
469 /////////////////////////////////////////////////////////////////////////////
470 -// CL_SWRenderTarget Construction:
471 +// SWRenderTarget Construction:
473 -CL_SWRenderTarget::CL_SWRenderTarget()
474 +SWRenderTarget::SWRenderTarget()
478 -CL_SWRenderTarget::~CL_SWRenderTarget()
479 +SWRenderTarget::~SWRenderTarget()
483 /////////////////////////////////////////////////////////////////////////////
484 -// CL_SWRenderTarget Attributes:
485 +// SWRenderTarget Attributes:
487 /////////////////////////////////////////////////////////////////////////////
488 -// CL_SWRenderTarget Operations:
489 +// SWRenderTarget Operations:
491 /////////////////////////////////////////////////////////////////////////////
492 -// CL_SWRenderTarget Implementation:
493 +// SWRenderTarget Implementation: