commit ac9a03c73e962cf1cd96d2453e3e6160892f55a4 Author: Emmanuele Bassi Date: Wed Aug 12 13:30:40 2015 +0100 Release Graphene 1.2.4 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 80702d2eab70caf6584aebdb9fb1b15b4b4e374f Author: Emmanuele Bassi Date: Wed Aug 12 13:25:02 2015 +0100 Ensure that we don't introspect system headers The introspection scanner has issues parsing SIMD system headers and compiler-specific extensions. This creates a bunch of warnings that we can't do anything about without a full overhaul of the introspection scanner. Luckily, we can detect when a header file is being included via the introspection scanner, and we can fall back to dummy scalar definitions. After all, the scanner is only using the definitions for sizing structures and for resolving names; the SIMD API is not accessible via introspection. configure.ac | 31 ++++++++++++++++++++++--------- src/graphene-simd4f.h | 8 ++++---- 2 files changed, 26 insertions(+), 13 deletions(-) commit 2e20e4b4decb20a302233178d2bb156dcbd870f9 Author: Emmanuele Bassi Date: Tue Aug 11 14:25:36 2015 +0100 macros: Re-arrange the version macro definitions Otherwise cpp will complain. src/graphene-version-macros.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 4c44b3dc7a5030c75c23edb013706e2443107709 Author: Emmanuele Bassi Date: Tue Aug 11 14:22:33 2015 +0100 macros: Fix a typo in the version macro check src/graphene-version-macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ad37b2a77ced32de7b9b90390d8e110758cbc74f Author: Emmanuele Bassi Date: Thu Jul 30 17:31:58 2015 +0100 travis: Rebuild and check with different SIMD implementations We have a CI tool, so it'd be good to have it test various configuration options, instead of relying on the automatic detection. .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 787b1ec1682c48864dd9529f164bcbef362cd30e Author: Emmanuele Bassi Date: Thu Jul 30 17:13:46 2015 +0100 simd4f: Reimplement the interpolate() function Use the same approach used by the lerp() macro. src/graphene-simd4f.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit fa5e5219883c61fab112505154c9cc8fcc0174ec Author: Emmanuele Bassi Date: Thu Jul 30 17:00:40 2015 +0100 Note why we can't always use graphene_sincos() The graphene-simd4x4f.h header is public, and contains all inlined functions; this means we cannot use graphene_sincos() inside it, as it's an inlined function declared inside graphene-private.h. src/graphene-simd4x4f.h | 3 +++ 1 file changed, 3 insertions(+) commit 1e08c88f7a0e59711ac76f3565fde08d6d18a7f0 Author: Emmanuele Bassi Date: Tue Jun 9 17:42:16 2015 +0100 build: Remove publish rule We don't need it any more, now that the API reference is published on the Github page for Graphene. doc/Makefile.am | 10 ---------- 1 file changed, 10 deletions(-) commit f9eab6f10498c93aa6132709410c1acbe2751ff9 Author: Emmanuele Bassi Date: Thu Apr 2 09:50:56 2015 +0100 tests: Constify predefined variables and avoid warnings We want to ensure that the predefined variables we use inside test units are not changed by the tests themselves, but we also want to avoid the compiler warning about unused variables, assignment to constants, or self-initialization. src/tests/graphene-test-compat.h | 41 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) commit baf197c19cb4719a7ac475b78da025e2779be366 Author: Emmanuele Bassi Date: Wed Apr 1 14:18:51 2015 +0100 build: Point to the website, not the repository We have a nice website for Graphene, no need to point people to the repo. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3fc7331a4e0131679bc802f297d3ab1eea3f5c7 Author: Emmanuele Bassi Date: Wed Apr 1 14:18:15 2015 +0100 build: Keep configure tunables together So we don't have to go around hunting them on release. configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 2256b8c2844f85168ae734b225cd4f4b1ba4b3fe Author: Emmanuele Bassi Date: Tue Mar 31 23:01:27 2015 +0100 docs: Update the short description of graphene_box_t src/graphene-box.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40caa5e4c29228d2d81380e9c88f9730f9c1b49d Author: Emmanuele Bassi Date: Tue Mar 31 22:54:05 2015 +0100 Post-release version bump to 1.2.3 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4282613df43c955f9acd9a2580fb6b440c6adcb6 Author: Emmanuele Bassi Date: Tue Mar 31 22:51:47 2015 +0100 Release Graphene 1.2.2 (stable) configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29dbfb8b31260d5d24607ff2dcf6cdc789f36929 Author: Emmanuele Bassi Date: Tue Mar 24 16:07:44 2015 +0000 Disable GCC vector intrinsics for GCC < 4.9 The GCC vector intrinsics just don't work correctly before that. configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 78ed5c6cb5e058261eca79e4a7d834bf6ea4b60f Author: Emmanuele Bassi Date: Fri Mar 20 11:03:40 2015 +0000 simd4x4f: Fix the 2D transformation check We need to check that the z and w components of the first, second, and fourth row vectors are an identity, as well as the whole third vector. Using a channel access and a whole vector comparison is also cheaper than do a comparison after a transpose. src/graphene-simd4x4f.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit b813342dff2e688a4f71e36268a067d545d90318 Author: Emmanuele Bassi Date: Fri Mar 20 11:02:35 2015 +0000 matrix: Fix the 2D conversion The translation component is taking the wrong indices from the 4x4 matrix. src/graphene-matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2f907ec16ea3608819edb86f0d4d4ee4f0770535 Author: Emmanuele Bassi Date: Tue Mar 17 23:55:18 2015 +0000 matrix: Fix 2D conversion method The indices are the other way around, since we're using row/column access to row vectors. src/graphene-matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ceb729885bd22e64bfd55f60fb7a467f07f36b52 Author: Emmanuele Bassi Date: Thu Mar 12 16:49:38 2015 +0000 private: Inline lerp() Let's get some type safety in here. src/graphene-private.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit bd6ea46751a3ee05ff65d948342520aad32433e0 Author: Emmanuele Bassi Date: Thu Mar 12 15:20:23 2015 +0000 Look for sincosf() Both sincos() and sincosf() should come together, but we should probably check for the function we actually want, in case somebody, somewhere, decides to ship a C library with only sincos() and then somebody decides to port Graphene to that platform. configure.ac | 2 +- src/graphene-private.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 1615220d8a7c608d693af0e3e436446e8d4b04c1 Author: Emmanuele Bassi Date: Wed Mar 11 23:13:39 2015 +0000 matrix: Clarify the lerp behaviour with non-decomposable matrices Right now we leave the behaviour of interpolating two matrices that cannot be decomposed into their transformations unspecified; we keep the result matrix as it is, by applying 'null' transformations, but the matrix that is passed in for the result could contain anything — it could even be uninitialized, and the caller could rely on Graphene putting sane values inside it. We should provide a stable behaviour for our API, and document it properly. The sane approach is to just bail out early, and initialize to an identity matrix. We don't do that unconditionally to avoid unnecessary cost, since, in case of success, the identity matrix will be blasted away in any case. src/graphene-matrix.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) commit bdf2c199c5bfae6e7b81711a647beaf79160eeb0 Author: Emmanuele Bassi Date: Wed Mar 11 21:40:17 2015 +0000 triangle: Properly align allocations Like we do for other types that are just wrapping graphene_simd4f_t. src/graphene-triangle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 38571c5a08719930be4b6d9e3d71d08677edc640 Author: Emmanuele Bassi Date: Wed Mar 11 21:39:08 2015 +0000 box: Ensure that allocation is aligned A graphene_box_t is made of two graphene_vec3_t, which are just two wrapped graphene_simd4_t. We need to ensure that those get properly aligned memory areas when allocating them. src/graphene-box.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 11fd0c2503ada684b129a1ba1b9a7645952a2a91 Author: Emmanuele Bassi Date: Tue Mar 10 22:22:26 2015 +0000 docs: Update API reference links README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 09bbf7c9560a6b89be884477ad97ab59e108cde9 Author: Emmanuele Bassi Date: Tue Mar 10 20:24:49 2015 +0000 quaternion: Use graphene_sincos() Instead of separate sinf() and cosf() calls. This has the chance of using the (faster) sincosf() call. src/graphene-quaternion.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 481000bbd524ac97713e716a6bdb4f71c0a8f29b Author: Emmanuele Bassi Date: Tue Mar 10 20:23:36 2015 +0000 euler: Use graphene_sincos() Instead of separate sinf() and cosf() calls. This has the chance of using the (faster) sincosf() call. src/graphene-euler.c | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) commit 40839f27a4de821cd46e30f3fb4814b1041a5312 Author: Emmanuele Bassi Date: Tue Mar 10 20:14:44 2015 +0000 Add private wrapper for sincosf() We want to have a fallback in case we don't have access to sincosf(). src/graphene-private.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 36c301eba46a0e72b9eab4cdaeb670a5840bc420 Author: Emmanuele Bassi Date: Tue Mar 10 20:13:04 2015 +0000 Check for sincos() and friends They are a useful GNU libc extension. configure.ac | 5 +++++ 1 file changed, 5 insertions(+) commit 4c04dc78af5be0967f43f253535bf2beb8f5de3d Merge: e038594 0d73a78 Author: Emmanuele Bassi Date: Fri Feb 27 13:32:44 2015 +0000 Merge pull request #40 from ndufresne/config-in-libdir Install graphene-config.h in libdir commit 0d73a78b3ee64ee3c4d0dec0e6adef6780f32cb0 Author: Nicolas Dufresne Date: Thu Feb 26 16:00:58 2015 -0500 Install graphene-config.h in libdir This file is architecture dependent. To support multilib we need to make sure multiple copies can coexist. src/Makefile.am | 3 ++- src/graphene.pc.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit e0385940d2b83c3d64a6eacde922a27d23ceafb3 Author: Emmanuele Bassi Date: Tue Feb 24 17:59:41 2015 +0000 matrix: Use quaternions even when rotating from Euler angles It's safer in case of interpolations. src/graphene-matrix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 514dad96175d4e42a9758b13c30658578c3dd535 Merge: 40cdb93 afdd3f0 Author: Emmanuele Bassi Date: Tue Feb 24 14:23:57 2015 +0000 Merge pull request #38 from ndufresne/android-build-fix alloc: Include errno.h commit afdd3f05190384cd90f3d4f51e5af61d6c166929 Author: Nicolas Dufresne Date: Tue Feb 24 08:40:19 2015 -0500 alloc: Include errno.h This fixes build errors on Android: graphene-alloc.c: In function 'graphene_aligned_alloc': graphene-alloc.c:103:3: error: 'errno' undeclared (first use in this function) errno = 0; src/graphene-alloc.c | 1 + 1 file changed, 1 insertion(+) commit 40cdb93534f688d6f7c69cbd56ec1fe38ec0f7e5 Merge: 0ba6115 b7c03d0 Author: Emmanuele Bassi Date: Wed Jan 28 09:45:05 2015 +0000 Merge pull request #35 from fanc999/master Fix build on Windows commit b7c03d0c4d897ddf39860b3efff250fafaf0db50 Author: Chun-wei Fan Date: Wed Jan 28 17:35:46 2015 +0800 graphene-private.h: Fix macro naming Instead of 'ff' for graphene_lerp(), use 'factor' as it seems clearer. Also, drop the include of stdio.h. src/graphene-private.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3976d6367487f1fb4b1c6f8bbeba9820b58ba096 Author: Chun-wei Fan Date: Wed Jan 28 17:33:57 2015 +0800 Include stdio.h graphene-box.c and graphene-vectors.c This is needed as we are using stderr and fprintf in these sources. src/graphene-box.c | 1 + src/graphene-vectors.c | 2 ++ 2 files changed, 3 insertions(+) commit 15bb87254bbc3ac140fa45812735eccaef5a92d1 Author: Chun-wei Fan Date: Wed Jan 28 17:10:17 2015 +0800 Fix Windows INIT_ONCE Compilation The sources that tried to use INIT_ONCE had a few build-time issues: -The _WIN32_WINNT is supposed to be 0x0600. -init_static_vec4 () appeared to be incorrectly cut-and-pasted. -We also need the windows.h and _WIN32_WINNT definition for graphene-box.c. src/graphene-box.c | 5 +++++ src/graphene-vectors.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 1526b9d1e7a8b8c293e14f98938ffcb888117e40 Author: Chun-wei Fan Date: Wed Jan 28 17:07:13 2015 +0800 src/graphene-private.h: Fix build on Visual Studio Visual Studio does not like using 'f' in a macro when one is also intending to use it as a floating point suffix, so don't use it there. Also, include stdio.h as users of this header also tend to use items from stdio.h. Signed-off-by: Chun-wei Fan src/graphene-private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0ba6115eb9e3ec04266d4a93109716337767a07c Author: Emmanuele Bassi Date: Mon Jan 26 10:50:23 2015 +0000 Post-release version bump to 1.2.1 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 99c9d18b8104436486492d48a5b331669cb74723 Author: Emmanuele Bassi Date: Mon Jan 26 10:19:55 2015 +0000 Release Graphene 1.2.0 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04439509b98755c6cd3f04203e8db0a2311c0f74 Author: Emmanuele Bassi Date: Mon Jan 26 10:26:07 2015 +0000 build: Fix up source doc locations doc/Makefile.am | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 240a5b2411ed5e65c6cbde57e68a2a284047c591 Author: Emmanuele Bassi Date: Sun Jan 25 17:18:19 2015 +0000 matrix: Add rect → quad projection We have a rect → quad transformation, so we should have a rect → quad projection as well. doc/graphene-sections.txt | 1 + src/graphene-matrix.c | 33 +++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 4 ++++ 3 files changed, 38 insertions(+) commit c5c5051cb484e6de56fea4ce0cd68eeafc9d488e Author: Emmanuele Bassi Date: Sun Jan 25 17:11:51 2015 +0000 quad: Add array-based initializer There are some cases where we have an array points storing a quad, so it's easier to have an initializer that takes the array, instead of iterating over the array, or accessing each element. doc/graphene-sections.txt | 1 + src/graphene-quad.c | 22 ++++++++++++++++++++++ src/graphene-quad.h | 3 +++ src/tests/quad.c | 20 +++++++++++--------- 4 files changed, 37 insertions(+), 9 deletions(-) commit 21f6ab47b27120a819ebf4b60c9587754befb3d1 Author: Emmanuele Bassi Date: Wed Dec 31 13:28:21 2014 +0000 tests: Make TravisCI happy src/tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 484a551c729bd08d998e868c968e0b666b973113 Author: Emmanuele Bassi Date: Wed Dec 31 13:06:43 2014 +0000 tests/simd: Check the dot() operator src/tests/simd.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit fcf07cf5d369e180b6dcd7f659cc2e77b39d241c Author: Emmanuele Bassi Date: Wed Dec 31 12:54:00 2014 +0000 tests: Disable frustum/contains-point with GCC vectors The results of the plane distance check are completely wrong, compared to SSE intrinsics and naïve scalar implementations. I'm afraid I'll have to deal with assembly. For the time being, disable the offending tests; I'll get back to them as soon as possible. src/tests/Makefile.am | 2 +- src/tests/frustum.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit 64bb552e84bfee44e3ead3623a7c00dd201bac18 Author: Emmanuele Bassi Date: Wed Dec 31 12:39:18 2014 +0000 simd4f: Use subscription access for GCC vectors The GCC documentation states: Vectors can be subscripted as if the vector were an array with the same number of elements and base type. This allows us to drop the union types we use to converts vectors to arrays in order to access each component, thus simplifying the code, and hopefully making it more efficient. src/graphene-simd4f.h | 175 ++++++++++++++++++------------------------------ src/graphene-simd4x4f.h | 16 ++++- 2 files changed, 81 insertions(+), 110 deletions(-) commit ab7dd604c05f86e2ef3287e1cccefc881b869724 Author: Emmanuele Bassi Date: Wed Dec 31 12:33:22 2014 +0000 simd4f: Clean up dot3 and dot2 operators Better to use ancillary variables for the splatted vectors than to use them for the intermediate results. Makes the code immediately obvious. src/graphene-simd4f.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 3660736ef1eae86c849f7ad3a3d3478828fa09ab Author: Emmanuele Bassi Date: Wed Dec 31 12:32:20 2014 +0000 simd4f: Fix typo in channel getter It should be '_simd4f_get_xyzw', not '_smd4f_get_xyzw'. src/graphene-simd4f.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 33fdb11faeb1a5a4bafbc5ef870a63bcb0f37949 Author: Emmanuele Bassi Date: Mon Dec 29 23:23:02 2014 +0000 simd4f: Avoid shadowing variables When using GCC vectors we end up shadowing variables because of the expansion of the min() and max() macros inside the clamp() function. We can use an ancillary variable to avoid the warning. src/graphene-simd4f.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d408fe8c0a103bf6a0874f00446e778b668cfd4a Author: Emmanuele Bassi Date: Mon Dec 29 01:36:38 2014 +0000 tests: Use fuzzy comparisons The scalar implementation of SIMD4f introduces a lot more fuzziness in the results of divisions than the equivalent optimized paths. src/tests/point3d.c | 2 +- src/tests/triangle.c | 4 ++-- src/tests/vec2.c | 4 ++-- src/tests/vec3.c | 6 +++--- src/tests/vec4.c | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) commit 3cca9b3e316a6a53d2c77d2d70abe848afa60e6a Author: Emmanuele Bassi Date: Mon Dec 29 01:36:16 2014 +0000 simd4f: Fix get() operator Typo. src/graphene-simd4f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29bb27e007d900f688cfa2b81f0dedda4988e07b Author: Emmanuele Bassi Date: Mon Dec 29 01:32:44 2014 +0000 simd4f: Fix scalar cmp_neq() DeMorgan would be very, very cross with me. src/graphene-simd4f.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 983b50bbf4213cfe09e5e1a382ec56dbee88191f Author: Emmanuele Bassi Date: Mon Dec 29 01:25:31 2014 +0000 simd4f: Fix scalar macros Some typos. src/graphene-simd4f.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ef481c917816fbe2c89fd872610bed8b950d0af7 Author: Emmanuele Bassi Date: Mon Dec 29 01:06:03 2014 +0000 build: Cache checks for SIMD implementations We want to cache the results, but more importantly we want to have a named variable that can be overridden when cross-compiling for known architectures. configure.ac | 187 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 99 insertions(+), 88 deletions(-) commit f45f0929af7a6dd24c949aad9374dce843404435 Author: Emmanuele Bassi Date: Sat Dec 27 23:09:10 2014 +0000 build: Make gtk-doc a soft dependency We want to allow building Graphene without gtk-doc installed, especially on non-Linux platforms. README.md | 2 +- autogen.sh | 29 +++++++++++++++++------------ configure.ac | 7 +++++++ 3 files changed, 25 insertions(+), 13 deletions(-) commit a405e0150bc7354982da6a5f0fbf3e0ec30d8858 Author: Emmanuele Bassi Date: Sat Dec 27 22:48:03 2014 +0000 build: Run gtkdoc-check on `make check` This should ensure that all symbols gets documented, come release time. doc/.gitignore | 5 +++++ doc/Makefile.am | 7 +++++++ 2 files changed, 12 insertions(+) commit 311fe8776b9499c758f638239eb0b75026f46d54 Author: Emmanuele Bassi Date: Sat Dec 27 22:47:36 2014 +0000 build: Allow disabling maintainer-mode configure.ac | 2 ++ 1 file changed, 2 insertions(+) commit 7e867e9c4a0c01cce4a81742ebf6af0dc581e46f Author: Emmanuele Bassi Date: Sat Dec 27 14:51:39 2014 +0000 doap: Update the project homepage graphene.doap | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 82c87d4ca40ab0ef35097549b6e72346fee8b1d1 Author: Emmanuele Bassi Date: Sat Dec 27 14:12:35 2014 +0000 box: Use vec3.equal() Like we do for graphene_sphere_equal(). The direct SIMD4f comparison operator ignores floating point fluctuations and can lead to false negatives. src/graphene-box.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4ccd1e01607156910f1243959fe4290142ecf486 Author: Emmanuele Bassi Date: Sat Dec 27 14:10:39 2014 +0000 sphere: Use vec3.equal() Comparing the SIMD4f directly does not take into account floating point fluctuations. The equal() operator for vectors does a comparison and a near() check for us. src/graphene-sphere.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f1edf907587d72280e466e9ffe72c5eedd6326c Author: Emmanuele Bassi Date: Sat Dec 27 14:08:09 2014 +0000 tests: Improve coverage for spheres src/tests/sphere.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) commit 5fd7a98664fcd99a7d8e6e83c437ac70421011f1 Author: Emmanuele Bassi Date: Sat Dec 27 13:04:30 2014 +0000 tests: Improve code coverage for quaternions src/tests/quaternion.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 8e71a373ef99932f2aa070a2079533c1344d6fe8 Author: Emmanuele Bassi Date: Sat Dec 27 12:51:52 2014 +0000 tests: Increase the euler coverage src/tests/euler.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5a97a3960eb3636f3e8992165284f623607f7644 Author: Emmanuele Bassi Date: Sat Dec 27 11:43:02 2014 +0000 docs: Clarify that "box" means "axis-aligned bounding box" Instead of "a generic collection of vertices to form a box". src/graphene-box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ab01bd801761116d91cc5dd2b638897d8abcb9d Author: Emmanuele Bassi Date: Wed Dec 24 12:39:36 2014 +0000 bench: Use the GRAPHENE_SIMD_S symbol Since we're redefining GRAPHENE_USE_* for benchmark purposes, we should also redefine GRAPHENE_SIMD_S, and use it, instead of using an additional `IMPL` definition. src/bench/Makefile.am | 6 +++--- src/bench/matrix.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 24c03167bd5d91fba7096dd06c3d6aaf1e9fc6f0 Author: Emmanuele Bassi Date: Wed Dec 24 12:24:04 2014 +0000 quaternion: Use a single SIMD read Instead of four separate ones. src/graphene-quaternion.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 225c5fc91b12b70e1f92eff101b7d804d6858c74 Author: Emmanuele Bassi Date: Wed Dec 24 12:23:26 2014 +0000 tests: Slightly increase quaternion's code coverage src/tests/quaternion.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 59f5a42d79d166b16a9a39236da5b780ff1a0aea Author: Emmanuele Bassi Date: Wed Dec 24 12:15:43 2014 +0000 docs: Specify units of angles in init_with_order() Like we do elsewhere. src/graphene-euler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f1865ec207f03cf92d2f084398139921bf1fac89 Author: Emmanuele Bassi Date: Wed Dec 24 12:15:15 2014 +0000 docs: Mention graphene_quaternion_t in Euler angles docs src/graphene-euler.c | 2 ++ 1 file changed, 2 insertions(+) commit 2d80533eb00f365a1ba03ab9cf473801ffb8198e Author: Emmanuele Bassi Date: Wed Dec 24 12:13:52 2014 +0000 docs: Mention graphene_euler_t in the Quaternion docs src/graphene-quaternion.c | 4 ++++ 1 file changed, 4 insertions(+) commit d39e73256e16087f02f8bddae1fb90e314d343ed Author: Emmanuele Bassi Date: Wed Dec 24 01:03:40 2014 +0000 docs: Mention GLib in the MSYS2 instructions If GLib is not installed, Graphene will still automatically turn off functionality, but if you're building a GLib-based application on Windows you probably want to ensure you build GLib before Graphene. README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55bcdba163a8467fdcf3d512a1e1ed105b9fa335 Author: Emmanuele Bassi Date: Wed Dec 24 00:56:06 2014 +0000 build: Detect MSYS2 builds on Windows Otherwise, when building inside an MSYS2 environment the required `-no-undefined` linker flag won't be used to build Graphene. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9056dbf3dbfbe5ecd872b5518508c225d52e3187 Merge: 8349599 42e4bcf Author: Emmanuele Bassi Date: Wed Dec 24 00:38:28 2014 +0000 Merge pull request #34 from Whitecl4ws/master Update README.md commit 42e4bcf989409df5502d46a6bd4238d617fd05f5 Author: Whitecl4ws Date: Tue Dec 23 19:35:19 2014 -0500 Update README.md Added make as a dependency README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 83495991178ad63c7a928dc4112d360047e6b099 Author: Emmanuele Bassi Date: Tue Dec 23 20:35:24 2014 +0000 Add a section for building on Windows Using MSYS2. Fixes issue #33. README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 756fdda3a118da427a5685ae221f7e176e429780 Author: Emmanuele Bassi Date: Tue Dec 23 20:08:45 2014 +0000 build: Use the correct LDFLAGS The variable used in the Makefile.am needs to be the same as the one used in the configure.ac, otherwise compilation will fail with libtool on Windows. configure.ac | 4 ++-- src/Makefile.am | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) commit 4cff26d4fe9c8d2c5365aefeb90eb717e7fd50e4 Author: Emmanuele Bassi Date: Thu Dec 18 14:58:59 2014 +0000 Use graphene_lerp() inside interpolate() implementations Instead of reimplementing it. src/graphene-point.c | 4 ++-- src/graphene-point3d.c | 13 +++---------- src/graphene-size.c | 4 ++-- 3 files changed, 7 insertions(+), 14 deletions(-) commit 727dcf4626459a964746d3a3b69e86e6db3bb1f9 Author: Emmanuele Bassi Date: Thu Dec 18 11:41:54 2014 +0000 docs: Clarify the default euler order enumeration value The 'DEFAULT' value is special, in that it gets resolved to its effective value when used. src/graphene-euler.c | 6 +++++- src/graphene-euler.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) commit 7c2ac1d3a9eb4381d5f222e427eb4e4f6da3e769 Author: Emmanuele Bassi Date: Wed Dec 10 15:49:57 2014 +0000 doc: Add API reference links to the README README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 05fd528a8c758def89938d02849292974ada2a81 Author: Emmanuele Bassi Date: Wed Dec 10 14:19:32 2014 +0000 matrix: Simplify interpolate() Use graphene_lerp() where necessary, and drop intermediate variables where not needed. src/graphene-matrix.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 4f075430fb656246e7dc39d46c4c849007788f18 Author: Emmanuele Bassi Date: Wed Dec 10 14:15:47 2014 +0000 rect: Use graphene_lerp() for interpolation And drop the custom internal macro we use. src/graphene-rect.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit fd252ab4a1d2cd915799c5a472922f44cbd7a2b9 Author: Emmanuele Bassi Date: Wed Dec 10 14:14:48 2014 +0000 Add graphene_lerp() private macro A macro for computing the linear interpolation between two values. src/graphene-private.h | 2 ++ 1 file changed, 2 insertions(+) commit 57879985f251c6d493cb766be77c4e329f14b13e Author: Emmanuele Bassi Date: Wed Dec 10 13:50:05 2014 +0000 matrix: Fix interpolation When calling graphene_simd4f_t functions we always operate on values, not on references, so we need to store the result. Instead of using `mul(v, splat(-1))` we should use the neg() operator. src/graphene-matrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 512eedebc90d23eff47f9df0ba54d552e1d00f0d Author: Emmanuele Bassi Date: Tue Dec 9 22:59:14 2014 +0000 docs: Update link to the API reference README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d93637ae3fef8d41501cadb859dc74c5b02bc009 Author: Emmanuele Bassi Date: Tue Dec 9 16:48:53 2014 +0000 docs: Add an initial overview to the API ref doc/graphene-docs.xml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit a1ce1f49806927906f8a160691882901b0d56c1d Author: Emmanuele Bassi Date: Tue Dec 9 00:04:21 2014 +0000 Post-release version bump to 1.1.3 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c6721e8af135bc5c0e39476b0ee42757247e3a0 Author: Emmanuele Bassi Date: Tue Dec 9 00:03:05 2014 +0000 release: Graphene 1.1.2 (snapshot) configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c403234fe2ca3ca2b382948cb22b6cc9adca601 Author: Emmanuele Bassi Date: Thu Dec 4 10:04:14 2014 +0000 simd4f: Add clamp_scalar() operator Similar to clamp(), but to clamp a vector between scalar values. doc/graphene-sections.txt | 1 + src/graphene-simd4f.h | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) commit 1ee4c987d2338554530c9ed4f2c78bc107c14bcb Author: Emmanuele Bassi Date: Thu Dec 4 09:58:07 2014 +0000 simd4f: Add clamp() operator doc/graphene-sections.txt | 1 + src/graphene-simd4f.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 49c367e180f1f96c23ec818c63e578812b00464e Author: Emmanuele Bassi Date: Thu Dec 4 09:57:02 2014 +0000 simd4f: Fix max() for GCC vectors An extra space in the macro definition broke the expansion. src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66da5377f4325ae18d93d81fe8f9294db88da2aa Author: Emmanuele Bassi Date: Wed Dec 3 14:48:41 2014 +0000 tests: Use near() operator in fuzzy vector comparison macros We have this new operator for vector types, so we should use it to simplify the macro expansion. src/tests/graphene-test-compat.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b35b9a8ea1c54c4ccbb3b541f5c435823f2449d8 Author: Emmanuele Bassi Date: Wed Dec 3 14:45:35 2014 +0000 vectors: Allow fuzzyness in equality checks We should allow for floating point representation discrepancies when checking two vectors for equality. The immediate check using the SIMD comparison operator has the same issue as a direct equality using memcmp() or '==', but also we want to check within an arbitrary high precision. We use the same strategy (and epsilon) to check if two graphene_point_t or two graphene_point3d_t are equal as well. src/graphene-vectors.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit bb11a565009726a1dec8531317df8c3c3e5fe85a Author: Emmanuele Bassi Date: Wed Dec 3 14:41:46 2014 +0000 vec4: Add near() operator Similar to the one we added to vec2 and vec3. doc/graphene-sections.txt | 1 + src/graphene-vec4.h | 4 ++++ src/graphene-vectors.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit c3d7cfc5bab42fb322046d04d43e9f5e3b455562 Author: Emmanuele Bassi Date: Wed Dec 3 14:39:35 2014 +0000 vec3: Add near() operator Similar to the one we added to vec2. doc/graphene-sections.txt | 1 + src/graphene-vec3.h | 4 ++++ src/graphene-vectors.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit b6f9cbb0160466bb6b4880f16d958da908c358b8 Author: Emmanuele Bassi Date: Wed Dec 3 14:36:44 2014 +0000 vec2: Add near() operator We want to know if two vectors are within a specified epsilon of each other, instead of being equal. doc/graphene-sections.txt | 1 + src/graphene-vec2.h | 4 ++++ src/graphene-vectors.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit 04827c3fcad77f98b2be6fd6cd230fd5332ce323 Author: Emmanuele Bassi Date: Tue Dec 2 18:06:50 2014 +0000 tests/vec3: Use fuzzy equality macro src/tests/vec3.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 10f26ac18d70d0ecaa2dcf155b3fda7230c3fda9 Author: Emmanuele Bassi Date: Tue Dec 2 18:04:23 2014 +0000 tests/vec4: Use fuzzy equality macro src/tests/vec4.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit bef5ac76d168d2fd78af1ae0448951f7893dbbdf Author: Emmanuele Bassi Date: Tue Dec 2 18:03:40 2014 +0000 tests: Add vec4 fuzzy equality macro src/tests/graphene-test-compat.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 57dc63ed6b4bbe9fe78e16e3f3f840803763ed2e Author: Emmanuele Bassi Date: Mon Dec 1 15:16:20 2014 +0000 tests: Move compare_matrices() to the shared namespace And rename it graphene_assert_fuzzy_matrix_equal(). src/tests/graphene-test-compat.h | 16 ++++++++++++- src/tests/matrix.c | 50 ++++++++++++++-------------------------- 2 files changed, 32 insertions(+), 34 deletions(-) commit 78cfc3803c0310791bc611c7d612515e7a042477 Author: Emmanuele Bassi Date: Mon Dec 1 12:34:17 2014 +0000 Use InitOnceExecuteOnce() on Windows This is the equivalent of pthread_once() for Windows Vista and newer. This commit is untested, but it has been taken from an example on MSDN, so it should in theory just work. src/graphene-box.c | 22 ++++++++++++++ src/graphene-vectors.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 3 deletions(-) commit 88885afa6e2e88413be7b62fe2464b0dae42f05e Author: Emmanuele Bassi Date: Mon Dec 1 12:32:46 2014 +0000 Update Libs.private and Requires.private for pkg-config We need to ensure that the linker and compiler flags are an accurate reflection of our dependencies for all the possible configurations. src/graphene.pc.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5229f9e282c3e76da92e84d7fc510c536a9d05eb Author: Emmanuele Bassi Date: Mon Dec 1 12:31:51 2014 +0000 build: Expose PTHREAD_* variables for substitution We will need them in the pkg-config file, if we don't depend on GObject. configure.ac | 2 ++ 1 file changed, 2 insertions(+) commit d73ad84654c2a503e0fd5dafb9e676eec36a9142 Author: Emmanuele Bassi Date: Mon Dec 1 12:18:00 2014 +0000 build: Check for InitOnceExecuteOnce on Windows We use this function like its pthread equivalent. configure.ac | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 567e09c599250bdbd502afa7230753aafd674511 Author: Emmanuele Bassi Date: Mon Dec 1 10:55:32 2014 +0000 box: Conditionally use pthread_once Like we did for the lazily initialized constant vectors, we need to use pthread_once() to initialize the constant boxes. src/graphene-box.c | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) commit 332ea39de6c5531e6febd1dad38217edf0c166ac Author: Emmanuele Bassi Date: Mon Dec 1 10:49:05 2014 +0000 vectors: Conditionally use pthread_once() We have to initialize the global constant vectors in a thread-safe way. src/graphene-vectors.c | 119 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 102 insertions(+), 17 deletions(-) commit b60c27e6dd5ce319ae2b3e41bfaf509be0a8484a Author: Emmanuele Bassi Date: Mon Dec 1 10:16:04 2014 +0000 build: Check for pthreads We have some lazily initialized global variables in Graphene that get initialized when retrieving them, and we definitely want to ensure thread safety when that happens. Since we cannot unconditionally depend on GLib, we need to do this the old fashioned way, and implement "thread safe once access" ourselves. For starters, we add a dependency on pthreads, and use pthread_once_t. On Windows, we'll use InitOnceInitialize() instead, since we don't care about supporting Windows XP. Makefile.am | 1 + build/autotools/ax_pthread.m4 | 332 ++++++++++++++++++++++++++++++++++++++++++ configure.ac | 6 +- 3 files changed, 337 insertions(+), 2 deletions(-) commit a434d9668a8ed9c45850ee10aa8fd89b496bb26c Author: Emmanuele Bassi Date: Sun Nov 30 11:14:33 2014 +0000 tests/plane: Use the fuzzy vec3 comparison macro src/tests/plane.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8fc8a47a86325f83a86dbe33a07d6d2b30b85ccc Author: Emmanuele Bassi Date: Sun Nov 30 11:12:21 2014 +0000 tests/triangle: Use the vec3 fuzzy comparison macro src/tests/triangle.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f5e84a0cec34116bcc5e84fbfb35e1ade456415a Author: Emmanuele Bassi Date: Sun Nov 30 11:10:07 2014 +0000 tests: Rework the fuzzy comparison macros We need a vec3 fuzzy comparison macro, but we also need to clean up the mess that the existing macros have become. The only bits that needs to be placed under a compiler check are the typeof() declarations and the actual epsilon condition; the rest of the macros are perfectly compiler-agnostic. Once we moved the epsilon check out to its own macro, the other macros fall in line fairly simply. src/tests/graphene-test-compat.h | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) commit 0a2d3b16937832e10df6d123efe752fb61a7806e Author: Emmanuele Bassi Date: Sat Nov 29 23:47:08 2014 +0000 tests/triangle: Use a fuzzy check on the normal vector equality The normal vectors for the triangle and plane are not going to be exactly equal. src/tests/triangle.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a28fef9fe9c6ef8cf22458884167714977eac9fc Author: Emmanuele Bassi Date: Sat Nov 29 23:44:32 2014 +0000 vectors: Compensate for length = 0 when normalizing The low-level SIMD4f type is happy with using NaN when normalizing a vector with a length of 0, but we want to provide some safety net and reliability across platforms, so we make the normalize() function slightly slower by checking the vector length. src/graphene-vectors.c | 15 ++++++++++++--- src/tests/triangle.c | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) commit d1852ccd08360f7a172156a5ecad581acdc952a0 Author: Emmanuele Bassi Date: Fri Nov 28 16:03:38 2014 +0000 tests/triangle: Improve coverage src/tests/triangle.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) commit 1caa0869ab9a515f7826bbd7524670a39818fcd3 Author: Emmanuele Bassi Date: Fri Nov 28 15:31:00 2014 +0000 docs: Fix formatting src/graphene-triangle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c023bad1301eabe114173c2d9655e4465f94545d Author: Emmanuele Bassi Date: Fri Nov 28 15:21:09 2014 +0000 triangle: Move a comment near the relevant code src/graphene-triangle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f0fd258b064712170a317816533c57613b98bdb2 Author: Emmanuele Bassi Date: Fri Nov 28 13:41:57 2014 +0000 triangle: Add barycentric coordinates of point getter We can expose the function we use to find whether a given point is contained in a triangle, as it's generally useful to compute the UV vector. doc/graphene-sections.txt | 1 + src/graphene-triangle.c | 104 ++++++++++++++++++++++++++++++++++++---------- src/graphene-triangle.h | 4 ++ src/tests/triangle.c | 4 ++ 4 files changed, 91 insertions(+), 22 deletions(-) commit 764bbff0ca3af33e5bee0394cdf449eab591f15c Author: Emmanuele Bassi Date: Fri Nov 28 12:39:40 2014 +0000 triangle: Add triangle → box function doc/graphene-sections.txt | 1 + src/graphene-triangle.c | 20 ++++++++++++++++++++ src/graphene-triangle.h | 3 +++ 3 files changed, 24 insertions(+) commit e33ad6eb956597b7814f6dc68ef4477b63c88ae9 Author: Emmanuele Bassi Date: Fri Nov 28 12:21:46 2014 +0000 triangle: Rename variables Match them with the terminology used by the web page that we link in the code comment. src/graphene-triangle.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 2ae9d9c2d95a7dd006e7b5f3c8489718e4612bf3 Author: Emmanuele Bassi Date: Fri Nov 28 12:12:46 2014 +0000 tests/matrix: Remove an unnecessary `return` src/tests/matrix.c | 1 - 1 file changed, 1 deletion(-) commit 768d78071d022669fdf7699bbbf077853c477841 Author: Emmanuele Bassi Date: Fri Nov 28 12:11:25 2014 +0000 build: Disable unused-local-typedefs warning Too many false positives in older GLib versions with GCC >= 4.8. build/autotools/graphene-macros.m4 | 3 +++ 1 file changed, 3 insertions(+) commit 081fb28c66fbc0ff593f23ed2686987a45590ad5 Author: Emmanuele Bassi Date: Fri Nov 28 11:54:16 2014 +0000 tests/matrix: Ignore Clang and older GLib versions Still trying to make TravisCI happy. src/tests/matrix.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 6d7ee55e4890998e583427a471ce5d6681679465 Author: Emmanuele Bassi Date: Fri Nov 28 04:29:06 2014 +0000 tests/matrix: Disable Euler → Matrix test on GCC < 4.9 We tried playing games with the Travis CI build environment, but it seems that the only GCC versions where the code actually works are the ones more recent that 4.9 (included). src/tests/matrix.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1847ce9351d416f4c047b714b07183942e2632f9 Author: Emmanuele Bassi Date: Thu Nov 27 15:15:02 2014 +0000 tests/triangle: Improve coverage src/tests/triangle.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 5 deletions(-) commit 3554d3e103de8f4e5be313f2bbdb330f9414dfb2 Author: Emmanuele Bassi Date: Thu Nov 27 14:49:04 2014 +0000 triangle: Fix copy and paste thinko The init_from_point3d() initializer is overwriting the 'b' vertex if NULL is passed for the 'c' vertex. src/graphene-triangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit db499fdd8f39e405399b3871987494fbdc52e0d4 Author: Emmanuele Bassi Date: Wed Nov 26 13:45:08 2014 +0000 euler: Rename variable for consistency src/graphene-euler.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) commit 5b23c84886fb547750b738b5d63a102a720028c6 Author: Emmanuele Bassi Date: Wed Nov 26 13:22:00 2014 +0000 tests/matrix: Improve compare_matrices() Use the newly added, matrix-specific fuzzy comparison macro to improve the output of the check in case of failure. src/tests/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3065ba3d7587dd87044bfdd35d11c4ccf72ec8b Author: Emmanuele Bassi Date: Wed Nov 26 13:21:03 2014 +0000 tests: Rework the fuzzy comparison macros Simplify the condition checking, and add a specialized fuzzy comparison macro for matrices that takes the row and column being compared. src/tests/graphene-test-compat.h | 55 ++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 24 deletions(-) commit 615ccdaf71ccbba5507c260068242717c7214b0a Author: Emmanuele Bassi Date: Wed Nov 26 11:22:42 2014 +0000 travis: Use gcc-4.8 only when building with GCC .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 237779b307fac6c70ea000d4b39145e9c8338645 Author: Emmanuele Bassi Date: Wed Nov 26 11:18:47 2014 +0000 travis: Install gcc-4.8 and use it .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ebb83d12057466dce44eefc2e0296a0c4663af7 Author: Emmanuele Bassi Date: Wed Nov 26 11:15:09 2014 +0000 travis: Remove -qq from update options .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58a4782286e0c32913a2d8f96a5e6a36eaadd13d Author: Emmanuele Bassi Date: Wed Nov 26 10:38:31 2014 +0000 travis: Update the GCC toolchain Sadly, Travis CI is using GCC 4.6 from the Ubuntu 12.04 LTS repositories, which is apparently buggy, especially when it comes to floating point math optimizations. Since floating point math is all that Graphene does, bumping up the toolchain to use a slightly more recent (and correct) GCC suite seems the only way to ensure that the test suite passes on Travis with GCC just like it already does on Travis with Clang and locally, with GCC 4.9. .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 13ca5aa4a3646e9a154f3d78ea1103d8ce342667 Author: Emmanuele Bassi Date: Wed Nov 26 10:20:53 2014 +0000 tests/matrix: Verify that all rotations are idempotent Rotating through all the various API we provide should produce the same results. src/tests/matrix.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9729faa5309dff94146f832ad581a7ede5324f20 Author: Emmanuele Bassi Date: Wed Nov 26 10:18:12 2014 +0000 euler: Fix the math for the matrix conversion We are using a left-handed sign convention, to ensure that creating a matrix through graphene_euler_t, graphene_quaternion_t, and using the angle-axis notation results in the same rotation matrix. We need to document the exact nature of our transformation, including the matrices used to compute the resulting row vectors. src/graphene-euler.c | 103 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 31 deletions(-) commit 90493349c76ee90d0c50b94143b6e090333265d6 Author: Emmanuele Bassi Date: Wed Nov 26 09:25:49 2014 +0000 tests/matrix: Simplify compare_matrices() macro Instead of per-element access through the API, just dump the matrices being compared into arrays of floats, and access those. src/tests/matrix.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d7e2d6bcb2cba76727c12579305ab470d741b94a Author: Emmanuele Bassi Date: Tue Nov 25 23:19:23 2014 +0000 euler: Fix reorder() The point of the method is to allow changing the order of a graphene_euler_t, not just to reset it to the default order. src/graphene-euler.c | 9 ++++----- src/graphene-euler.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) commit e6139ff41e272479883e7570aec92f891a2b22a2 Author: Emmanuele Bassi Date: Tue Nov 25 15:23:13 2014 +0000 tests: Port matrix suite to the boilerplate macros src/tests/matrix.c | 54 ++++++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 30 deletions(-) commit 6b72761d6ff23516cea74c39dc09dd20543ca78b Author: Emmanuele Bassi Date: Tue Nov 25 15:06:58 2014 +0000 build: Remove unnecessary file check We only run autogen.sh from a Git clone, and each clone is guaranteed to be complete; we don't need to check for the presence of a file (which may or may not stay there) to ensure that we have a valid source directory. autogen.sh | 9 --------- 1 file changed, 9 deletions(-) commit 3ffe442e4f4f13e1029dac07f4b8f228c006f335 Author: Emmanuele Bassi Date: Tue Nov 25 15:05:07 2014 +0000 matrix: Use Euler → matrix for rotation Instead of converting a graphene_euler_t to a graphene_quaternion_t and then extracting the rotation matrix. src/graphene-matrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 22aa17279f03ed8ccf07e9035777776fe9f34c4d Author: Emmanuele Bassi Date: Tue Nov 25 14:54:32 2014 +0000 euler: Add Euler → rotation matrix conversion For completeness, similar to how we allow a quaternion → matrix conversion. doc/graphene-sections.txt | 1 + src/graphene-euler.c | 97 +++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-euler.h | 3 ++ 3 files changed, 101 insertions(+) commit 260280466fbfc534b880478fc460acc0ae4453bc Author: Emmanuele Bassi Date: Sun Nov 23 16:00:33 2014 +0000 matrix: Add rotation variants for euler and quaternion Makes is easier to apply a rotation to a graphene_matrix_t for transformations described through a graphene_quaternion_t or a graphene_euler_t. doc/graphene-sections.txt | 2 ++ src/graphene-matrix.c | 50 +++++++++++++++++++++++++++++++++++++++++------ src/graphene-matrix.h | 6 ++++++ 3 files changed, 52 insertions(+), 6 deletions(-) commit 17da2bc8a6884c9b078924a3f4f21854a9ce5dce Author: Emmanuele Bassi Date: Sun Nov 23 12:02:11 2014 +0000 tests/euler: Check roundtrips between Euler and Quaternion src/tests/euler.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 2f8ae4c5ba56ce191a317e4deeebd10a76b4dead Author: Emmanuele Bassi Date: Sun Nov 23 12:00:36 2014 +0000 quaternion: Relax equality range The float epsilon is too small, considering the range of values. src/graphene-quaternion.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit cd1005b7ab471618f799e38e069945444ad2b39d Author: Emmanuele Bassi Date: Sun Nov 23 11:59:14 2014 +0000 euler: Convert to degrees from radians The conversion from matrices and quaternions are done using trigonometric functions, so the results need to be converted to degrees before passing them to the graphene_euler_t API. src/graphene-euler.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 53e765d25cec9805533c4eb20cf3e7ffa8769914 Author: Emmanuele Bassi Date: Sat Nov 22 20:54:15 2014 +0000 docs: Remove some more unnecessary tabs doc/CODING_STYLE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d6bbb9fee095f7b5eb1970464435638c5133c89 Author: Emmanuele Bassi Date: Sat Nov 22 20:40:07 2014 +0000 docs: Remove unnecessary tabs doc/CODING_STYLE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5790c327f0419aa1e478b01b1f7eef5fb10a2305 Author: Emmanuele Bassi Date: Sat Nov 22 20:35:14 2014 +0000 docs: Add a style section for the types doc/CODING_STYLE.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) commit a2b269a0890f655374bc8af5dc050c58ee7eb3dd Author: Emmanuele Bassi Date: Sat Nov 22 20:19:27 2014 +0000 docs: Fix tabs-vs-spaces example in the coding style doc/CODING_STYLE.md | 2 ++ 1 file changed, 2 insertions(+) commit a3630b6fcccdbc2c6985be06bc5693e6ca6f6231 Author: Emmanuele Bassi Date: Sat Nov 22 20:18:14 2014 +0000 docs: Remove mentions of Clutter from the coding style doc/CODING_STYLE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 2dc9490cf4490f121de6b342cfd39d1c8c937136 Author: Emmanuele Bassi Date: Sat Nov 22 18:57:08 2014 +0000 doc: Update README README.md | 1 + 1 file changed, 1 insertion(+) commit ccb1f7f07f3c06519711c6da9e42329671bab3a4 Author: Emmanuele Bassi Date: Sat Nov 22 18:55:07 2014 +0000 tests: Add initial graphene_euler_t test suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/euler.c | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) commit 6bdbd6010d148bedc2d41a0796849c27a48b517d Author: Emmanuele Bassi Date: Sun Nov 16 10:43:42 2014 +0000 Add graphene_euler_t We have quaternions; we have (angles, axis); we should also have a structure for Euler angles to define rotations in the public API. doc/graphene-docs.xml | 1 + doc/graphene-sections.txt | 24 ++ src/Makefile.am | 2 + src/graphene-euler.c | 545 ++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-euler.h | 132 +++++++++++ src/graphene-gobject.c | 22 ++ src/graphene-gobject.h | 5 + src/graphene-quaternion.c | 85 +++++++- src/graphene-quaternion.h | 3 + src/graphene-types.h | 1 + src/graphene.h | 1 + 11 files changed, 819 insertions(+), 2 deletions(-) commit df0a5d115c236394c268ac05ee2216d14cafbc1c Author: Emmanuele Bassi Date: Sat Nov 22 18:35:06 2014 +0000 docs: Add missing arguments to graphene_simd4x4f_init_frustum() src/graphene-simd4x4f.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 64667a5482b11e5b0dc39f77b0cba05d091687cd Author: Emmanuele Bassi Date: Thu Nov 20 11:16:12 2014 +0000 tests/frustum: Add frustum matrix → frustum unit Similar to the orthographic matrix → frustum unit. src/tests/frustum.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) commit 06645b85a51106902cdcbb0ed06ff09aa17dc731 Author: Emmanuele Bassi Date: Thu Nov 20 11:15:21 2014 +0000 matrix: Add init_frustum() The graphene_matrix_t wrapper around graphene_simd4x4f_init_frustum(). We can use it to initialize a matrix, and then use the matrix to initialize a graphene_frustum_t. doc/graphene-sections.txt | 2 ++ src/graphene-matrix.c | 32 ++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 8 ++++++++ 3 files changed, 42 insertions(+) commit ed84a000c2ab70f2d9a69a8d113ff2e4a2fe1213 Author: Emmanuele Bassi Date: Thu Nov 20 11:14:08 2014 +0000 simd4x4f: Add an init_frustum() initializer Initializes a SIMD 4x4 matrix with the frustum described by six clipping planes. src/graphene-simd4x4f.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 07b9108acafab8d125fdc0b3f8f6438fabef1e8e Author: Emmanuele Bassi Date: Wed Nov 19 16:39:08 2014 +0000 tests/frustum: Add a few more points src/tests/frustum.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5c5ce295ab2fb223cdc0090569c44610604fa54c Author: Emmanuele Bassi Date: Wed Nov 19 16:32:32 2014 +0000 tests/frustum: Add contains_point() test src/tests/frustum.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 122ae4ffff18edc32c32c855aa3d39983ccde4ff Author: Emmanuele Bassi Date: Wed Nov 19 14:00:14 2014 +0000 tests: Add frustum test suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/frustum.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) commit ad58750fcc0341032fc16dfa021c6b0dd2b1a121 Merge: c5ff897 505b4ff Author: Emmanuele Bassi Date: Wed Nov 19 13:39:18 2014 +0000 Merge pull request #31 from alexlarsson/master Fix graphene_matrix_unproject_point3d commit 505b4ffb3aba2a0329cd2efaaea756b8e95d7a8a Author: Alexander Larsson Date: Wed Nov 19 14:29:34 2014 +0100 Fix graphene_matrix_unproject_point3d It was inverting projection into tmp and then using inv_projection. This changes it to invert into inv_projection. src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5ff897df881b6485a5e48c3f258438666785790 Author: Emmanuele Bassi Date: Tue Nov 18 13:36:37 2014 +0000 tests/scale: Port to the boilerplate macros src/tests/size.c | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) commit 570bcab24def8bffc49acbf58cb96e73ede2b8ea Author: Emmanuele Bassi Date: Tue Nov 18 13:36:20 2014 +0000 tests: Add bug base URL src/tests/graphene-test-compat.h | 1 + 1 file changed, 1 insertion(+) commit 4318a28094c29133e8a4e74feead09a767689167 Author: Emmanuele Bassi Date: Mon Nov 17 15:56:41 2014 +0000 docs: Add code blocks for examples in ordered list doc/CODING_STYLE.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ebd1fd3d116723c93e4122ef26b5f05e88f8de52 Author: Emmanuele Bassi Date: Mon Nov 17 15:45:57 2014 +0000 docs: Include a coding style document Since we are getting contributions, and I don't want to spend time explaining coding style in the future, let's be explicit about the kind of style I'm going to accept. This is just the GLib/GTK+/Clutter coding style, amended where it makes more sense in the context of Graphene. README.md | 25 ++- doc/CODING_STYLE.md | 503 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 525 insertions(+), 3 deletions(-) commit 6c4cc64fa685c06a966f46074a64d7b2371f303b Author: Emmanuele Bassi Date: Mon Nov 17 15:09:22 2014 +0000 triangle: Make init arguments nullable If a point or a vector representing a vertex are NULL, the (0, 0, 0) coordinates should be used instead. src/graphene-triangle.c | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) commit 659049dfaba897c59310d044859fda963b28e019 Author: Emmanuele Bassi Date: Mon Nov 17 15:07:44 2014 +0000 Use the correct annotation for optional in arguments The `(optional)` annotation is only meaningful for `(out)` arguments, meaning that it's possible to ignore the argument by passing a NULL pointer to it. The `(nullable)` annotation is meant, among other things, for `(in)` argument that can be replaced with a NULL. src/graphene-box.c | 8 ++++---- src/graphene-plane.c | 2 +- src/graphene-sphere.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) commit ab7aa35d5e99a1dbfee5a9180ed599dc79701f6d Author: Emmanuele Bassi Date: Mon Nov 17 14:57:49 2014 +0000 tests/triangle: Port to the boilerplate macros src/tests/triangle.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 8a5c9fd809083abce2c759edbb5003fec45cfa2e Author: Emmanuele Bassi Date: Mon Nov 17 14:57:34 2014 +0000 tests/sphere: Port to the boilerplate macros src/tests/sphere.c | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) commit ec3edbdd106a010c9555e5f3f664b29a5cdf5968 Author: Emmanuele Bassi Date: Mon Nov 17 12:39:13 2014 +0000 tests/rect: Port to the boilerplate macros src/tests/rect.c | 78 ++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 42 deletions(-) commit 46ae36c43f73315cdfa7b26cc8336faba94edd2a Author: Emmanuele Bassi Date: Mon Nov 17 12:38:58 2014 +0000 tests/quaternion: Port to the boilerplate macros src/tests/quaternion.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit f9d5b8bf8a0c00f0d2bb2a0bc28d0378c96762c7 Author: Emmanuele Bassi Date: Mon Nov 17 12:38:42 2014 +0000 tests/quad: Port to the boilerplate macros src/tests/quad.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 7ded5c6f966c52d7a519e595fe3fc32b8c110d6a Author: Emmanuele Bassi Date: Mon Nov 17 11:54:58 2014 +0000 tests/point: Port to the boilerplate macros src/tests/point.c | 62 ++++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 35 deletions(-) commit ddd9e2189605fd0536ec8a767eda4941beabf5f2 Author: Emmanuele Bassi Date: Mon Nov 17 11:54:09 2014 +0000 tests: Add pre-seeded Point variables And rename the pre-seeded Point3D variables to avoid conflicts. src/tests/box.c | 16 ++++++++-------- src/tests/graphene-test-compat.h | 20 ++++++++++++-------- src/tests/plane.c | 2 +- src/tests/point3d.c | 28 ++++++++++++++-------------- 4 files changed, 35 insertions(+), 31 deletions(-) commit 29e36919cae74704a38219f9009ed464bda46ee2 Author: Emmanuele Bassi Date: Mon Nov 17 11:51:18 2014 +0000 build: Rework conditional support for tests and benchmarks The default should be to continue the configuration process if no GLib was found, but fail if either (or both) tests and benchmarks were explicitly enabled and GLib is not available. configure.ac | 79 ++++++++++++++++++++++++++++++++++++++++----------------- src/Makefile.am | 7 ++++- 2 files changed, 62 insertions(+), 24 deletions(-) commit 1e8c17c5878b96b6f019872315e5e3c8ebb1f2a9 Author: Emmanuele Bassi Date: Sun Nov 16 22:38:49 2014 +0000 tests: Add two and half to the pre-seeded Point3D src/tests/box.c | 1 - src/tests/graphene-test-compat.h | 6 +++++- src/tests/point3d.c | 24 ++++++++++-------------- 3 files changed, 15 insertions(+), 16 deletions(-) commit 22907af8269130540429d7a4f1d57174d6e39405 Author: Emmanuele Bassi Date: Sun Nov 16 22:35:50 2014 +0000 tests/point3d: Port to the test suite boilerplate macros src/tests/point3d.c | 106 +++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 56 deletions(-) commit 2559ca5f135034eaf8386b4a5b9335060458c46b Author: Emmanuele Bassi Date: Sun Nov 16 22:35:30 2014 +0000 tests/box: Port to the test suite boilerplate macros src/tests/box.c | 101 ++++++++++++++++++++++++++------------------------------ 1 file changed, 46 insertions(+), 55 deletions(-) commit b5feba8abb7f69fc4111d908e00b0b19bdc4f271 Author: Emmanuele Bassi Date: Sun Nov 16 22:33:47 2014 +0000 tests: Add pre-seeded, per-unit variables We want to guarantee consistency of results across test units, so we should provide standard variables to units to facilitate that. The default variables current defined are: float x, y, z, w graphene_point3d_t zero graphene_point3d_t one Others will be added on a case-by-case basis. src/tests/graphene-test-compat.h | 14 +++++++++++++- src/tests/plane.c | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) commit d4b527818a5655e03d13db9dd80085112b95aabf Author: Emmanuele Bassi Date: Sun Nov 16 17:18:56 2014 +0000 tests/plane: Improve coverage Add more unit tests for graphene_plane_t. src/tests/plane.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) commit 5abe3e898c1f3ce3b06c6396a5641b075b36f6ed Author: Emmanuele Bassi Date: Sun Nov 16 17:17:46 2014 +0000 plane: Use fuzzy check for constant equality Use the same epsilon used to check equality for Point3D coordinates. src/graphene-plane.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 4822024b2f74c29f6b0c8da6015e1f76db6bbdbc Author: Emmanuele Bassi Date: Sun Nov 16 15:27:01 2014 +0000 tests: Add graphene_plane_t suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/plane.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) commit 8b8f17b2a53a1363d4d5cb3a7f3630ea55e77ded Author: Emmanuele Bassi Date: Sun Nov 16 15:25:55 2014 +0000 tests: Add macros for reducing boilerplate This stuff should probably live somewhere in GTest. src/tests/graphene-test-compat.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 9ab7ff7c97fa8c8e8773494c5e99aa9d90cf2bc0 Author: Emmanuele Bassi Date: Sun Nov 16 15:11:00 2014 +0000 plane: Make the normal optional when initializing We can initialize the normal to the X axis if no normal vector is passed. src/graphene-plane.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 340212b0aaeeecdf1fca5ba1db18e4c5be55b2af Author: Emmanuele Bassi Date: Sun Nov 16 12:05:12 2014 +0000 tests/box: Add more units Improve the test suite coverage for graphene_box_t. src/tests/box.c | 169 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 168 insertions(+), 1 deletion(-) commit 975920d94c59766132817085a0f9ae8c8d64d35a Author: Emmanuele Bassi Date: Sun Nov 16 12:04:02 2014 +0000 box: Flip the contains checks around Just like we did in commit e8038beb5d3b3466387ffbda9594fe63c553389e, we need to flip the comparison operators in the contains_point() and contains_box() methods to avoid false negatives. src/graphene-box.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit 17c96ed8b20d475fc395e777093ce1f43fb9b974 Author: Emmanuele Bassi Date: Sun Nov 16 11:32:22 2014 +0000 tests/box: Add more units src/tests/box.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) commit 699a7d995a42a0e51a76f2e99c244aa5785cb16d Author: Emmanuele Bassi Date: Sun Nov 16 11:31:47 2014 +0000 box: Re-use the API inside the implementation This increases the code coverage, and reduces the chances of getting things wrong. src/graphene-box.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit e8038beb5d3b3466387ffbda9594fe63c553389e Author: Emmanuele Bassi Date: Sun Nov 16 11:29:59 2014 +0000 box: Flip the intersection check around We use the same notation as the equivalent graphene_rect_intersection() function, but we also need to use the cmp_ge() SIMD operator because both the SIMD operands have the fourth channel set to 0. Using cmp_le() would introduce false positives. src/graphene-box.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4fb39b5dde3f475e3fe0ddaa16e37260f3cbcb39 Author: Emmanuele Bassi Date: Sat Nov 15 15:01:45 2014 +0000 Fix a typo in the 1.2 version macro src/graphene-version-macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6317df61ba60b0e57dfc9b0e9628e1618f48ad7e Author: Emmanuele Bassi Date: Sat Nov 15 13:03:49 2014 +0000 rect: Rename an internal function Rename normalize_internal to normalize_in_place. It does not make *much* of a difference, since the public entry point does exactly the same, with a return value, but it makes it clear that the rectangle is normalized in place. This is a pretty bad API wart; the public entry point should take an additional argument, like we do everywhere else. src/graphene-rect.c | 84 ++++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 40 deletions(-) commit e92cf4b30d4a7d15ee4060fcb9238e3d07f93e67 Author: Emmanuele Bassi Date: Sat Nov 15 12:50:52 2014 +0000 matrix: Use convenience API src/graphene-matrix.c | 50 ++++++++++++-------------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) commit 2ff31d2fc42f76a9d7d44735c183567a47e6add1 Author: Emmanuele Bassi Date: Sat Nov 15 12:24:54 2014 +0000 build: Clean up configure.ac configure.ac | 79 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 45 insertions(+), 34 deletions(-) commit 34e604fa97234532a84ce6755f32f8f8c450dd21 Author: Emmanuele Bassi Date: Sat Nov 15 12:21:59 2014 +0000 build: Add mapfile for Solaris builds I originally nibbed this whole chunk from the Pixman configure.ac, but I forgot to modify it and include the mapfile. Since nobody complained, it is clear that Graphene hasn't been built on Solaris. I do not have access to a Solaris installation, nor to SunCC, so I'm tempted to just bin the whole thing and wait for outside contibutions; since it does not cost me anything, yet, I'll just leave it here for a while. I consider SunCC/Solaris support on notice, though, and will likely remove it if nothing happens after I release 1.2. Makefile.am | 3 ++- build/solaris-hwcap.mapfile | 30 ++++++++++++++++++++++++++++++ configure.ac | 7 +++++-- 3 files changed, 37 insertions(+), 3 deletions(-) commit 64c6d61a9b041ed6baa3d523952f497ce95f37b9 Author: Emmanuele Bassi Date: Sat Nov 15 12:02:02 2014 +0000 build: Reset interface age We added a bunch of API for the 1.2 cycle. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 926afa84c7a0e44d2794e9032470ae1aeeae1efe Author: Emmanuele Bassi Date: Sat Nov 15 11:59:31 2014 +0000 frustum: Add intersection with box method doc/graphene-sections.txt | 1 + src/graphene-frustum.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-frustum.h | 3 +++ 3 files changed, 55 insertions(+) commit ba6d1b316f6187af44845095dc98a041b61976cd Author: Emmanuele Bassi Date: Sat Nov 15 11:44:34 2014 +0000 frustum: Add getter for the planes array doc/graphene-sections.txt | 1 + src/graphene-frustum.c | 20 ++++++++++++++++++++ src/graphene-frustum.h | 4 ++++ 3 files changed, 25 insertions(+) commit 5dcdeef8a299e54bf75201f8ecbc62b6dc8d296c Author: Emmanuele Bassi Date: Fri Nov 14 16:13:55 2014 +0000 tests: Add initial suite for graphene_sphere_t src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/sphere.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) commit 3751c3e5edbfa3a7203eb5bf483163ab7aeb95f0 Author: Emmanuele Bassi Date: Fri Nov 14 15:50:44 2014 +0000 tests/quad: Improve coverage src/tests/quad.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) commit 5f798219c47ac4923a4eae114c0eab0c51200096 Author: Emmanuele Bassi Date: Fri Nov 14 15:50:23 2014 +0000 tests: Add initial graphene_triangle_t suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/triangle.c | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) commit e53987773c44745dfe01afc063b060e667643db7 Author: Emmanuele Bassi Date: Fri Nov 14 13:05:28 2014 +0000 tests/box: Verify inset does not yield negative widths Coverage back to 100%. src/tests/rect.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f3b1759ecde222d18408b0f672f9c43e747d1305 Author: Emmanuele Bassi Date: Fri Nov 14 13:01:31 2014 +0000 tests: Add units for vector equality Take the code coverage of the vectors units back to 100%. src/tests/vec2.c | 25 +++++++++++++++++++++++++ src/tests/vec3.c | 25 +++++++++++++++++++++++++ src/tests/vec4.c | 25 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+) commit 23b7f8870ed4db4e1e31711b380c257172e719a2 Author: Emmanuele Bassi Date: Fri Nov 14 12:53:49 2014 +0000 vectors: Correctly initialize const one vectors We cannot use 'splat' to initialize the one vectors for vec2 and vec3 because the public initializers will set the unused components to zero, which will lead to this equalities failing: graphene_vec2_equal (graphene_vec2_init (&tmp, 1.f, 1.f), graphene_vec2_one ()); graphene_vec3_equal (graphene_vec3_init (&tmp, 1.f, 1.f, 1.f), graphene_vec3_one ()); src/graphene-vectors.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit e25dc3a8ed7261c48835903f5eabccf07f859889 Author: Emmanuele Bassi Date: Fri Nov 14 12:37:40 2014 +0000 box: Use convenience vec3 → point3d API src/graphene-box.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 83e4e67428be6c5bceb712c0f770e0ceb97049bc Author: Emmanuele Bassi Date: Fri Nov 14 12:37:09 2014 +0000 docs: Annotate optional fields in graphene_box_t initializers src/graphene-box.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a8044b48c4e0cf793484f722770f6ce3448a86e2 Author: Emmanuele Bassi Date: Fri Nov 14 12:36:28 2014 +0000 docs: Fix graphene_box_t blurb We don't allow public access to the .min and .max fields. src/graphene-box.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eab4bfd00d0b1a4518d3b2772d41358dc0169218 Author: Emmanuele Bassi Date: Thu Nov 13 18:15:18 2014 +0000 Put the GRAPHENE_VECTORCALL annotation on its own line This makes gtk-doc happy, and find the graphene_simd4x4f_init() symbol. Hopefully, it won't break MSVC compilation. src/graphene-simd4x4f.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e05a4cb65bce6232766812276e9579911b7131cb Author: Emmanuele Bassi Date: Thu Nov 13 18:00:49 2014 +0000 simd4f: Add indexed component getter doc/graphene-sections.txt | 1 + src/graphene-simd4f.c | 35 +++++++++++++++++++++ src/graphene-simd4f.h | 80 +++++++++++++++-------------------------------- 3 files changed, 61 insertions(+), 55 deletions(-) commit 35d635bf3efae8f15220e603561a3b9f5866390b Author: Emmanuele Bassi Date: Thu Nov 13 17:08:58 2014 +0000 Rename aligned allocation functions Ensure that it's clear what they do. src/graphene-alloc-private.h | 6 +++--- src/graphene-alloc.c | 33 ++++++++++++++++++++++----------- src/graphene-matrix.c | 4 ++-- src/graphene-vectors.c | 12 ++++++------ 4 files changed, 33 insertions(+), 22 deletions(-) commit c789d1abdc353d52117e1358e222289958fc43d2 Author: Emmanuele Bassi Date: Fri Nov 7 11:49:47 2014 +0000 tests: Add initial suite for graphene_box_t src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/box.c | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+) commit 79c7f8222c39dd22461a3a415e83048e64f23e4e Author: Emmanuele Bassi Date: Thu Nov 6 14:11:42 2014 +0000 docs: Add the new triangle type to the README file README.md | 1 + 1 file changed, 1 insertion(+) commit 410ba38f6103abfd28bb9cbadbd29899ad91a5c1 Author: Emmanuele Bassi Date: Thu Nov 6 12:03:01 2014 +0000 Add graphene_triangle_t A triangle type, which can be useful for creating meshes or handling arrays of vertices arranged as triangle strips. doc/graphene-docs.xml | 1 + doc/graphene-sections.txt | 19 +++ src/Makefile.am | 2 + src/graphene-gobject.c | 2 + src/graphene-gobject.h | 5 + src/graphene-triangle.c | 345 ++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-triangle.h | 98 +++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 9 files changed, 474 insertions(+) commit 0f403694f6af839f3b72105e93c42b1686ec80ca Author: Emmanuele Bassi Date: Thu Nov 6 10:41:05 2014 +0000 matrix: Add unproject_point3d() method Unprojecting a point from a projection and a modelview matrices is expected to be a common operation for UI toolkits based on Graphene. doc/graphene-sections.txt | 1 + src/graphene-matrix.c | 38 ++++++++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 5 +++++ 3 files changed, 44 insertions(+) commit 4a9a7b46d67c7e36a0e93b6dfed27e003191d863 Merge: 019a51a 706f10e Author: Emmanuele Bassi Date: Wed Nov 5 11:16:00 2014 +0000 Merge pull request #30 from alexlarsson/master Fix various issues that break frustum clipping in Gthree commit 706f10e22a7de41d3f118569abb58eb70baa50d0 Author: Alexander Larsson Date: Wed Nov 5 11:57:52 2014 +0100 Fix graphene_matrix_transform_sphere() Actually apply the matrix to the sphere center. src/graphene-matrix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5d2655d7faac617d9b01f13b1feb1963827b7e2b Author: Alexander Larsson Date: Wed Nov 5 11:56:53 2014 +0100 Fix graphene_plane_normalize() This didn't take the current constant value into account, breaking if res != p. src/graphene-plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 533bdfe18e1134327d5d313f91bdd4e08fc13cef Author: Alexander Larsson Date: Wed Nov 5 11:56:04 2014 +0100 Fix: graphene_box_expand_vec3 We want to use min/max, not subtract/add, just like the normal graphene_box_expand. src/graphene-box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 019a51a1baf4988cfe7f5bf66d55014ea1c2bfa5 Author: Emmanuele Bassi Date: Tue Nov 4 14:42:00 2014 +0000 simd4x4f: Clean up look_at() Use the old variable names, but do not use the per-channel SIMD access for the w row vector components; instead, use the SIMD → float[4] conversion, which can be optimized. src/graphene-simd4x4f.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 679e9c302318f114fb0209e89789b692f0c97945 Author: Emmanuele Bassi Date: Tue Nov 4 11:32:26 2014 +0000 tests/matrix: Rework the failing look_at() tests The tests are checking the old, buggy implementation. The rotation tests have the wrong sign for the angles, so they are easily fixed. The random eye, center, up test requires some more thought, so it's currently disabled. src/tests/matrix.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) commit 953594befedec144ee5219cb648c718aa62c59f9 Author: Emmanuele Bassi Date: Tue Nov 4 11:29:33 2014 +0000 simd4x4f: Fix look_at() implementation There is no need to transpose the matrix before translating it to the eye coordinates. This breaks the matrix look_at() unit tests but I'm pretty confident that it is correct because: • the same approach is used by various look_at() implementations, like the one in Cogl and Mesa • the change fixes users of graphene_matrix_look_at(), like Gthree This seems to imply that the tests are incorrect, and they were testing the wrong implementation. src/graphene-simd4x4f.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 7ea438bc41d0eaa2df237445abc0bc4c3728275a Merge: 0ac04de c1479f9 Author: Emmanuele Bassi Date: Mon Nov 3 17:18:41 2014 +0000 Merge pull request #28 from alexlarsson/master Fix graphene_matrix_transform_sphere commit c1479f90510c00f986700377b909eb69375e71ff Author: Alexander Larsson Date: Mon Nov 3 18:02:56 2014 +0100 Fix graphene_matrix_transform_sphere This was using the wrong way to compute the scale in the different directions which only worked for pure scale matrices. We need to compute the length of each of the x/y/z columns and take the max of those. src/graphene-matrix.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0ac04de998e9458a67f573f5d0692725fe81aea9 Author: Emmanuele Bassi Date: Mon Nov 3 12:52:36 2014 +0000 docs: Replace %true with `true` The C99 `true` symbol is not recognised by gtk-doc, as it comes from a system header. We still want it to look like an identifier, but we really don't need the link. src/graphene-box.c | 6 +++--- src/graphene-frustum.c | 4 ++-- src/graphene-matrix.c | 12 ++++++------ src/graphene-plane.c | 2 +- src/graphene-point.c | 4 ++-- src/graphene-point3d.c | 4 ++-- src/graphene-quad.c | 2 +- src/graphene-quaternion.c | 2 +- src/graphene-rect.c | 8 ++++---- src/graphene-simd4f.c | 12 ++++++------ src/graphene-simd4f.h | 6 +++--- src/graphene-simd4x4f.h | 4 ++-- src/graphene-size.c | 2 +- src/graphene-sphere.c | 6 +++--- src/graphene-vectors.c | 6 +++--- 15 files changed, 40 insertions(+), 40 deletions(-) commit da8026be9f1fc0a13dcb6d8d25625fde2da734dd Merge: 9c646aa b119ecc Author: Emmanuele Bassi Date: Mon Nov 3 10:56:51 2014 +0000 Merge pull request #26 from fanc999/master graphene-simd4f.h: Fix MSVC Defines for Intrinistics commit 9c646aa1cb041a76c0afd78c6f9cc903e384594d Author: Emmanuele Bassi Date: Mon Nov 3 10:53:50 2014 +0000 docs: Do not use TRUE We return the C99 stdbool.h `true`, not the GLib `TRUE` macro. src/graphene-simd4f.h | 6 +++--- src/graphene-simd4x4f.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit 7278634149751699c8d40faa3d417f17f41a7d22 Author: Emmanuele Bassi Date: Mon Nov 3 10:52:32 2014 +0000 docs: Add missing symbols to the API reference doc/graphene-sections.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0017d43b59487dc20bd2f68bbbf68699a24b1cde Author: Emmanuele Bassi Date: Mon Nov 3 10:49:43 2014 +0000 docs: Fix the introspection annotations The `vertices` argument is an out parameter. src/graphene-box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ff79e388463aa6613416f5285a951ac8c9bf852c Author: Emmanuele Bassi Date: Mon Nov 3 10:46:45 2014 +0000 Use point3d → vec3 utility function Instead of calling graphene_vec3_init() with each member of the graphene_point3d_t structure. src/graphene-box.c | 8 ++++---- src/graphene-plane.c | 10 +++++----- src/graphene-sphere.c | 24 +++++++++++++----------- 3 files changed, 22 insertions(+), 20 deletions(-) commit b3dd1a317765539b16847c7d3a9e569932484918 Author: Emmanuele Bassi Date: Mon Nov 3 10:35:51 2014 +0000 matrix: Add transform_box() method Transform each vertex of the box and then reconstruct the bounding box from those. src/graphene-matrix.c | 29 +++++++++++++++++++++++++++++ src/graphene-matrix.h | 4 ++++ 2 files changed, 33 insertions(+) commit 2652544c9f8e1f15ecb3d4deecfd330a19ccb338 Author: Emmanuele Bassi Date: Mon Nov 3 10:34:52 2014 +0000 docs: Fix the transform_sphere() stanza Correct a typo, and the Since: tag. src/graphene-matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf247468b305a1ebc684e99f76cebc2d57923d01 Author: Emmanuele Bassi Date: Mon Nov 3 10:34:04 2014 +0000 box: Add getter method for the vertices We are going to use it to transform the box using a matrix. src/graphene-box.c | 29 +++++++++++++++++++++++++++++ src/graphene-box.h | 3 +++ 2 files changed, 32 insertions(+) commit ba751098395f35d85a611fe57134fa4e6277026b Author: Emmanuele Bassi Date: Mon Nov 3 10:21:22 2014 +0000 docs: Add missing documentation to box accessors src/graphene-box.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4cf9ace7a3f42e7bcfbe5abecfa79d77137fd0b4 Author: Emmanuele Bassi Date: Mon Nov 3 10:09:51 2014 +0000 docs: Fix argument name Use the same name as the header, to make the introspection scanner happy. src/graphene-sphere.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 025a7b49dba1a5fa96a556fa798e578aab27bcb6 Author: Emmanuele Bassi Date: Mon Nov 3 10:08:23 2014 +0000 Use arrays of point3d, not arrays of pointers to point3d Allocating point3d is a bit weird, even if we do provide API for it. src/graphene-box.c | 8 ++--- src/graphene-box.h | 98 +++++++++++++++++++++++++-------------------------- src/graphene-sphere.c | 11 +++--- src/graphene-sphere.h | 54 ++++++++++++++-------------- 4 files changed, 85 insertions(+), 86 deletions(-) commit 8a3e86df6277c3ced77fb0e0d52a018b0f60ca6d Merge: 7e86a10 a0670c2 Author: Emmanuele Bassi Date: Mon Nov 3 10:03:28 2014 +0000 Merge pull request #27 from alexlarsson/master Add various things that are needed for GThree commit a0670c26344f36303687498d27d8aa680162504d Author: Alexander Larsson Date: Mon Nov 3 09:29:06 2014 +0100 Add graphene_matrix_transform_sphere Transform a sphere to a bounding sphere for the transformed sphere. Very useful for frustum culling. src/graphene-matrix.c | 31 +++++++++++++++++++++++++++++++ src/graphene-matrix.h | 4 ++++ 2 files changed, 35 insertions(+) commit 44ebb01bbb55dbd356bf2c12cbad3cc6cb57f3c0 Author: Alexander Larsson Date: Mon Nov 3 09:28:23 2014 +0100 Add graphene_sphere_init_from_vectors This is needed for GThree where we have existing meshes with vec3 vertices that we need a bounding sphere for. src/graphene-sphere.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- src/graphene-sphere.h | 5 +++++ 2 files changed, 52 insertions(+), 1 deletion(-) commit b26178136fcd1fdf7bab2fd945a16440c91d5d75 Author: Alexander Larsson Date: Mon Nov 3 09:27:32 2014 +0100 graphene_sphere_t: Add getters for center and radius src/graphene-sphere.c | 31 +++++++++++++++++++++++++++++++ src/graphene-sphere.h | 5 +++++ 2 files changed, 36 insertions(+) commit b18734b27c77dde6d4c5c2b5965ce4bb0d5a5eae Author: Alexander Larsson Date: Mon Nov 3 09:26:10 2014 +0100 Add graphene_box_init_from_vectors src/graphene-box.c | 31 +++++++++++++++++++++++++++++++ src/graphene-box.h | 4 ++++ 2 files changed, 35 insertions(+) commit b119ecc96739749a060d5ab2e978e3b707b50824 Author: Chun-wei Fan Date: Mon Nov 3 15:23:40 2014 +0800 graphene-simd4f.h: Fix MSVC Defines for Intrinistics ... from commit 9b0b22c (simd4f: Add more comparison operators), as the MSVC initrinics calls were not correct (i.e. they should be in-sync with the GCC ones, and a function name was off, which broke the build and the tests. Fix that. p.s. The code in its current state is only buildable with Visual Studio 2013 for Visual Studio. src/graphene-simd4f.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7e86a10259ee424722c752296ae7595402db44fc Author: Emmanuele Bassi Date: Sun Nov 2 17:16:38 2014 +0000 box: Add more utility functions doc/graphene-sections.txt | 3 ++ src/graphene-box.c | 60 +++++++++++++++++++++++++++ src/graphene-box.h | 102 +++++++++++++++++++++++++--------------------- 3 files changed, 119 insertions(+), 46 deletions(-) commit 46eb0c62078ce94affb0dc9602c209849aeff2ff Author: Emmanuele Bassi Date: Sun Nov 2 14:52:25 2014 +0000 sphere: Add more utility functions doc/graphene-sections.txt | 6 ++ src/graphene-sphere.c | 139 +++++++++++++++++++++++++++++++++++++++++++++- src/graphene-sphere.h | 19 +++++++ 3 files changed, 163 insertions(+), 1 deletion(-) commit 314abab3d6aeda81f71e980dea4db5b1c245fbe6 Author: Emmanuele Bassi Date: Sun Nov 2 14:39:47 2014 +0000 box: Add expand_scalar() method We are going to use it inside graphene_sphere_t. doc/graphene-sections.txt | 1 + src/graphene-box.c | 28 +++++++++++++++++++++++++++- src/graphene-box.h | 4 ++++ 3 files changed, 32 insertions(+), 1 deletion(-) commit 104ade3842d7f9a595d09adae0b452aa6bf47f6f Author: Emmanuele Bassi Date: Sun Nov 2 14:21:41 2014 +0000 box: Use vec3 instead of point3d We use vec3 math internally, and converting back and forth between coordinates and vectors is not nearly as nice as converting only at specific entry points. This requires some surgery for the static array of constant boxes, but we can follow the same pattern used for the static array of constant vectors we already have. doc/graphene-sections.txt | 2 + src/graphene-box.c | 219 +++++++++++++++++++++++++++------------------- src/graphene-box.h | 15 ++-- 3 files changed, 141 insertions(+), 95 deletions(-) commit 2047459579988b11b24998c0e5b1551f7582d8d0 Author: Emmanuele Bassi Date: Sun Nov 2 11:53:06 2014 +0000 sphere: Allow passing NULL for the center initializer We can use the zero() vec3 in that case. src/graphene-sphere.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8875d5374c52ca0a7711271e71b6cb6ec66af2bf Author: Emmanuele Bassi Date: Sun Nov 2 11:40:42 2014 +0000 docs: Update the README We provide more types, now. README.md | 4 ++++ 1 file changed, 4 insertions(+) commit 5be159230d6c8f8723f42d71b02afc0520150a94 Author: Emmanuele Bassi Date: Sat Nov 1 15:23:20 2014 +0000 tests: Check for GCC when using typeof() It's a GCC extension; any other compiler, except Clang in GCC compatibility mode, will need to opt it if they support it. src/tests/graphene-test-compat.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 47e8bfdc131c94e0055a2abe7a4f77214953e5aa Author: Emmanuele Bassi Date: Sat Nov 1 15:07:43 2014 +0000 doc: Rename variable to let gtk-doc ignore it It seems gtk-doc gets fairly confused with inlined functions. src/graphene-simd4f.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed7df1c37bbece5bdffc6f9672daa43ee02837f6 Author: Emmanuele Bassi Date: Sat Nov 1 14:59:31 2014 +0000 macro: Put vectorcall macro under the Graphene namespace Like we do with the alignment macro. src/graphene-macros.h | 22 +++++++++++----------- src/graphene-simd4x4f.h | 3 ++- 2 files changed, 13 insertions(+), 12 deletions(-) commit 154b69b6ee7ce2a17d1f6467b9a9698c31216f7a Author: Emmanuele Bassi Date: Sat Nov 1 14:29:50 2014 +0000 frustum: Add sphere intersection query function doc/graphene-sections.txt | 1 + src/graphene-frustum.c | 35 +++++++++++++++++++++++++++++++++++ src/graphene-frustum.h | 4 ++++ 3 files changed, 40 insertions(+) commit 9bdf09ec8ca695dc4d701b5ea0f656aa8ca78f7c Author: Emmanuele Bassi Date: Sat Nov 1 14:23:03 2014 +0000 sphere: Add init function for array of points Similar to how we allow initializing graphene_box_t from an array of points. doc/graphene-sections.txt | 1 + src/graphene-sphere.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-sphere.h | 16 ++++++++---- 3 files changed, 78 insertions(+), 5 deletions(-) commit 0d2bc63c5be9ea75f0b9b61fbde6f95af2c6fd76 Author: Emmanuele Bassi Date: Sat Nov 1 14:08:29 2014 +0000 Add graphene_box_t A 3D box, represented by two vertices. doc/graphene-docs.xml | 9 +- doc/graphene-sections.txt | 30 +++ src/Makefile.am | 2 + src/graphene-box.c | 569 ++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-box.h | 121 ++++++++++ src/graphene-gobject.c | 2 + src/graphene-gobject.h | 5 + src/graphene-types.h | 5 +- src/graphene.h | 5 +- 9 files changed, 740 insertions(+), 8 deletions(-) commit 9b0b22c7bb1e7e2d3017294a40d5cf5cb9de0880 Author: Emmanuele Bassi Date: Sat Nov 1 12:13:15 2014 +0000 simd4f: Add more comparison operators We are going to need API to perform order relation predicates. The added API has an untested ARM NEON implementation. doc/graphene-sections.txt | 4 ++ src/graphene-simd4f.c | 120 +++++++++++++++++++++++++++++++ src/graphene-simd4f.h | 178 ++++++++++++++++++++++++++++++++++++++++++++-- src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/simd.c | 111 +++++++++++++++++++++++++++++ 6 files changed, 410 insertions(+), 5 deletions(-) commit 07dc40b31f0a48a6a4d9c973c00adb804adfca69 Author: Emmanuele Bassi Date: Tue Oct 28 20:00:47 2014 +0000 docs: Add 1.2 symbols index to the API reference doc/graphene-docs.xml | 4 ++++ 1 file changed, 4 insertions(+) commit 9d0b759ce5ade1e756b0794db9b61784509ef60a Author: Emmanuele Bassi Date: Tue Oct 28 20:00:14 2014 +0000 docs: Add 1.0 symbols index to the API reference doc/graphene-docs.xml | 4 ++++ 1 file changed, 4 insertions(+) commit 6bb8c77095d81662d75e46c5acbff919b09704b7 Author: Emmanuele Bassi Date: Tue Oct 28 19:58:27 2014 +0000 Add graphene_sphere_t A representation of a sphere. Does not do much, at the moment. doc/graphene-docs.xml | 1 + doc/graphene-sections.txt | 10 ++++++ src/Makefile.am | 2 ++ src/graphene-gobject.c | 2 ++ src/graphene-gobject.h | 5 +++ src/graphene-sphere.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-sphere.h | 62 ++++++++++++++++++++++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 9 files changed, 175 insertions(+) commit 888436311b77f02c90fcd5ad6815cf31683719be Author: Emmanuele Bassi Date: Tue Oct 28 19:51:45 2014 +0000 docs: Add graphene-frustum to the API reference index doc/graphene-docs.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ccd91619134f3dc409a16b9c4580318cf72f5128 Author: Emmanuele Bassi Date: Tue Oct 28 17:41:45 2014 +0000 docs: Add missing symbols for GObject integration doc/graphene-sections.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 677a0cd0bfa4566578cdd0c5388a617a0414d3f0 Author: Emmanuele Bassi Date: Tue Oct 28 12:18:17 2014 +0000 plane: Add annotations for alloc() The graphene_plane_alloc() function is a constructor, and it needs to be marked as such. src/graphene-plane.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8d4ccd3dcacf79d1d206339168233caf034b9f39 Author: Emmanuele Bassi Date: Tue Oct 28 12:16:34 2014 +0000 gobject: Add plane and frustum GTypes src/graphene-gobject.c | 4 ++++ src/graphene-gobject.h | 10 ++++++++++ 2 files changed, 14 insertions(+) commit 56fa66ccf4dec2052787cacdd160fccff21155ca Author: Emmanuele Bassi Date: Tue Oct 28 12:13:29 2014 +0000 Add graphene_frustum_t The graphene_frustum_t is a structure representing a viewing frustum as 6 planes (top, bottom, left, right, z_near, and z_far). doc/graphene-sections.txt | 11 +++ src/Makefile.am | 2 + src/graphene-frustum.c | 220 ++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-frustum.h | 78 ++++++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 6 files changed, 313 insertions(+) commit da0e4b14ced628bac00f0a0cabf4474ffbf99623 Author: Emmanuele Bassi Date: Tue Oct 28 11:51:12 2014 +0000 alloc: Add an alloc() variant that 0-fills the memory Similar to calloc(), just in case we want to guarantee that all our alloc() functions return zero-filled memory, like GLib does. src/graphene-alloc-private.h | 3 +++ src/graphene-alloc.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) commit 03a4aacf5faae02820f3e611fa1386713b6c62f4 Author: Emmanuele Bassi Date: Tue Oct 28 11:49:57 2014 +0000 alloc: Return NULL if G_DISABLE_ASSERT is set We only print an error and abort() if assertions are disabled; otherwise, we simply return NULL and let the error bubble up. src/graphene-alloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 337f740c88e54fca724f82975f87b99a2fa5de25 Author: Emmanuele Bassi Date: Tue Oct 28 10:32:55 2014 +0000 plane: Remove unnecessary include src/graphene-plane.c | 2 -- 1 file changed, 2 deletions(-) commit ec7f4a5a394aad773341a6d2b269fe1219b71048 Merge: 46bd21e 9f138bd Author: Emmanuele Bassi Date: Sat Nov 1 14:48:00 2014 +0000 Merge pull request #25 from fanc999/master Allow Build of Graphene on Visual Studio commit 9f138bdeed8cb83712cfb613419ff953a2ba6bbc Author: Chun-wei Fan Date: Sat Nov 1 10:56:45 2014 +0800 graphene-macros.h: Make VECTORCALL Define More Readable Make the define clearer, only for MSVC 2013+ and MSVC 2013+ X86 builds, otherwise define to nothing. src/graphene-macros.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7eafa91e1b58291a2c9b7d9ef9fbeb00a0d5c7cb Author: Chun-wei Fan Date: Sat Nov 1 00:24:36 2014 +0800 Clean up Previous Commit A Bit Visual Studio does not normally set _M_AMD64 automatically, so don't check for that. src/graphene-macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8f3cd91ee8dac7010200eba1ab99eef92a35611 Author: Chun-wei Fan Date: Fri Oct 31 19:59:48 2014 +0800 Enable SSE Intrinistics on MSVC 2013+ 32-bit Builds Use __vectorcall on graphene_simd4x4f_init() on MSVC 2013 (and later) 32-bit builds so that SSE intrinistics can be enabled on 32-bit builds for recent MSVC versions. Also, as Emmanuele suggested, move the VECTORCALL macro definition into graphene-macros.h. src/graphene-macros.h | 7 +++++++ src/graphene-simd4x4f.h | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) commit aab47cdf85f35722663ce2a103089e3a55688b57 Author: Chun-wei Fan Date: Fri Oct 31 19:29:27 2014 +0800 graphene-test-compat.h: Remove MSVC 2010+ Code Path Apparently decltype is only available for C++, so it won't work for plain C programs, so remove the MSVC 2010+ codepath that was trying to use it. src/tests/graphene-test-compat.h | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit f67cccf50823505e1b2be4d35920fc8d09e81d9e Author: Chun-wei Fan Date: Wed Oct 29 21:18:40 2014 +0800 graphene-sim4df.h: Fix typo Sorry for my not-too-good English, fixed: reciprocol->reciprocal. src/graphene-simd4f.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0a40136992cb59dd1389272884c0e8959c3eb6c6 Author: Chun-wei Fan Date: Wed Oct 29 21:14:42 2014 +0800 bench/matrix.c: Update g_free->free Use free() instead of g_free() according to Emmanuele's suggestions, since we are using the system allocator. src/bench/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4452658e59e5098aeec47c6db3e3d950d98b45a1 Author: Chun-wei Fan Date: Wed Oct 29 17:09:23 2014 +0800 graphene-bench-utils.h: Export Symbols Via Compiler Attributes Decorate the symbols in the headers so that the symbols can be exported, as graphene-bench-utils.c needs to be built as a DLL. src/bench/graphene-bench-utils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 76abd19fbc4f3ebb912f947f7aad7f55e7ae7cb7 Author: Chun-wei Fan Date: Wed Oct 29 17:11:32 2014 +0800 Benchmark: Allow Aligned Allocation on MSVC MSVC supports aligned allocation via _aligned_malloc(), which is similar to aligned_alloc(), but with the parameters inverted. Also, on MSVC, whatever that is allocated with _aligned_malloc() must be freed with _aligned_free(), otherwise the program will abort() internally by the CRT. src/bench/matrix.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit a0d86bbe71ac11e48c5732b3dbf2d79b96efba5d Author: Chun-wei Fan Date: Wed Oct 29 17:07:41 2014 +0800 tests/graphene-test-compat.h: Allow Build on MSVC Define graphene_assert_fuzzy_equals that is suitable on Visual Studio builds, as it does not support typeof, and there are some differences in syntax. Later Visual Studio versions support similar functionality with decltype. src/tests/graphene-test-compat.h | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) commit 4eb460c7a19f06b82b17fa2a815bf27c60894679 Author: Chun-wei Fan Date: Wed Oct 29 17:04:33 2014 +0800 graphene-simd4x4f.h: Allow Build On Visual Studio Fix the initialization in graphene_simd4x4f_init() so that compilers will be happy with the types, and add a definition for graphene_simd4x4f_transpose_in_place(s) that is suitable for Visual Studio when we have SSE2 intrinistic support. The SSE2 initrinistic support, due to ABI issues, like the GCC builds, are only supported on x64 builds, and possibly x86 builds on MSVC 2013 and later using __vectorcall. src/graphene-simd4x4f.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit b8fb6659fd02a8146ccad075bf07373f64b15d56 Author: Chun-wei Fan Date: Wed Oct 29 17:01:10 2014 +0800 graphene-alloc.c: Allow aligned_alloc Behaviour on MSVC MSVC supports aligned memory allocation, but with some differences, namely: -It uses _aligned_malloc(), which does the same thing but with inverted parameters with aligned_alloc(). -Memory allocated with _aligned_malloc() must be freed with _aligned_free(), otherwise the program will abort. src/graphene-alloc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 681aace1c41ffe1400c05353b894bf142571678c Author: Chun-wei Fan Date: Wed Oct 29 16:58:41 2014 +0800 graphene-line-segment.h: Allow Build on MSVC MSVC is quite picky about types in regards to initialization, so split up the initialization line to make everyone happy. src/graphene-line-segment.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c24df0ec6117c21cf01120b71653b8e2b08b6b8d Author: Chun-wei Fan Date: Wed Oct 29 16:57:44 2014 +0800 graphene-simd4f.h: Define Macros for MSVC Builds ...when it is possible to build the libraries with SSE2 intrinistics on Visual Studio. It is more or less like the SSE2/GCC version, but due to syntactical differences we need to define these as macros for Visual Studio, and there are still a some differences when we convert between __m128 and __m128i. src/graphene-simd4f.h | 235 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 233 insertions(+), 2 deletions(-) commit 0fc1c0212d674f1fe26c39a18cb55206c8747fdf Author: Chun-wei Fan Date: Wed Oct 29 16:53:04 2014 +0800 graphene-macros.h: Fix MSVC Compilation Fix the typedef line when we don't have stdbool.h on Visual Studio, and include stdbool.h on Visual Studio 2013 and later, as it does ship with it. src/graphene-macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 46bd21e96f8d325c559209dd057797b59ddbc9fc Author: Emmanuele Bassi Date: Tue Oct 28 10:25:05 2014 +0000 build: Bump up the version We added new API, and we already branched, so we need to bump up the configure.ac version. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 66044b72f20836980da15564588f1270dc8e6552 Author: Emmanuele Bassi Date: Tue Oct 28 10:24:45 2014 +0000 plane: Add more initializers doc/graphene-sections.txt | 2 ++ src/graphene-plane.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-plane.h | 9 +++++++ 3 files changed, 78 insertions(+) commit eb4424662533581e7d922fc2fca6b8413c02d249 Author: Emmanuele Bassi Date: Tue Oct 28 10:04:09 2014 +0000 Fix typo in the comment src/graphene-point3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b380a8531ebe042d9286664678c6502cc630762 Author: Emmanuele Bassi Date: Mon Oct 27 18:10:19 2014 +0000 Add a plane type Planes are useful in fully 3D canvases, as they can be used for things like frustum-based culling. The graphene_plane_t data structure represents a plane via a normal vector pointing towards the origin of the plane; and a constant value representing the distance from the origin along the normal vector. doc/graphene-docs.xml | 1 + doc/graphene-sections.txt | 16 +++ src/Makefile.am | 2 + src/graphene-plane.c | 261 ++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-plane.h | 90 ++++++++++++++++ src/graphene-types.h | 2 + src/graphene.h | 1 + 7 files changed, 373 insertions(+) commit 06e4e092f0019a00a92cb6b497abfdecffafe992 Author: Emmanuele Bassi Date: Mon Oct 27 18:06:44 2014 +0000 vec: Add equality check function We want to check if two vectors are the same, or have the same values. doc/graphene-sections.txt | 3 ++ src/graphene-vec2.h | 3 ++ src/graphene-vec3.h | 3 ++ src/graphene-vec4.h | 3 ++ src/graphene-vectors.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+) commit a0e382a93377950b6f84d77d33e0c6e3729ce96b Author: Emmanuele Bassi Date: Mon Oct 27 17:57:23 2014 +0000 docs: Fix typo src/graphene-vectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a3fa30523b032ad7342a421feb5d04cfa0e9986 Author: Emmanuele Bassi Date: Mon Oct 27 17:57:07 2014 +0000 vec: Add negate() operator doc/graphene-sections.txt | 3 +++ src/graphene-vec2.h | 4 ++++ src/graphene-vec3.h | 3 +++ src/graphene-vec4.h | 3 +++ src/graphene-vectors.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ src/tests/vec2.c | 13 +++++++++++++ src/tests/vec3.c | 14 ++++++++++++++ src/tests/vec4.c | 15 +++++++++++++++ 8 files changed, 103 insertions(+) commit d98aa3c15f16343832cb836aecf25cc59848dbcf Author: Emmanuele Bassi Date: Mon Oct 27 15:08:45 2014 +0000 quaternion: Check out arguments They are not documented as being optional, but we can relax the requirement in the future, if needed. src/graphene-quaternion.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 62eace6b683f0c917b26bb49e8aea44921e61330 Author: Emmanuele Bassi Date: Mon Oct 27 15:08:21 2014 +0000 quaternion: Use deg-to-rad macro src/graphene-quaternion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b4e5ef1cf00db7ac5cae46acc39a397ec0e74346 Author: Emmanuele Bassi Date: Mon Oct 27 15:03:49 2014 +0000 quaternion: Add to_angles() conversion We have initializers from various formats (Euler angles, angle/axis, matrix), but we are missing a conversion function from quaternion to Euler angles. doc/graphene-sections.txt | 3 +- src/graphene-private.h | 3 ++ src/graphene-quaternion.c | 82 +++++++++++++++++++++++++++++++++++++++++++---- src/graphene-quaternion.h | 11 +++++-- src/tests/.gitignore | 1 + src/tests/Makefile.am | 9 +++--- src/tests/quaternion.c | 28 ++++++++++++++++ 7 files changed, 122 insertions(+), 15 deletions(-) commit ad9a6fba9e33c5b3449a94ad65397fafa121d0d0 Author: Emmanuele Bassi Date: Thu Oct 23 23:08:57 2014 +0100 tests: Macro-ize compare_matrices() This way, we'll print out the location of the assertion failure in the right place. src/tests/matrix.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) commit 7d2c3a6164db13f893336bcb33f94fd95c57a324 Merge: bf485a6 d3f261b Author: Emmanuele Bassi Date: Thu Oct 23 23:07:59 2014 +0100 Merge pull request #23 from alexlarsson/master Fix matrix inversion typo commit d3f261b568acd60fcb18718ad3756ee830a75b74 Author: Alexander Larsson Date: Thu Oct 23 23:38:26 2014 +0200 Add matrix invert test to verify previous fix src/tests/matrix.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit 808165f423e38a7ea143dd2d4a0ac62e726e246d Author: Alexander Larsson Date: Thu Oct 23 23:37:04 2014 +0200 Fix typo in graphene_simd4x4f_inverse The destination variable is called "...yzwx", but it was multiplying by wxyz... src/graphene-simd4x4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bf485a639aa65680e65848eb7dbd10f41e6d0ce0 Merge: 5643581 aed5580 Author: Emmanuele Bassi Date: Thu Oct 23 12:50:41 2014 +0100 Merge pull request #22 from alexlarsson/master Add matrix_look_at_testcase commit aed55806ac1529b8690f844d7ca5684411edb6dc Author: Alexander Larsson Date: Thu Oct 23 13:22:34 2014 +0200 Add matrix_look_at_testcase src/tests/matrix.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) commit 5643581f1a7b78e63b395db029e193202d368475 Author: Emmanuele Bassi Date: Wed Oct 22 18:58:03 2014 +0100 build: Look for NEON intrinsics instead of assembly We're checking for availability of ARM NEON assembly in order to determine whether or not we can use NEON instructions; at the same time, we're not using assembly anywhere, and we're instead relying on the existence of the NEON intrinsics. There's the chance of false positives out there — toolchains that only have ARM NEON assembly but no intrinsics supported — so we need to be more explicit as to what we look for and use. If, at some point, we'll have assembly versions of the NEON SIMD implementation then we'll add the assembly check back. configure.ac | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 942c36fab4af2cbd9e5db189ca8130c4f6312e3a Author: Emmanuele Bassi Date: Wed Oct 22 18:56:43 2014 +0100 build: Check for sed before using $SED configure.ac | 2 ++ 1 file changed, 2 insertions(+) commit f62554b8e878a8002926e3137f6d842687d52a67 Merge: 7f0562e a765eb4 Author: Emmanuele Bassi Date: Wed Oct 22 15:07:23 2014 +0100 Merge pull request #20 from ebassi/issues/12 build: Add -mfloat-abi=softfp on Android commit 7f0562e6a68ef4f3eeffe80e4214ae2d7f4fc959 Merge: 3fd354b 8b3262b Author: Emmanuele Bassi Date: Wed Oct 22 15:06:46 2014 +0100 Merge pull request #19 from ebassi/issues/18 matrix: Add point3d transformation commit 8b3262b3ffb560871d4a120d56df110b79c532b4 Author: Emmanuele Bassi Date: Tue Oct 21 19:49:04 2014 +0100 matrix: Add point3d transformation Issue: #18 doc/graphene-sections.txt | 1 + src/graphene-matrix.c | 28 ++++++++++++++++++++++++++++ src/graphene-matrix.h | 4 ++++ 3 files changed, 33 insertions(+) commit 3fd354b9185df30c6e2f086eea206a357d616c17 Merge: 9710220 04b9592 Author: Emmanuele Bassi Date: Wed Oct 22 14:59:23 2014 +0100 Merge pull request #17 from ebassi/issue/16 Issue/16 commit 04b95928cb82e85707ed84d40757d434f4653af0 Author: Emmanuele Bassi Date: Tue Oct 21 13:05:31 2014 +0100 docs: Add newly introduced scale() vec operator Issue: #16 doc/graphene-sections.txt | 3 +++ 1 file changed, 3 insertions(+) commit 2404856a56cedce742354d6723ef0669365c6860 Author: Emmanuele Bassi Date: Tue Oct 21 13:03:49 2014 +0100 vectors: Add scalar multiplication Add an operator that allows multipling all our vector types with a scalar value. Issue: #16 src/graphene-vec2.h | 4 ++++ src/graphene-vec3.h | 4 ++++ src/graphene-vec4.h | 5 +++++ src/graphene-vectors.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/tests/vec2.c | 13 ++++++++++++ src/tests/vec3.c | 14 +++++++++++++ src/tests/vec4.c | 15 ++++++++++++++ 7 files changed, 109 insertions(+) commit 853cd9005045da1d3bc5b057f2d36dfd13af3e1c Author: Emmanuele Bassi Date: Tue Oct 21 13:03:11 2014 +0100 Add 1.2 version macros Issue: #16 src/graphene-version-macros.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 9710220b776842eb6500c499894bc6b81559fd30 Merge: 7bb475a 0088b7f Author: Emmanuele Bassi Date: Mon Oct 20 13:58:08 2014 +0100 Merge pull request #15 from alexlarsson/master Fix graphene_quaternion_init_from_angles calculations commit 0088b7f238239bfb6f80b6030ad957d99f3746be Author: Alexander Larsson Date: Mon Oct 20 14:36:05 2014 +0200 Fix graphene_quaternion_init_from_angles calculations This was just wrong (did not even set z!) This implementation is the same as the one in three.js: https://github.com/mrdoob/three.js/blob/master/src/math/Quaternion.js#L119 src/graphene-quaternion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7bb475ad7d10b850d9f3fad78663eb7a66b3c282 Author: Emmanuele Bassi Date: Mon Oct 20 10:41:47 2014 +0100 quaternion: Fix the → matrix conversion The w row vector should be [ 0, 0, 0, 1 ]. src/graphene-quaternion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a765eb4981abf73dec778de894eebdaf21cfd381 Author: Emmanuele Bassi Date: Thu Sep 25 17:25:23 2014 +0100 build: Add -mfloat-abi=softfp on Android It seems that Android requires `-mfloat-abi=softfp -mfpu=neon` in the compilation flags in order to use the NEON instructions, even if the configure time check passes with `-mfpu=neon` alone. [ebassi/graphene#12] configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 109c2c866b3454b750f131cd3760b893237d80e4 Author: Emmanuele Bassi Date: Thu Sep 25 17:04:27 2014 +0100 Post-release version bump to 1.0.1 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6ccebbf7153392b63759e911add15e22bdec6801 Author: Emmanuele Bassi Date: Thu Sep 25 17:02:36 2014 +0100 Release Graphene 1.0.0 First API stable release in the 1.0 series; from now on, no API or ABI changes are allowed. configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8e11ee162f0bb9411ccf69156d241f5ffc9bbf4a Author: Emmanuele Bassi Date: Thu Sep 25 12:15:05 2014 +0100 bench: Ensure the right compiler/linker flags are used Since we're making the benchmark test suite access the SIMD instructions directly, we need to specify the compiler and linker flags in the build; only using GLib's compiler and linker flags won't help. [ebassi/graphene#13] src/bench/Makefile.am | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit a4868bb8fa906b4eec9d9cc58619e40f8496ae24 Author: Emmanuele Bassi Date: Thu Sep 25 12:06:13 2014 +0100 alloc: Quell a compiler warning in a fallback path The err variable should be set in all conditional branches. src/graphene-alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cf84ce971bfd0df66fa2d17f375e349949e02c66 Author: Emmanuele Bassi Date: Thu Sep 25 12:00:39 2014 +0100 build: Remove all optimization toggles from CFLAGS Some build environments inject optimization flags in the CFLAGS variable, but we really don't want that to happen for Graphene, since we're setting -O3 ourselves in our base CFLAGS. configure.ac | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 40994fae93406dc0da72352f834fd61ea2907cee Author: Emmanuele Bassi Date: Sat Aug 9 20:04:03 2014 +0100 macros: Ignore our boolean type when generating introspection We will be generating introspection data on capable compilers. src/graphene-macros.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 1267286679c2b27b556d654b3abe24044980803c Author: Emmanuele Bassi Date: Fri Aug 8 17:21:38 2014 +0100 macros-private: Force the bool result in likely/unlikely The semantics for __builtin_expect() are that the expression matches the constant, so we need to ensure that. src/graphene-private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e9f6112337db0f86c613a502a57a16d3473b2a7f Author: Emmanuele Bassi Date: Fri Aug 8 17:20:32 2014 +0100 macros-private: Check for __GNUC__ being set src/graphene-private.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3794ea088e3be1e9462ae6c77e02d50aae070fc5 Author: Emmanuele Bassi Date: Tue Aug 5 19:08:16 2014 +0100 simd4f: Escape local variables in NEON paths Like we do for other macro-ized API, to avoid shadowing. src/graphene-simd4f.h | 105 +++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 52 deletions(-) commit 850a898d4109f5e9263ff5c61832b826ee6b6376 Author: Emmanuele Bassi Date: Tue Aug 5 19:07:39 2014 +0100 simd4f: Fix GCC implementation of sqrt() We need to take all the channels, not just the first. src/graphene-simd4f.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 80de90703b6f210a5fa19207d586fb683a790ab6 Author: Emmanuele Bassi Date: Tue Aug 5 16:38:14 2014 +0100 simd4f: Fix compilation for ARM NEON paths If code at least builds it has a fighting chance of actually doing something, as opposed to not being able to do even that. src/graphene-simd4f.h | 74 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit 2e08924a76547e10e722aab7d57d000ad8d2c348 Author: Emmanuele Bassi Date: Tue Aug 5 16:38:00 2014 +0100 Fix compiler warning src/graphene-simd4x4f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40611ea8fa0659e280f29c42623121ad0e32e49a Author: Emmanuele Bassi Date: Tue Aug 5 16:37:06 2014 +0100 Include stdlib.h We use allocator functions, so we need the header that provides them and not assume that the platform will do that for us. src/graphene-private.h | 1 + 1 file changed, 1 insertion(+) commit 4f8567f3ae4372528a4d72e13956f36e786b9500 Author: Emmanuele Bassi Date: Sun Jul 27 13:15:10 2014 +0100 Remove misleading comment The SIMD matrix equivalency with GL is actually confusing readers. The origin of the comment can be traced in the 3D matrix type inside Gecko: > This matrix is treated as row-major. Assuming we consider our vectors > row vectors, this matrix type will be identical in memory to the > OpenGL and D3D matrices. OpenGL matrices are column-major, however > OpenGL also treats vectors as column vectors, the double transposition > makes everything work out nicely. Graphene uses the same strategy of using row vectors, given that we are operating on them through SIMD instructions. src/graphene-simd4x4f.h | 4 ---- 1 file changed, 4 deletions(-) commit 7cf16b1790603a775ad560be7387ad8231644ffe Author: Emmanuele Bassi Date: Mon Jul 7 13:24:04 2014 +0100 docs: Fix configuration switch name in the README README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4dfcdb7031c30b5ed4a939f2e2b5062f7673b2c9 Author: Emmanuele Bassi Date: Mon Jul 7 12:57:39 2014 +0100 build: Add configuration variables to the pkg-config file We list the platform-specific flags for SIMD types that we used to build Graphene, as well as the list of SIMD types enabled. This allows feature discovery for client code. src/graphene.pc.in | 3 +++ 1 file changed, 3 insertions(+) commit 942c08444883cbfd9ae6a6f3ec881e7fc83f184f Author: Emmanuele Bassi Date: Mon Jul 7 12:56:59 2014 +0100 build: Add a variable listing the SIMD implementations We can use it for feature discovery if we expose it in the pkg-config file. configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 11e8d01d41a42c3e88a20f1ef0f3680f583ac3a2 Author: Emmanuele Bassi Date: Mon Jul 7 12:55:41 2014 +0100 build: Remove global flags from benchmarking suite We don't need the full Graphene compiler and linker flags: we only need GLib for building the benchmarking test suite. src/bench/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 19f4ed337c4d941aaa9e23747476c1d861aa9bca Author: Emmanuele Bassi Date: Tue Jul 1 00:34:32 2014 +0100 Drop GLib as a hard dependency We can build Graphene without GLib, now. This means that Graphene can drop the hard requirement on GLib in its pkg-config file as well. GLib is still required for: • building GObject types • building the test suite • building the benchmark suite • building the API reference, by way of requiring the GObject types but it's possible to disable all of the above at configure time. README.md | 4 +--- configure.ac | 51 +++++++++++++++++++++++++++++++++++++++++---------- src/bench/Makefile.am | 4 ++-- src/graphene-types.h | 1 - src/tests/Makefile.am | 4 ++-- 5 files changed, 46 insertions(+), 18 deletions(-) commit 55992d779e27600d1c7cf9cc0c2fcd4436979f9b Author: Emmanuele Bassi Date: Tue Jul 1 00:32:41 2014 +0100 Replace G_GNUC_EXTENSION with __extension__ We're already protected by GNUC checks, so we're sure we're going to compile the code using the GCC __extension__ symbol using GCC or a GCC-compatible compiler. src/graphene-simd4f.h | 242 ++++++++++++++++++++++++------------------------ src/graphene-simd4x4f.h | 4 +- 2 files changed, 122 insertions(+), 124 deletions(-) commit 3423bcc1a0b686a722865af3b281e8c066fa6311 Author: Emmanuele Bassi Date: Tue Jul 1 00:31:54 2014 +0100 matrix: Remove g_print() Use fprintf() instead. src/graphene-matrix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b00884588236ed68c6172beb9ed478aa7ced50f8 Author: Emmanuele Bassi Date: Mon Jun 30 23:57:56 2014 +0100 docs: Do not parse graphene-private.h doc/Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 1e91822239fdbe0196134a7a1db107d54f548b5d Author: Emmanuele Bassi Date: Mon Jun 30 23:56:44 2014 +0100 Replace GLib macros with our own We use only a few of them, and we can re-implement them in a private header. src/Makefile.am | 1 + src/graphene-alloc.c | 3 +- src/graphene-macros.h | 32 +++++++++++++++--- src/graphene-matrix.c | 2 +- src/graphene-point.c | 7 ++-- src/graphene-point3d.c | 9 +++-- src/graphene-private.h | 79 +++++++++++++++++++++++++++++++++++++++++++ src/graphene-quad.c | 3 +- src/graphene-quaternion.c | 7 ++-- src/graphene-rect.c | 7 ++-- src/graphene-simd4f.c | 5 ++- src/graphene-simd4x4f.c | 5 ++- src/graphene-size.c | 5 ++- src/graphene-vectors.c | 3 +- src/graphene-version-macros.h | 23 +++++++------ 15 files changed, 143 insertions(+), 48 deletions(-) commit 385e0ab1765d21e290f8cc226291a65b87206bf6 Author: Emmanuele Bassi Date: Mon Jun 30 23:46:08 2014 +0100 Remove g_return/g_assert We fly without safety net underneath the trapeze. src/graphene-matrix.c | 131 ++------------------------------------ src/graphene-point.c | 18 ------ src/graphene-point3d.c | 35 ----------- src/graphene-quad.c | 15 ----- src/graphene-quaternion.c | 39 ------------ src/graphene-rect.c | 42 ------------- src/graphene-size.c | 16 ----- src/graphene-vectors.c | 156 ---------------------------------------------- 8 files changed, 4 insertions(+), 448 deletions(-) commit d59904e5c8d054decb36436d8a927fd4c7525fc3 Author: Emmanuele Bassi Date: Mon Jun 30 23:12:44 2014 +0100 Replace `gboolean` with `bool` Chip away another bit of the GLib dependency. src/graphene-line-segment.h | 6 ++--- src/graphene-macros.h | 8 ++++++ src/graphene-matrix.c | 64 ++++++++++++++++++++++----------------------- src/graphene-matrix.h | 12 ++++----- src/graphene-point.c | 16 ++++++------ src/graphene-point.h | 6 ++--- src/graphene-point3d.c | 16 ++++++------ src/graphene-point3d.h | 4 +-- src/graphene-quad.c | 8 +++--- src/graphene-quad.h | 2 +- src/graphene-quaternion.c | 8 +++--- src/graphene-quaternion.h | 2 +- src/graphene-rect.c | 30 ++++++++++----------- src/graphene-rect.h | 8 +++--- src/graphene-simd4f.c | 12 ++++----- src/graphene-simd4f.h | 46 ++++++++++++++++---------------- src/graphene-simd4x4f.h | 12 ++++----- src/graphene-size.c | 8 +++--- src/graphene-vectors.c | 12 ++++----- 19 files changed, 144 insertions(+), 136 deletions(-) commit 3498b7f3dc18aa2c4f168acb479480378c96fc9e Author: Emmanuele Bassi Date: Mon Jun 30 22:53:39 2014 +0100 alloc: Drop GLib code Use size_t, fprintf(), abort(), and strerror(). src/graphene-alloc-private.h | 10 ++++++---- src/graphene-alloc.c | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 18 deletions(-) commit 2261fdf438ae05aa545f738292f0355bb02bae14 Author: Emmanuele Bassi Date: Mon Jun 30 22:40:54 2014 +0100 Replace G_(BEGIN|END)_DECLS with out own If we want to drop the hard dependency on GLib, we can start with this. src/graphene-alloc-private.h | 6 +++--- src/graphene-macros.h | 8 ++++++++ src/graphene-matrix.h | 4 ++-- src/graphene-point.h | 4 ++-- src/graphene-point3d.h | 4 ++-- src/graphene-quad.h | 4 ++-- src/graphene-quaternion.h | 4 ++-- src/graphene-rect.h | 4 ++-- src/graphene-simd4f.h | 4 ++-- src/graphene-simd4x4f.h | 4 ++-- src/graphene-types.h | 4 ++-- src/graphene-vec2.h | 4 ++-- src/graphene-vec3.h | 4 ++-- src/graphene-vec4.h | 4 ++-- 14 files changed, 35 insertions(+), 27 deletions(-) commit 59c07780f29819eab8fba1912b6e1631bbcbbb25 Author: Emmanuele Bassi Date: Fri Jul 4 17:37:08 2014 +0100 quaternion: Make struct fields private We don't allow direct access to the fields of complex, vector-based types. src/graphene-quaternion.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9774e14097dad4a7af4f587d941a8f7bbe5d0142 Author: Emmanuele Bassi Date: Fri Jul 4 17:26:17 2014 +0100 docs: Note about non-commutativity of matrix multiplication If I can get it wrong, other people might. src/graphene-matrix.c | 3 +++ 1 file changed, 3 insertions(+) commit bafada59b2e0189eab07937895cc2006bbcdbfec Author: Emmanuele Bassi Date: Fri Jul 4 17:25:33 2014 +0100 matrix: Use the right order for multiply() operands Inside interpolate() we're multiplying two matrices with the wrong order. src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 330bc84be2b7666cb003b7ada13c572a2f5efb4c Author: Emmanuele Bassi Date: Fri Jul 4 17:10:14 2014 +0100 simd4x4f: Use vec4_mul() instead of unrolling it inside matrix_mul() Now that we can follow what the code does, we can go back to calling vec4_mul() from matrix_mul(). src/graphene-simd4x4f.h | 55 ++++++++++--------------------------------------- 1 file changed, 11 insertions(+), 44 deletions(-) commit 7af2acb8b1a5b756032eee79388a68fcf9ead870 Author: Emmanuele Bassi Date: Fri Jul 4 16:51:53 2014 +0100 simd4x4f: Simplify the matrix/vector multiplications Rearrange the operations so that it's easy to follow what they are doing, and avoid nesting too deep. The previous code does: add (mul (), add (mul (), add (mul (), mul ()))) which maps to: mul() ⎫ ⎬ add() ⎫ mul() ⎭ ⎬ add() ⎫ mul() ⎭ ⎬ → res mul() ⎭ In order to make it easier to follow, we can rewrite it as: add (add (mul (), mul ()), add (mul (), mul ())) which more intuitively maps to: mul() ⎫ ⎬ add() ⎫ mul() ⎭ ⎪ ⎬ add() → res mul() ⎫ ⎪ ⎬ add() ⎭ mul() ⎭ and it lends itself to a better indentation. src/graphene-simd4x4f.h | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 1cad9c53216e07e839afad6b004044c7a02f1d4d Author: Emmanuele Bassi Date: Thu Jul 3 17:05:56 2014 +0100 build: Clean up docs `publish` rule doc/Makefile.am | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cc5efe2ddc07f3ec569a4d7eba0320ef9ac6c77c Author: Emmanuele Bassi Date: Thu Jul 3 16:50:15 2014 +0100 docs: Link the API reference from the README README.md | 3 +++ 1 file changed, 3 insertions(+) commit 48daf510c7ceab836de8d3fdfd21b2794c24e6e4 Author: Emmanuele Bassi Date: Thu Jul 3 16:49:09 2014 +0100 build: Add a `publish` target for docs doc/Makefile.am | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit e3ed9c9fd462b5538e6d5e2c14f39ba958e89d81 Author: Emmanuele Bassi Date: Thu Jul 3 15:48:59 2014 +0100 matrix: Use the right order for the multiplication operands Multiply the existing matrix with the transformation matrix, now that the low level matrix multiplication does the right thing. src/graphene-matrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit cecf4bc34414792328ce9b61a040664fad4be196 Author: Emmanuele Bassi Date: Thu Jul 3 15:39:47 2014 +0100 simd4x4f: Improve the matrix multiplication The current implementation using matrix-vector multiplication gets the non-commutativity wrong, plus it's not entirely clear. I decided to rewrite it from scratch starting from a naive implementation that does the classic row times column multiplication; unsurprisingly, this approach is also fairly slow compared to the current implementation, especially when it comes to the scalar SIMD implementation fallback code. On the plus side, the naive implementation is actually correct. From the correct implementation, I reduced the coded by skipping the transpose operation, instead opting for four dot products per row; this approach maintains correctness, while speeding up all cases by a factor of two, and bringing us back to the same levels of the current implementation. src/graphene-simd4x4f.h | 92 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 4 deletions(-) commit d1eb4992d56128226f74b9e9d4c0a4f802a478da Author: Emmanuele Bassi Date: Thu Jul 3 15:33:05 2014 +0100 simd4f: Add sum_scalar() operator Same as sum(), but returns a scalar value and does not require the caller to call get_x(). doc/graphene-sections.txt | 1 + src/graphene-simd4f.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) commit 6ba1d6ec379d83e291a5285996023436d6a43379 Author: Emmanuele Bassi Date: Wed Jul 2 12:49:59 2014 +0100 Better link for the Travis CI badge README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2bb4c48f69fb4d856fa0623ef95802fa7598ae0 Author: Emmanuele Bassi Date: Wed Jul 2 12:44:29 2014 +0100 tests: Use fuzzy float comparison where appropriate This should make the test suite slightly more stable in the face of fuzziness in the floating point operations. src/tests/matrix.c | 19 +++++++------------ src/tests/point.c | 4 +++- src/tests/vec2.c | 19 +++++++++++-------- src/tests/vec3.c | 21 +++++++++++++-------- src/tests/vec4.c | 13 ++++++------- 5 files changed, 40 insertions(+), 36 deletions(-) commit 1efe7fa345f5ab9fb75ecf6f7109c2f1fd9ec4a0 Author: Emmanuele Bassi Date: Wed Jul 2 12:43:46 2014 +0100 tests: Add a fuzzy comparison macro We use something like this in the matrix test suite, but it's useful for other types. src/tests/graphene-test-compat.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ddba5ac8f339e86b9813d24fdca37889ce78a9b4 Author: Emmanuele Bassi Date: Tue Jul 1 01:57:12 2014 +0100 Add the nice travis widget to the README README.md | 2 ++ 1 file changed, 2 insertions(+) commit 19d203753e9e23205c3b0c1179dd74ba0e76000a Author: Emmanuele Bassi Date: Tue Jul 1 01:51:11 2014 +0100 tests: Add backward compat symbols We use symbols from GLib 2.40, but we can provide backward compatibility macros for them. src/tests/Makefile.am | 2 ++ src/tests/graphene-test-compat.h | 8 ++++++++ src/tests/matrix.c | 2 ++ src/tests/point.c | 2 ++ src/tests/point3d.c | 2 ++ src/tests/quad.c | 2 ++ src/tests/rect.c | 2 ++ src/tests/size.c | 2 ++ src/tests/vec2.c | 2 ++ src/tests/vec3.c | 2 ++ src/tests/vec4.c | 2 ++ 11 files changed, 28 insertions(+) commit abd9e66d5c5d0f1ff7f8abe49147796f526eb306 Author: Emmanuele Bassi Date: Tue Jul 1 01:42:20 2014 +0100 matrix: Avoid shadowing y0 src/graphene-matrix.c | 38 +++++++++++++++++++------------------- src/graphene-matrix.h | 8 ++++---- 2 files changed, 23 insertions(+), 23 deletions(-) commit 624d5864ea26b74b20867d342cdc8b95ba30f169 Author: Emmanuele Bassi Date: Tue Jul 1 01:40:07 2014 +0100 rect: Fix compiler warnings src/graphene-rect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e64a7f43fa3acb41945fe9ffe4ca0b4f45174e7a Author: Emmanuele Bassi Date: Tue Jul 1 01:36:23 2014 +0100 build: Try and lower the GLib requirement Use the versioning macros to notify us. configure.ac | 2 +- src/Makefile.am | 2 ++ src/tests/Makefile.am | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) commit c0d475ea279ca7fb035c7c8ec3949bf9072ae141 Author: Emmanuele Bassi Date: Tue Jul 1 01:35:36 2014 +0100 travis: Disable benchmarks .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57d14ea3a6c58e7f180115f297c301bfb7676fed Author: Emmanuele Bassi Date: Tue Jul 1 01:18:30 2014 +0100 docs: Restructure the dependencies section README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cabe5fb72ddc7fb0bd5568286297db0defac5387 Author: Emmanuele Bassi Date: Tue Jul 1 01:17:07 2014 +0100 A gente nudge for Travis CI commit 26bd64e07723a0a85b2d129eeb420f909dcffff0 Author: Emmanuele Bassi Date: Mon Jun 30 23:16:27 2014 +0100 simd4f: Fix cast for cmp_eq and cmp_neq operators We are casting the first operand, not the result. src/graphene-simd4f.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) commit 8c5666bb0e5e0f2162c26be0f24544097cda08ed Author: Emmanuele Bassi Date: Mon Jun 30 22:40:01 2014 +0100 build: Remove an unnecessary warning The -Wbad-function-cast warning gets tripped by the perfectly legal atomic operations in GLib. build/autotools/graphene-macros.m4 | 1 - 1 file changed, 1 deletion(-) commit e09e63cee812e789443c85d977d54901e42f5ce7 Author: Emmanuele Bassi Date: Sun Jun 29 19:48:33 2014 +0100 Rename GRAPHENE_BENCHMARK to GRAPHENE_SIMD_BENCHMARK Make sure that it's self-evident that the symbol is only for benchmarking SIMD implementations. configure.ac | 4 ++-- src/bench/Makefile.am | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 84042cb38b97ecc35750c25247c2df8f3cb542be Author: Emmanuele Bassi Date: Sun Jun 29 19:46:33 2014 +0100 build: Restructure scalar typedefs in graphene-config.h We use the `/*< private >*/` trigraph, but the parsers have had troubles in the past if the definition of a structured type sits on just one line. configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a3080756e3f70607ee5047358554eecf0a0eb37b Author: Emmanuele Bassi Date: Sun Jun 29 19:42:44 2014 +0100 matrix: Rename affine → 2d We already have graphene_matrix_is_2d(), so the conversion functions from and to affine transformation matrices should follow that naming scheme. doc/graphene-sections.txt | 4 ++-- src/graphene-matrix.c | 32 ++++++++++++++++---------------- src/graphene-matrix.h | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) commit fc8a73f0e7168385e4cac130a20c058f0ed2e0a3 Author: Emmanuele Bassi Date: Sun Jun 29 19:37:33 2014 +0100 build: Fix configure arguments for distcheck We don't have --enable-maintainer-flags, and we want to force the generation of the introspection data. Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f651e3b261a1d98b02f00aae7a13b118d0be8ea Author: Emmanuele Bassi Date: Sun Jun 29 19:36:28 2014 +0100 Silence compiler warnings In the benchmark code. src/bench/graphene-bench-utils.c | 6 +++--- src/bench/matrix.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit b3592da1025b039e7d210500e5c26e952f844097 Author: Emmanuele Bassi Date: Sun Jun 29 19:34:36 2014 +0100 build: Use our own macros Based on the xorg-macros, but cut down considerably in size, and only for the flags that make sense for Graphene. Makefile.am | 1 + build/autotools/as-compiler-flag.m4 | 62 -------------- build/autotools/graphene-macros.m4 | 159 ++++++++++++++++++++++++++++++++++++ configure.ac | 52 ++---------- 4 files changed, 169 insertions(+), 105 deletions(-) commit 1db7586d97b7811e988a69b4ee6b3378fa52fa71 Author: Emmanuele Bassi Date: Thu Jun 26 12:11:32 2014 +0100 alloc: Fix pre-condition checks We just return NULL if we're asked to allocate 0 bytes. This simplifies the overflow check later on. src/graphene-alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 06d5d9338a6413425720db065c41059d0e933acf Author: Emmanuele Bassi Date: Thu Jun 26 12:10:32 2014 +0100 Add a control file for Travis CI May be useful, one day. .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 019576ecc4a9403468c1ea821d02ca9607ec50b2 Author: Emmanuele Bassi Date: Mon Jun 23 16:18:20 2014 +0100 docs: Note the layout for affine conversions This should clarify which values we provide, or consume, when converting a graphene_matrix_t to, or from, an affine transformation matrix. src/graphene-matrix.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c19fd39b7df416f2d257375c36abb0da6bceb2ba Author: Emmanuele Bassi Date: Mon Jun 23 16:14:26 2014 +0100 docs: Improve the description of graphene_matrix_t Note the memory layout, and the fact that the contents of the matrix type are opaque and should never be accessed directly. src/graphene-matrix.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 00fc750587d698ebda7029b2d4d9f001a12407cf Author: Emmanuele Bassi Date: Mon Jun 23 16:13:50 2014 +0100 docs: Fix typo in the SIMD matrix description src/graphene-simd4x4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68b985d65228ad4ccdca983b84ae1fb743f63fde Author: Emmanuele Bassi Date: Mon Jun 23 11:43:03 2014 +0100 Post-release version bump to 0.99.3 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1dc9583aba44d6589f93c92d378b39711f68881 Author: Emmanuele Bassi Date: Mon Jun 23 11:29:47 2014 +0100 Release 0.99.2 - release candidate 1 Now that the documentation hit the 100% mark, and we can generate introspection data, I think it's time for a Graphene 1.0 release. The "1.0" moniker does not imply that the code is Bug Free™: I still haven't tested all the math, and the test suite coverage is painfully low. Plus, the introspection generation depends on an unreleased version of GObject-Introspection, so there's that. The API, on the other hand, is pretty much what I want it to look like. I think that there are still some minor adjustments to be made in some of the modifiers, like the vector length and normalization functions modifying the vector in place, instead of returning a modified copy; on the other hand, I feel pretty confident that there won't be major changes at this point, and that any other API work on Graphene is going to rely on additions and deprecations. The other reason why I want to do a 1.0 release is that I'll soon start publishing the code I'm working on that depends on the Graphene API, which means that I'll need an actual release. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb38bd5b9438a50fe9596f76a5cd4385ec144c91 Author: Emmanuele Bassi Date: Mon Jun 23 11:40:04 2014 +0100 build: Don't dist GIR and typelib files Also, mop them up when needed. src/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e657dd8c892ed85b29cfeff93d90e9295588632d Author: Emmanuele Bassi Date: Mon Jun 23 01:42:51 2014 +0100 matrix: Add to/from affine transformation conversion In order to integrate Graphene with other, commonly used 2D libraries, we need to have entry points that allow us to convert between affine transformation matrices and our 3D transformation ones. doc/graphene-sections.txt | 2 ++ src/graphene-matrix.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 16 +++++++++ 3 files changed, 108 insertions(+) commit 2a90db6319a566b9d1eb490f7bbbc7c183e93b27 Author: Emmanuele Bassi Date: Mon Jun 23 01:18:01 2014 +0100 build: Use the right top-level for the benchmark target We need to recurse down $(top_builddir), not $(top_srcdir). Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a805f3bae8d952d7af38ee60ec4f4b054d160f29 Author: Emmanuele Bassi Date: Mon Jun 23 01:02:13 2014 +0100 docs: We now provide both GTypes and introspection data Change the paragraphs in the README file that mention GObject and introspection. README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 6a143ccb3b4a304affe5a8bc23fca5ea0ca7e4f0 Author: Emmanuele Bassi Date: Mon Jun 23 00:55:48 2014 +0100 docs: Mention the SIMD types separately in the README The primary API are the convenience types; the SIMD types are available but only to those who know what they are doing. README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 167049dbe14ee4c6a0bc6b76801c080b7015e2cc Author: Emmanuele Bassi Date: Mon Jun 23 00:37:52 2014 +0100 build: Set interface_age to 0 It's a development cycle anyway. configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5e7eec9d77ac4e0bdf691d63971e67ca7f6cd791 Author: Emmanuele Bassi Date: Mon Jun 23 00:36:34 2014 +0100 build: Ignore SIMD API when generating introspection data The SIMD API is a low level API, and it does not have a GType representation, so we cannot use introspection with it — nor we should. src/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e5db96c98bd0737b1e83b926514feb4892844d01 Author: Emmanuele Bassi Date: Mon Jun 23 00:12:50 2014 +0100 docs: Add missing documentation for vectors and matrix API src/graphene-matrix.c | 11 +-- src/graphene-simd4x4f.h | 78 +++++++++++++++++++- src/graphene-vectors.c | 184 ++++++++++++++++++++++++++---------------------- 3 files changed, 182 insertions(+), 91 deletions(-) commit dc0a9aef6d2e5decc4daaafb61da1233f84fe8a4 Author: Emmanuele Bassi Date: Fri Jun 20 16:24:15 2014 +0100 docs: Add more documentation to graphene_simd4x4f_t src/graphene-simd4x4f.h | 165 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 161 insertions(+), 4 deletions(-) commit 37f4efc4512b77a70fd715c9804672a451632159 Author: Emmanuele Bassi Date: Fri Jun 20 16:05:42 2014 +0100 docs: Finish documenting the SIMD vector type src/graphene-simd4f.c | 143 ++++++++++++++++++++++++++++++++ src/graphene-simd4f.h | 220 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 340 insertions(+), 23 deletions(-) commit c377dae756a109d6122bf4a37573817a174c2180 Author: Emmanuele Bassi Date: Fri Jun 20 15:44:58 2014 +0100 docs: Finish documenting graphene_matrix_t src/graphene-matrix.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit a9c29c2a0f0430653e93f4c00650c99cbec20b93 Merge: 6323153 a93d468 Author: Emmanuele Bassi Date: Fri Jun 20 11:43:26 2014 +0100 Merge pull request #10 from ebassi/introspection Add introspection data to Graphene commit a93d468db80b5231059875e9580de7d9e1f8f2fa Author: Emmanuele Bassi Date: Fri Jun 20 11:31:35 2014 +0100 build: Use the $(SED) variable Don't hardcode `sed`, in case it's not in $PATH. src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b76fe0565afd980fa99626bc7bf9a1d3f37d857f Author: Emmanuele Bassi Date: Tue May 13 11:14:00 2014 +0100 build: Remove special cased regexp We can use generic regular expressions for transforming lower case types into camel cased ones. src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4464bc411bf7814c46640d41ed71c5f7e695f51 Author: Emmanuele Bassi Date: Tue May 13 00:20:09 2014 +0100 Add introspection generation We use the newly added --identifier-filter-cmd option of the introspection scanner to ensure that the introspection machinery knows how to handle our types. Makefile.am | 1 + build/autotools/introspection.m4 | 96 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 10 +++++ src/Makefile.am | 34 +++++++++++++- 4 files changed, 140 insertions(+), 1 deletion(-) commit 6323153f061ea9461b5c4edece45f14e25235898 Author: Emmanuele Bassi Date: Thu Jun 19 16:32:16 2014 +0100 docs: Finish documenting graphene_vec4_t src/graphene-vectors.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 142 insertions(+), 6 deletions(-) commit 190a449389477f60448177d27edca00b6c1d2f9c Author: Emmanuele Bassi Date: Thu Jun 19 16:31:14 2014 +0100 vec4: Change the vec2,3 initializers for vec4 Initializing a vec4 from vec2 and vec3 should not leave the value of the third and fourth components undefined. src/graphene-vec4.h | 7 +++++-- src/graphene-vectors.c | 38 ++++++++++++++++++++++++++++++++++---- src/tests/vec4.c | 4 ++-- 3 files changed, 41 insertions(+), 8 deletions(-) commit 0c41ed8935220128d00e5473b618bb37d8e54570 Author: Emmanuele Bassi Date: Thu Jun 19 16:29:55 2014 +0100 simd4f: Add merge_low() operator Takes the two lowest channels of two SIMD vectors and merges them together in a new SIMD vector. doc/graphene-sections.txt | 1 + src/graphene-simd4f.c | 14 ++++++++++++++ src/graphene-simd4f.h | 29 ++++++++++++++++++++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) commit 330034b1dff925705941d97b776673fecfd5b90e Author: Emmanuele Bassi Date: Thu Jun 19 16:07:38 2014 +0100 docs: Finish documenting graphene_point3d_t src/graphene-point3d.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 106 insertions(+), 4 deletions(-) commit 30ba516b514d5d988aa23a860f918b67d19c760e Author: Emmanuele Bassi Date: Thu Jun 19 12:06:14 2014 +0100 docs: Add more matrix documentation src/graphene-matrix.c | 172 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 168 insertions(+), 4 deletions(-) commit fe010bc93f2f007ad8f3977fc9b12b2feed936d3 Author: Emmanuele Bassi Date: Wed Jun 18 19:24:59 2014 +0100 docs: Add some more documentation to graphene_matrix_t src/graphene-matrix.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) commit c59a6756798fc4ecc2b50965de47a2d745b67335 Author: Emmanuele Bassi Date: Wed Jun 18 19:23:17 2014 +0100 simd4x4f: Simplify the perspective() function Use the newly added merge_w() operator for SIMD vectors to cut some lines out. The function could be unrolled differently by using a transposed matrix and accessing the column vectors, but it would need to be benchmarked first. src/graphene-simd4x4f.h | 62 ++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 26 deletions(-) commit c9653ce97cb517fa44d54cbb8b37a8c70d1edad6 Author: Emmanuele Bassi Date: Wed Jun 18 19:21:23 2014 +0100 simd4f: Add merge_w() function Merges the first three channels of a SIMD vector with the given floating point value for the fourth channel. doc/graphene-sections.txt | 1 + src/graphene-simd4f.c | 14 ++++++++++++++ src/graphene-simd4f.h | 27 +++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) commit b93e75c0d9f8235f21d02a7b09d2d6146df84943 Author: Emmanuele Bassi Date: Tue Jun 17 14:31:55 2014 +0100 matrix: Fix interpolation of scale factor src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca19dd1072b03af5c51e0629f4873511836dfe04 Author: Emmanuele Bassi Date: Tue Jun 17 14:31:42 2014 +0100 matrix: Fix argument checks src/graphene-matrix.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 754d4522b33697e2d7ce17819de62befbf777546 Author: Emmanuele Bassi Date: Tue Jun 17 13:18:28 2014 +0100 docs: Add missing vec3 symbols src/graphene-vectors.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) commit 9e2e07170a7d56bf352af1c3e8984537d6467e66 Author: Emmanuele Bassi Date: Tue Jun 17 13:13:49 2014 +0100 docs: Fix typo in graphene_vec2_dot() src/graphene-vectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64f25def20637554f9f6773aeb8f80004c69432b Author: Emmanuele Bassi Date: Tue Jun 17 13:12:59 2014 +0100 docs: Document graphene_size_t src/graphene-size.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit c144643db792cf2320297a0914927e5435a33f3c Author: Emmanuele Bassi Date: Tue Jun 17 13:02:08 2014 +0100 docs: Fix typo in graphene_rect_union() src/graphene-rect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f17881336b2ca97785bb28150afdcbe5c0cdb8ed Author: Emmanuele Bassi Date: Tue Jun 17 13:01:39 2014 +0100 docs: Finish documenting graphene_quaternion_t src/graphene-quaternion.c | 184 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 180 insertions(+), 4 deletions(-) commit bf5a09b6bfe185ab4e78c59e122acbb19276099d Author: Emmanuele Bassi Date: Mon Jun 16 15:42:42 2014 +0100 docs: Add more documentation to graphene_matrix_t src/graphene-matrix.c | 126 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 94 insertions(+), 32 deletions(-) commit 6a61cf5d99749ed7fb11305924205ae14ebcd21d Author: Emmanuele Bassi Date: Mon Jun 16 12:22:54 2014 +0100 docs: Add gtk-doc overrides for SIMD types We don't want to parse graphene-config.h, and gtk-doc would get it mostly wrong anyway. We use simple overrides to the effect that the graphene_simd4f_t and graphene_simd4x4f_t become opaque struct types. doc/.gitignore | 1 - doc/Makefile.am | 1 + doc/graphene-overrides.txt | 7 +++++++ src/graphene-simd4f.c | 3 +++ src/graphene-simd4x4f.h | 3 +++ 5 files changed, 14 insertions(+), 1 deletion(-) commit 6896cd52f91eb35c4e499ea50291ae115b520588 Author: Emmanuele Bassi Date: Mon Jun 16 12:09:23 2014 +0100 docs: Document the vector length macros src/graphene-types.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 164b5b35cada14ae9de43c32ae1524832c93271e Author: Emmanuele Bassi Date: Mon Jun 16 12:07:58 2014 +0100 docs: Document the GRAPHENE_RECT_INIT macro src/graphene-rect.h | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 3949bcde9d7ec8a6070762d3e06ad015f0569098 Author: Emmanuele Bassi Date: Mon Jun 16 12:06:53 2014 +0100 docs: Document versioning macros src/graphene-version-macros.h | 26 ++++++++++++++++++++++++++ src/graphene-version.h.in | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) commit 04b30fd403b4eb01e65fa4e0dc6ca0100d009ac2 Author: Emmanuele Bassi Date: Mon Jun 16 12:06:33 2014 +0100 docs: Add section for graphene_matrix_t src/graphene-matrix.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit d8df64e90a71e17f4a7dfc7ea8a24c8fc91253c9 Author: Emmanuele Bassi Date: Mon Jun 16 11:55:04 2014 +0100 rect: Allow changing up modifiers We should return the modified argument, so that we can chain up callers. This is especially useful in higher order languages. src/graphene-rect.c | 18 +++++++++++++++--- src/graphene-rect.h | 6 +++--- 2 files changed, 18 insertions(+), 6 deletions(-) commit 791f98742f376d8b71f1bdd743143b739a00f945 Author: Emmanuele Bassi Date: Mon Jun 16 11:41:28 2014 +0100 docs: Finish documenting graphene_rect_t src/graphene-rect.c | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 178 insertions(+), 2 deletions(-) commit 90b5b8f287d290411e2c7158d6b0ddc97a35e8f4 Author: Emmanuele Bassi Date: Mon Jun 16 10:53:23 2014 +0100 docs: Remove the Clang issue It seems that I either fixed it, or it fixed itself, because I can't reproduce it any more. README.md | 8 -------- 1 file changed, 8 deletions(-) commit 36106432037a07effb3ee707325ee48a5d7714ea Author: Emmanuele Bassi Date: Fri Jun 13 18:23:22 2014 +0100 build: Generate a ChangeLog on dist Makefile.am | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 2d244daab64d73a781b1ab55f3c128b443c15b8c Author: Emmanuele Bassi Date: Fri Jun 13 10:21:08 2014 +0100 matrix: Add per-axis rotation functions These are just convenience wrappers around rotate() that do not require to use an axis vector. doc/graphene-sections.txt | 3 ++ src/graphene-matrix.c | 91 ++++++++++++++++++++++++++++++++++++++++++++--- src/graphene-matrix.h | 9 +++++ 3 files changed, 98 insertions(+), 5 deletions(-) commit bdc5f7700d6f4fbea8f32b3c62a3931221e6ed4a Author: Emmanuele Bassi Date: Thu Jun 12 12:48:41 2014 +0100 simd4f: Add neg() operator doc/graphene-sections.txt | 1 + src/graphene-simd4f.c | 22 ++++++++++++++++++++++ src/graphene-simd4f.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) commit 000563222d2efe1375a69bede15521b4830671bc Author: Emmanuele Bassi Date: Thu Jun 12 12:46:07 2014 +0100 simd4f: Fix typo in flip operators for NEON src/graphene-simd4f.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 802f059261117bfcdf5a403c4130265ac18219f3 Author: Emmanuele Bassi Date: Thu Jun 12 12:03:01 2014 +0100 tests/matrix: Ensure that rotations are additive Rotating by 45° → 15° is equivalent to rotating by 60°. src/tests/matrix.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 318189636c2e5a318a7ec7df94d4cbf17a24e5f9 Author: Emmanuele Bassi Date: Thu Jun 12 11:56:54 2014 +0100 matrix: Multiplication is non-commutative The order to multiply two matrices is important. When transforming a matrix with a rotation, translation, or scale, we need to multiply the transformation matrix with the given matrix, not the other way around. Issue #9. src/graphene-matrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9acca7b1fc891f7457eb944f5d5910468966db9f Author: Emmanuele Bassi Date: Thu Jun 12 11:55:50 2014 +0100 tests/matrix: Use a bigger angle Ten degrees creates a small difference between values which could be misinterpreted as a floating point fluctuation. src/tests/matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 82ed76b8d1ddbccbb3a1b97492fe2841cd830c65 Merge: aded9b7 6327b89 Author: Emmanuele Bassi Date: Thu Jun 12 11:26:42 2014 +0100 Merge pull request #8 from lubosz/tests Some matrix tests commit 6327b89b18496fe623f23c7374abb5c6ed4f7c93 Author: Lubosz Sarnecki Date: Thu Jun 12 11:55:03 2014 +0200 test: make matrix rotation test fail src/tests/matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 074e488934da2504a56777aa7adfcf0721379eb7 Author: Lubosz Sarnecki Date: Tue Jun 3 23:50:26 2014 +0200 tests: add matrix neutral element test src/tests/matrix.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit aded9b7647826a89ccfce8f4f0a079144c123142 Author: Emmanuele Bassi Date: Tue Jun 10 18:29:09 2014 +0100 docs: Documentation fixes src/graphene-point.c | 1 + src/graphene-vectors.c | 56 ++++++++++++++++++++++++++++---------------------- 2 files changed, 32 insertions(+), 25 deletions(-) commit 8d97b5f7fb89c767b0840edb67c2fca23fe82bf8 Author: Emmanuele Bassi Date: Tue Jun 10 12:41:15 2014 +0100 docs: Various documentation fixes Try to reduce the amount of warnings coming from gtk-doc. doc/Makefile.am | 1 + doc/graphene-docs.xml | 4 +- doc/graphene-sections.txt | 26 ++++--- src/graphene-point3d.c | 1 + src/graphene-point3d.h | 28 ++++++++ src/graphene-quad.c | 94 +++++++++++++++++++++++++ src/graphene-quad.h | 14 ++++ src/graphene-quaternion.c | 31 +++++++++ src/graphene-quaternion.h | 11 +++ src/graphene-rect.c | 111 ++++++++++++++++++++++++++++++ src/graphene-rect.h | 4 +- src/graphene-simd4x4f.c | 22 ++++++ src/graphene-simd4x4f.h | 171 +++++++++++++++++++++++++++++++++++++--------- src/graphene-size.c | 5 +- src/graphene-vectors.c | 130 ++++++++++++++++++++++++++--------- 15 files changed, 569 insertions(+), 84 deletions(-) commit 3b51a5db63a6998ba2dac80f89737dfc26b7704b Author: Emmanuele Bassi Date: Tue Jun 10 12:02:29 2014 +0100 quaternion: Don't go through convenience types We can use the SIMD low level API directly instead of going through the convenience classes. src/graphene-quaternion.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit fe84b820ffbe6a0c0e2eae8e5a69770f0bd73176 Author: Emmanuele Bassi Date: Sat Jun 7 15:13:51 2014 +0100 docs: Document graphene_simd4f_t src/graphene-simd4f.c | 423 ++++++++++++++++++++++++++++++++++++++++++++++++-- src/graphene-simd4f.h | 14 +- 2 files changed, 414 insertions(+), 23 deletions(-) commit 5d57fbcafbbe3cfb1543775acabb5438fd547eea Author: Emmanuele Bassi Date: Sat Jun 7 15:13:14 2014 +0100 docs: Document graphene_point_t src/graphene-point.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++- src/graphene-point.h | 62 +++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) commit 154b246a4535d66324fa36801ab5b44048d23017 Author: Emmanuele Bassi Date: Sat Jun 7 15:11:47 2014 +0100 bench: Use a better allocator We cannot use graphene_alloc() because it's a private symbol, but we can easily implement it for the matrix benchmark. src/bench/matrix.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) commit 76157787a2dddbce0a31e4cfedeefba2937aaf7b Author: Emmanuele Bassi Date: Sat Jun 7 15:11:25 2014 +0100 build: Let gtk-doc check graphene-config.h doc/Makefile.am | 1 - 1 file changed, 1 deletion(-) commit 25423ead2a940178a740cad3624aae8388ae62ee Author: Emmanuele Bassi Date: Sat Jun 7 15:10:54 2014 +0100 build: Hide contents of scalar simd4f_t from gtk-doc configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 938420d3ea7408e85246d46fe04b961a35d20895 Author: Emmanuele Bassi Date: Sat Jun 7 15:10:35 2014 +0100 docs: SIMD types are now public README.md | 1 + 1 file changed, 1 insertion(+) commit 6b534ab8aeebefeaecac52ec3cf090945ea03e9c Author: Emmanuele Bassi Date: Sat Jun 7 15:10:00 2014 +0100 build: Add top-level `benchmark` target Just a top-level wrapper for the `benchmark` target under src/bench. Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 95fa3c52c09061ba971c8ec5a212489698cdc848 Author: Emmanuele Bassi Date: Sat Jun 7 15:05:15 2014 +0100 Add custom allocator for SIMD-backed types While we're guaranteed the alignment of SIMD types on the stack, the same guarantees do not apply when allocating them on the heap. We can assume that malloc() will align to multiples of 8 and 16 on basically all the platforms we care about, but it's not something we can take for granted. Luckily, we can check if the platform we're compiling for has an allocator function that supports alignment; with the advent of ISO C11 and its aligned_alloc() the chances that the platform has that function or one close to it in semantics and behaviour, the check is likely to turn out something we can use. configure.ac | 7 +++ src/Makefile.am | 2 + src/graphene-alloc-private.h | 39 ++++++++++++++++ src/graphene-alloc.c | 105 +++++++++++++++++++++++++++++++++++++++++++ src/graphene-matrix.c | 5 ++- src/graphene-vectors.c | 13 +++--- 6 files changed, 163 insertions(+), 8 deletions(-) commit a24fbb2e8d91679a1815d883f8915e69c93c20d9 Author: Emmanuele Bassi Date: Wed Jun 4 18:51:10 2014 +0100 docs: Add description for graphene-gobject src/graphene-gobject.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit 97243caeb572f514493ff96c866d2ec517001332 Author: Emmanuele Bassi Date: Wed Jun 4 16:30:59 2014 +0100 Add API reference We use gtk-doc to generate the API reference. Still needs lots of love, but it's a starting point. .gitignore | 2 + Makefile.am | 4 +- autogen.sh | 7 + configure.ac | 6 + doc/.gitignore | 18 +++ doc/Makefile.am | 34 ++++ doc/graphene-docs.xml | 46 ++++++ doc/graphene-sections.txt | 384 ++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 499 insertions(+), 2 deletions(-) commit c2639f2240a0f9e9ca92f2ffb0a92435ef472be1 Merge: 91b7931 087d04d Author: Emmanuele Bassi Date: Wed Jun 4 14:00:33 2014 +0100 Merge pull request #7 from ebassi/issues/4 matrix: Use degrees in the graphene_matrix_t rotation API commit 087d04d254f091a57cd69b82acd7566a8fd9f98f Author: Emmanuele Bassi Date: Wed Jun 4 13:58:16 2014 +0100 matrix: Use degrees in the graphene_matrix_t rotation API We can keep using radians in the underlying SIMD implementation, but the public-facing convenience API should use the more convenient unit instead. Fixes issue #4. src/graphene-matrix.c | 17 ++++++++++++++--- src/tests/matrix.c | 10 ++-------- 2 files changed, 16 insertions(+), 11 deletions(-) commit 91b793173ffe6d713fbdd4e9a27d1c26392f18b9 Author: Emmanuele Bassi Date: Wed Jun 4 13:27:18 2014 +0100 Remove unnecessary files We folded every SIMD per-implementation and shared header into the main ones, so we don't need them any more. src/graphene-simd4f-common.h | 153 ------------- src/graphene-simd4f-gcc.h | 318 -------------------------- src/graphene-simd4f-neon.h | 337 ---------------------------- src/graphene-simd4f-scalar.h | 297 ------------------------ src/graphene-simd4f-sse.h | 302 ------------------------- src/graphene-simd4x4f-common.h | 498 ----------------------------------------- src/graphene-simd4x4f-gcc.h | 51 ----- src/graphene-simd4x4f-neon.h | 48 ---- src/graphene-simd4x4f-scalar.h | 61 ----- src/graphene-simd4x4f-sse.h | 41 ---- 10 files changed, 2106 deletions(-) commit 2ac65fdfdda4e021f611203c3b0e4a5475adf24e Author: Emmanuele Bassi Date: Wed Jun 4 12:31:30 2014 +0100 bench: Test projection We should benchmark the implementation of some common methods in the graphene_matrix_t API. We start from point projection. src/bench/matrix.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) commit 1faab6682e53a85c717b71084c505f2d5445e025 Author: Emmanuele Bassi Date: Wed Jun 4 12:30:41 2014 +0100 tests: Use proper formatting for the fuzzy eq message We can reuse the assertion message API from GTest. src/tests/matrix.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 172b35038c4193954127676d1dc93e50edf65e5b Author: Emmanuele Bassi Date: Wed Jun 4 12:30:04 2014 +0100 matrix: Coding style fixes for print() src/graphene-matrix.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 9dee600dc8152c688bf8349d9bd1aba83b455c45 Author: Emmanuele Bassi Date: Wed Jun 4 11:42:00 2014 +0100 bench: Build the SIMD matrix test case for every implementation And run all the available implementations. src/bench/.gitignore | 2 +- src/bench/Makefile.am | 48 ++++++++++++++++++++++++++++++++++++++-- src/bench/graphene-bench-utils.c | 17 +++++++++++++- src/bench/matrix.c | 4 +++- 4 files changed, 66 insertions(+), 5 deletions(-) commit 4686c448326a8b5b9baae1a9214cd75cb4fa7f6b Author: Emmanuele Bassi Date: Wed Jun 4 11:40:49 2014 +0100 Restore the ability to override the SIMD implementation This allows us to have a proper benchmark suite that can go through all the implementations available at compile time, in order to measure their relative performance. configure.ac | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f1b9daef69fc176077ca18cebc3f518838eb30d8 Author: Emmanuele Bassi Date: Wed Jun 4 10:45:17 2014 +0100 bench: Restructure the benchmark test suite We want to benchmark the pure, SIMD matrix API instead of the typed wrappers around it; by doing so, we will be able to test the different implementations in the future, since those get inlined into the test suite, instead of being inlined into the library. configure.ac | 2 +- src/bench/.gitignore | 9 +- src/bench/Makefile.am | 80 +------------ src/bench/graphene-bench-utils.c | 238 +++++++++++++-------------------------- src/bench/graphene-bench-utils.h | 2 - src/bench/matrix.c | 74 +++++++----- 6 files changed, 134 insertions(+), 271 deletions(-) commit 790755544bca5c7dd3782ebfece9398e55302143 Author: Emmanuele Bassi Date: Wed Jun 4 10:38:45 2014 +0100 Rework the implementation of the SIMD types The current implementation of the SIMD types is slightly less useful than it ought to be, and we should make it better. The main goal of this commit is to make the SIMD vector and matrix API public and usable outside of Graphene itself, through the judicious application of inlining and macros. We can inline everything inside the simd4f.h and simd4x4f.h headers, and use compiler extensions to macroize all the platform-specific API using a trick similar to the one used by gatomic.[ch] in GLib. Currently, this means that we support only GCC and GCC-compatible compilers, like Clang; supporting SunCC and MSVC would be nice, but it'll require some help from people that have access to those compiler suites. src/Makefile.am | 16 +- src/graphene-simd4f.c | 573 +++++++++++++++++++++++++ src/graphene-simd4f.h | 1079 ++++++++++++++++++++++++++++++++++++++++++++++- src/graphene-simd4x4f.c | 67 +++ src/graphene-simd4x4f.h | 503 +++++++++++++++++++++- src/graphene.h | 3 + 6 files changed, 2197 insertions(+), 44 deletions(-) commit a6a54d44368d118c73651ff0d3fcd348dab97435 Author: Emmanuele Bassi Date: Mon Jun 2 20:08:02 2014 +0100 Drop the GRAPHENE_BENCHMARK conditional We cannot build Graphene with a run-time selectable backend without building a whole vtable and paying its price. configure.ac | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 9f5a2112fb9335496d4e1d8b44a9f969b8c39b94 Author: Emmanuele Bassi Date: Mon Jun 2 17:28:26 2014 +0100 build: Add more aggressive compiler flags We should be building Graphene with more aggressive optimizations, and with enough flags to let the compiler know what we want. configure.ac | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 74e47419ea52df14ce693034ffb889644edce476 Merge: 7c755ce b9016d0 Author: Emmanuele Bassi Date: Tue Jun 3 21:47:15 2014 +0100 Merge pull request #6 from lubosz/matrix+tests+review Use the correct matrix multiplication function and add some tests. commit b9016d0e2d2ff83c9d91313f469bd656ed900a97 Author: Lubosz Sarnecki Date: Tue Jun 3 22:46:08 2014 +0200 tests: fix style. make delta smaller src/tests/matrix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4a3d06e1841790c51353f97e2f1e0b5c29002f59 Author: Lubosz Sarnecki Date: Tue Jun 3 14:19:48 2014 +0200 tests: add some matrix tests * add delta to float comparision src/tests/matrix.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) commit 0c4c3b1cc92ff8a2afe233d72bcf0682b4366440 Author: Lubosz Sarnecki Date: Tue Jun 3 22:19:42 2014 +0200 matrix: add print function src/graphene-matrix.c | 23 +++++++++++++++++++++++ src/graphene-matrix.h | 3 +++ 2 files changed, 26 insertions(+) commit 17f0ce634f29fbfd275bb559922e4fecf70f5450 Author: Lubosz Sarnecki Date: Tue Jun 3 20:17:16 2014 +0200 matrix: use correct matrix multiplication functions src/graphene-matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 7c755ce3d00cf960abb724409ee8fac1596ac9c5 Author: Emmanuele Bassi Date: Tue May 27 17:37:53 2014 +0100 Drop usage of GSlice allocator Use calloc/free, and don't bother going through the slice allocator. In theory, nobody (except language bindings) will use allocated structures; nevertheless, we should probably keep them slightly faster, and it's pretty clear that the typical system allocator can beat both the GLib wrappers, and the GSlice allocator even for single-thread and simple cases. src/graphene-matrix.c | 5 ++--- src/graphene-point.c | 5 ++--- src/graphene-point3d.c | 5 ++--- src/graphene-quad.c | 5 ++--- src/graphene-quaternion.c | 5 ++--- src/graphene-rect.c | 5 ++--- src/graphene-size.c | 5 ++--- src/graphene-vectors.c | 15 ++++++--------- 8 files changed, 20 insertions(+), 30 deletions(-) commit 4dea3953cc37104f5977a614841dacec11b7f8ff Author: Emmanuele Bassi Date: Tue May 27 17:20:41 2014 +0100 matrix: Missing 'z' scaling factor Typo: we're reusing the 'x' scaling factor for the 'z' row. Bug reported by: Mattias Bengtsson src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f7101d195d2cc3bb7cfd7ee18ad7c6d49e9ec32 Author: Emmanuele Bassi Date: Tue May 27 17:19:07 2014 +0100 matrix: Use the right order of points when transforming Follow the corners in clockwise order. src/graphene-matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5122c02555a084269b56af979f04f471b2f18300 Author: Emmanuele Bassi Date: Tue May 27 17:18:24 2014 +0100 quad: Add rect_t initializer It would be more convenient to be able to initialize a quad from a rect in a consistent way. src/graphene-quad.c | 15 +++++++++++++++ src/graphene-quad.h | 25 ++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) commit aa2c5b9c0b20e3ac7b080354009d1a2102f2ebd8 Author: Emmanuele Bassi Date: Tue May 27 17:17:01 2014 +0100 point3d: Fix header alignment src/graphene-point3d.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 435dd83b02f248efac08e3ace7eaa39cd74f6a00 Author: Emmanuele Bassi Date: Wed May 21 23:01:19 2014 +0100 build: Fix variable name A remnant of the copy and paste of the code coverage macro madness. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77a2ba1ebb4e9594cf2d3a094e73df8c78b54218 Author: Emmanuele Bassi Date: Fri May 16 12:04:13 2014 +0100 Add DOAP file describing Graphene graphene.doap | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 90a315959cb1c412783e05eb5fde6375ef32f434 Author: Emmanuele Bassi Date: Fri May 16 11:59:10 2014 +0100 build: Fix AC_INIT incantation configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6acd1e32518b40d189479427d92e1f235a7b398b Author: Emmanuele Bassi Date: Thu May 15 12:40:58 2014 +0100 build: Fix conditional build of GObject In case we don't have GObject but we do have GLib, for some weird reason, we don't want to forcibly depend on the former. configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 09b91d840cbc22d80ec1c2e230abc16cbae141a6 Author: Emmanuele Bassi Date: Tue May 13 15:04:26 2014 +0100 Begin annotating the API We want to turn on introspection at some point. src/graphene-matrix.c | 123 +++++++++++++++ src/graphene-point3d.c | 9 ++ src/graphene-vectors.c | 398 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 530 insertions(+) commit 0156695bf1f5e9ab99473b3183b736d44ab3d099 Author: Emmanuele Bassi Date: Tue May 13 15:04:11 2014 +0100 matrix: Fix compiler warnings src/graphene-matrix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 746df251de9450df1602d56479ae77cff61922cf Author: Emmanuele Bassi Date: Tue May 13 15:03:31 2014 +0100 build: Enable more stringent compiler flags configure.ac | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 39d3f62a0c629ba077dac01c3dacac56795d4595 Author: Emmanuele Bassi Date: Tue May 13 09:06:25 2014 +0100 build: Add missing file to EXTRA_DIST Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 643e8806dfebf6ddc2a4376036088a3bc917febf Author: Emmanuele Bassi Date: Mon May 12 19:22:49 2014 +0100 build: Remove introspection check configure.ac | 4 ---- 1 file changed, 4 deletions(-) commit c6f5836c5f270561114feb5a40e1928713b45262 Author: Emmanuele Bassi Date: Mon May 12 19:22:29 2014 +0100 build: Fix a variable name src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6985a676cf68295d2c91c644a3d928adada5b72f Author: Emmanuele Bassi Date: Mon May 12 14:31:44 2014 +0100 Add (optional) support for GObject types In order to use Graphene from GObject-based libraries and applications we need to expose its types through the GType type system. We don't want to strongly depend on it, though, so we allow the user to conditionally include the type definitions in their code, or to disable support entirely (for size-constrained build targets). In order to use the GType for each type exposed by Graphene client code must: • check for the presence of the graphene-gobject-1.0 pkg-config file • include instead of Since Graphene is meant to be a GNOME-friendly library, we default to support GObject types out of the box, and we allow building without those symbols only through a specific configure switch. .gitignore | 1 + configure.ac | 28 +++++++++++++++-- src/Makefile.am | 14 +++++++++ src/graphene-gobject.c | 74 ++++++++++++++++++++++++++++++++++++++++++++ src/graphene-gobject.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene.pc.in | 2 +- 6 files changed, 200 insertions(+), 3 deletions(-) commit 41e6c5e8b7e3c08f1d1c4d37703bec4013984a0d Author: Emmanuele Bassi Date: Fri May 9 13:34:47 2014 +0100 docs: Add missing period README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b8d9fbedf2bd0deb25427db0a53525c323805ae6 Author: Emmanuele Bassi Date: Fri May 9 13:32:10 2014 +0100 docs: Add 'known issues' section in the README. README.md | 8 ++++++++ 1 file changed, 8 insertions(+) commit 4de90902c22e0553092a87e1e5d6ec8542c309a3 Author: Emmanuele Bassi Date: Fri May 9 13:24:04 2014 +0100 matrix: Remove unnecessary variable in interpolate() We're operating on graphene_simd4f_t anyway, so there's no need to use a graphene_vec4_t as a container type. src/graphene-matrix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit dbd7ccb3771c91ef2dfc892fe84ff3cf2b7c2c89 Author: Emmanuele Bassi Date: Fri May 9 12:38:07 2014 +0100 bench: Rework the output src/bench/graphene-bench-utils.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 801b7cc0b59acf728429160801752e5a802ab308 Author: Emmanuele Bassi Date: Fri May 9 12:21:00 2014 +0100 bench: Add `benchmark` build target Just runs the benchmarks without dumping the results into a formatted file. src/bench/Makefile.am | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 0122ab6f912fe713ee56245a335479bc945a0549 Author: Emmanuele Bassi Date: Fri May 9 12:20:34 2014 +0100 bench: Fix off by one error src/bench/graphene-bench-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f9055ad4d7f0443b3309390b22223d599fb76ef2 Author: Emmanuele Bassi Date: Fri May 9 12:19:31 2014 +0100 bench: Add a default unstructured output So we can run the benchmarks without any specific format and still have something printed out on the screen without the --verbose switch. src/bench/graphene-bench-utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit bd31780b3d2cfeb5069055e8a2bc3e26407b1625 Author: Emmanuele Bassi Date: Fri May 9 12:18:26 2014 +0100 bench/matrix: Perform 10000 iterations per round src/bench/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6d4537ed81bda7221c2ec3951d969b00cfe1d7c8 Author: Emmanuele Bassi Date: Thu May 8 15:05:16 2014 +0100 bench: Add matrix interpolation src/bench/Makefile.am | 14 ++++++++++- src/bench/matrix.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) commit 2ee204236d258f611349ca10a670194116594ce1 Author: Emmanuele Bassi Date: Thu May 8 14:47:54 2014 +0100 bench: Rename function for clarity src/bench/graphene-bench-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0945a8753bb95b5e778aa386189719f922b5a83 Author: Emmanuele Bassi Date: Thu May 8 14:47:23 2014 +0100 bench: Remove default to CSV output src/bench/graphene-bench-utils.c | 3 --- 1 file changed, 3 deletions(-) commit 8ebe2eddddd7234f5bc57fdc9315a38cb85281d3 Author: Emmanuele Bassi Date: Thu May 8 14:46:55 2014 +0100 bench: List formats in the help output src/bench/graphene-bench-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13530d0b2c36e9f82ac997f3337f9dcc92455a82 Author: Emmanuele Bassi Date: Thu May 8 09:59:17 2014 +0100 bench: Use the newly added set/get_rounds_per_unit() src/bench/vec2.c | 3 ++- src/bench/vec4.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 9c83c3ec673f565a76332ed169c5b1de8c1a24e6 Author: Emmanuele Bassi Date: Thu May 8 09:54:35 2014 +0100 bench: Let units tell us of internal rounds We don't want to call each unit a million times, to avoid overhead from function calls; yet, we want to run a unit multiple times for each round. We already have the concept of "factor", but each unit needs to apply the factor inside itself, and the benchmarking suite has no clue about it. By bringing it outside of each unit and into the benchmark suite we can reliably know how many iterations per round are going to happen, and we can scale the timing per round appropriately. This gives us the ability to have timing per iteration, instead of per round, and a better resolution on the timing itself. src/bench/graphene-bench-utils.c | 45 +++++++++++++++++++++++++++++----------- src/bench/graphene-bench-utils.h | 3 +++ 2 files changed, 36 insertions(+), 12 deletions(-) commit e6b1d52fb1429f810eedc1439b0613221ea1dfba Author: Emmanuele Bassi Date: Thu May 8 01:24:30 2014 +0100 bench: Use stderr for verbose messages We don't want the verbose logging to mistakenly end up in the benchmark output. src/bench/graphene-bench-utils.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 5a1910fe15dd8b1be76c1cd6ec7375d8ee4db22b Author: Emmanuele Bassi Date: Thu May 8 01:24:15 2014 +0100 bench: Add licensing blurb src/bench/graphene-bench-utils.c | 23 +++++++++++++++++++++++ src/bench/graphene-bench-utils.h | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) commit 72d9ec8a26d1338477b1b003f76161496e25e6dd Author: Emmanuele Bassi Date: Thu May 8 01:18:34 2014 +0100 bench: Add a couple of vec4 units src/bench/.gitignore | 4 +++ src/bench/Makefile.am | 14 +++++++- src/bench/vec4.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletion(-) commit 9590e088c7fc9bfcd795dbcabcf7679038c91b8d Author: Emmanuele Bassi Date: Thu May 8 01:06:21 2014 +0100 Add the prototype of a benchmark suite We want to test the various implementations of the fast paths inside Graphene, so we should have at least some form of benchmarking suite for them. The suite is private, but its API is modelled on GTest and the GObject performance tests. It's not perfect: the build is especially clunky and needs further refactoring for the rules, so that we can avoid replicating them all just because we change a pre-processor define. configure.ac | 10 ++ src/Makefile.am | 8 +- src/bench/.gitignore | 5 + src/bench/Makefile.am | 71 +++++++++ src/bench/graphene-bench-utils.c | 335 +++++++++++++++++++++++++++++++++++++++ src/bench/graphene-bench-utils.h | 28 ++++ src/bench/vec2.c | 68 ++++++++ 7 files changed, 524 insertions(+), 1 deletion(-) commit fb5a87d31262b69a76bbaee50d54e1ec62e2054a Author: Emmanuele Bassi Date: Thu May 8 00:54:51 2014 +0100 build: Rename GRAPHENE_FORCE_USE to GRAPHENE_BENCHMARK We're only going to override the configure-time selection when benchmarking Graphene. configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59384683943a435b4ce5a6bab9f2ad9325e6b9ff Author: Emmanuele Bassi Date: Thu May 8 00:41:24 2014 +0100 build: Add Makefile conditional for GCC vectors Like we have for SSE2 and ARM NEON. configure.ac | 2 ++ 1 file changed, 2 insertions(+) commit a77e23f0d43679b5daf435dad1be9453e7aaca2b Author: Emmanuele Bassi Date: Wed May 7 13:13:42 2014 +0100 Allow overriding the fast paths For benchmarking purposes we should allow overriding the fast path selection through the definition of two symbols. First, we need a `GRAPHENE_FORCE_USE` symbol to disable the selection done when generating the graphene-config.h header at configure time; this allows the user to define the appropriate `GRAPHENE_USE_*` symbol prior to including the main graphene.h header. configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 1ea9da62af4a6a65aa33a62fc18b3d95f913ce46 Author: Emmanuele Bassi Date: Tue May 6 11:49:11 2014 +0100 simd4x4f: Implement missing is_2d() function src/graphene-simd4x4f-common.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit b1d6a3e67c1b18eef4a852e0b5b45b5408132d94 Author: Emmanuele Bassi Date: Tue May 6 09:31:26 2014 +0100 docs: Add the 'new issue' step README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f1a110ea311f76784d72f678de8b471a52721000 Author: Emmanuele Bassi Date: Tue May 6 02:14:10 2014 +0100 docs: Add a section on how to contribute README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit fc24e284d95b7339ac8092a095277d7092a9bc78 Author: Emmanuele Bassi Date: Tue May 6 02:13:54 2014 +0100 docs: Update installation notes README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 0396804cd75082a3fe430a8d010cc5f062c9fa5b Author: Emmanuele Bassi Date: Tue May 6 02:07:51 2014 +0100 docs: Clean up the README file README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit ba6579fece82f9144418a90c70f5b924f9d9b352 Author: Emmanuele Bassi Date: Tue May 6 02:06:38 2014 +0100 build: Ensure we fail early on unsupported platforms In the future we may want to allow forcing a specific backend, especially for micro-benchmark comparisons between the various SIMD code paths. configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 48eb7497b35e11cb0df1067493246796d8fbc04d Author: Emmanuele Bassi Date: Tue May 6 01:50:12 2014 +0100 docs: Update README README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit c1ee3bb8e37061974d63c4b89d2047acaf3a5c41 Author: Emmanuele Bassi Date: Tue May 6 01:41:12 2014 +0100 tests/vec4: Use a larger epsilon We end up hitting fluctuations in the floating point representation, so it's better if we use a larger epsilon to check for the component of a vec4 after normalization. This should probably be applied to the other vector test units as well. Tested with the SSE2, GCC vector fast paths, as well as the scalar implementation. src/tests/vec4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 78aeb75c9179b0a348a1b123f5a54588ce7cf3a5 Author: Emmanuele Bassi Date: Tue May 6 01:34:23 2014 +0100 tests/vec4: 100% coverage for graphene_vec4_t src/tests/vec4.c | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) commit 5e93c0ec0564484f669f6103e827f4f77bb4b38f Author: Emmanuele Bassi Date: Tue May 6 01:22:08 2014 +0100 tests/vec3: 100% coverage for graphene_vec3_t src/tests/vec3.c | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) commit 741112db4b38845572491d6881c5a33f53be629e Author: Emmanuele Bassi Date: Tue May 6 00:56:44 2014 +0100 tests/vec2: 100% coverage for graphene_vec2_t src/tests/vec2.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) commit 4821f10541809ff27c682d2eda87b70bde8575e6 Author: Emmanuele Bassi Date: Mon May 5 19:30:59 2014 +0100 tests: Verify the allocation paths for vectors src/tests/vec2.c | 14 ++++++++------ src/tests/vec3.c | 18 ++++++++++-------- src/tests/vec4.c | 22 ++++++++++++---------- 3 files changed, 30 insertions(+), 24 deletions(-) commit a2abe90accc9d4e23245d00dc9933e33188e36a5 Author: Emmanuele Bassi Date: Mon May 5 19:23:08 2014 +0100 tests/vec4: Add initial vec4 test suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/vec4.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) commit 5625b7730acbc9144d8d7a615d1ef7791d5bfda0 Author: Emmanuele Bassi Date: Mon May 5 19:19:52 2014 +0100 tests/vec3: Add initial vec3 test suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/vec3.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) commit 5c9ff95cfd61f79d38e3c97ce58dde7bf2cade53 Author: Emmanuele Bassi Date: Mon May 5 19:19:27 2014 +0100 tests/vec2: Test all const vectors src/tests/vec2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1716dcd79b0d2af66c30865cc0142ad9591f94a5 Author: Emmanuele Bassi Date: Mon May 5 19:12:00 2014 +0100 quaternion: Flesh out the API We should provide some more quaternion API for the data type to be actually useful to others. src/graphene-quaternion.c | 199 ++++++++++++++++++++++++++++++++++++++++++++-- src/graphene-quaternion.h | 66 +++++++++++---- 2 files changed, 245 insertions(+), 20 deletions(-) commit f016bb244212104585d3b4f473d03dda0aebac25 Author: Emmanuele Bassi Date: Mon May 5 17:01:00 2014 +0100 tests/rect.c: Complete coverage for the rect tests src/tests/rect.c | 192 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) commit fc6dc9f91eefb19b2d8d41b389e4d78abfa6efbf Author: Emmanuele Bassi Date: Mon May 5 17:00:15 2014 +0100 rect: Validate arguments for equals() We need to check for NULL before dereferencing pointers. src/graphene-rect.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 4bf4cb539c1cb70ee72f8360418c70109ee36afe Author: Emmanuele Bassi Date: Mon May 5 15:06:35 2014 +0100 tests: Add initial graphene_rect_t test suite src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/rect.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) commit 89231662bcb13bad1c8d2b7dac36cc4861423d31 Author: Emmanuele Bassi Date: Mon May 5 15:05:08 2014 +0100 rect: Fix the rect initializer We use the 'init_from' convention for initializers; the init_from_rect() init function was correctly declared in the header, but incorrectly defined in the source file. src/graphene-rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9883f0392dc97626171320d8ca6d8e7bb697f4f4 Author: Emmanuele Bassi Date: Mon May 5 14:58:01 2014 +0100 tests: Add graphene_quad_t test suite And make it cover 100% of the API while we're at it. This also covers 100% of the private line segment API. src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/quad.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) commit 845390ede48fb9e64fd850507204b3d5c5d1424c Author: Emmanuele Bassi Date: Mon May 5 14:19:50 2014 +0100 tests/size: 100% coverage src/tests/size.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 813999c2fcade29d5758eeb32c6323001ec81576 Author: Emmanuele Bassi Date: Mon May 5 14:05:18 2014 +0100 size: Add missing symbol annotation src/graphene-point.h | 1 + 1 file changed, 1 insertion(+) commit fc6a10830884e8ff3ed8fa7df37c7e0b6fee8343 Author: Emmanuele Bassi Date: Mon May 5 13:59:34 2014 +0100 tests/point3d: 100% test coverage src/tests/point3d.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 93 insertions(+), 6 deletions(-) commit a0ffbd02cf1e39a52f89389dccd84e860543bf92 Author: Emmanuele Bassi Date: Mon May 5 13:46:58 2014 +0100 vec3: Add cross product We're missing the cross() operator for the vec3 type. src/graphene-vec3.h | 4 ++++ src/graphene-vectors.c | 11 +++++++++++ 2 files changed, 15 insertions(+) commit 1ee3da12df6a790125d10d04ccaa3d218d26570f Author: Emmanuele Bassi Date: Mon May 5 13:19:22 2014 +0100 tests: Add point3d suite We can start from the point test suite, and then add the point3d specific API. src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/point3d.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) commit e20124fe2067099e945f236a4aab0a61f8a2947b Author: Emmanuele Bassi Date: Mon May 5 13:18:23 2014 +0100 point3d: Fill out the API The point3d API should be similar to the point API. src/graphene-point3d.c | 94 ++++++++++++++++++++++++++++++++++++++++---------- src/graphene-point3d.h | 68 +++++++++++++++++++++--------------- 2 files changed, 117 insertions(+), 45 deletions(-) commit f72a746d28f7c9e6ba5a4ddd1a744945d2e83ee5 Author: Emmanuele Bassi Date: Sun May 4 13:50:20 2014 +0100 simd4x4f: Use the ARM NEON header Forgot to include the correct header when enabling the NEON path. src/graphene-simd4x4f.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f1f61e21ab7bdac0aefa8b406987dee7e04e6870 Author: Emmanuele Bassi Date: Sun May 4 13:48:18 2014 +0100 tests/point: Add full code coverage src/tests/point.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 8d256f54b4db8fb563def46f1cf3eb268badbbca Author: Emmanuele Bassi Date: Sun May 4 13:39:45 2014 +0100 Add support for code coverage of the test suite We use lcov and GCC to generate code coverage reports after running the test suite. .gitignore | 4 +++ Makefile.am | 24 +++++++++++++++++ configure.ac | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++-- src/tests/.gitignore | 2 ++ 4 files changed, 103 insertions(+), 2 deletions(-) commit 3cb64a0c6748e315cb23babdf7b91893016d784f Author: Emmanuele Bassi Date: Sun May 4 13:31:05 2014 +0100 tests/point: Add more code coverage src/tests/point.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit b2bcb752047da61c43b4e7989cf2550f224d1c5c Author: Emmanuele Bassi Date: Sun May 4 13:22:19 2014 +0100 tests/matrix: Use get_value() src/tests/matrix.c | 5 +++++ 1 file changed, 5 insertions(+) commit ea80a8da79ea466a151e0ea9cd40aaa89ac2c354 Author: Emmanuele Bassi Date: Sun May 4 13:17:27 2014 +0100 Begin the slow process of documenting Graphene Each type should have its own section, and each public symbol should have a propert annotation. src/graphene-point.c | 26 ++++++++++++++++++++++-- src/graphene-point3d.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 2 deletions(-) commit 025fceb1a638d9621d43ac42e45535e6a9573f4a Author: Emmanuele Bassi Date: Sun May 4 13:16:32 2014 +0100 point3d: Use SIMD ops for interpolate() Given that we're operating on the equivalent of a vec3, it's going to be more efficient to just use a SIMD4f and then read back. src/graphene-point3d.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit ceb8ae023f191804173b0ed9c9135c0c40cf5d9b Author: Emmanuele Bassi Date: Sun May 4 13:15:53 2014 +0100 point3d: Use SIMD ops for scale() src/graphene-point3d.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit c0ccc9870739dc6680cbdf689e82ca8660c04011 Author: Emmanuele Bassi Date: Sun May 4 11:43:47 2014 +0100 matrix: Add row getter Returns a copy of the row as a vec4. src/graphene-matrix.c | 32 ++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 4 ++++ 2 files changed, 36 insertions(+) commit 73e0281f1e3781f6d0469932c85240200522b305 Author: Emmanuele Bassi Date: Sun May 4 11:15:12 2014 +0100 matrix: Add arguments check to get_value() When I moved the function from being an internal helper to public API I forgot to add validation checks on the arguments. src/graphene-matrix.c | 4 ++++ 1 file changed, 4 insertions(+) commit 21c2a0877a62261bb6dae4e991d97c79c111ea28 Author: Emmanuele Bassi Date: Sun May 4 11:06:40 2014 +0100 matrix: Implement is_backface_visible() Forgot about this little helper. src/graphene-matrix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 53a0cf5ed83f5d22fe9616822a38b27453e95309 Author: Emmanuele Bassi Date: Sat May 3 23:08:11 2014 +0100 docs: Update the README file README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 16 deletions(-) commit 0365be5c16b993acc2d69f93179994a051ef5d33 Author: Emmanuele Bassi Date: Sat May 3 23:00:46 2014 +0100 build: Check for __builtin_shuffle() If we have access to the GCC vector extensions then we also have access to __builtin_shuffle(), but better safe than sorry. configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 03640c196094eb277e5c479eef7ce1b499085891 Author: Emmanuele Bassi Date: Sat May 3 22:59:29 2014 +0100 simd4f-gcc: Use more builtin operators We can use __builtin_shuffle() to implement our shuffle functions, as well as using the comparison operators instead of comparing decomposed vectors. src/graphene-simd4f-gcc.h | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) commit 39c5c97e8a0f25169b3d48fd4f609ac0b00f4ce4 Author: Emmanuele Bassi Date: Sat May 3 22:13:57 2014 +0100 build: Require GLib ≥ 2.40 We need g_assert_nonnull() for the test suite. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b25382a69697b52b394af217c465fb2a9f4e434 Author: Emmanuele Bassi Date: Sat May 3 12:19:55 2014 +0100 rect: Document the type semantics The graphene_rect_t allows flipping the origin using negative sizes, but we always expect the public entry points to normalize it so that we can assume positive sizes when operating on them. The public API does not act like a mutator: we always implicitly operate on a normalized copy internally. src/graphene-rect.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit c62092afdd7bfc760f8496981ec5be94ea521c38 Author: Emmanuele Bassi Date: Sat May 3 12:19:16 2014 +0100 matrix: Use more graphene_rect_t convenience We should use the rect → point API everywhere. src/graphene-matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 81035cd81507ff9134addcfee253ced1c943af55 Author: Emmanuele Bassi Date: Sat May 3 12:18:19 2014 +0100 rect: Normalize newly initialized rectangles This ensures that we always have a normalized rectangle as long as we use the public graphene_rect_t entry points. src/graphene-rect.c | 2 ++ 1 file changed, 2 insertions(+) commit 64bf5bd09e4fc5d634f27145f4edb202fb735aaf Author: Emmanuele Bassi Date: Sat May 3 11:54:40 2014 +0100 build: Disable GCC vectors on ARM According to what I managed to scrounge on the web, it seems that the GCC vectors are buggy on older ARM architectures, and are not faster than the scalar implementation. configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 916fcff22ac8f696d25e08468bf2ce07d577b380 Author: Emmanuele Bassi Date: Sat May 3 11:53:59 2014 +0100 build: Fix sanity check for GCC vectors configure.ac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0b0486a54ba8f4b5ebc5b4d2e6cecf2d95a0a2f3 Author: Emmanuele Bassi Date: Sat May 3 11:42:35 2014 +0100 vec4: Fix copy and paste typo src/graphene-vectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c18080947f6f926888aa9c21359a4b3cb44dae05 Author: Emmanuele Bassi Date: Sat May 3 10:13:30 2014 +0100 vectors: Add more conversion API Improve the ability to convert between vector types. src/graphene-vec3.h | 13 +++++++++ src/graphene-vec4.h | 6 +++++ src/graphene-vectors.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 89 insertions(+), 3 deletions(-) commit d1ef9d1c7c47ba4971943536f0d5c8ee9cf81065 Author: Emmanuele Bassi Date: Sat May 3 09:58:15 2014 +0100 Fix scalar implementation of SIMD types Simple copy and paste thinkos. src/graphene-simd4f-scalar.h | 4 ++-- src/graphene-simd4x4f-scalar.h | 38 +++++++++++++++++++------------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit 71ea2d84cd8604cb513b0c5f10c6c2322f37462d Author: Emmanuele Bassi Date: Sat May 3 09:55:28 2014 +0100 Fix GCC implementation of SIMD types Copy and paste thinko. src/graphene-simd4f-gcc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 96323f3e176eebce943a44af62963ed415f322a1 Author: Emmanuele Bassi Date: Sat May 3 09:53:53 2014 +0100 Enable ARM NEON If you feel brave enough. configure.ac | 2 +- src/graphene-simd4f.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) commit 13951e24b000f274c17b3056ac4b3d58fa5235f4 Author: Emmanuele Bassi Date: Sat May 3 09:53:07 2014 +0100 Add missing NEON implementation of SIMD types Still untested, but checked against the ARM NEON intrinsics API sheets. src/graphene-simd4f-neon.h | 66 +++++++++++++++++++++++++++++++++++++++++--- src/graphene-simd4x4f-neon.h | 2 +- 2 files changed, 63 insertions(+), 5 deletions(-) commit 0abc2862538e8d431bbbe2be999fa9c29ba745a1 Author: Emmanuele Bassi Date: Fri May 2 19:26:15 2014 +0100 Add missing licensing information src/graphene-simd4f-common.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit f0241ca2919c91fcef86e01239f4957bd9e4e376 Author: Emmanuele Bassi Date: Fri May 2 19:20:56 2014 +0100 Add a notice for the SSE operations The implementation is based on a C++ library similar to Graphene called `Vectorial`, written by Mikko Lehtonen, and licensed under the terms of the two-clause BSD license. src/graphene-simd4f-sse.h | 5 +++++ 1 file changed, 5 insertions(+) commit a8fbb7007159561d82b98a815a10c04e66ff2620 Author: Emmanuele Bassi Date: Fri May 2 19:16:25 2014 +0100 matrix: Add interpolation method src/graphene-matrix.c | 280 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 6 ++ 2 files changed, 286 insertions(+) commit 40d16295d94a0acb62404b494c5d7ebe5a7b6fec Author: Emmanuele Bassi Date: Fri May 2 19:06:30 2014 +0100 matrix: Change translate() method We don't need a vec3 for the translation components: a point3d is more than enough. src/graphene-matrix.c | 9 +++------ src/graphene-matrix.h | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) commit c131ce477b09e96dc7ce2311e0d83f2833b36542 Author: Emmanuele Bassi Date: Fri May 2 19:00:26 2014 +0100 simd4f: Add more convenience API Needed for matrix interpolation. src/graphene-simd4f-common.h | 50 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 6 deletions(-) commit ff8ff3d8062f6fdc0996fe29622174b6202e196d Author: Emmanuele Bassi Date: Fri May 2 18:59:15 2014 +0100 point3d: Add interpolation src/graphene-point3d.c | 14 ++++++++++++++ src/graphene-point3d.h | 6 ++++++ 2 files changed, 20 insertions(+) commit 42225db9aa6ca8472c500958526973504aae1abd Author: Emmanuele Bassi Date: Thu May 1 19:08:20 2014 +0100 Add quaternion type src/Makefile.am | 2 + src/graphene-quaternion.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-quaternion.h | 71 ++++++++++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 5 files changed, 235 insertions(+) commit 9cc82850ee7ab55a29a96be82bd702cfeb4d5799 Author: Emmanuele Bassi Date: Fri May 2 19:00:09 2014 +0100 Add matrix.get_value() src/graphene-matrix.c | 99 ++++++++++++++++++++++++++------------------------- src/graphene-matrix.h | 6 ++++ 2 files changed, 56 insertions(+), 49 deletions(-) commit 3997e40a692e8a1aa6c7a497b6789ba14221440f Author: Emmanuele Bassi Date: Thu May 1 18:44:46 2014 +0100 matrix: Add untransformation functions src/graphene-matrix.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/graphene-matrix.h | 10 +++++++- 2 files changed, 70 insertions(+), 3 deletions(-) commit 70be8f4579fe1d3a28696782c5be6bbc06ab658b Author: Emmanuele Bassi Date: Thu May 1 18:42:39 2014 +0100 rect: Add more point-based accessors src/graphene-rect.c | 30 ++++++++++++++++++++++++++++++ src/graphene-rect.h | 6 ++++++ 2 files changed, 36 insertions(+) commit 12fcf5f94c22248ef9d8e188df21d0f8b518b936 Author: Emmanuele Bassi Date: Thu May 1 18:25:35 2014 +0100 matrix: Add skew operations src/graphene-matrix.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit cf65c238af354149aedb8b92f3560b6019f3fb4d Author: Emmanuele Bassi Date: Thu May 1 17:27:07 2014 +0100 Begin ARM NEON implementation of SIMD types Nowhere near complete, nor tested. src/graphene-simd4f-neon.h | 252 ++++++++++++++++++++++++++++++++++++++++++- src/graphene-simd4x4f-neon.h | 21 +++- 2 files changed, 271 insertions(+), 2 deletions(-) commit 20d62f9f55a52401860e4ba09f6bd121e68db5db Author: Emmanuele Bassi Date: Thu May 1 17:21:25 2014 +0100 build: Improve handling of compiler and linker flags For SSE2 and ARM NEON we want to pass the right compiler and linker flags only when needed. configure.ac | 19 ++++++++++++++----- src/Makefile.am | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 7 deletions(-) commit fd1d95ed11a114928e9a96f301ef3fbe3cce5987 Author: Emmanuele Bassi Date: Thu May 1 16:33:36 2014 +0100 Add more API to graphene_matrix_t src/graphene-matrix.c | 139 +++++++++++++++++++++++++++++++++++++++-- src/graphene-matrix.h | 4 +- src/graphene-simd4x4f-common.h | 56 ++++++++++++++++- 3 files changed, 192 insertions(+), 7 deletions(-) commit beb62235c3a5240e81e8ba1a883a59fcfdc225bc Author: Emmanuele Bassi Date: Thu May 1 16:33:16 2014 +0100 Add more API to graphene_rect_t src/graphene-rect.c | 234 +++++++++++++++++++++++++++++++++++++++++++++++++++- src/graphene-rect.h | 46 ++++++++++- 2 files changed, 275 insertions(+), 5 deletions(-) commit 41bd421db85fc4ebef8696a11db5d048eafaf99d Author: Emmanuele Bassi Date: Wed Apr 30 17:42:04 2014 +0100 Add more API to the matrix type configure.ac | 13 +- src/graphene-matrix.c | 429 ++++++++++++++++++++++++++++++++++++++++- src/graphene-matrix.h | 149 +++++++++++++- src/graphene-simd4f-gcc.h | 24 +++ src/graphene-simd4f-scalar.h | 20 ++ src/graphene-simd4f-sse.h | 16 ++ src/graphene-simd4x4f-common.h | 71 ++++++- src/graphene-simd4x4f.h | 18 +- src/tests/.gitignore | 1 + src/tests/Makefile.am | 3 +- src/tests/matrix.c | 30 +++ 11 files changed, 747 insertions(+), 27 deletions(-) commit a0a4c6926aa47c95eae7bac4386171037985ecd5 Author: Emmanuele Bassi Date: Wed Apr 30 16:38:11 2014 +0100 simd4x4f: Constify argument src/graphene-simd4x4f.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6bb47e8e52537028105a0d1602469c30a2f0627c Author: Emmanuele Bassi Date: Wed Apr 30 15:52:47 2014 +0100 Fix point3d compilation src/graphene-point3d.c | 1 - 1 file changed, 1 deletion(-) commit 1cbf7c50368d095c821e07824d5da98cec423550 Author: Emmanuele Bassi Date: Wed Apr 30 15:52:34 2014 +0100 Add quad data type src/Makefile.am | 3 ++ src/graphene-line-segment.h | 59 +++++++++++++++++++++++++ src/graphene-quad.c | 105 ++++++++++++++++++++++++++++++++++++++++++++ src/graphene-quad.h | 60 +++++++++++++++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 6 files changed, 229 insertions(+) commit a275d457f224a32f30b7811e59b94d471c5dbf27 Author: Emmanuele Bassi Date: Wed Apr 30 15:08:45 2014 +0100 Add point3d type src/Makefile.am | 2 + src/graphene-point3d.c | 157 +++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-point3d.h | 81 +++++++++++++++++++++++++ src/graphene-types.h | 2 + src/graphene.h | 2 + 5 files changed, 244 insertions(+) commit eaf44a0119e8d7871e9f56e50c2e4447a1426aaf Author: Emmanuele Bassi Date: Wed Apr 30 11:40:18 2014 +0100 simd4x4f: Add inverse() src/graphene-simd4x4f-common.h | 67 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 8 deletions(-) commit d4d58fca95bed772d32a9c90bad57d6c7c23f29b Author: Emmanuele Bassi Date: Wed Apr 30 11:16:41 2014 +0100 Ignore temporary files .gitignore | 1 + 1 file changed, 1 insertion(+) commit 5b6b873cccba6bbf8b7c3f8615806035d6db15b2 Author: Emmanuele Bassi Date: Wed Apr 30 11:15:41 2014 +0100 Add graphene_rect_t A rectangle type. src/Makefile.am | 2 + src/graphene-rect.c | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-rect.h | 70 +++++++++++++++++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 5 files changed, 207 insertions(+) commit 25a2c62db8d9d8c52d7ce7bd3a678fbe8a489e84 Author: Emmanuele Bassi Date: Wed Apr 30 11:10:59 2014 +0100 Add graphene_matrix_t A 4x4 matrix type. src/Makefile.am | 2 ++ src/graphene-matrix.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-matrix.h | 62 ++++++++++++++++++++++++++++++++++++++++++++ src/graphene-types.h | 2 ++ src/graphene.h | 2 ++ 5 files changed, 140 insertions(+) commit 5023ae1c7df1b8416dad44f4f767ef45501a9e2d Author: Emmanuele Bassi Date: Wed Apr 30 11:09:07 2014 +0100 Split out common simd4x4f operations configure.ac | 13 ++ src/Makefile.am | 1 + src/graphene-macros.h | 3 + src/graphene-simd4x4f-common.h | 313 +++++++++++++++++++++++++++++++++++++++++ src/graphene-simd4x4f.h | 258 ++------------------------------- 5 files changed, 343 insertions(+), 245 deletions(-) commit 62aab38ae4b02950255d1940af54a26728a7206a Author: Emmanuele Bassi Date: Tue Apr 29 14:38:29 2014 +0100 Add simd4f operations for simd4x4f inverse src/graphene-macros.h | 8 ++++++ src/graphene-simd4f-gcc.h | 58 +++++++++++++++++++++++++++++++++++++++++ src/graphene-simd4f-scalar.h | 44 +++++++++++++++++++++++++++++++ src/graphene-simd4f-sse.h | 62 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 172 insertions(+) commit 1d7b1aa6bbd6aaf7040ee6b10352b480dcfc7b3d Author: Emmanuele Bassi Date: Tue Apr 29 13:51:59 2014 +0100 Add matrices of simd4f vectors src/Makefile.am | 5 + src/graphene-simd4x4f-gcc.h | 51 +++++++ src/graphene-simd4x4f-neon.h | 29 ++++ src/graphene-simd4x4f-scalar.h | 61 ++++++++ src/graphene-simd4x4f-sse.h | 41 ++++++ src/graphene-simd4x4f.h | 324 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 511 insertions(+) commit cbf8b0e07da45e72b623047974547add556f7fe0 Author: Emmanuele Bassi Date: Mon Apr 28 18:56:06 2014 +0100 vectors: Move all vector structs in public Copy and paste of header guards prevented the vec3 and vec4 headers from functioning properly. src/graphene-vec2.h | 4 ++-- src/graphene-vec3.h | 20 +++++++++++++++++--- src/graphene-vec4.h | 18 ++++++++++++++++-- src/graphene-vectors-private.h | 11 ----------- src/graphene-vectors.c | 2 +- 5 files changed, 36 insertions(+), 19 deletions(-) commit 7ed2e115951d5949e7cecccc8543691d33ac18c1 Author: Emmanuele Bassi Date: Mon Apr 28 17:32:00 2014 +0100 Revert "Allow placing vec3 and vec4 structs on the stack" This reverts commit 113169698e4f89fffdba11c9027723c7ee9ef616. src/graphene-vec3.h | 14 -------------- src/graphene-vec4.h | 13 ------------- src/graphene-vectors-private.h | 11 +++++++++++ 3 files changed, 11 insertions(+), 27 deletions(-) commit b599295172d5e2f7a6f32f3fc20c193b25ba3281 Author: Emmanuele Bassi Date: Mon Apr 28 17:31:23 2014 +0100 Fix the scalar simd4f_t definition configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 113169698e4f89fffdba11c9027723c7ee9ef616 Author: Emmanuele Bassi Date: Mon Apr 28 14:12:13 2014 +0100 Allow placing vec3 and vec4 structs on the stack Like for vec2 structures. src/graphene-vec3.h | 14 ++++++++++++++ src/graphene-vec4.h | 13 +++++++++++++ src/graphene-vectors-private.h | 11 ----------- 3 files changed, 27 insertions(+), 11 deletions(-) commit 701ae9d7b5440120d404cf712f207ade8dc1238a Author: Emmanuele Bassi Date: Mon Apr 28 12:22:16 2014 +0100 vec2: Allow putting graphene_vec2_t on the stack Now that the definition of graphene_simd4f_t is public we can put the graphene_vec2_t structure on the stack, and avoid allocating it for all operations. src/graphene-macros.h | 6 ++++++ src/graphene-vec2.h | 14 ++++++++++++++ src/graphene-vectors-private.h | 5 ----- src/tests/vec2.c | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 5 deletions(-) commit c5268c1a260fd90b73e1b6dfea909d30bc1bbb48 Author: Emmanuele Bassi Date: Mon Apr 28 12:14:21 2014 +0100 Add equality function for point and size src/graphene-macros.h | 10 ++-------- src/graphene-point.c | 21 +++++++++++++++++---- src/graphene-point.h | 8 ++++++++ src/graphene-size.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 12 deletions(-) commit e6e26faa8d1993694241c9836d99e940d6ef235f Author: Emmanuele Bassi Date: Mon Apr 28 12:00:04 2014 +0100 Move simd4f typedef into its own header As a prelude to be able to put the vector types on the stack. .gitignore | 3 ++ configure.ac | 109 ++++++++++++++++++++++++++++++++++++++++-- src/Makefile.am | 19 +++++++- src/graphene-macros.h | 11 ----- src/graphene-simd4f-gcc.h | 4 +- src/graphene-simd4f-scalar.h | 7 --- src/graphene-simd4f-sse.h | 2 - src/graphene-simd4f.h | 11 +---- src/graphene-types.h | 2 + src/graphene-version-macros.h | 108 +++++++++++++++++++++++++++++++++++++++++ src/graphene-version.h.in | 35 ++++++++++++++ src/graphene.h | 3 ++ 12 files changed, 277 insertions(+), 37 deletions(-) commit 49ff8809f7cfc8d2fdec0c15f63a9be076aaf50a Author: Emmanuele Bassi Date: Mon Apr 28 10:28:24 2014 +0100 fixup: Licensing terms LICENSE | 33 +++++++++++++++------------------ src/graphene-macros.h | 23 +++++++++++++++++++++++ src/graphene-point.c | 31 +++++++++++++++++++++++++++++++ src/graphene-point.h | 23 +++++++++++++++++++++++ src/graphene-simd4f-gcc.h | 23 +++++++++++++++++++++++ src/graphene-simd4f-neon.h | 23 +++++++++++++++++++++++ src/graphene-simd4f-scalar.h | 24 ++++++++++++++++++++++++ src/graphene-simd4f-sse.h | 23 +++++++++++++++++++++++ src/graphene-simd4f.h | 23 +++++++++++++++++++++++ src/graphene-size.c | 31 +++++++++++++++++++++++++++++++ src/graphene-types.h | 23 +++++++++++++++++++++++ src/graphene-vec2.h | 23 +++++++++++++++++++++++ src/graphene-vec3.h | 23 +++++++++++++++++++++++ src/graphene-vec4.h | 23 +++++++++++++++++++++++ src/graphene-vectors-private.h | 23 +++++++++++++++++++++++ src/graphene-vectors.c | 23 +++++++++++++++++++++++ src/graphene.h | 23 +++++++++++++++++++++++ 17 files changed, 400 insertions(+), 18 deletions(-) commit d33500a49128f16745d9368fa452809c05746875 Author: Emmanuele Bassi Date: Sat Apr 26 19:32:17 2014 +0100 Add point and size types src/Makefile.am | 5 ++- src/graphene-point.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-point.h | 87 +++++++++++++++++++++++++++++++++++++ src/graphene-size.c | 68 +++++++++++++++++++++++++++++ src/graphene-types.h | 3 ++ src/graphene.h | 2 + src/tests/.gitignore | 2 + src/tests/Makefile.am | 2 + src/tests/point.c | 85 ++++++++++++++++++++++++++++++++++++ src/tests/size.c | 22 ++++++++++ 10 files changed, 392 insertions(+), 1 deletion(-) commit 7e3f7358a1fff34b93325081313eca3bb762a29f Author: Emmanuele Bassi Date: Fri Apr 25 15:41:36 2014 +0100 Initial import .gitignore | 34 ++ LICENSE | 22 + Makefile.am | 10 + README.md | 44 ++ autogen.sh | 38 ++ build/autotools/as-compiler-flag.m4 | 62 +++ build/autotools/glib-tap.mk | 135 ++++++ build/autotools/glibtests.m4 | 28 ++ build/autotools/tap-driver.sh | 652 ++++++++++++++++++++++++++ build/autotools/tap-test | 5 + configure.ac | 367 +++++++++++++++ src/Makefile.am | 60 +++ src/graphene-macros.h | 31 ++ src/graphene-simd4f-common.h | 92 ++++ src/graphene-simd4f-gcc.h | 213 +++++++++ src/graphene-simd4f-neon.h | 6 + src/graphene-simd4f-scalar.h | 216 +++++++++ src/graphene-simd4f-sse.h | 198 ++++++++ src/graphene-simd4f.h | 42 ++ src/graphene-types.h | 23 + src/graphene-vec2.h | 78 ++++ src/graphene-vec3.h | 87 ++++ src/graphene-vec4.h | 95 ++++ src/graphene-vectors-private.h | 28 ++ src/graphene-vectors.c | 904 ++++++++++++++++++++++++++++++++++++ src/graphene.h | 15 + src/graphene.pc.in | 11 + src/tests/.gitignore | 6 + src/tests/Makefile.am | 12 + src/tests/vec2.c | 31 ++ 30 files changed, 3545 insertions(+)