Commit Graph

4859 Commits

Author SHA1 Message Date
James Turner
a6437f4e96 More SGPropertyNode::getPositions tests. 2017-01-28 15:37:41 +00:00
James Turner
5bd7be6ed1 Check for file permissions via SGPath. 2017-01-28 15:37:41 +00:00
Florent Rougon
d9cc3738b9 Improve sgstream_test.cxx
- Create "testfile" in a temporary directory (and make sure the temp dir
  and the file it contains are both removed when the test program exits).

- Use test macros such as SG_CHECK_EQUAL() instead of by-hand checks and
  "return EXIT_FAILURE" statements.

- Use sg_ofstream instead of plain std::ostream. This simplifies things
  a tiny bit, because one SGPath instance is enough to create both the
  sg_ofstream instance and the sg_gzifstream instance used afterwards to
  reread the created file.

- Don't call (sg_)ofstream::close() at the end of the block the instance
  is declared in: this is entirely unnecessary, since sg_ofstream
  derives from std::ofstream, which is automatically close()d when
  destroyed (RAII behavior).
2017-01-26 16:58:20 +01:00
Erik Hofman
edec5bbc01 There is still a segmenttion fault issue with the AVX code, disable it until this is sorted out 2017-01-26 14:46:36 +01:00
Florent Rougon
6a2d86c526 Small improvements for simgear::Dir
- Add method simgear::Dir::isNull(), analogous to SGPath::isNull().

- Make sure that simgear::Dir::tempDir() returns a null simgear::Dir
  instance when creation of the directory failed (so far, this was only
  the case on systems where HAVE_MKDTEMP is defined).

- Use simgear::strutils::error_string() instead of strerror() (the
  latter is not guaranteed to be thread-safe).

- Make sure <cerrno> is #included, regardless of the platform.

- Add automated tests for isNull(), setRemoveOnDestroy() and tempDir().
2017-01-26 12:41:59 +01:00
Stuart Buchanan
6c64e9b36c Add scenery-path-suffix support to terrasync
Remove /sim/rendering/building-mesh as it is
redundant.

Add check that objects are in the correct bounding
box of the containing STG file.
2017-01-21 22:19:38 +00:00
Erik Hofman
bcecee0f76 Small optimization to my own cross product implementation 2017-01-21 10:28:24 +01:00
Richard Harrison
c5cdfa1a1d Prevent null pointer deference when load has failed.
This was triggered by the TU154B; probably related to the console error

* "Image loading failed:Warning: reading "fgdata\AI\Aircraft\tu154b\Model" not supported.
2017-01-21 00:54:30 +01:00
Erik Hofman
f9f2b4cbdb Bring the ARM NEON code in line with the SSE code 2017-01-20 15:32:28 +01:00
Erik Hofman
33feb9a416 Move SIMD flags to CMAKE_CXX_FLAGS_RELEASE and fix a typo in the process 2017-01-20 14:56:15 +01:00
Erik Hofman
9e1aaa8b56 Make a distinction between a null-pointer and the value of 0 2017-01-19 23:14:39 +01:00
Erik Hofman
ef2eb635af Fix a header path 2017-01-19 16:41:01 +01:00
Erik Hofman
2db412a923 Specialize class constructors in the hope to ged rid of wrong compiler assignment of an unaligned float array to an SSE register 2017-01-19 16:39:30 +01:00
Erik Hofman
061fea48c8 Add an ARM NEON readu simd4x4_neon.hxx and small fixes for simd_neon.hxx 2017-01-19 13:20:52 +01:00
Erik Hofman
c4ea62a899 Add a version of simd.hxx for ARM NEON 2017-01-18 15:41:12 +01:00
Erik Hofman
789c09a402 I forgot the linux variant of ALIGN 2017-01-12 14:19:09 +01:00
Erik Hofman
de9b329115 reorganize the code a bit 2017-01-12 11:43:46 +01:00
Erik Hofman
1b793a127c Be more explicit about alignment 2017-01-12 10:18:39 +01:00
James Turner
3cb3084725 Rename ‘new’ thumbnails to ‘previews’
This avoids an XML naming clash, and allows both systems to exist in
parallel peacefully. Update the tests to check both the thumbnails
and preview system in parallel with each other.
2017-01-10 18:05:40 +00:00
Erik Hofman
637f67888a Reinstate AVX support again 2017-01-07 13:55:09 +01:00
Erik Hofman
fbc0986fd8 Do not rely on SSE3, this is just a slight drawback 2017-01-06 15:10:52 +01:00
Erik Hofman
14ebe0b618 Disable AVX support until someone figures out why it is not working properly 2017-01-06 00:11:05 +01:00
James Turner
fd34cc30b8 compare_versions: limit how many parts are checked.
This can be used to only check the first one or two parts of a version,
to ensure only the major, or major+minor parts match.
2017-01-05 10:55:14 +00:00
Erik Hofman
7b0faed03a Fix an AVX error 2017-01-04 16:30:19 +01:00
Erik Hofman
8d1dc30b07 Try to fix a possible AVX core dump 2017-01-04 12:55:28 +01:00
Erik Hofman
03cff6abca Fix Never use <avxintrin.h> directly; include <immintrin.h> instead. 2017-01-01 13:26:36 +01:00
Erik Hofman
d7821324b8 Fix a wrong enclosing bracket 2017-01-01 11:40:59 +01:00
Ron Haertel
f3e066cce0 Bug fix for bug 1920
In pt_lights.cxx in SGLightFactory::getOdal, at segment "centerline lights",
the decrement loop index i is initialized with lights.getNumLights(), then is used at lights.getLight. (ERROR)
The function getNumLights is set to the size of the vector which is one more than the max index refernce.

This restores the behavior that was in place before commit 8ddb99f62f
2016-12-30 18:49:19 -05:00
James Turner
45ac758cc9 Expose position on SGPropertyNode. 2016-12-27 11:09:07 +00:00
Erik Hofman
f0e6402fff One more, and hopefully the last, MSVC fix 2016-12-23 15:31:40 +01:00
Erik Hofman
41bf142e31 Try to fix an MSVC compile error 2016-12-23 14:50:14 +01:00
Erik Hofman
2e9efa98d7 Add accelearated cross product 2016-12-22 13:43:04 +01:00
Erik Hofman
2c2a57f368 Addd support for AVX, 4 double precision operations in one go 2016-12-21 09:04:46 +01:00
Erik Hofman
4ea1326126 A better MSVC fix and code speedups 2016-12-20 09:54:19 +01:00
Erik Hofman
09b44ac68a MSVC compiler fix (hopefully) 2016-12-19 18:37:52 +01:00
Erik Hofman
a48ab434ab Convert more code to SIMD 2016-12-19 15:58:57 +01:00
Florent Rougon
d39a56d4fb Add missing include: <cctype> for unary std::islower()
Thanks to Ron H. for the report.
2016-12-18 11:02:01 +01:00
Erik Hofman
892579456d add SSE support for the C compiler (gcc and clang) 2016-12-18 09:40:38 +01:00
Erik Hofman
4dde1d365c MSVC 2013+ for 64-bit automatically sets /arch:SSE2 and doesn't recognise te option 2016-12-17 10:50:19 +01:00
James Turner
2f21b582cd Canvas image fill and source rect setters.
C++ code can set the fill and source rect directly.
2016-12-16 19:14:44 +00:00
James Turner
b29536f8b7 Set Canvas element transforms from C++
Also allow transforms to be disabled.
2016-12-16 19:14:44 +00:00
James Turner
039f9920db Direct rect support. 2016-12-16 19:14:44 +00:00
James Turner
7c254e9c04 Native SVG path-data parsing in the Canvas.
This substantially cuts down the amount of properties needed when
importing SVG elements into Canvas paths.
2016-12-16 19:14:44 +00:00
Erik Hofman
35a115bfd4 Fix a stupid mistake and move hsum_ps_sse to shVector.c 2016-12-16 16:01:59 +01:00
Erik Hofman
70dd9d35b1 Also accelerate SHVector3 using SIMD 2016-12-16 15:12:53 +01:00
Erik Hofman
31e3cf06fb Accelerate SHVector4 and SHMatrix3x3 operations using SIMD 2016-12-16 14:54:24 +01:00
Erik Hofman
175eddd1fa Add the proper SSE options to Clang too 2016-12-16 11:05:03 +01:00
Erik Hofman
fe73247b82 Really use _mm_setzero_ps9) instead 2016-12-16 11:04:49 +01:00
Erik Hofman
203db3d095 Enable SSE and SSE2 by default 2016-12-16 10:49:44 +01:00
James Turner
8c4695b991 Fix duplicate variants in packages. 2016-12-15 17:37:32 +00:00