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/API/Display/display_target.h.orig 2013-09-24 13:53:31.000000000 +0200
303 +++ ClanLib-3.0.0/Sources/API/Display/display_target.h 2013-11-05 22:46:46.000000000 +0100
305 /// \name Implementation
311 /// \brief Constructs a null DisplayTarget
316 /// \brief Constructs a DisplayTarget
318 /// \param DisplayTarget_Impl = Weak Ptr
319 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/setup_swrender.cpp~ 2013-09-24 13:53:31.000000000 +0200
320 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/setup_swrender.cpp 2013-11-05 21:47:15.449955252 +0100
328 /////////////////////////////////////////////////////////////////////////////
329 -// CL_SetupSWRender Construction:
330 +// SetupSWRender Construction:
332 -CL_SetupSWRender::CL_SetupSWRender()
333 +SetupSWRender::SetupSWRender()
335 - if (CL_System::detect_cpu_extension(CL_System::sse2))
336 + if (System::detect_cpu_extension(System::sse2))
338 - throw CL_Exception("Sorry, this compiled clanSWRender does not support SSE2, but your CPU does support SSE2. (Update clanSWRender to contain SSE2)");
339 + throw Exception("Sorry, this compiled clanSWRender does not support SSE2, but your CPU does support SSE2. (Update clanSWRender to contain SSE2)");
341 - throw CL_Exception("Sorry, clanSWRender requires a processor capable of SSE2 instructions. (Update your CPU)");
342 + throw Exception("Sorry, clanSWRender requires a processor capable of SSE2 instructions. (Update your CPU)");
345 -CL_SetupSWRender::~CL_SetupSWRender()
346 +SetupSWRender::~SetupSWRender()
350 -void CL_SetupSWRender::set_current()
354 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_graphic_context.cpp~ 2013-09-24 13:53:31.000000000 +0200
355 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_graphic_context.cpp 2013-11-05 21:47:35.776621770 +0100
363 /////////////////////////////////////////////////////////////////////////////
364 -// CL_GraphicContext_SWRender_Impl Class:
365 +// GraphicContext_SWRender_Impl Class:
367 -class CL_GraphicContext_SWRender_Impl
368 +class GraphicContext_SWRender_Impl
371 - CL_GraphicContext_SWRender_Impl()
372 + GraphicContext_SWRender_Impl()
376 - ~CL_GraphicContext_SWRender_Impl()
377 + ~GraphicContext_SWRender_Impl()
382 /////////////////////////////////////////////////////////////////////////////
383 -// CL_GraphicContext_SWRender Construction:
384 +// GraphicContext_SWRender Construction:
386 -CL_GraphicContext_SWRender::CL_GraphicContext_SWRender(CL_GraphicContext &gc) : CL_GraphicContext(gc),
387 - impl(new CL_GraphicContext_SWRender_Impl)
388 +GraphicContext_SWRender::GraphicContext_SWRender(GraphicContext &gc) : GraphicContext(gc),
389 + impl(new GraphicContext_SWRender_Impl)
393 -CL_GraphicContext_SWRender::~CL_GraphicContext_SWRender()
394 +GraphicContext_SWRender::~GraphicContext_SWRender()
398 /////////////////////////////////////////////////////////////////////////////
399 -// CL_GraphicContext_SWRender Attributes:
400 +// GraphicContext_SWRender Attributes:
402 -void CL_GraphicContext_SWRender::throw_if_null() const
403 +void GraphicContext_SWRender::throw_if_null() const
406 - throw CL_Exception("CL_GraphicContext_SWRender is null");
407 + throw Exception("GraphicContext_SWRender is null");
410 -CL_PixelPipeline *CL_GraphicContext_SWRender::get_pipeline() const
411 +PixelPipeline *GraphicContext_SWRender::get_pipeline() const
416 /////////////////////////////////////////////////////////////////////////////
417 -// CL_GraphicContext_SWRender Operations:
418 +// GraphicContext_SWRender Operations:
420 -void CL_GraphicContext_SWRender::draw_pixels_bicubic(int x, int y, int zoom_number, int zoom_denominator, const CL_PixelBuffer &pixels)
421 +void GraphicContext_SWRender::draw_pixels_bicubic(int x, int y, int zoom_number, int zoom_denominator, const PixelBuffer &pixels)
425 -void CL_GraphicContext_SWRender::queue_command(CL_UniquePtr<CL_PixelCommand> &command)
426 +void GraphicContext_SWRender::queue_command(std::unique_ptr<PixelCommand> &command)
430 /////////////////////////////////////////////////////////////////////////////
431 -// CL_GraphicContext_SWRender Implementation:
433 +// GraphicContext_SWRender Implementation:
435 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_program_object.cpp~ 2013-09-24 13:53:31.000000000 +0200
436 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_program_object.cpp 2013-11-05 21:47:48.349955014 +0100
444 /////////////////////////////////////////////////////////////////////////////
445 -// CL_ProgramObject_SWRender Construction:
446 +// ProgramObject_SWRender Construction:
448 -CL_ProgramObject_SWRender::CL_ProgramObject_SWRender(CL_SoftwareProgram *program, bool is_sprite_program)
449 +ProgramObject_SWRender::ProgramObject_SWRender(SoftwareProgram *program, bool is_sprite_program)
453 -CL_ProgramObject_SWRender::CL_ProgramObject_SWRender(const CL_ProgramObject &program_object) : CL_ProgramObject(program_object)
454 +ProgramObject_SWRender::ProgramObject_SWRender(const ProgramObject &program_object) : ProgramObject(program_object)
458 -CL_ProgramObject_SWRender::~CL_ProgramObject_SWRender()
459 +ProgramObject_SWRender::~ProgramObject_SWRender()
463 /////////////////////////////////////////////////////////////////////////////
464 -// CL_ProgramObject_SWRender Attributes:
465 +// ProgramObject_SWRender Attributes:
467 -CL_SoftwareProgram *CL_ProgramObject_SWRender::get_program() const
468 +SoftwareProgram *ProgramObject_SWRender::get_program() const
473 -bool CL_ProgramObject_SWRender::is_sprite_program() const
474 +bool ProgramObject_SWRender::is_sprite_program() const
479 -CL_SWRenderProgramObjectProvider *CL_ProgramObject_SWRender::get_provider() const
480 +SWRenderProgramObjectProvider *ProgramObject_SWRender::get_provider() const
485 /////////////////////////////////////////////////////////////////////////////
486 -// CL_ProgramObject_SWRender Operations:
487 +// ProgramObject_SWRender Operations:
489 /////////////////////////////////////////////////////////////////////////////
490 -// CL_ProgramObject_SWRender Implementation:
492 +// ProgramObject_SWRender Implementation:
494 --- ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_target.cpp~ 2013-09-24 13:53:31.000000000 +0200
495 +++ ClanLib-3.0.0/Sources/SWRender/X11/Stub/swr_target.cpp 2013-11-05 21:47:58.379954940 +0100
503 /////////////////////////////////////////////////////////////////////////////
504 -// CL_SWRenderTarget Construction:
505 +// SWRenderTarget Construction:
507 -CL_SWRenderTarget::CL_SWRenderTarget()
508 +SWRenderTarget::SWRenderTarget()
512 -CL_SWRenderTarget::~CL_SWRenderTarget()
513 +SWRenderTarget::~SWRenderTarget()
517 /////////////////////////////////////////////////////////////////////////////
518 -// CL_SWRenderTarget Attributes:
519 +// SWRenderTarget Attributes:
520 +bool SWRenderTarget::is_current()
525 /////////////////////////////////////////////////////////////////////////////
526 -// CL_SWRenderTarget Operations:
527 +// SWRenderTarget Operations:
528 +void SWRenderTarget::set_current()
532 /////////////////////////////////////////////////////////////////////////////
533 -// CL_SWRenderTarget Implementation:
534 +// SWRenderTarget Implementation: