commit 55ada180561cfe6d44eb3cf0afa91df42fdef6d3 Author: Emmanuele Bassi Date: Thu Feb 22 22:59:10 2018 +0000 Release Graphene 1.6.2 (stable) Mostly fixes for the Meson build, to ensure it's a bit more idiomatic and conforms to what newer versions of Meson expect from a project. configure.ac | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9554b3ad880b980fc082653e02aaa7799f8e28f8 Author: Emmanuele Bassi Date: Thu Feb 22 22:57:45 2018 +0000 Revert "Add a dist script for cutting release tarballs" This reverts commit 2611e2cf20f2eb8d43b3067aed607ee667017286. Meson acquired the ability to create distribution tarballs, so we don't need a script any more. .gitattributes | 4 ---- make_release.sh | 16 ---------------- 2 files changed, 20 deletions(-) commit f11aba084a4ded3fcb159b9a85eca613c2824b3c Author: Emmanuele Bassi Date: Thu Feb 22 22:48:19 2018 +0000 build: Add introspection data to the internal dependency We want to ensure that the introspection data is available when depending on Graphene. This is especially useful when using Graphene as a sub-project. src/meson.build | 93 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 37 deletions(-) commit 443713aab40b79f2a204791fd97e6a18401310d0 Author: Emmanuele Bassi Date: Thu Feb 22 22:46:58 2018 +0000 build: Allow generating introspection data when cross-compiling It's perfectly possible to generate introspection data when cross-compiling; you just need to use a wrapper around g-ir-scanner. meson.build | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 2c85e26a255707029a181649724c1cb49891ee4b Author: Emmanuele Bassi Date: Thu Feb 22 22:45:30 2018 +0000 build: Fix the symbol visibility checks On Windows, we can use the `__declspec(dllexport)` syntax with all compilers, not just MSVC; the only thing we need to change the symbol visibility flag with GCC-like compilers, as the default visibility for the Visual C compiler is "hidden" already. meson.build | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 517fb5db3e739b648e57cd4b0069012c4798d90e Author: Emmanuele Bassi Date: Thu Feb 22 22:44:38 2018 +0000 build: Use a slightly more idiomatic Meson We can simplify the build instructions by using the facilities that Meson provides. meson.build | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit ba8c7b50a6257fd89691cffe4791109c7e71806d Author: Emmanuele Bassi Date: Thu Feb 22 22:43:52 2018 +0000 build: Bump up Meson dependency We are going to clean up the build a bit, so let's bump up to a non-ancient version of Meson. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26f9f067a63b63900493efad9f2b042b98857323 Author: Emmanuele Bassi Date: Wed Mar 29 16:05:39 2017 +0100 Bump up Meson version for AppVeyor CI We require a newer Meson to build Graphene. .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 88dc90e5a74a562bd05e61d67170b2c992cd3e61 Author: Emmanuele Bassi Date: Wed Mar 29 15:58:22 2017 +0100 Use the appropriate Python when generating introspection data We currently hardcode 'python' as the interpreter, but what we really want is to reuse the same Python interpreter as the one we use for Meson. Luckily, Meson has a 'python3' module that we can use to find the interpreter's path, and use that. This allows us to drop an implicit dependency on Python 2.x. Signed-off-by: Emmanuele Bassi meson.build | 2 +- src/identfilter.py | 6 ++---- src/meson.build | 5 ++++- 3 files changed, 7 insertions(+), 6 deletions(-) commit d57705a3779f835d31eb3f8ee402d3259c8d6801 Author: Emmanuele Bassi Date: Thu Apr 6 18:19:28 2017 +0100 Fix the 1.6 version macro checks We're still using 1.4 as the min required/max allowed thresholds. src/graphene-version-macros.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0db236320299fec02d3e7b3bc2924fc513fcdb07 Author: Emmanuele Bassi Date: Thu Mar 2 17:23:38 2017 +0000 Post-release version bump to 1.6.1 configure.ac | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit aa40018fa12905d024b85293ef49bfc7af1b5627 Author: Emmanuele Bassi Date: Thu Mar 2 17:21:17 2017 +0000 Release Graphene 1.6.0 configure.ac | 4 ++-- meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 9a45974db73d887d0e15d9d43140bdcf32e950cd Author: Emmanuele Bassi Date: Thu Mar 2 11:52:15 2017 +0000 Coding style fixes after uncrustify pass We're not going to commit all the changes found by uncrustify as the configuration is still not yet perfect. build/uncrustify.cfg | 228 +++++++++++++++++++++++----------------------- src/graphene-alloc.c | 8 +- src/graphene-box.c | 14 +-- src/graphene-euler.c | 6 +- src/graphene-gobject.c | 92 +++++++++---------- src/graphene-matrix.c | 17 ++-- src/graphene-quaternion.c | 3 +- src/graphene-rect.c | 26 +++--- src/graphene-size.c | 4 +- src/graphene-sphere.c | 8 +- src/graphene-vectors.c | 24 +++-- 11 files changed, 221 insertions(+), 209 deletions(-) commit 2611e2cf20f2eb8d43b3067aed607ee667017286 Author: Emmanuele Bassi Date: Thu Mar 2 11:16:59 2017 +0000 Add a dist script for cutting release tarballs Instead of using autotools and distcheck to cut a tarball, we can use this script and `git archive`. The tarball won't be self-hosting, but you'll need autotools or Meson installed. .gitattributes | 4 ++++ make_release.sh | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) commit 3faf27071e862d15a12e2bae246fb211f5ed8cbf Author: Emmanuele Bassi Date: Thu Mar 2 11:01:09 2017 +0000 Drop enable-debug option from the Meson build We can use the `buildtype` option to cover everything that the `--enable-debug` option does in the Autotools build. meson.build | 33 +++++---------------------------- meson_options.txt | 1 - 2 files changed, 5 insertions(+), 29 deletions(-) commit a1581bf168e174b275f43269d0a8038fe7a3f722 Author: Emmanuele Bassi Date: Thu Mar 2 10:42:33 2017 +0000 Use the appropriate include directory There's no need to specify an absolute path with newer versions of Meson; we use '.' as the inclusion path to specify the dependency on Graphene header files when building tests and benchmarks, as those live in a sub-directory of the main source directory. src/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50926ef02474571b8bd23d4f2093fa498f80ede9 Author: Emmanuele Bassi Date: Thu Mar 2 10:19:43 2017 +0000 Fix the sincosf() check Use compiler arguments to define '_GNU_SOURCE' so that it gets around side effects of how Meson constructs its function testing code. Additionally, as specified by the sincos() man page, link against the math library. meson.build | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7c412b8d6866843c93d6b0953a60951572067553 Author: Emmanuele Bassi Date: Thu Mar 2 10:18:36 2017 +0000 Allow no deep comparison for pointer types The pointer comparison rules are generally useful even without a deep comparison of their contents. src/graphene-private.h | 3 +++ 1 file changed, 3 insertions(+) commit 37dce5ed449996300ff82e5a506096cd39b67151 Author: Emmanuele Bassi Date: Thu Mar 2 10:17:23 2017 +0000 Drop \W3 from the MSVC compiler flags Meson will add compiler specific warnings depending on the build type. meson.build | 1 - 1 file changed, 1 deletion(-) commit cce62db5062143937c89ea8c796c6ea2bf59ad6e Author: Emmanuele Bassi Date: Wed Mar 1 14:19:48 2017 +0000 Drop an old TODO Meson arrays have a contains() method. src/bench/meson.build | 1 - 1 file changed, 1 deletion(-) commit b1de2a4de275e8e46857a63e6228206acc7475f6 Author: Emmanuele Bassi Date: Tue Feb 28 15:38:58 2017 +0000 Add uncrustify configuration We're going to use it to improve (and check) coding style consistency. build/uncrustify.cfg | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) commit 4fd83cde6fdb4481dd0034f035dd5f994326ef52 Author: Emmanuele Bassi Date: Tue Feb 28 13:41:46 2017 +0000 Add editorconfig file The editorconfig spec is a nicer, cross-editor way to define editor options. See: http://editorconfig.org/ for more information. .editorconfig | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 086793ef4177c1267c736fd42583c23590a3cab0 Author: Emmanuele Bassi Date: Tue Feb 28 13:38:28 2017 +0000 Add Git attributes file We want to allow disting using `git archive`, which means we need to have a way to ignore some files that are part of the repository when generating the dist archive. .gitattributes | 5 +++++ 1 file changed, 5 insertions(+) commit 08e1f2511b52987ec80b27f27aa65c47bc0abe83 Author: Emmanuele Bassi Date: Sat Feb 25 19:33:14 2017 +0000 Add equal() function for graphene_frustum_t Completely forgot to add it in 1.2, so let's plug this hole in the API. doc/graphene-sections.txt | 1 + src/graphene-frustum.c | 33 +++++++++++++++++++++++++++++++++ src/graphene-frustum.h | 4 ++++ 3 files changed, 38 insertions(+) commit 0ca839097d323496e222cf1030ffea28d62258c9 Author: Emmanuele Bassi Date: Sat Feb 25 19:26:24 2017 +0000 Add index for 1.6 symbols doc/graphene-docs.xml | 4 ++++ 1 file changed, 4 insertions(+) commit 5ca581ce35522aada1f2601443cba4353f9a56d2 Author: Emmanuele Bassi Date: Sat Feb 25 19:25:29 2017 +0000 Add 1.6 version macros src/graphene-version-macros.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 8852195557bbf9a802cecfbed5378d72b498aa60 Author: Emmanuele Bassi Date: Sat Feb 25 19:23:07 2017 +0000 Replace all equal() functions implementations Use the newly added pointer equality function. src/graphene-box.c | 20 +++++---- src/graphene-euler.c | 18 ++++---- src/graphene-plane.c | 28 +++++++------ src/graphene-plane.h | 4 +- src/graphene-point.c | 18 ++++---- src/graphene-point3d.c | 18 ++++---- src/graphene-quaternion.c | 24 ++++++----- src/graphene-ray.c | 20 +++++---- src/graphene-rect.c | 31 +++++++------- src/graphene-size.c | 20 +++++---- src/graphene-sphere.c | 22 +++++----- src/graphene-triangle.c | 22 ++++++---- src/graphene-vectors.c | 102 ++++++++++++++++++++-------------------------- 13 files changed, 188 insertions(+), 159 deletions(-) commit 3186aab07e33bd3522b752a21185b668e07b379d Author: Emmanuele Bassi Date: Sat Feb 25 19:08:25 2017 +0000 Add pointer comparison function All our comparison functions are predicated on the same behaviour: * if the two pointers are the same, return true * if either pointer is NULL, return false * perform type-specific comparisons Since the behaviour is the same, and we want to avoid discrepancies in the existing code and in any future type we may add, we should abstract the pointer comparison part into its own private function, so that we perform the common checks; then, we can call a type-specific internal function to perform the comparison on the content of the data. src/graphene-private.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c3a9c0cefbfa756ff0ac530d15b25c05e592fc91 Author: Emmanuele Bassi Date: Sat Feb 25 18:41:19 2017 +0000 Replace vec4 single channel reads with block read When converting a quaternion to angles we're doing separate channel reads on two different vectors. These are more expensive than a single block read, so let's replace them with calls to graphene_vec4_to_float() instead. The readability suffers slightly, but it's still a win. src/graphene-quaternion.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 2160b929b129e9ad972b4a2e4694d6cae8f074b3 Author: Emmanuele Bassi Date: Mon Feb 20 16:03:18 2017 +0000 Add cross file for MingW on Fedora The cross file allows to cross compile Graphene on Fedora, using the the MingW toolchain for both x86_64 and i686. build/cross/fedora-mingw32.txt | 18 ++++++++++++++++++ build/cross/fedora-mingw64.txt | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) commit 7844922f7af7feabe92fd1850a0efb45137e4d19 Author: Emmanuele Bassi Date: Thu Feb 16 12:40:43 2017 +0000 docs: Override version macros We don't need to see what they are defined to. doc/graphene-overrides.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit e3bf17456172c4036b7aab28447bde3eca27387b Author: Emmanuele Bassi Date: Thu Feb 16 12:40:05 2017 +0000 docs: Ignore graphene.h We don't really need it, as it does not define any symbol. doc/meson.build | 1 + 1 file changed, 1 insertion(+) commit 58a896179fb048cd666c44b299dfaf3ddf1caf92 Author: Emmanuele Bassi Date: Thu Feb 16 12:39:28 2017 +0000 Add builddir to the gtk-doc srcdir We have generated headers that we need to parse when generating the documentation. doc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba0cca5148aa87b225d4dee472a518d2f9e6e33e Author: Emmanuele Bassi Date: Thu Feb 16 12:38:33 2017 +0000 Bump Meson dependency In order to build the documentation correctly, without missing symbols, we need to bump up the dependency of Meson to 0.37.0. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cccfa8326dc4e6599f2a88189023390c3565db4e Author: Emmanuele Bassi Date: Tue Feb 14 22:23:15 2017 +0000 Add Appveyor build status badge README.md | 2 ++ 1 file changed, 2 insertions(+) commit 444b8b0db77fefe96a5324aafbd35793f7c86385 Author: Emmanuele Bassi Date: Tue Feb 14 21:43:12 2017 +0000 Add casts for the float lerp() operator This avoids the warning from MSVC: warning C4244: 'return': conversion from 'double' to 'float', possible loss of data And it's similar to what we do for the integer lerp(). src/graphene-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aec10d986b89a6298666563b62c10c03ad05ccf2 Author: Emmanuele Bassi Date: Tue Feb 14 21:41:19 2017 +0000 The licensing terms are in the LICENSE file Not the COPYING one. .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eacf9b47c4189ca8c796f662d885918d3687ce5c Author: Emmanuele Bassi Date: Tue Feb 14 21:39:37 2017 +0000 Rename the build directory for Appveyor We need a different name than `build`, because that directory already exists in the repository. .appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 18fa27704ac9edf34619d0990e3609321d8c1499 Author: Emmanuele Bassi Date: Tue Feb 14 21:36:19 2017 +0000 Add Appveyor support Just like we use Travis to perform CI on Graphene for Linux (and possibly macOS), we can use Appveyor to perform CI on Windows. Additionally, Appveyor can take the build artefacts and upload them to the GitHub release page, thus automating the release process for binary builds. .appveyor.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 8b665cedf4230a2b18458643850d06d34179f08c Author: Emmanuele Bassi Date: Sat Feb 11 15:59:30 2017 +0000 Add Meson build files to the autotools dist This way developers can pick up a Graphene dist tarball and still use Meson to build it. Makefile.am | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) commit b616fd02ad2efb828a9571659c8bcf79102d0eae Author: Emmanuele Bassi Date: Sat Feb 11 15:46:19 2017 +0000 Revert "Temporarily disable Clang from the Travis matrix" This reverts commit 57d652d9879baf155b8cc4ade291b8114cd09d23. The ebassi/grapheneci:latest Docker image has Clang 3.8 installed, so we can re-enable it on Travis. .travis.yml | 1 + 1 file changed, 1 insertion(+) commit 57d652d9879baf155b8cc4ade291b8114cd09d23 Author: Emmanuele Bassi Date: Sat Feb 11 15:29:05 2017 +0000 Temporarily disable Clang from the Travis matrix I'll have to add it to the Docker image we use for CI. .travis.yml | 1 - 1 file changed, 1 deletion(-) commit 19736972f1590ccf7fe08fde2cdb0a7cbd1a7e95 Author: Emmanuele Bassi Date: Sat Feb 11 15:23:00 2017 +0000 Use the right Docker image Copy-paste thinko, of course. .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8c725b7370fee7b5ba2296d9356a5211e7e58b35 Author: Emmanuele Bassi Date: Sat Feb 11 15:14:18 2017 +0000 Use a Docker container with Travis Instead of relying on the environment provided by Travis, which is really not up to date with the requirements of Graphene, let's use Docker to create a separate containerised environment. This allows us to build Graphene using Meson and Ninja, and use a decent compiler as well. .travis.yml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 7db8c5e6733ba237d9688ff1798fc8bad8508b69 Author: Emmanuele Bassi Date: Tue Jan 10 12:54:45 2017 +0000 Post-release version bump to 1.5.5 configure.ac | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 16c606424c0ab9a4490e6110fd2744d32ae5fe1c Author: Emmanuele Bassi Date: Tue Jan 10 12:45:41 2017 +0000 Release Graphene 1.5.4 (snapshot) configure.ac | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1e4740e4def3e13d2a25c4eff89cae70c1ca03c9 Author: Emmanuele Bassi Date: Tue Jan 10 12:46:50 2017 +0000 build: The identfilter.py script was moved It's now in the main source directory, instead of the separate build one; the EXTRA_DIST directive for automake needs to take the move into account. Makefile.am | 3 +-- src/Makefile.am | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) commit 9c695a1f6aaed227f18ff9658eb0a3f89bf36cf9 Author: Emmanuele Bassi Date: Mon Jan 9 14:17:06 2017 +0000 matrix: Do not use comparisons with floating point values We have graphene_approx_val() for these cases, to ensure minimal fuzziness around the FLT_EPSILON. src/graphene-matrix.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 235ba88e46ac86f9888514b6ca1a994d2c7d2c50 Author: Emmanuele Bassi Date: Mon Jan 9 14:15:55 2017 +0000 matrix: Use SIMD min/max to avoid a loop We can use the min_value() and max_value() operators to retrieve the minimum and maximum values of a set of coordinates, and avoid a loop with conditionals. src/graphene-matrix.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit 76b8814d774010f9fd725bd3c5e0c97909bfa6c9 Author: Emmanuele Bassi Date: Mon Jan 9 14:15:05 2017 +0000 More C99 use The matrix code could use some level of modernization. src/graphene-matrix.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 203dcdcd695d5390fa74dad7dc4e509452dddd88 Author: Emmanuele Bassi Date: Wed Jan 4 14:21:04 2017 +0000 Use C99 declaration after statement where convenient Since we required a C99 compiler we may as well use it. src/graphene-box.c | 8 ++----- src/graphene-euler.c | 15 ++++++------- src/graphene-frustum.c | 18 +++++----------- src/graphene-point.c | 26 ++++++++++------------ src/graphene-point3d.c | 30 ++++++++++---------------- src/graphene-quaternion.c | 55 +++++++++++++++++++++-------------------------- src/graphene-rect.c | 6 ++---- src/graphene-sphere.c | 6 ++---- 8 files changed, 64 insertions(+), 100 deletions(-) commit f846696b26f4e708e4e07331ba8fdce840003271 Author: Emmanuele Bassi Date: Wed Jan 4 14:18:41 2017 +0000 build: Remove declaration-after-statement warning We want to take advantage of this new, bleeding edge C standard called C99. build/autotools/graphene-macros.m4 | 1 - meson.build | 1 - 2 files changed, 2 deletions(-) commit 60e27cb742826a55bd094fe26578de504d228f6d Author: James Huang Date: Fri Jul 1 16:49:03 2016 -0700 Whitespace fixes Signed-off-by: Emmanuele Bassi src/graphene-simd4f.c | 2 +- src/graphene-simd4f.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a967f74a9003fa420b3ff788e6f98437016443fa Merge: 3f8dd1d df7e479 Author: Emmanuele Bassi Date: Wed Jan 4 13:45:47 2017 +0000 Merge pull request #89 from achadwick/only-one-aligned-alloc Use only one aligned alloc func, work around msys2 commit 3f8dd1dfa8e0d5e44fd89f9383d5dde8cddf493b Merge: 02b471c fb76122 Author: Emmanuele Bassi Date: Wed Jan 4 13:44:34 2017 +0000 Merge pull request #93 from achadwick/update-msys2-docs Update build docs for MSYS2 commit 02b471c84e789bd04d7a7d3ea9b95ff29af9d2b6 Merge: a3a959b 00a1c82 Author: Emmanuele Bassi Date: Wed Jan 4 13:42:55 2017 +0000 Merge pull request #94 from achadwick/fix-issue88-for-autotools autotools: Use Python to invoke identfilter.py commit 00a1c827061c7a77a3f638779ef6481aa8823774 Author: Andrew Chadwick Date: Tue Jan 3 20:20:13 2017 +0000 Travis: add python3 package dependency The autotools build now depends on Python3 for its introspection phase. The default Python in Ubuntu is still Python2. .travis.yml | 1 + 1 file changed, 1 insertion(+) commit fb761224de9c6af3dbd062961f8f2f621003eb8e Author: Andrew Chadwick Date: Tue Jan 3 17:50:08 2017 +0000 Update build docs for MSYS2 This commit updates README.py with better tested documentation for the MSYS2 platform on Windows. Previously the instructions would fail because "automake" is not a package. This commit also gets the user to select packages based on their intended target platform, a concept that matters on MSYS2 because each target has its own $PREFIX. The docs were also out of date in that they did not cover meson or the Python dependency. README.md | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) commit 482e4311187257ed42e0e902ff3a1e4a3d64e14e Author: Andrew Chadwick Date: Tue Jan 3 18:06:01 2017 +0000 autotools: Use Python to invoke identfilter.py We cannot rely on a shebang line on different platforms. Fixes https://github.com/ebassi/graphene/issues/88 for autotools. configure.ac | 3 +++ src/Makefile.am | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit df7e479cdff78859dd4290ce570c72a67c91a309 Author: Andrew Chadwick Date: Tue Jan 3 17:10:55 2017 +0000 Use only one aligned alloc function Closes: https://github.com/ebassi/graphene/issues/76 This commit makes the existing flat set of macro tests into a big if-else block, and selects only one aligned alloc function. If no such function is available, meson now terminates with an error and the build will fail. This is as recommended by @nirbheek, who suggests that meson should only search for a single aligned memory allocation function during configuration of graphene. Ref: https://github.com/ebassi/graphene/pull/86#issuecomment-264900534 On MSYS2, a buggy mismatch between the native mingw-w64 builtins and the standard headers causes meson < 0.37.0 to report that the function exists because the underlying builtin exists. Cascading the tests like this works around breaking configuration on the MSYS2 platform for meson<0.37 by excluding certain POSIX-only cases on Windows. Ref: https://github.com/mesonbuild/meson/issues/1083 meson.build | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit a3a959bc0e3dc8393ba57ce47afd8383cc8c845a Author: Emmanuele Bassi Date: Tue Jan 3 11:52:32 2017 +0000 build: Use Python to invoke identfilter.py We cannot rely on a shebang line on different platforms. Fixes #88 src/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 813c909ad620d9e9bf2743dc13ee77ec4bd4941e Author: Emmanuele Bassi Date: Wed Dec 28 15:17:37 2016 +0000 build: Only use '-Bsymbolic-functions' with GCC Both Clang and MSVC do not support this linker flag. Fixes #91 src/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 718586db3d4861f8e978e2612380b7ef74fc2749 Merge: 77a58ac 35e23bd Author: Emmanuele Bassi Date: Tue Dec 13 11:33:11 2016 +0000 Merge pull request #90 from benjamin-otte/master rect: Fix typo in graphene_rect_intersection() commit 35e23bd55edad6c5c25e787c62d4559dbdc2519c Author: Benjamin Otte Date: Tue Dec 13 08:21:57 2016 +0100 rect: Fix typo in graphene_rect_intersection() src/graphene-rect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77a58ace3ce30222a555c786e15a0b68592ee651 Merge: 002e964 58b01d2 Author: Emmanuele Bassi Date: Mon Dec 5 17:39:49 2016 +0000 Merge pull request #86 from centricular/malloc-stdlib-aligned-malloc Use malloc.h for _aligned_malloc instead of stdlib.h commit 58b01d2a390ec91a2d98c8de00bbdbd9c7813ca1 Author: Nirbheek Chauhan Date: Mon Dec 5 20:54:40 2016 +0530 Also use HAVE__ALIGNED_MALLOC in graphene-alloc.c Exactly the same code is used in exactly the same way, except that there's no restriction about the memory being aligned so we were falling back to unaligned memory. src/graphene-alloc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 14413fefcdb9a0fe91d43f5d2b52e54a90d2f613 Author: Nirbheek Chauhan Date: Mon Dec 5 20:27:41 2016 +0530 Use malloc.h for _aligned_malloc instead of stdlib.h Both stdlib.h and malloc.h define it on MinGW but it's only defined by malloc.h on MSVC, so just use malloc.h https://github.com/ebassi/graphene/pull/84#discussion_r90875361 meson.build | 2 +- src/bench/matrix.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 002e96461e9f46e759197b41001971a33f388134 Merge: 93d30c4 0d9a78a Author: Emmanuele Bassi Date: Mon Dec 5 10:01:51 2016 +0000 Merge pull request #84 from centricular/matrix-bench-aligned-alloc-mingw meson: Detect and use _aligned_malloc on MinGW commit 0d9a78a042b462f010c6d72210e7511d54dd0c8d Author: Nirbheek Chauhan Date: Sat Dec 3 02:51:23 2016 +0530 benchmarks: Use G_GINT64_FORMAT for printing gint64 %ld does not work on Windows, which requires %I64d and actually causes a segfault while trying to print the test results. src/bench/graphene-bench-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 778bb9980b90c0434a8ad9c7cbafec1fad4a0ba3 Author: Nirbheek Chauhan Date: Sat Dec 3 02:49:32 2016 +0530 meson: Detect and use _aligned_malloc on MinGW MinGW also uses _aligned_malloc(), not just MSVC. Without this, we were just returning uninitialized memory since no other aligned allocator was available. Closes #83 meson.build | 1 + src/bench/matrix.c | 14 ++++++++------ src/config.h.meson | 3 +++ 3 files changed, 12 insertions(+), 6 deletions(-) commit 93d30c4e409d0cf207ba601362a01336b0c7b413 Author: Emmanuele Bassi Date: Mon Nov 28 10:21:12 2016 +0000 Fix build on older GCC versions The fix for MSVC in commit 05b13b9972ade43115eba3204e45edbb2047aeb0 also applies to older versions of GCC — but not of Clang. Since there's really no reason to initialize static storage to zero, as it's guaranteed by the C standard, we can simply drop the explicit initialization altogether. src/graphene-point.c | 6 +----- src/graphene-point3d.c | 6 +----- src/graphene-rect.c | 6 +----- src/graphene-size.c | 6 +----- 4 files changed, 4 insertions(+), 20 deletions(-) commit 3fdf6d502de677142a9ed0d00a1e2b632028def7 Author: Emmanuele Bassi Date: Mon Nov 28 10:18:37 2016 +0000 Use c99 as the standard Don't use gnu99. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e897263f889b3bf440079510d822b940675d088a Author: Emmanuele Bassi Date: Mon Nov 28 10:17:09 2016 +0000 Switch from typeof to __auto_type Available since GCC 4.9 (that I could find), __auto_type avoids the double expansion of the argument that may occur with typeof. src/graphene-private.h | 36 ++++++++++++++++++------------------ src/tests/graphene-test-compat.h | 10 +++++----- 2 files changed, 23 insertions(+), 23 deletions(-) commit bc9ee83ae553fa33e17cfcdb72f422b4f2ad90fc Author: Emmanuele Bassi Date: Mon Nov 28 09:51:00 2016 +0000 Revert "Drop Travis CI" This reverts commit 63c680adc057fb5e238ed7770b31d5cb9afbf984. Re-enable Travis, now that we still support autotools builds. .travis.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit f152c07239f19f75e96a9173dfaae6e30347af9f Author: Emmanuele Bassi Date: Mon Nov 28 09:48:03 2016 +0000 build: Ensure we enable C99 with autotools Older (< 5) versions of GCC do not default to C99, so we need to enable the C99 standard. Meson does this already, but since we support autotools, we need to do that inside configure.ac as well. configure.ac | 3 +++ 1 file changed, 3 insertions(+) commit 15cdeb5ac82a6b89b973b319d17b40d59df410d2 Author: Emmanuele Bassi Date: Fri Nov 25 13:23:27 2016 +0000 Revert "Remove unused variable from pkg-config file template" This reverts commit 217ac682ba4686267e05e9ff495afa5585f4b097. It seems exec_prefix is required by pkg-config on Ubuntu. src/graphene.pc.in | 1 + 1 file changed, 1 insertion(+) commit 280d7b58fc97db71dde7d42470394b9b26d8a19f Author: Emmanuele Bassi Date: Thu Nov 24 14:27:44 2016 +0000 Remove unnecessary copyright symbol We're already using 'Copyright', and the © symbol means 'Copyright'; thus, writing: Copyright © ... translates to "Copyright Copyright". src/bench/graphene-bench-utils.c | 2 +- src/bench/graphene-bench-utils.h | 2 +- src/graphene-alloc-private.h | 28 ++++++++++++++-------------- src/graphene-alloc.c | 28 ++++++++++++++-------------- src/graphene-box.c | 2 +- src/graphene-box.h | 2 +- src/graphene-euler.c | 2 +- src/graphene-euler.h | 2 +- src/graphene-frustum.c | 2 +- src/graphene-frustum.h | 2 +- src/graphene-gobject.c | 2 +- src/graphene-gobject.h | 2 +- src/graphene-line-segment-private.h | 2 +- src/graphene-macros.h | 2 +- src/graphene-matrix.c | 2 +- src/graphene-matrix.h | 2 +- src/graphene-plane.c | 2 +- src/graphene-plane.h | 2 +- src/graphene-point.c | 2 +- src/graphene-point.h | 2 +- src/graphene-point3d.c | 2 +- src/graphene-point3d.h | 2 +- src/graphene-private.h | 2 +- src/graphene-quad.c | 2 +- src/graphene-quad.h | 2 +- src/graphene-quaternion.c | 2 +- src/graphene-quaternion.h | 2 +- src/graphene-rect.c | 2 +- src/graphene-rect.h | 2 +- src/graphene-simd4f.c | 2 +- src/graphene-simd4f.h | 2 +- src/graphene-simd4x4f.c | 2 +- src/graphene-simd4x4f.h | 2 +- src/graphene-size.c | 2 +- src/graphene-size.h | 2 +- src/graphene-sphere.c | 2 +- src/graphene-sphere.h | 2 +- src/graphene-triangle.c | 2 +- src/graphene-triangle.h | 2 +- src/graphene-types.h | 2 +- src/graphene-vec2.h | 2 +- src/graphene-vec3.h | 2 +- src/graphene-vec4.h | 2 +- src/graphene-vectors-private.h | 2 +- src/graphene-vectors.c | 2 +- src/graphene-version-macros.h | 2 +- src/graphene.h | 2 +- 47 files changed, 73 insertions(+), 73 deletions(-) commit e7b15a15d9ec128032ff7c50616bfff5ae012020 Author: Emmanuele Bassi Date: Thu Nov 24 13:35:27 2016 +0000 build: Drop custom inclusion paths for introspection The gnome.generate_gir() method will add the source and build directories to the inclusion paths. src/meson.build | 4 ---- 1 file changed, 4 deletions(-) commit b1ef68435ba624f0a1187676e4f22f3a65f2431f Author: Emmanuele Bassi Date: Tue Nov 22 16:36:28 2016 +0000 Sync version inside configure.ac configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7ac0652edb64a8b59c612a23f33dfb2e8539b83c Author: Emmanuele Bassi Date: Tue Nov 22 16:35:57 2016 +0000 Revert "Drop autotools" This reverts commit fea8dcc326abfc127753bce402ccb1297cc44797. Apparently, building from autotools is still a requirement. .gitignore | 45 +++ Makefile.am | 62 +++ autogen.sh | 46 +++ build/autotools/ax_pthread.m4 | 332 ++++++++++++++++ build/autotools/glib-tap.mk | 135 +++++++ build/autotools/glibtests.m4 | 28 ++ build/autotools/graphene-macros.m4 | 161 ++++++++ build/autotools/introspection.m4 | 96 +++++ build/autotools/tap-driver.sh | 652 ++++++++++++++++++++++++++++++ build/autotools/tap-test | 5 + build/solaris-hwcap.mapfile | 30 ++ configure | 70 ---- configure.ac | 794 +++++++++++++++++++++++++++++++++++++ doc/Makefile.am | 49 +++ src/Makefile.am | 186 +++++++++ src/bench/Makefile.am | 83 ++++ src/tests/Makefile.am | 33 ++ 17 files changed, 2737 insertions(+), 70 deletions(-) commit 496e19a6477ec1b5daccfa8587fa48cbe00961ed Merge: 967d5b9 836e8ae Author: Emmanuele Bassi Date: Tue Nov 22 15:31:50 2016 +0000 Merge pull request #81 from TingPing/gtkdoc-refs build: Fix gtk-doc references to glib commit 836e8ae852613ed4028ae07b7a44822bad7902b8 Author: Patrick Griffis Date: Tue Nov 22 10:20:56 2016 -0500 build: Fix gtk-doc references to glib doc/meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 967d5b943a87b150883ae93154d5fa89d6ae0ce3 Author: Emmanuele Bassi Date: Tue Nov 22 14:12:02 2016 +0000 Post-release version bump to 1.5.3 meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 815a0b16af16911da2f653371959e527b65f9bbe Author: Emmanuele Bassi Date: Tue Nov 22 14:10:06 2016 +0000 Relase 1.5.2 (snapshot) meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e7c5b07a3372bf43ad5588d88dbc59573ab434 Author: Igor Gnatenko Date: Tue Nov 22 02:46:01 2016 +0100 build: install tests into libexecdir Tests are ELF files, so in case of multilib they will conflict. Using libexecdir will tell that this package is not multilib. src/tests/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21e048e5be3f23d4e430716a2bc57f9f71c0f7c2 Merge: 8a7a4a3 05b13b9 Author: Emmanuele Bassi Date: Tue Nov 22 13:43:43 2016 +0000 Merge pull request #79 from fanc999/msvc.build Fix build of 1.5.1 on Visual Studio commit 05b13b9972ade43115eba3204e45edbb2047aeb0 Author: Chun-wei Fan Date: Tue Nov 22 14:13:16 2016 +0800 src/: Fix build on Visual Studio (and possibly other compilers) On Visual Studio at least, in static variables and global constants, one is not allowed to have non-constant initializers[1], which will cause the build to break with C2099 (initializer not constant). So, use only constants to initialize the global static constants that we now switched to C99-style initialation macros, which unfortunately means that we have to initialize them in the formoer way. Note that these initializer macros work fine on Visual Studio otherwise, including building GTK+-3.89.1. [1]: http://stackoverflow.com/questions/6131455/compile-error-c2099-initializer-is-not-a-constant, please see first reply. src/graphene-point.c | 4 ++++ src/graphene-point3d.c | 4 ++++ src/graphene-rect.c | 4 ++++ src/graphene-size.c | 4 ++++ 4 files changed, 16 insertions(+) commit 2692396eccdcc6eb9e0ff94e50b46871fe6c366c Author: Chun-wei Fan Date: Tue Nov 22 14:10:01 2016 +0800 MSVC: src/config.h.meson: Define inline as __inline 'inline' is only supported on plain C directly on Visual Studio 2015 and later, so in order to build properly, we need to define inline as __inline for pre-2015 builds. src/config.h.meson | 5 +++++ 1 file changed, 5 insertions(+) commit 8a7a4a39c63000ca5f41ddfce8ce80d792f6b9cc Merge: 217ac68 2f620de Author: Emmanuele Bassi Date: Tue Nov 22 00:04:09 2016 +0000 Merge pull request #77 from ignatenkobrain/meson build: use join_paths() commit 2f620de6f6c496dded9e5da57e6c5ac33ba48f6d Author: Igor Gnatenko Date: Tue Nov 22 00:27:19 2016 +0100 build: use join_paths() Doing magic around "/" is not portable and causing issues if paths are absolute. Signed-off-by: Igor Gnatenko doc/meson.build | 10 +++++----- meson.build | 16 +++------------- src/meson.build | 8 ++++---- src/tests/meson.build | 2 +- 4 files changed, 13 insertions(+), 23 deletions(-) commit 217ac682ba4686267e05e9ff495afa5585f4b097 Author: Emmanuele Bassi Date: Mon Nov 21 23:03:34 2016 +0000 Remove unused variable from pkg-config file template src/graphene.pc.in | 1 - 1 file changed, 1 deletion(-) commit 570f0630990fd881e7afb9975c3654d92af54883 Author: Emmanuele Bassi Date: Mon Nov 21 23:02:24 2016 +0000 build: Fix base directories for pkg-config files The 'libdir' option now contains the full path, instead of a path relative to the 'prefix' option. The 'datadir' and 'includedir' options can still contain a relative path, so we need to check. meson.build | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit f249660fcf98875d1baa9d4e987f024277df8ef2 Author: Emmanuele Bassi Date: Mon Nov 21 22:59:26 2016 +0000 build: Bump up required version of Meson meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80d553a532346f3044aee973af67c04f8a914ffd Author: Emmanuele Bassi Date: Mon Nov 21 15:16:40 2016 +0000 tests/matrix: Use point3d init macro Instead of compound literals or temporary variables. src/tests/matrix.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit 71da6a0425eb34a298767c51b68eb4c12e5e18f8 Author: Emmanuele Bassi Date: Mon Nov 21 15:08:32 2016 +0000 Update initialization macros for C99 Since Graphene requires a C99-compliant compiler to build, we should also require a C99-compliant compiler to use it. The point, point3d, size, and rect initialization macros should use designated initializers, to ensure we're initializing the right fields while keeping the code legible. Additionally, by using the type cast notation, we support using the initialization macros as part of a compond literal, so we can do: graphene_matrix_translate (&m, &GRAPHENE_POINT3D_INIT (x, y, z)); and avoid a temporary variable. src/graphene-point.h | 6 +++--- src/graphene-point3d.h | 8 ++++---- src/graphene-rect.h | 12 ++++++------ src/graphene-size.h | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) commit 0eea281cff027502e007922f64ef6cebb8b0201b Author: Emmanuele Bassi Date: Mon Nov 21 15:07:05 2016 +0000 Bump up version Now that GTK+ is using Meson, it's a good idea to start opening up the master branch for further API and development, without breaking the 1.4 API stability. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99b60ff092514ccddbd91151ae1cc67360eed060 Author: Emmanuele Bassi Date: Mon Nov 21 14:46:20 2016 +0000 matrix: Add fuzzyness in to_2d() checks We currently do fuzzy checks within the float epsilon for the is_2d() operator, but we do straight comparisons for the to_2d() one — which means that a 2D 4x4 matrix may be detected correctly, but would not be converted into the equivalent 2D affine matrix. src/graphene-matrix.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit f36d2c0f727daf6f7083af61cc3ace54e218928e Author: Emmanuele Bassi Date: Mon Nov 21 14:23:59 2016 +0000 Add private 'approx' operator We can use it to avoid the `fabsf() < FLT_EPSILON` dance. src/graphene-private.h | 7 +++++++ 1 file changed, 7 insertions(+) commit ae0fafb8133ddf503797b21ea5136db477d4c032 Author: Emmanuele Bassi Date: Tue Nov 8 11:52:29 2016 +0000 build: Add support for includedir to build-api wrapper configure | 1 + 1 file changed, 1 insertion(+) commit 20a6c4fb09b7a948a88146237965edb04a04a1fb Author: Emmanuele Bassi Date: Tue Nov 8 11:40:23 2016 +0000 build: Pass more options from the build-api wrapper Meson has more options conforming to the one expected by the build-api, so we should pass them through. configure | 6 ++++++ 1 file changed, 6 insertions(+) commit 153ae66c53037082ddcca2b9a4bfce5fe8739fe5 Author: Emmanuele Bassi Date: Tue Nov 8 11:39:31 2016 +0000 build: Exec the right command It doesn't help our build if we have a fallback and don't use it. configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f39f714cf9af97bdae2bf8e1d57518bfa4482902 Author: Emmanuele Bassi Date: Tue Nov 8 11:33:05 2016 +0000 build: Fall back if `meson.py` is not renamed to `meson` In some cases, python's setup.py does not do a rename and we get a `meson.py` instead of a `meson`. configure | 5 +++++ 1 file changed, 5 insertions(+) commit 63c680adc057fb5e238ed7770b31d5cb9afbf984 Author: Emmanuele Bassi Date: Tue Nov 8 11:21:33 2016 +0000 Drop Travis CI The Travis CI build environment is always hopelessly outdated, and we're depending on various new components: * recent GCC and Clang * Ninja * Python 3 * Meson One way to handle CI for Graphene is to use Docker and build our own custom image, but that requires some more work. For the time being, we're going to rely on GNOME Continuous to actually check that Graphene builds. .travis.yml | 22 ---------------------- 1 file changed, 22 deletions(-) commit b6754538fb97ded030bd686edb0421c9eaaff54f Author: Emmanuele Bassi Date: Tue Nov 8 10:30:33 2016 +0000 build: Do not require math library Various platforms have libm bundled in their libc. meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fea8dcc326abfc127753bce402ccb1297cc44797 Author: Emmanuele Bassi Date: Thu Nov 3 17:36:53 2016 +0000 Drop autotools Switch from a mixed autotools/meson environment to a pure meson one. We maintain backward compatibility by respecting the "build api": https://github.com/cgwalters/build-api So that automated build environments do not have to write ad hoc code in order to keep building Graphene — as long as they have Meson and Ninja installed. .gitignore | 45 --- Makefile.am | 62 --- autogen.sh | 46 --- build/autotools/ax_pthread.m4 | 332 ---------------- build/autotools/glib-tap.mk | 135 ------- build/autotools/glibtests.m4 | 28 -- build/autotools/graphene-macros.m4 | 161 -------- build/autotools/introspection.m4 | 96 ----- build/autotools/tap-driver.sh | 652 ------------------------------ build/autotools/tap-test | 5 - build/solaris-hwcap.mapfile | 30 -- configure | 58 +++ configure.ac | 794 ------------------------------------- doc/Makefile.am | 49 --- src/Makefile.am | 186 --------- src/bench/Makefile.am | 83 ---- src/tests/Makefile.am | 33 -- 17 files changed, 58 insertions(+), 2737 deletions(-) commit 60853ec8772c2b39aabb2538f497f3d0c976dac0 Author: Emmanuele Bassi Date: Thu Nov 3 17:32:01 2016 +0000 build: Generate the API reference through Meson The current build rules for the API reference are insufficient and generally broken. In order to fix them, we need to match what gtk-doc.make does, by including a `gtkdocentitities.ent` template that is going to be included by the main XML. Additionally, we need to include the assets and fix the generation of the ancillary files. Currently, Meson will ignore `graphene-overrides.txt`, but the next version will automatically copy it from srcdir to builddir. doc/meson.build | 47 ++++++++++++++++++++++++++++++++----------- doc/xml/gtkdocentities.ent.in | 8 ++++++++ doc/xml/meson.build | 10 +++++++++ 3 files changed, 53 insertions(+), 12 deletions(-) commit c4009fc6fb8cb00617c72918f041c7514e0a2087 Merge: 5aa9fb7 91212d2 Author: Emmanuele Bassi Date: Tue Nov 8 10:28:14 2016 +0000 Merge pull request #73 from fanc999/msvc.build build: Allow proper build with Visual Studio out-of-the-box commit 91212d26c2f5ba5bd7b7fd2ea5b94ef5397409db Author: Chun-wei Fan Date: Thu Oct 20 16:45:56 2016 +0800 meson.build: Make it more MSVC-friendly We are checking for compiler flags for warnings for GCC, but not Visual Studio, so do a similar check based on those that we have in GLib's msvc_recommended_pragmas.h when we are compiling for Visual Studio (the advantage of being the one that maintains the MSVC builds files for the GTK+ stack :)). As a result, we avoid using GCC-style compiler/linker flags, so that we don't choke meson's configure process and avoid needless warnings during the build. We also want to include SSE2 support for all x64 Visual Studio builds and x86/32-bit Visual Studio 2013+ builds, as the SSE2 intrinsics are supported on Visual Studio for a good while (since the 2008 days or before), but as we will be passing in 4 __m128i's when we do graphene_simd4x4f_init(), we can only support Visual Studio 2013 and later as a special flag which is now in the code is supported to allow the code to build with the 32-bit ABI. meson.build | 103 ++++++++++++++++++++++++++++++-------------- src/graphene-config.h.meson | 10 ++++- src/meson.build | 8 +++- 3 files changed, 87 insertions(+), 34 deletions(-) commit 5aa9fb770672314c5c9b10f456fd846b41ec6c91 Author: Emmanuele Bassi Date: Tue Oct 11 11:35:44 2016 +0100 docs: Update the build instructions We use Meson and ninja by default. README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 7967ca41aafe04ad49545910b75059893a369d63 Author: Emmanuele Bassi Date: Tue Oct 11 11:26:50 2016 +0100 build: Use compiler.has_argument() Instead of our homegrown solution. meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5a0f8c15b370672c44abb39249e96daa1f97e275 Author: Emmanuele Bassi Date: Tue Oct 11 10:22:59 2016 +0100 build: Encode interface age usage This should force us in ensuring new API only lands in development cycles. meson.build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7842b7418fac765e4a4958e807df4c0436297305 Author: Emmanuele Bassi Date: Sun Oct 2 14:29:39 2016 +0100 build: Ensure soname versioning matches We need to ensure that the soname used when installing the Graphene shared object is the same when building with Autotools and when building with Meson. The current scheme, mutuated from GTK+, is: libgraphene-1.0.so `- .0 `- (minor * 100 + micro - interface) `- interface Where `interface` is equal to `micro`, unless it's reset to 0 — which happens every time we add new API, during development cycles. This means that, for version `1.4.1`, the soname of the installed shared library is `0.400.1`, whereas for version `1.5.8`, the soname would be `0.508.0`. meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6781091d55a29ad27b8f80a213f78d67278ff581 Author: Emmanuele Bassi Date: Sun Oct 2 14:12:46 2016 +0100 build: Clean up the Meson build Depend on Meson ≥ 0.34.0 so we can use: * join() * is_odd() This allows us to have an 'auto' setting for the `enable-debug` configuration option, which enables debugging depending on whether we're in a stable or unstable development cycle. It also allows us to simplify the SIMD configuration variable by avoiding an unnecessary foreach. We also can clean up some unused variables here and there. meson.build | 49 +++++++++++++++++++++++-------------------------- meson_options.txt | 2 +- 2 files changed, 24 insertions(+), 27 deletions(-) commit 0942ce72ddc1b722f3b8c8596b32f7a4dc20e485 Merge: c2d3aae b1a90ba Author: Emmanuele Bassi Date: Sat Oct 1 10:11:47 2016 +0100 Merge branch 'wip/meson' Switch to the Meson build system[1] by default. [1]: http://mesonbuild.com commit b1a90ba789de3a248ce7006afaf8f9bf62ff4b24 Author: Emmanuele Bassi Date: Sat Oct 1 10:10:47 2016 +0100 Revert "Travis-CI has no support for Autotools" This reverts commit 54273153f99571c713841780497d143ebc0adde0. .travis.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a42a2edb0170f7ffc2f87f5c7fbd4ac16ddc564b Author: Emmanuele Bassi Date: Sat Oct 1 10:09:28 2016 +0100 Revert "build: Remove autotools" This reverts commit a244f8ea262a929dfd36d20645de233e4afa3a92. We'll merge the meson build into master, but keep autotools for a while while various stuff gets ported. Makefile.am | 62 +++ README.md | 74 +++- autogen.sh | 46 +++ build/autotools/ax_pthread.m4 | 332 +++++++++++++++ build/autotools/glib-tap.mk | 135 +++++++ build/autotools/glibtests.m4 | 28 ++ build/autotools/graphene-macros.m4 | 161 ++++++++ build/autotools/introspection.m4 | 96 +++++ build/autotools/tap-driver.sh | 652 ++++++++++++++++++++++++++++++ build/autotools/tap-test | 5 + build/solaris-hwcap.mapfile | 30 ++ configure.ac | 797 +++++++++++++++++++++++++++++++++++++ doc/Makefile.am | 49 +++ src/Makefile.am | 186 +++++++++ src/bench/Makefile.am | 83 ++++ src/tests/Makefile.am | 33 ++ 16 files changed, 2758 insertions(+), 11 deletions(-) commit 1b37892d3663f9f4838fd41ed2efe1fc2e2a3024 Author: Emmanuele Bassi Date: Fri Jun 17 20:08:57 2016 +0100 docs: Move contributing guidelines to its own file CONTRIBUTING.md | 32 ++++++++++++++++++++++++++++++++ README.md | 33 --------------------------------- 2 files changed, 32 insertions(+), 33 deletions(-) commit c2d3aae9432c1a465beda7433a6771c8fcdf09dc Merge: 8b3222a e9b85db Author: Emmanuele Bassi Date: Mon Sep 26 10:50:35 2016 +0100 Merge pull request #72 from fheger/pr2 Fixing build errors on ARM NEON. commit 8b3222ae1475738e82c2a44ac1b1540c9ed259d7 Merge: 67452ba 2e5b724 Author: Emmanuele Bassi Date: Mon Sep 26 10:49:32 2016 +0100 Merge pull request #71 from fheger/pr1 Fixing build errors on ARM NEON. commit e9b85dbc920148e779ee0fccb40566ce07d829d7 Author: Frederik Heger Date: Sun Sep 25 21:29:41 2016 -0400 Fixing build errors on ARM NEON. Part 2 of splitting PR #64 into two separate PRs. The underlying ARM fast type that graphene_simd4f_get calls into requires its inputs to be compile time constants. Passing the "col" argument in was causing the build to fail. src/graphene-matrix.c | 20 +++++++++++++++++++- src/graphene-simd4f.c | 18 +++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) commit 2e5b7245101a6ef96a40d6c8ce64ec9bc834c652 Author: Frederik Heger Date: Sun Sep 25 20:43:35 2016 -0400 Fixing build errors on ARM NEON. Part 1 of splitting PR #64 into two separate PRs. src/graphene-simd4f.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit ff112cae0a36a42794b18cbb2e7a1a359ad7b307 Merge: 5427315 8074b4c Author: Emmanuele Bassi Date: Wed Sep 21 10:57:20 2016 +0100 Merge pull request #70 from thiblahute/wip/meson Fix building graphene as a meson submodule commit 8074b4ca7e61d3f14bfc768206927fea60dd0d18 Author: Thibault Saunier Date: Tue Sep 20 21:11:54 2016 -0300 meson: Use current_*_dir instead of *_root where it makes sense src/meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 458192275264c86e52a0c6d6fb41daaa84fd8122 Author: Thibault Saunier Date: Tue Sep 20 20:23:34 2016 -0300 meson: Fix library version and soversion Doing the same as in GStreamer which I believe is properly following same scheme as libtool. meson.build | 5 +++++ src/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit c0d42512d770eaaf0e304e87077e6fdb9b92c2c2 Author: Thibault Saunier Date: Tue Sep 20 20:10:56 2016 -0300 meson: Do not use add_global_arguments but instead pass the args ourself Otherwise with recent version of meson we get the following error when building graphene as a subproject: Global arguments can not be set in subprojects because there is no way to make that reliable. meson.build | 15 ++++++++------- src/meson.build | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) commit 67452baade8156c08872ff6d70f8c992357ba7d0 Merge: 31cb295 c04f2d3 Author: Emmanuele Bassi Date: Thu Sep 1 13:13:58 2016 +0100 Merge pull request #69 from ford-prefect/master simd4f: Fix a compilation error commit c04f2d3d9585dd220b5a9c6299dbd47d8811d7da Author: Arun Raghavan Date: Thu Sep 1 09:28:45 2016 +0530 simd4f: Fix a compilation error Not sure why the missing semicolon didn't get caught before. Error: In file included from graphene-simd4f.c:42:0: graphene-simd4f.c: In function 'graphene_simd4f_reciprocal': graphene-simd4f.h:863:3: error: expected ';' before '}' token })) ^ graphene-simd4f.c:439:10: note: in expansion of macro 'graphene_simd4f_reciprocal' return graphene_simd4f_reciprocal (s); ^ Makefile:817: recipe for target 'libgraphene_1_0_la-graphene-simd4f.lo' failed Compiler: $ aarch64-linux-android-gcc --version aarch64-linux-android-gcc (GCC) 4.9.x 20150123 (prerelease) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Command: make[3]: Entering directory '/home/arun/code/gstreamer/cerbero/build/sources/android_universal/arm64/graphene-1.4.0/src' /bin/sh ../libtool --tag=CC --mode=compile ccache aarch64-linux-android-gcc -fuse-ld=gold -std=gnu99 -DHAVE_CONFIG_H -I. -DGRAPHENE_COMPILATION=1 -DG_LOG_DOMAIN=\"Graphene\" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_30 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -I../src -I../src -DGRAPHENE_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS --sysroot=/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64 -I/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64/usr/include -DANDROID -DPIC -O3 -ffast-math -fstrict-aliasing -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Wcast-align -Wno-unused-local-typedefs -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -fvisibility=hidden -I/home/arun/code/gstreamer/cerbero/build/dist/android_universal/arm64/include/glib-2.0 -I/home/arun/code/gstreamer/cerbero/build/dist/android_universal/arm64/lib/glib-2.0/include -Wall -g --sysroot=/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64 -I/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -DANDROID -DPIC -Wa,--noexecstack -MT libgraphene_1_0_la-graphene-simd4f.lo -MD -MP -MF .deps/libgraphene_1_0_la-graphene-simd4f.Tpo -c -o libgraphene_1_0_la-graphene-simd4f.lo `test -f 'graphene-simd4f.c' || echo './'`graphene-simd4f.c libtool: compile: ccache aarch64-linux-android-gcc -fuse-ld=gold -std=gnu99 -DHAVE_CONFIG_H -I. -DGRAPHENE_COMPILATION=1 -DG_LOG_DOMAIN=\"Graphene\" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_30 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -I../src -I../src -DGRAPHENE_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS --sysroot=/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64 -I/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64/usr/include -DANDROID -DPIC -O3 -ffast-math -fstrict-aliasing -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Wcast-align -Wno-unused-local-typedefs -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -fvisibility=hidden -I/home/arun/code/gstreamer/cerbero/build/dist/android_universal/arm64/include/glib-2.0 -I/home/arun/code/gstreamer/cerbero/build/dist/android_universal/arm64/lib/glib-2.0/include -Wall -g --sysroot=/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64 -I/home/arun/code/gstreamer/cerbero/build/android-ndk-r12b/platforms/android-21/arch-arm64/usr/include -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fPIC -DANDROID -DPIC -Wa,--noexecstack -MT libgraphene_1_0_la-graphene-simd4f.lo -MD -MP -MF .deps/libgraphene_1_0_la-graphene-simd4f.Tpo -c graphene-simd4f.c -fPIC -DPIC -o .libs/libgraphene_1_0_la-graphene-simd4f.o In file included from graphene-simd4f.c:42:0: graphene-simd4f.c: In function 'graphene_simd4f_reciprocal': graphene-simd4f.h:863:3: error: expected ';' before '}' token })) ^ graphene-simd4f.c:439:10: note: in expansion of macro 'graphene_simd4f_reciprocal' return graphene_simd4f_reciprocal (s); ^ Makefile:817: recipe for target 'libgraphene_1_0_la-graphene-simd4f.lo' failed src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 31cb2956b660afb45930a22f6eb9752097a31e35 Author: Emmanuele Bassi Date: Sat Aug 27 19:55:45 2016 +0100 build: Remove unnecessary ACLOCAL redefinition A bit of autoconf I cargo-culted from somewhere, but it's not necessary to the actual build. configure.ac | 3 --- 1 file changed, 3 deletions(-) commit 6051e035dc6aa1164250883a11e3e64a1c2ff0c9 Author: Emmanuele Bassi Date: Tue Aug 23 10:25:03 2016 +0100 tests/point: Use fuzzy point comparison macro Now that we have it. src/tests/point.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 884f8b88ea552fd7938e4e84c4df405af63b5406 Author: Emmanuele Bassi Date: Tue Aug 23 10:19:19 2016 +0100 tests: Don't use vec2 macro for fuzzy point testing We can avoid the point → vec2 conversion and just use the near() operator that graphene_point_t already exposes. src/tests/graphene-test-compat.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit c7df7d03dd9b585f173729a842f2a0377e1b7326 Author: Emmanuele Bassi Date: Tue Aug 16 15:50:22 2016 +0100 build: Require automake 1.11 Sadly, Travis is using a ridiculous version of Ubuntu as a base, which means that the automake version we get is 1.11 at most. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7e888061b08c92344c46b185bba3167355f6e84 Author: Emmanuele Bassi Date: Tue Aug 16 15:22:29 2016 +0100 matrix: Fix transform_rect() Apply the same change that fixed transform_bounds() in d1e67752. src/graphene-matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 46a6cdefe7e0d4ba898b291f8aa05368459a210c Author: Emmanuele Bassi Date: Mon Jun 27 16:31:58 2016 +0100 Add GitHub templates These templates are useful for contributors. .github/CONTRIBUTING.md | 34 ++++++++++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE.md | 9 +++++++++ .github/PULL_REQUEST_TEMPLATE.md | 14 ++++++++++++++ 3 files changed, 57 insertions(+) commit 63709bf440c40fb1d038027a075301aa6758a915 Author: Emmanuele Bassi Date: Mon Jun 27 16:24:01 2016 +0100 build: Enable subdir-objects And prepare ourselves for the glorious autotools future (while we still use autotools). configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05986f3eb521ab91be6f65c0b16992813223498e Merge: 4e2dc73 d1e6775 Author: Emmanuele Bassi Date: Tue Aug 16 15:19:05 2016 +0100 Merge pull request #68 from matthiasclasen/bounds-test A test showing breakage commit d1e67752d2b08e8817f39b30b39bb728c3b87da5 Author: Matthias Clasen Date: Tue Aug 16 10:08:38 2016 -0400 transform_bounds: Take translations into account To apply transformations, we need to put a 1 in the w coordinate and multiply 4x4, not 3x3. This fixes the /matrix/2d/transform_bound test. src/graphene-matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8dd608c7f9cf776ae2e6a97ac59d04bb24f7840c Author: Matthias Clasen Date: Tue Aug 16 10:07:43 2016 -0400 Use named getters in a few places get_x/_y is more obvious than get(...,0). src/graphene-matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7769b2f1afa66bded3ad8772b05cdbddf0b40bca Author: Matthias Clasen Date: Tue Aug 16 10:10:07 2016 -0400 Simplify a test slightly Not need to set up the translation matrix in two steps here. src/tests/matrix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit cd86791b3d6a479e3073cb8f5ac4930397e4069c Author: Matthias Clasen Date: Tue Aug 16 06:28:51 2016 -0400 Add a test for bounds transformation This doesn't currently work. src/tests/matrix.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit edb1d2c77dae4ace4d8ef396c77447ee32a63c1a Author: Matthias Clasen Date: Tue Aug 16 06:27:28 2016 -0400 Add assertion macros for rect comparison These will be used in future commits. src/tests/graphene-test-compat.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 4e2dc7306b79d6713e95225493a5751045eb62a2 Author: Emmanuele Date: Tue Jul 26 19:04:44 2016 +0100 build: Fix use of the AC_CONFIG_HEADERS macro Thanks to Rico Tzschichholz. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54273153f99571c713841780497d143ebc0adde0 Author: Emmanuele Bassi Date: Wed Jun 8 15:12:36 2016 +0100 Travis-CI has no support for Autotools .travis.yml | 22 ---------------------- 1 file changed, 22 deletions(-) commit a244f8ea262a929dfd36d20645de233e4afa3a92 Author: Emmanuele Bassi Date: Wed Jun 1 18:17:25 2016 +0100 build: Remove autotools We use Meson by default. Makefile.am | 62 --- README.md | 41 +- autogen.sh | 46 --- build/autotools/ax_pthread.m4 | 332 --------------- build/autotools/glib-tap.mk | 135 ------- build/autotools/glibtests.m4 | 28 -- build/autotools/graphene-macros.m4 | 161 -------- build/autotools/introspection.m4 | 96 ----- build/autotools/tap-driver.sh | 652 ------------------------------ build/autotools/tap-test | 5 - build/solaris-hwcap.mapfile | 30 -- configure.ac | 797 ------------------------------------- doc/Makefile.am | 49 --- src/Makefile.am | 186 --------- src/bench/Makefile.am | 83 ---- {build => src}/identfilter.py | 0 src/meson.build | 2 +- src/tests/Makefile.am | 33 -- 18 files changed, 12 insertions(+), 2726 deletions(-) commit c8fea41b39173ff2b5fc6ab261edfd0517307c3f Author: Emmanuele Bassi Date: Wed Jun 8 15:11:10 2016 +0100 build: Check and use additional compiler flags Just like we do with autotools. meson.build | 38 ++++++++++++++++++++++++++++++++++++++ src/meson.build | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) commit 0c656cd856408338f033a22acb44a558ad633ba0 Author: Emmanuele Bassi Date: Wed Jun 8 14:41:08 2016 +0100 build: Compute the soname version Instead of hard coding it, we can do basic integer arithmetic. meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit c8c3c97578327ca309c61814a73a97296c037fee Author: Emmanuele Bassi Date: Wed Jun 1 18:09:09 2016 +0100 build: Ensure we use the right headers for checks meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 61aa7d52c3bf26c45a3c5c48a01b592917381247 Author: Emmanuele Bassi Date: Tue May 31 13:50:17 2016 +0100 build: Generate the introspection data We can use the gnome module in Meson to generate the introspection XML and compile it to a typelib blob. src/meson.build | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 1c319ba3049dc858523d8570b7df01a9c1e464c0 Author: Emmanuele Bassi Date: Tue May 31 12:25:02 2016 +0100 build: Clean up some rules meson.build | 46 +++++++++++++++++++++++++++++++++++----------- meson_options.txt | 3 ++- src/meson.build | 20 +++++++++++++------- 3 files changed, 50 insertions(+), 19 deletions(-) commit 97d1f9f1e32636cc18f388246ce28d940db4f3ca Author: Emmanuele Bassi Date: Tue May 24 12:22:34 2016 +0100 build: Add initial attempt at doc generation Still missing a bunch of bits, so it's likely going to need to be revisited in the future. doc/meson.build | 20 ++++++++++++++++++++ meson.build | 7 +++++++ meson_options.txt | 1 + 3 files changed, 28 insertions(+) commit bf2709be75d4c71d9bc6a3655f827759b5e35749 Author: Emmanuele Bassi Date: Tue May 24 11:47:29 2016 +0100 build: Add benchmark target src/bench/meson.build | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/meson.build | 3 ++- 2 files changed, 49 insertions(+), 1 deletion(-) commit 8b518c79ad50c22ee5e761edd04e65645c744041 Author: Emmanuele Bassi Date: Tue May 24 11:01:10 2016 +0100 build: Enable test suite Build the test suite, and install the tests in the installed-tests system directory. src/meson.build | 10 ++++++++++ src/tests/meson.build | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit a2c6397c284acae3da7f20baa4cf2821f49c840c Author: Emmanuele Bassi Date: Mon May 23 23:17:19 2016 +0100 build: Add license field to the project() pragma meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e3b1f2312812c4c2aa6790265ec2b2027859b37 Author: Emmanuele Bassi Date: Mon May 23 23:15:36 2016 +0100 build: Add debugging options meson.build | 18 ++++++++++++++++++ meson_options.txt | 1 + src/meson.build | 6 ++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit 7d317f54dc2251b46b79a70880ab1b026abfa8ca Author: Emmanuele Bassi Date: Mon May 23 23:14:49 2016 +0100 build: Add missing variables for expansion The pkg-config file requires some more variables in order to be idempotent with the autotools build. meson.build | 69 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 25 deletions(-) commit 7e53eec9ed69b98f7cf4998c4393702b2caedba7 Author: Emmanuele Bassi Date: Mon May 23 20:16:38 2016 +0100 build: Split off headers and sources This will come in handy when we run the introspection scanner. src/meson.build | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 2ee0119c4f69bf452a8f51933c019ad11d24d2f7 Author: Emmanuele Bassi Date: Mon May 23 16:19:24 2016 +0100 build: Add meson build files meson.build | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 4 ++ src/config.h.meson | 3 + src/meson.build | 103 +++++++++++++++++++++++++++++++ 4 files changed, 287 insertions(+) commit d35b3b5011b9d70797158c6117c66371613c8e84 Author: Emmanuele Bassi Date: Mon May 23 17:04:34 2016 +0100 Add config.h template Use the `.meson` suffix instead of `.in`, because we're using Meson-specific directives. src/config.h.meson | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit d771e56382549de9f623a6bc93f6a30b435e77df Author: Emmanuele Bassi Date: Mon May 23 16:22:29 2016 +0100 Add graphene-config.h template for Meson We don't use `graphene-config.h.in` because we're using meson-specific directives, and because the autotools do not need a template file. src/graphene-config.h.meson | 96 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) commit c9f421aff674cdf5361abba5a4b95a8d9103a35f Author: Emmanuele Bassi Date: Mon May 23 18:06:19 2016 +0100 pc: Use GRAPHENE_VERSION for the Version field Don't use VERSION, so we can remove the autoconf generated macros. src/graphene.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68a26b16da290fdd0dcf2114a3bddd1cdb37edce Author: Emmanuele Bassi Date: Wed Jun 1 16:13:47 2016 +0100 bench: Initialize variables Avoid compiler warnings, and ensure that values are sane. src/bench/graphene-bench-utils.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b1e4a3099bac04f17e859aac32934356013ab221 Author: Emmanuele Bassi Date: Wed May 4 14:28:00 2016 +0100 simd4f: Use appropriate mask type on NEON src/graphene-simd4f.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a557c8f0bb78ff875bc3d7d42409d0cc9939743f Author: Emmanuele Bassi Date: Wed May 4 14:27:42 2016 +0100 simd4f: Fix typo in variable name src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 200ed8c67a4c06957bb2dad03b4a847afd157ae7 Author: Emmanuele Bassi Date: Wed May 4 14:27:20 2016 +0100 simd4f: Use appropriate rsqrt intrinsic on NEON src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa441b48b25d2db1d3f5e7b70383939025d087c1 Author: Emmanuele Bassi Date: Wed May 4 14:21:03 2016 +0100 simd4f: Fix typo in NEON channel getter Missing closing parenthesis on the GCC extension line. src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10e86ca94c18f2cd07f0583ff8c71a3c132a2f8d Author: Emmanuele Bassi Date: Mon Apr 11 12:38:54 2016 +0100 build: Fix the header name in the introspection data Typo in the name. src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 880542b5e10e75e6e9d8c52698b831f69e29cbb5 Author: Emmanuele Bassi Date: Fri Apr 8 15:33:40 2016 +0100 Post-release version bump to 1.4.1 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aab63ce5a0319932a2640c0e47bedeb4580305a4 Author: Emmanuele Bassi Date: Fri Apr 8 14:41:59 2016 +0100 Release 1.4.0 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8c4177775a12603e186ba71113338fb4e9a324df Author: Emmanuele Bassi Date: Fri Apr 8 15:27:06 2016 +0100 docs: Override graphene_simd4x4f_t The GRAPHENE_VECTORCALL annotation makes gtk-doc wet the bed, so we need to provide a manual override in order to pass `make check`. doc/graphene-overrides.txt | 6 ++++++ 1 file changed, 6 insertions(+) commit e8e0ca0e9d2c96c874e710a3c0561d43e9f0b385 Author: Emmanuele Bassi Date: Fri Apr 8 14:25:54 2016 +0100 build: Don't dist generated pkg-config files The .pc files for Graphene are going to be generated at configure time, so there's no point in having them into the dist tarball. src/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 587bcc68f90d017f79ba0641c6c1d3fc157efc17 Author: Emmanuele Bassi Date: Fri Apr 8 14:23:41 2016 +0100 build: Use AM_DISTCHECK_CONFIGURE_FLAGS The AM_DISTCHECK_CONFIGURE_FLAGS variable is the preferred one for use inside Makefile.am, in order to leave DISTCHECK_CONFIGURE_FLAGS for distributors and builders for overrides. Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 11a463fd85f65712e035d282739c5675b11bd7c3 Author: Emmanuele Bassi Date: Fri Apr 8 15:28:04 2016 +0100 simd4f: Align masks for dot3 fallbacks On some platforms (mostly 32 bit architectures) we need to force the alignment of the unsigned integer masks we use to implement dot3() on non-SSE 4.1 capable platforms. src/graphene-simd4f.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ee30fee15821e184f95b730954fd8665b730b7f Merge: 9290c88 8664d26 Author: Emmanuele Bassi Date: Fri Apr 8 13:04:12 2016 +0100 Merge pull request #58 from fanc999/master graphene-simd4x4f.h: Fix x86 Builds on MSVC 2013 and Later commit 8664d26ead9137444479871a565f1eb6ee379b3c Author: Chun-wei Fan Date: Thu Jan 29 13:50:41 2015 +0800 graphene-simd4x4f.h: Fix x86 Builds on MSVC 2013 and Later __vectorcall (hence GRAPHENE_VECTORCALL) must be after the return type, so move GRAPHENE_VECTORCALL around a bit to fix the build. src/graphene-simd4x4f.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9290c88cd5d7e3333f9ab90a6e4def7a88b8b5a1 Author: Emmanuele Bassi Date: Fri Apr 8 11:19:36 2016 +0100 Use C11 _Generic macro for type appropriate lerp() Look at us, all fancy and using a spec written 5 years ago. src/graphene-private.h | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) commit 9dc16635fe55f05daf9c1a6f1214e2bf6a647573 Author: Emmanuele Bassi Date: Thu Apr 7 19:05:06 2016 +0100 matrix: Use the type appropriate abs() Do not use the integer abs() when dealing with doubles. src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43248f9ec9db7b06789a2b1db1c3858a980befcb Author: Emmanuele Bassi Date: Thu Apr 7 18:57:50 2016 +0100 build: Re-indent configure.ac Too much white space and indentation makes editing and following the m4 madness harder than necessary. configure.ac | 489 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 220 insertions(+), 269 deletions(-) commit 0b225e407dd7d6bf6f11b7afc3a28c147b309d22 Author: Emmanuele Bassi Date: Thu Apr 7 18:14:55 2016 +0100 euler: Drop indirection in initializer Use the internal initializer function instead of going through the public API. src/graphene-euler.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a6bb76f881ae7b56ba00a0aa3c670344433eb52c Author: Emmanuele Bassi Date: Thu Apr 7 13:52:58 2016 +0100 tests: Add interpolation test for 3D matrices We use a simple translation because rotations are going to be messy to test. This should still be enough to see if the matrix decomposition code is doing the right thing. src/tests/matrix.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 9e1108bacb78ee61e23a260d7a75e85f2b20e37c Author: Emmanuele Bassi Date: Thu Apr 7 13:49:51 2016 +0100 tests: Add interpolation test for 2D matrices Let's try and avoid breakage in the future. src/tests/matrix.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) commit 84237c079b5a52c21692af79f2768d4f56896eff Author: Emmanuele Bassi Date: Thu Apr 7 13:40:32 2016 +0100 matrix: Fix the interpolation of 3D matrices We're not extracting the translation and perspective components correctly; the matrix is made of row vectors, which means that the translation component is the W row vector, whereas the perspective component is the W component of each row vector. src/graphene-matrix.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 178ebd1791364cff08b098d3cba51ae4706061af Author: Emmanuele Bassi Date: Thu Apr 7 13:39:16 2016 +0100 tests: Fix matrix fuzzy comparison macro We're not testing all the components because we're missing the row offset. src/tests/graphene-test-compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6bf5939f83f3beb6510b6adb46b55c256171c001 Author: Emmanuele Bassi Date: Wed Apr 6 16:38:02 2016 +0100 matrix: Fix interpolation between 2D matrices The decomposition and interpolation code claims to come from the CSS3 Transformation specification, but it does something fairly custom; it also uses the existing 3D matrix interpolation and recomposition code which is just not really correct. We should split the interpolation cases for 2D and 3D matrices in a more radical way, and follow the whole CSS3 Transformation spec more closely. src/graphene-matrix.c | 266 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 188 insertions(+), 78 deletions(-) commit 159a329ec3cfab3afc8982f6eb913cc630dc2508 Merge: d28e9d3 706568b Author: Emmanuele Bassi Date: Thu Mar 31 08:34:57 2016 +0100 Merge pull request #57 from cubicool/minimal-aligned-alloc Fix compile warnings when debug is disabled commit 706568b0e6498066ca6cd1b9a8ee7e1e16f80155 Author: Jeremy Moles Date: Wed Mar 30 17:48:25 2016 -0400 Fix compile warnings when debug is disabled Initialize the 'res' pointer to NULL. Borrow the 'errno' variable rather than using an 'err' variable local to graphene_aligned_alloc. There is some precedent for this, as the existing code also set 'errno = 0' before calling the corresponding alloc routine. src/graphene-alloc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit d28e9d3a9a6feb2623861d4e69b610d6dfcdbbb4 Author: Emmanuele Bassi Date: Wed Mar 23 16:29:18 2016 +0000 matrix: Load identity from a float array Instead of using an intermediate initializer. src/graphene-matrix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 891bc52cb2e349e34dc48d9f44c4ad25de284438 Author: Emmanuele Bassi Date: Wed Mar 23 16:08:08 2016 +0000 rect: Add zero() constant rectangle Similar to the zero() points and sizes, this allows us to initialize rectangles without having to call graphene_rect_init(), memset(), or use temporary variable declarations. doc/graphene-sections.txt | 1 + src/graphene-rect.c | 18 ++++++++++++++++++ src/graphene-rect.h | 3 +++ 3 files changed, 22 insertions(+) commit 36b2a10db7b0bd691f2c83bee7fd10ae9dbcdbba Author: Emmanuele Bassi Date: Wed Mar 16 16:44:29 2016 +0000 build: Clean up autogen Use `set -x` to trace the result of various checks when setting up the build environment. autogen.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 997f3da4d3e5b63c963e6125e7b648f594d1e333 Author: Emmanuele Bassi Date: Tue Mar 8 14:30:46 2016 +0000 simd4x4f: Remove intermediate variables We can pass the address of the row vertices when multiplying two matrices together. src/graphene-simd4x4f.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 97942778494424c3e87fea50cb675b302fd08b92 Author: Emmanuele Bassi Date: Tue Mar 8 12:32:05 2016 +0000 docs: Fix references for GLib/GObject symbols We need to tell gtk-doc where the installed docs are, in order for it to fix all the external references. doc/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 694661984970569749a8fcd894b607a459d142b8 Author: Emmanuele Bassi Date: Tue Mar 8 12:14:35 2016 +0000 docs: Make the order of operands explicit For non-commutative operators on vectors the order is important. Fixes #54 src/graphene-vectors.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 73eb1d0b23ad7765700a379d7098ce857a360a17 Author: Emmanuele Bassi Date: Wed Feb 10 16:15:28 2016 +0000 Document restriction for graphene_triangle_get_barycoords() We require that the point is coplanar to the triangle. If we change implementation, we may lift the restriction, but for the time being better be explicit. Closes #56 src/graphene-triangle.c | 3 +++ 1 file changed, 3 insertions(+) commit be145c16b312cea45bb8fcfe4ab0e7cfd1f04f5f Merge: 89a8254 ac17167 Author: Emmanuele Bassi Date: Wed Feb 10 10:30:40 2016 +0100 Merge pull request #53 from swilmet/wip/improve-docs docs: improve doc of graphene_sphere_translate() commit 89a82547445048494e825671cc263d9fa9126782 Merge: 770682c e40294f Author: Emmanuele Bassi Date: Wed Feb 10 10:30:12 2016 +0100 Merge pull request #52 from swilmet/wip/triangle-unit-test tests: add unit test for graphene_triangle_get_area() commit ac17167221d8bc13cbd98aa011c6607a0ce8666f Author: Sébastien Wilmet Date: Wed Feb 10 10:22:17 2016 +0100 docs: improve doc of graphene_sphere_translate() I know what is a translation, but it was not clear to me whether @point referred to the new center coordinates, or the delta. It turns out that it's the delta, as expected for a translation, but it's better to explain it in the docs. src/graphene-sphere.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e40294f42a0004896aebd9423da0d4ef8847ad6e Author: Sébastien Wilmet Date: Tue Jan 12 15:57:35 2016 +0100 tests: add unit test for graphene_triangle_get_area() The function always returns a positive area. Signed areas can be useful for some computations in computer graphics, but it is not present in graphene. src/tests/triangle.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 770682c884a2ffc9dbbbc7b35de13e75812d824c Author: Emmanuele Bassi Date: Fri Jan 29 15:32:24 2016 +0100 matrix: Add checks for invertible matrices We should propagate error states for non-invertible matrices from the SIMD implementation to the public wrapper type. src/graphene-matrix.c | 33 ++++++++++++++++++++++++--------- src/graphene-matrix.h | 2 +- 2 files changed, 25 insertions(+), 10 deletions(-) commit 94c2d2d814eb215d43b0baa6f69ec44bb396fab0 Author: Emmanuele Bassi Date: Fri Jan 29 15:27:08 2016 +0100 simd: Check if the matrix is invertible We should check if the determinant is not zero before trying to invert the matrix. This commit changes the return value of the inverse() operator, but the ABI stability is preserved. src/graphene-simd4x4f.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 9744fa81285ea9d52c88f5b50b3649267474a08d Author: Emmanuele Bassi Date: Wed Jan 27 11:32:07 2016 +0000 euler: Store angles in radians Instead of converting internally at the point of use, we should store the rotation angles in radians, and only transform to and from degrees when interfacing with the public API. Closes #32 src/graphene-euler.c | 63 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 20 deletions(-) commit 92081bdd963128e6405f3c4e092f631daf12085b Author: Emmanuele Bassi Date: Wed Jan 27 11:03:30 2016 +0000 Add radians variants for quaternions It's been requested, and it can help to avoid round-tripping between radians and degrees. Closes #32 doc/graphene-sections.txt | 2 + src/graphene-quaternion.c | 100 +++++++++++++++++++++++++++++++++------------- src/graphene-quaternion.h | 10 +++++ 3 files changed, 85 insertions(+), 27 deletions(-) commit 284043513602183e6007524d6e1ed7a788fa5f8f Author: Emmanuele Bassi Date: Wed Jan 27 10:46:57 2016 +0000 docs: Clarify the modelview required when unprojecting When unprojecting a point, Graphene expects the inverse of the modelview used to project it. We cannot really change the implementation to invert the modelview ourselves without breaking existing code. There's also the common behaviour of canvas libraries to cache the inverse of the modelview to avoid incurring into additional costs, which means we'd be working against our callers. Fixes issue #50 src/graphene-matrix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7673ae2a4bf2d777d9063b587f2751efd555630c Author: Emmanuele Bassi Date: Tue Jan 26 18:27:06 2016 +0000 rect: Remove unused variables And thus silence two compiler warnings. src/graphene-rect.c | 1 - 1 file changed, 1 deletion(-) commit 2b2e23d367cc95ffd1c8b3461543bb6125bc44c3 Author: Emmanuele Bassi Date: Mon Jan 18 20:16:24 2016 +0000 docs: Clarify the meaning of the triangle's midpoint Link to Wikipedia, because all human knowledge should be up for debate. src/graphene-triangle.c | 3 +++ 1 file changed, 3 insertions(+) commit 9df082ddba2d1deb9971cc9b49e4dd149dec4e76 Author: Emmanuele Bassi Date: Mon Jan 18 19:23:29 2016 +0000 rect: Fix the implementation of union() We need to take into consideration the origin of each rectangle when comparing sizes. Fixes #49. src/graphene-rect.c | 4 ++-- src/tests/rect.c | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) commit ec5bf9ba38f5e8a0433bbe7c4f609560b38f9152 Author: Emmanuele Bassi Date: Mon Jan 18 19:22:34 2016 +0000 rect: Use union() to implement expand() We union a rectangle with a degenerate rectangle of size 0 and origin in the given point. src/graphene-rect.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 979493eb0f61fabb3dee725956005cd6057c39aa Author: Emmanuele Bassi Date: Thu Jan 14 12:52:00 2016 +0000 docs: Add examples of GObject integration This should clarify how to use Graphene types with GObject. src/graphene-gobject.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) commit 788a305d45be54dd02d3eb0199ffbb8e9aac2f93 Author: Emmanuele Bassi Date: Thu Jan 14 12:35:40 2016 +0000 docs: Add some images to the graphene_rect_t reference doc/Makefile.am | 3 + doc/rectangle-intersection.png | Bin 0 -> 2174 bytes doc/rectangle-intersection.svg | 82 +++++++++++++++++++ doc/rectangle-union.png | Bin 0 -> 2668 bytes doc/rectangle-union.svg | 79 ++++++++++++++++++ doc/rectangle.png | Bin 0 -> 12713 bytes doc/rectangle.svg | 182 +++++++++++++++++++++++++++++++++++++++++ src/graphene-rect.c | 10 +++ 8 files changed, 356 insertions(+) commit 22fc4b600718408f57ebc3ea2cd54634cccce4ab Merge: 3b97374 79e43f1 Author: Emmanuele Bassi Date: Tue Jan 12 13:10:42 2016 +0000 Merge pull request #47 from swilmet/wip/barycoords Add unit tests for graphene_triangle_get_barycoords() commit 3b97374aa127ce23988bb06215223681c385f1bd Merge: d5decac e095efb Author: Emmanuele Bassi Date: Tue Jan 12 13:09:44 2016 +0000 Merge pull request #48 from swilmet/wip/docs-fixes Some docs fixes and improvements commit d5decac54d24e97e7880d33c13977f84a27a8f37 Author: Emmanuele Bassi Date: Tue Jan 12 13:08:01 2016 +0000 docs: Add an image to explain barycentric coordinates The current explanation is ambiguous as to what the 'u' and 'v' coordinates map; we should be more explicit, and an image gets the point across much more easily. doc/Makefile.am | 3 +- doc/triangle-barycentric.png | Bin 0 -> 19080 bytes doc/triangle-barycentric.svg | 223 +++++++++++++++++++++++++++++++++++++++++++ src/graphene-triangle.c | 6 ++ 4 files changed, 231 insertions(+), 1 deletion(-) commit e095efbb21adbff12b5de02a96e489d669c18c5d Author: Sébastien Wilmet Date: Tue Jan 12 13:53:46 2016 +0100 docs: add #include information doc/graphene-sections.txt | 3 +++ 1 file changed, 3 insertions(+) commit 4420cdd6b55258eff8d4b2491594dfc5be2da47c Author: Sébastien Wilmet Date: Tue Jan 12 13:37:05 2016 +0100 docs: fix explanation about CamelCase types When reading the docs, I thought that the CamelCase types were also available in C. But it is not the case. Change also "camel case" -> "CamelCase", for a better understanding. src/graphene-gobject.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 79e43f1a21239ca989a8fa7d77d5b8731402b36c Author: Sébastien Wilmet Date: Tue Jan 12 10:39:10 2016 +0100 tests: Add unit test for graphene_triangle_get_barycoords() u is on the ac axis and v is on the ab axis. Is that normal? src/tests/triangle.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) commit 0925d8c89f4fbfe9d93eabfe064b8120207dca47 Author: Sébastien Wilmet Date: Tue Jan 12 10:48:51 2016 +0100 tests: Add graphene_assert_fuzzy_vec2_equal() macro src/tests/graphene-test-compat.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit e1cdf36c1a3dd945fb39413c0518ad41d1c7a908 Author: Sébastien Wilmet Date: Tue Jan 5 14:18:18 2016 +0100 docs: another batch of trivial typo fixes src/graphene-sphere.c | 2 +- src/graphene-vectors.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit a4c2e97bd04c3716719560d4e31deffb7a234fc7 Merge: e0c4e4c b8481cd Author: Emmanuele Bassi Date: Tue Jan 5 09:16:30 2016 +0000 Merge pull request #44 from swilmet/wip/swilmet/docs-fixes docs: a few trivial typo fixes commit b8481cd98be95ffbbdbb6e324e040b8a19028ba1 Author: Sébastien Wilmet Date: Mon Jan 4 16:37:44 2016 +0100 docs: a few trivial typo fixes src/graphene-rect.c | 2 +- src/graphene-simd4f.c | 4 ++-- src/graphene-simd4f.h | 4 ++-- src/graphene-simd4x4f.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit e0c4e4c5dbc2eeaa45d10d65226954982fe080b3 Author: Emmanuele Bassi Date: Mon Nov 9 11:50:25 2015 +0000 Revert "matrix: Reorder point unprojection" This reverts commit 1c46f0b8521645b52427311687d1c30b565789f0. The change breaks existing users. src/graphene-matrix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 9ea181f51a3f6e38e1f31bfe376c5292ca90b130 Author: Emmanuele Bassi Date: Sun Nov 8 13:06:07 2015 +0000 point3d: Add viewport normalization utility function The newly added function is useful to normalize a 3D point to the unit coordinate space [ -1, 1 ] within a viewport. doc/graphene-sections.txt | 1 + src/graphene-point3d.c | 36 ++++++++++++++++++++++++++++++++++++ src/graphene-point3d.h | 7 +++++++ src/tests/point3d.c | 21 +++++++++++++++++++++ 4 files changed, 65 insertions(+) commit 1c46f0b8521645b52427311687d1c30b565789f0 Author: Emmanuele Bassi Date: Sun Nov 8 12:10:09 2015 +0000 matrix: Reorder point unprojection Let's follow the same approach as gluUnProject(): first, multiply the modelview and the projection matrices; then invert the result. We should also avoid a division by zero. src/graphene-matrix.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9b90b480f8fa0caf7886a8b3d72dfd19d27ddcce Author: Emmanuele Bassi Date: Sat Nov 7 16:55:27 2015 +0000 docs: Fix typo in type name src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 445680d853be38f5c50cd664ba6a924d86da2063 Author: Emmanuele Bassi Date: Sat Nov 7 16:49:38 2015 +0000 docs: Use 'plain' language for non-code examples This way gtk-doc won't try to do things like syntax highlighting. src/graphene-matrix.c | 6 +++--- src/graphene-simd4f.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) commit 91487bc293c3e4a0ab3c69edfadd35d2fc697ba6 Author: Emmanuele Bassi Date: Thu Nov 5 19:00:06 2015 +0000 tests: Re-enable matrix tests under GCC Like we re-enabled the frustum tests, we should try and see if the GCC in TravisCI is back to working. src/tests/matrix.c | 12 ------------ 1 file changed, 12 deletions(-) commit b2f579650a419025acf8094791aaa10087f8a65b Author: Emmanuele Bassi Date: Thu Nov 5 18:39:09 2015 +0000 tests: Re-enable frustum units under GCC We fixed a series of issues with the dot3() operator, which is used when computing the distance from a plane; this should improve the behaviour of the graphene_frustum_contains_point() on older versions of GCC. src/tests/frustum.c | 9 --------- 1 file changed, 9 deletions(-) commit 48e8589dc788aa4a66e9af3cad322bbd521a58e2 Author: Emmanuele Bassi Date: Thu Nov 5 11:51:20 2015 +0000 quad: Vectorise min/max look up Instead of iterating and branching, we can vectorise the operation of looking for the minimum and maximum values in the points array. src/graphene-quad.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit e80acf94229236fd7b78d37d73cf27aa2fde138d Author: Emmanuele Bassi Date: Thu Nov 5 11:37:41 2015 +0000 quaternion: Precompute factors We reuse the same factors in all euler ordering cases, so we should extract them from the switch branches. src/graphene-quaternion.c | 75 ++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 33 deletions(-) commit 34f776f27e0ee1545a386ec5d7caa30a5d3102c6 Author: Emmanuele Bassi Date: Thu Nov 5 11:36:45 2015 +0000 quaternion: Drop some indirection Set the row vectors of the result matrix, instead of using additional vector variables. src/graphene-quaternion.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) commit 823d9b169f689ce0406de579269b241c3aec194f Author: Emmanuele Bassi Date: Wed Nov 4 19:54:10 2015 +0000 euler: Avoid unnecessary indirection We're computing the components of the result matrix using a vec4, and then taking those vec4 variables to initialize a matrix — but the intent is to store the values as SIMD vectors. We can side step the whole thing, and directly initialize the row vectors of the result matrix. src/graphene-euler.c | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) commit aa9dd380b5369417a19ac14be0fcd2dfd0fb7d82 Author: Emmanuele Bassi Date: Wed Oct 14 11:37:29 2015 +0100 simd4f: Optimize neg() on GCC Instead of doing four single lane reads, use a splat and a mul. src/graphene-simd4f.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 51748e1bb3d7697317a3f74e7b6f9a7a9a0b84c8 Author: Emmanuele Bassi Date: Wed Oct 14 11:36:21 2015 +0100 simd4f: Zero-safe GCC reciprocal A bit more expensive, since it replaces a single splat and mul with four single lane reads, but at least it behaves consistently, and avoids NaN. src/graphene-simd4f.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cb8409b09e1dcf5cf726029cea20a8a3bad78bf6 Author: Emmanuele Bassi Date: Wed Oct 14 11:35:41 2015 +0100 Fix indentation Keep operands at the right indentation level. src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cedeae5965d5b8cdcb18d90cb4a42e5fc46a7627 Author: Emmanuele Bassi Date: Wed Oct 14 11:22:58 2015 +0100 Include emmintrin.h from graphene-config.h We use __m128i for both the GCC and the MSVC paths, but only the MSVC one explicitly includes emmintrin.h — the GCC path relies on other headers. Let's be explicit and consistent everywhere. configure.ac | 1 + src/graphene-simd4f.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) commit f1126ac0a705d0221333ab82ec96c6b7c1462dec Author: Emmanuele Bassi Date: Wed Oct 14 01:09:39 2015 +0100 simd4f: Clean up the sum() implementation Do all the splats upfront, and then sum them, instead of using intermediate results. src/graphene-simd4f.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 08219582d1ca0e6dee9fa4ba8008d8c6cda48f99 Author: Emmanuele Bassi Date: Wed Oct 14 01:09:00 2015 +0100 Fix indentation of SSE rsqrt() on MSVC Too many spaces. src/graphene-simd4f.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit c1229a2add6e7096839eba3845db642525ad4d56 Author: Emmanuele Bassi Date: Wed Oct 14 00:49:38 2015 +0100 simd4f: Define union type once for the SSE path Both the GCC and the MSVC branches define the same union type for single lane reads; we can define it once in the common path, instead. src/graphene-simd4f.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) commit ee76f5389e8b9aba2ccf435a41a2f22b955ff457 Author: Emmanuele Bassi Date: Wed Oct 14 00:48:59 2015 +0100 Add a couple of explanatory comments Should improve the readability of the header. src/graphene-simd4f.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 99a8dc93dce99db67d298a378f975552efa9d04b Author: Emmanuele Bassi Date: Tue Oct 13 13:28:43 2015 +0100 rect: Add get_vertices() method Similar to graphene_box_get_vertices(), it returns the four vertices of a graphene_rect_t as an array of graphene_vec2_t. doc/graphene-sections.txt | 1 + src/graphene-rect.c | 25 +++++++++++++++++++++++++ src/graphene-rect.h | 4 ++++ 3 files changed, 30 insertions(+) commit 03ea593a181a981aeeea91c9913f1e598c7fcc59 Author: Emmanuele Bassi Date: Tue Oct 13 11:51:43 2015 +0100 box: Inline more implementations Instead of using graphene_vec3_t wrappers, let's use graphene_simd4f_t methods directly, as they are inlined and we don't pay the cost of a function call in most cases. src/graphene-box.c | 77 +++++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 35 deletions(-) commit 744c34485198fc1e51002da5617a75aff550ea63 Author: Emmanuele Bassi Date: Wed Oct 7 23:08:50 2015 +0100 simd4f: Protect against division by zero in scalar reciprocal Like we do for rsqrt() and div(). src/graphene-simd4f.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 74e9e7bd6e8387f870aa7a37f886316d67032417 Author: Emmanuele Bassi Date: Wed Oct 7 17:49:31 2015 +0100 matrix: Drop some intermediate variables src/graphene-matrix.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 644b7d29194e86e974f4b902b109e7e64c78cc83 Author: Emmanuele Bassi Date: Mon Oct 5 18:01:20 2015 +0100 rect: Remove check in normalize_in_place We are already doing a check on each direction of the rectangle's size, so there's really no point in doing a likely() check beforehand. src/graphene-rect.c | 3 --- 1 file changed, 3 deletions(-) commit e9c58af84fbd88bdf0603e44b4c08f80c1817240 Author: Emmanuele Bassi Date: Mon Oct 5 17:59:16 2015 +0100 build: Remove -Winline from SSE2_CFLAGS It's pretty pointless to have -Winline there, since we use inline all over the place. We should either always warn because of missed inlining, or never do that. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18e48701f084171b04fa824f12eec9c1ac7f143b Author: Emmanuele Bassi Date: Mon Oct 5 16:36:03 2015 +0100 docs: Add explanations for SIMD operators Some functions have explanations on the operations they perform that include an example of the resulting vector; we should add more of those. src/graphene-simd4f.c | 67 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 7 deletions(-) commit 11a0d633bbae6c5910752c4a3eb9d7a287003696 Author: Emmanuele Bassi Date: Mon Oct 5 16:20:43 2015 +0100 bench: Include stdlib.h for malloc/free Otherwise the compiler will warn for the implicit declarations. src/bench/graphene-bench-utils.c | 1 + 1 file changed, 1 insertion(+) commit 85823e0d996b7f2d7aec5b8c1ddff15b60c114f3 Author: Emmanuele Bassi Date: Mon Oct 5 16:19:56 2015 +0100 simd: Fix the definition of dot3_scalar() in scalar context Cut and paste idiocy. src/graphene-simd4f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55484125158e0bc9e11c090f155b4840bf75cb71 Author: Emmanuele Bassi Date: Mon Oct 5 16:17:47 2015 +0100 simd4f: Fix an aliasing issue The dot3_scalar() operator in the scalar code path was aliased to dot3(). src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9674324e982d0d4a3c013f3f6dc604bb431bda35 Author: Emmanuele Bassi Date: Mon Oct 5 15:50:22 2015 +0100 Remove sse4.1 from GRAPHENE_SIMD variable We coalesce the SSE 4.1 support with SSE2, if that's available — i.e. the SSE 4.1 support is an extension on top of SSE2. configure.ac | 1 - 1 file changed, 1 deletion(-) commit 3eb29fbea4f5dc00cad9bc27628b5b2f13890277 Author: Emmanuele Bassi Date: Mon Oct 5 15:30:07 2015 +0100 Allow include-time SIMD detection The graphene-config.h header should allow determining the SIMD implementation. This way, projects could conceivably just use the SIMD API inside their own vector and matrix types. The capabiltities are still detected at configure time, because the rest of the API depends on a single SIMD implementation. configure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 6e5248a7d52506ffde29fc81e37936f9847c6acc Author: Emmanuele Bassi Date: Mon Oct 5 15:25:00 2015 +0100 simd4f: Optimise cross3 on ARM NEON Instead of using a ton of single lane reads to unroll the cross vectors, we can use 2-lanes vectors and combinations to compute the cross product and then reassemble it in the correct order. src/graphene-simd4f.h | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) commit 733c9a020198ccf70e935351a914808c10dfbd9f Author: Emmanuele Bassi Date: Mon Oct 5 15:23:27 2015 +0100 simd4f: Add a float32x2_t typedef on NEON The NEON instructions set has a 2-lanes SIMD type that we already use; let's typedef it so it's immediately recognisable. doc/graphene-sections.txt | 1 + src/graphene-simd4f.h | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) commit ab5b1a69df4c35552d48e5775a9cfd182bfa5cae Author: Emmanuele Bassi Date: Mon Oct 5 13:50:58 2015 +0100 simd4f: Simplify rsqrt on NEON Instead of flattening the implementation, let's use a separate macro for the estimate iteration. This will allow us to tweak the implementation in the future without losing track of the number of iterations. src/graphene-simd4f.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit f323bac803637074b1ed98029cad1d83f004f8bb Author: Emmanuele Bassi Date: Sun Oct 4 17:28:51 2015 +0100 bench: Compute a better average time per round We're just doing a simple "total elapsed time / number of rounds", but we should do a little bit better than that, by discarding the maximum and minimum timing between all rounds. src/bench/graphene-bench-utils.c | 92 +++++++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 25 deletions(-) commit eb2d3efe56f77de1514abf2ecc6df8c0598d30c2 Author: Emmanuele Bassi Date: Sat Oct 3 12:47:27 2015 +0100 Use the scalar dot3 whenver possible Instead of doing a dot3() followed by a single lane read. src/graphene-matrix.c | 6 +++--- src/graphene-point3d.c | 5 ++--- src/graphene-vectors.c | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) commit 3399b51a10886476539e713d94e369d9b3612f9e Author: Emmanuele Bassi Date: Sat Oct 3 12:43:00 2015 +0100 simd4f: Add scalar version of dot3() We can optimize dot3() operations requiring a scalar on certain architectures, to avoid computing the dot product and then do a single lane read. doc/graphene-sections.txt | 1 + src/graphene-simd4f.c | 28 ++++++++++++++++++++++++++-- src/graphene-simd4f.h | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 62 insertions(+), 3 deletions(-) commit b050bca269829d7a0440168ef451b125b76ccced Author: Emmanuele Bassi Date: Fri Oct 2 14:35:39 2015 +0100 bench: Fix units for time formatting src/bench/graphene-bench-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fdc5767e55141566468c7aa1233d28db7388e31f Author: Emmanuele Bassi Date: Wed Sep 30 18:11:51 2015 +0100 simd: Be more graceful when handling divisions Check if the denominator is 0, before attempting a division. This should reduce the cases where we get a NaN when we really expect a 0. src/graphene-simd4f.c | 16 ++++++++-------- src/graphene-simd4f.h | 15 ++++++++++----- 2 files changed, 18 insertions(+), 13 deletions(-) commit c167abfada9761e91c4240bbf31032b772081aa9 Author: Emmanuele Bassi Date: Wed Sep 30 17:49:27 2015 +0100 build: Fix typo in the dependencies of the asm rule src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bce774e295835578d283df8d9fee86880f83006 Author: Emmanuele Bassi Date: Wed Sep 30 17:35:47 2015 +0100 simd: Fill all channels of the dot3 results / pt.2 The GCC vector implementation of the dot3 product operator should conform to all the other implementations, and set all the channels. This is the equivalent of 2d8e877d40e3012f6430591eb5a8e8b564e19f63 which fixed the scalar implementation. src/graphene-simd4f.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 845f3745181ab72ac7fe4819cecd89531274508a Author: Emmanuele Bassi Date: Wed Sep 30 17:30:01 2015 +0100 simd: Use the appropriate sqrt function We're dealing with single precision floating point values, so we should use sqrtf() to avoid conversions to double precision floating point. src/graphene-simd4f.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2d8e877d40e3012f6430591eb5a8e8b564e19f63 Author: Emmanuele Bassi Date: Wed Sep 30 17:26:25 2015 +0100 simd: Fill all channels of the dot3 results The scalar implementation of the dot3 product operator should conform to all the other implementations, and set all the channels. This fixes test suite failure we get in the matrix look_at() method: Graphene:ERROR:matrix.c:264:matrix_look_at: [0][3]: __m1[__idx] == __m2[__idx] (+/- 0.0001f): (-nan == 0) Because the SIMD normalize3() operator will try to compute the inverse square root of 0 in the .w channel, resulting in a NaN. src/graphene-simd4f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 885579cd474d6673f0670e248aaa40985d64e667 Author: Emmanuele Bassi Date: Wed Sep 30 14:05:26 2015 +0100 simd4f: Optimise dup_3f() on NEON Avoids multiple coercions and single line reads by using offsets inside the array. src/graphene-simd4f.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd36110e64a6551980434d422f460d5ff3352168 Author: Emmanuele Bassi Date: Wed Sep 30 13:49:07 2015 +0100 simd4f: Optimize dot3 operator for SSE4.1 If we have access to SSE 4.1, we can use the `_mm_dp_ps()` intrinsic to speed up the dot3() product operator. src/graphene-simd4f.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 9e6ca0196d4488d33886c745d31a7e7466d8b1d3 Author: Emmanuele Bassi Date: Wed Sep 30 13:42:27 2015 +0100 simd4f: Optimize dot3 product We can implement the dot3 operator depending on the SIMD implementation in use, instead of having a generic one, similarly to how we implement the cross3 operator. src/graphene-simd4f.c | 29 ++++++++++++++++++++ src/graphene-simd4f.h | 74 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 78 insertions(+), 25 deletions(-) commit ff58291e3e9ab9a221486e42c500c42e59b7c064 Author: Emmanuele Bassi Date: Wed Sep 30 12:44:48 2015 +0100 Detect SSE 4.1 intrinsics If we have SSE2 intrinsics then we should also check for the 4.1 instruction set. configure.ac | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 491dabd886ec3f1540b7cfce069f8c0ef2a07ce6 Author: Emmanuele Bassi Date: Wed Sep 30 12:43:38 2015 +0100 Do a better job when detecting SSE2 intrinsics Instead of directly including the intrinsics headers, we can do a check on specific macros and error out more gracefully. configure.ac | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 82869ccf90f39a117be2fb963ccd44f336f4191c Author: Emmanuele Bassi Date: Tue Sep 29 19:57:53 2015 +0100 matrix: Optimise normalize() By computing the scalar inverse of the matrix.ww field we can avoid four costly SIMD divisions in favour of four cheap multiplications. src/graphene-matrix.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 27f311ec34be652409b7acd0d65398f04b4d0d44 Author: Emmanuele Bassi Date: Tue Sep 29 19:56:31 2015 +0100 matrix: Inline transform_bounds() Use the SIMD vector and matrix API, instead of the public graphene_matrix_t one, for better inlining. We should also vectorise the min/max operations instead of using a loop with a bunch of conditionals. src/graphene-matrix.c | 64 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 19 deletions(-) commit 7ddb110d097040e59633768a745954370eb0012f Author: Emmanuele Bassi Date: Tue Sep 29 19:55:45 2015 +0100 matrix: Inline some more functions Use the SIMD vector and matrix types, which inline better. src/graphene-matrix.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit fdfef1a8b7740b14dd0fe75015eea3072d74f49d Author: Emmanuele Bassi Date: Tue Sep 29 19:53:42 2015 +0100 simd: Add min_val/max_val operators We want to be able to get the minimum value in a SIMD vector, so that we can avoid a loop (rolled or unrolled). doc/graphene-sections.txt | 2 ++ src/graphene-simd4f.h | 44 ++++++++++++++++++++++++++++++++ src/tests/simd.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) commit e25c9b4426eb09c53c818be59bbba0afe3378a0b Author: Emmanuele Bassi Date: Thu Sep 24 09:35:39 2015 +0100 tests/matrix: Follow coding style src/tests/matrix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d98e9011bcf451504689134ec087bf7f21a6cea7 Author: Emmanuele Bassi Date: Wed Sep 23 18:56:10 2015 +0100 matrix: Inline more functions Instead of calling into public graphene_matrix_t and graphene_vec[234]_t API we can try and use graphene_simd4x4f_t and graphene_simd4f_t functions, which get inlined and avoid intra-library calls. src/graphene-matrix.c | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 34 deletions(-) commit 6ba1b807e862c244b82ba6f7cb1f47554676ac04 Author: Emmanuele Bassi Date: Wed Sep 23 18:44:39 2015 +0100 build: Add a make target for inspecting assembly We want to be able to quickly check the assembly code generated by the C compiler, in order to inspect and quickly evaluate if we are regressing. .gitignore | 1 + src/Makefile.am | 9 +++++++++ 2 files changed, 10 insertions(+) commit e3398f4bc1e0a50af51ba6924eaf827e793e91bb Author: Emmanuele Bassi Date: Tue Sep 22 18:18:09 2015 +0100 point3d: Do a compiler check for the SIMD read Apparently, Clang ≤ 3.5 has issues when doing a vectorised partial read from a SIMD type into a pointer to a structure. src/graphene-point3d.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 9f812c6f3c0c78272fb20ca3736020d18136f59c Author: Emmanuele Bassi Date: Tue Sep 22 18:08:37 2015 +0100 point3d: Reintroduce the optimized read Instead of the per-channel read, use a vectorised partial read from the SIMD into the point3d structure. This has been confirmed to work on Clang through the test suite. src/graphene-point3d.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e957c7b678271bb3bcbdd6e97a37773cdfee5136 Author: Emmanuele Bassi Date: Tue Sep 22 18:02:55 2015 +0100 tests/simd: Do vectorised reads into structures Check if we can count on compiler assistance to do a vectorised read from a SIMD into a structure with the corresponding number of floating point members. src/tests/simd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit d3ee76c2c4ae1fb5dd27ff5f9009b11961aa5929 Author: Emmanuele Bassi Date: Tue Sep 22 17:54:10 2015 +0100 tests/simd: Add units for dup_[234]f We want to check that we can do a full or partial read from a SIMD vector into an array of floats. src/tests/simd.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit db10ba37b5dca09de2636aa2c16c489106c3e0b3 Author: Emmanuele Bassi Date: Tue Sep 22 17:48:18 2015 +0100 Undo optimized reads Apparently, not all releases of Clang can do a partial memcpy from an SSE SIMD vector into a structure laid out as a float array. This warrants a bit more investigations, because it may mean that the graphene_simd4f_dup_[23] API are broken on certain versions of Clang. src/graphene-point.c | 3 ++- src/graphene-point3d.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 44c900ea369bb7787ada443174eb7ed76f42dce1 Author: Emmanuele Bassi Date: Tue Sep 22 17:40:46 2015 +0100 point: Use the address of the struct Similarly to what we do when convering a SIMD to a 3D point, use the address of the struct instead of the address of the first element of the struct. src/graphene-point.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b70ef4a7febb149956aa5ef9b69613511b455946 Author: Emmanuele Bassi Date: Tue Sep 22 17:38:35 2015 +0100 point3d: Use the address of the struct When converting from a SIMD vector to a 3D point, use the address of the structure instead of the address of the first element of the structure. This should fix compilation with Clang. src/graphene-point3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 15caf83deccba0f1fbf0724baf63c0cba1f44378 Author: Emmanuele Bassi Date: Tue Sep 22 17:23:47 2015 +0100 rect: Add expand() method Based on a similar method in graphene_box_t, which expands the area of the rectangle to include a given point. doc/graphene-sections.txt | 1 + src/graphene-rect.c | 28 ++++++++++++++++++++++++++++ src/graphene-rect.h | 5 +++++ src/tests/rect.c | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+) commit 78d7ca97dd67428e5b4694ba590226461928dc6c Author: Emmanuele Bassi Date: Tue Sep 22 15:17:36 2015 +0100 point: Add point/vec2 conversion functions Similar to what graphene_point3d_t exposes for vec3. doc/graphene-sections.txt | 2 ++ src/graphene-point.c | 40 ++++++++++++++++++++++++++++++++++++++++ src/graphene-point.h | 9 ++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) commit 43de32966069c6ad8ffe1f3a77cb825752bed551 Author: Emmanuele Bassi Date: Mon Sep 21 18:24:05 2015 +0100 Rename line segment header Since it's a private header, it should have 'private' in the file name, like other private headers. doc/Makefile.am | 2 +- src/Makefile.am | 2 +- src/{graphene-line-segment.h => graphene-line-segment-private.h} | 8 ++++---- src/graphene-quad.c | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) commit b2b8b10587d02f7e9e2a708610b40dce47f692dd Author: Emmanuele Bassi Date: Mon Sep 21 18:10:30 2015 +0100 Use aligned allocations for all vector-based types All complex types embedding a vector should use the aligned allocator, as we want to ensure that they are allocated correctly. src/graphene-euler.c | 5 +++-- src/graphene-frustum.c | 4 ++-- src/graphene-plane.c | 6 ++++-- src/graphene-sphere.c | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) commit 2e79b084fbeb951192d5bcdc2a340a34ab05292b Author: Emmanuele Bassi Date: Mon Sep 21 12:54:15 2015 +0100 point3d: Optimize vec3 → point3d initializer We call this a fair amount; we can shave some time by avoiding the single channel reads in favour of a single memcpy. src/graphene-point3d.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 16c54d11103b97251088cec13f3e0a272f3ad09f Author: Emmanuele Bassi Date: Mon Sep 21 12:49:34 2015 +0100 box: Use the appropriate initializer We want to turn a vec3 into a point3d, and graphene_point3d_t provides us with a convenient functiont that does precisely that. src/graphene-box.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 1bf3638026289a255ea3731c36c913daf8eaa17b Author: Emmanuele Bassi Date: Mon Sep 21 12:28:26 2015 +0100 Move graphene_size_t to its own header Instead of hijacking the graphene-point.h one. src/Makefile.am | 1 + src/graphene-point.h | 68 --------------------------------- src/graphene-rect.h | 1 + src/graphene-size.c | 2 +- src/graphene-size.h | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene.h | 1 + 6 files changed, 109 insertions(+), 69 deletions(-) commit e449d7c3dac628902da2be142fd0499a41a2a83b Author: Emmanuele Bassi Date: Mon Sep 21 11:02:26 2015 +0100 build: Sort SIMD implementations correctly We want the used SIMD implementation to be the first in the list, for convenience; otherwise, the 'scalar' fallback implementation will always appear first. configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7b9a7c493a1f0c9f98003d4de3da999019fea53f Author: Emmanuele Bassi Date: Mon Sep 21 10:58:11 2015 +0100 build: Generate pkg-config files at configure time Instead of ad hoc rules inside the automake template, we can use the configuration script to generate the versioned pkg-config files for Graphene. configure.ac | 5 ++++- src/Makefile.am | 10 +--------- 2 files changed, 5 insertions(+), 10 deletions(-) commit 52d090de2faecabf9ea691ef005042bfcbc0e093 Author: Emmanuele Bassi Date: Wed Sep 16 17:08:52 2015 +0100 docs: Reword the description paragraph doc/graphene-docs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 096c75d8cc0c7d46d470c2b8f610d955ae4b9e17 Author: Emmanuele Bassi Date: Tue Sep 15 15:58:25 2015 +0100 rect: Deprecate round_to_pixel() Let's make it abundantly clear that the correct method is round(). src/graphene-rect.c | 2 ++ src/graphene-rect.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit fd3f6b7f4ae354aaaef3ed4c27ef554b15ef8243 Author: Emmanuele Bassi Date: Tue Sep 15 15:53:56 2015 +0100 rect: Provide a replacement for round_to_pixel() The round_to_pixel() method of graphene_rect_t is all kinds of problematic. First of all, it operates in place, whereas we want our mutators to operate on a separate object; then, it mentions "pixels" in the name, when it really has nothing to do with them; finally, it's not clear what it does, as it's not similar to any other operator we have inside the rectangle API. We should simply have a round() method that operates on a copy of the given rectangle, and is clearly tied to the concept of 'rounding' the values of the rectangle's description. doc/graphene-sections.txt | 1 + src/graphene-rect.c | 34 ++++++++++++++++++++++++++++------ src/graphene-rect.h | 3 +++ 3 files changed, 32 insertions(+), 6 deletions(-) commit d91df7715a99f1a2e466c3ce94675c5d85db5e23 Author: Emmanuele Bassi Date: Tue Sep 15 15:27:34 2015 +0100 rect: Add non-mutating versions of various methods The graphene_rect_t API was written before I settled down on the design tenet of providing functions that do not mutate the object. The normalize(), inset(), and offset() methods operate in place on the given rectangle; we should provide equivalent methods that do not mutate the rectangle they are given but, instead, store the result in a separate out argument. doc/graphene-sections.txt | 3 ++ src/graphene-rect.c | 118 ++++++++++++++++++++++++++++++++++++++-------- src/graphene-rect.h | 13 +++++ 3 files changed, 115 insertions(+), 19 deletions(-) commit 8546f986758374ccd0c9857929c0b69a77fa4a72 Author: Emmanuele Bassi Date: Mon Sep 14 15:43:39 2015 +0100 matrix: Add ray transformation Like we allow transforming boxes, spheres, and other Graphene types using the given matrix. doc/graphene-sections.txt | 1 + src/graphene-matrix.c | 29 +++++++++++++++++++++++++++++ src/graphene-matrix.h | 4 ++++ src/tests/ray.c | 22 ++++++++++++++++++++++ 4 files changed, 56 insertions(+) commit 2562a709616e00a41ead2d4a98a207d648bda19e Author: Emmanuele Bassi Date: Sun Sep 13 13:10:32 2015 +0100 tests: Add suite for graphene_ray_t src/tests/.gitignore | 1 + src/tests/Makefile.am | 1 + src/tests/ray.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) commit 938ddaee3ce8ade6550c3fcb8b954d0cd3ef9c24 Author: Emmanuele Bassi Date: Sat Sep 12 12:34:13 2015 +0100 docs: Add graphene_ray_t Plumbing for getting the API reference. doc/graphene-docs.xml | 5 +++++ doc/graphene-sections.txt | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) commit a31ca181eba0979ea7cb98fd4c392cd1887a0bae Author: Emmanuele Bassi Date: Sat Sep 12 12:33:37 2015 +0100 Add GType goo for graphene_ray_t Function and macro for a new boxed type. src/graphene-gobject.c | 2 ++ src/graphene-gobject.h | 5 +++++ 2 files changed, 7 insertions(+) commit a0d8ab0a4d2c3be88bca2f7567dd41d4e9ca80d7 Author: Emmanuele Bassi Date: Sat Sep 12 12:33:05 2015 +0100 Add graphene_ray_t The beginnings of a simple type for ray casting. src/Makefile.am | 2 + src/graphene-ray.c | 352 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/graphene-ray.h | 98 ++++++++++++++ src/graphene-types.h | 1 + src/graphene.h | 1 + 5 files changed, 454 insertions(+) commit 766df40602ca36d045d27bec719a386800603d67 Author: Emmanuele Bassi Date: Sun Sep 13 12:24:55 2015 +0100 point3d: Add distance() operator We have a distance() operator for the 2D point, but not for the 3D one. doc/graphene-sections.txt | 1 + src/graphene-point3d.c | 35 +++++++++++++++++++++++++++++++++++ src/graphene-point3d.h | 4 ++++ 3 files changed, 40 insertions(+) commit b6721de070f8e301a8265d7926940faaf6a30150 Author: Emmanuele Bassi Date: Fri Sep 11 15:49:16 2015 +0100 Add version macros for 1.4 The new API cycle opens now. src/graphene-version-macros.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit c56c5d5caf536b475f11bdbc33b5930de5c02517 Author: Emmanuele Bassi Date: Fri Sep 11 15:42:23 2015 +0100 Post-branch version bump to 1.3.1 configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3caf3fc1fd1f257dab601ec683d15182dda3c57f Author: Emmanuele Bassi Date: Fri Sep 11 14:13:40 2015 +0100 tests: Increase coverage of graphene_matrix_t Coverage stats: Hits Total Coverage ------------------------------------ Lines: 145 460 31.5 % Functions: 34 63 54.0 % Still a *long* way to go. src/tests/matrix.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit b139eebfffa4f7ab2ab1b60dd85923000ce9d0ff Author: Emmanuele Bassi Date: Fri Sep 11 14:02:33 2015 +0100 tests: Increase converage of graphene_quaternion_t As measured by lcov: Hit Total Coverage ---------------------------------------- Lines: 163 187 87.2 % Functions: 20 20 100.0 % src/tests/quaternion.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) commit fea554e6cc11a03d6273a8f495c1b95c6d4a7898 Author: Emmanuele Bassi Date: Fri Sep 11 11:46:32 2015 +0100 matrix: Use dot() operator We have a dot() operator for SIMD vectors, we should use it. src/graphene-matrix.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a6a3c44120b616d01c01d56fa7106219bdebff41 Author: Emmanuele Bassi Date: Fri Sep 11 11:44:51 2015 +0100 matrix: Simplify interal rotate mutator The internal function that we use to rotate a matrix given an (angle, axis) tuple should be simplified: * the angle should be in radians, like most of our internal API * the axis vector should be constified src/graphene-matrix.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 796d19b17ee044f2e018a629c0d97f00b9d4b5e4 Author: Emmanuele Bassi Date: Thu Sep 10 16:48:58 2015 +0100 docs: Drop repeated 'for the' README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed8c26df919934da07979cd9e9ba2785bcad510c Author: Emmanuele Bassi Date: Thu Sep 10 16:39:47 2015 +0100 Post-release version bump to 1.2.11 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit daf2e180d164edbc534d1251b03ff40eb7b638f3 Author: Emmanuele Bassi Date: Thu Sep 10 16:38:23 2015 +0100 Release Graphene 1.2.10 (stable) configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b40774dc118e5c606479bc1a05b41ae91f441ab Author: Emmanuele Bassi Date: Thu Sep 10 12:26:42 2015 +0100 Use platform-provided FLT_EPSILON Instead of defining our own constant for the epsilon, let's use the one provided by the C standard library. src/graphene-private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cd2d1932810084ef17f05e3548a96845b84db498 Author: Emmanuele Bassi Date: Thu Sep 10 12:21:11 2015 +0100 simd4x4: Use a smaller epsilon Using nearbyintf() may end up in false positives at small scales, given the rounding it performs. We should use FLT_EPSILON and just check that the value we want to verify is near it. src/graphene-simd4x4f.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7b8e404575c20f852250f25908d254b75a0a116f Author: Emmanuele Bassi Date: Thu Sep 10 11:20:50 2015 +0100 Post-release version bump to 1.2.9 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b9d8a187fd7af9b81a09a7797fedb749b4e40a6 Author: Emmanuele Bassi Date: Thu Sep 10 11:19:19 2015 +0100 Release Graphene 1.2.8 (stable) configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bed9077a4c7001d43d882673e72e7d042b960e13 Author: Emmanuele Bassi Date: Wed Sep 9 19:37:17 2015 +0100 matrix: Go back to the simd4x4 is_2d() operator Now that we have a working baseline, and now that the is_2d() operator for graphene_simd4x4f_t is not affected by floating point fluctuations, we can go back to using it. We can leave the fuzzy comparison code in place, in case of regressions, for ease of debugging. src/graphene-matrix.c | 4 ++++ 1 file changed, 4 insertions(+) commit bbb069f9c28dd2c5533bd58825993465a8d9a092 Author: Emmanuele Bassi Date: Wed Sep 9 19:34:18 2015 +0100 simd4x4: Use nearbyint() to check for equality Instead of using direct equality, we should use the nearbyintf() function, so that any rounding errors get squashed. src/graphene-simd4x4f.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit c16ce27d47e0411f975be6dee3f5c9ae6825df01 Author: Emmanuele Bassi Date: Wed Sep 9 19:28:47 2015 +0100 simd4x4: Unroll conditions for is_2d() Split up the conditions, for readability. src/graphene-simd4x4f.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 8ba7fdd0a298e24e58c954ace82c2589037f45e5 Author: Emmanuele Bassi Date: Wed Sep 9 19:24:20 2015 +0100 tests: Check the effects of rotating a 2D matrix Rotating a 2D matrix on the Z axis should not result in a non-affine transformation; conversely, rotating the same matrix on the Y axis should result in a non-affine transformation. Let's test both assumptions. src/tests/matrix.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit c5e57280d5187e653f5b38c03f39ad24a49bfe5b Author: Emmanuele Bassi Date: Wed Sep 9 19:22:21 2015 +0100 matrix: Unroll the is_2d() operator The is_2d() implementation inside graphene_simd4x4f_t is susceptible to floating point rounding errors. We can make the public wrapper API inside graphene_matrix_t a bit more forgiving, by using the private fuzzy comparison macro. src/graphene-matrix.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 2d2510d0d6134dc3d40aca6094f64cbb6e25380e Author: Emmanuele Bassi Date: Wed Sep 9 18:58:49 2015 +0100 private: Add a fuzzy comparison macro We use it in the test suite, but it's also useful internally. src/graphene-private.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit cf30a56c134d385faab35121ca6261ee9f6846d9 Author: Emmanuele Bassi Date: Wed Sep 9 16:19:30 2015 +0100 tests: Add tests for 2D matrices It's nicer if we ensure that this stuff does not break with every commit. src/tests/matrix.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) commit 02cce7babfdde8761774c72d0cd065ffbfff5654 Author: Emmanuele Bassi Date: Wed Sep 9 15:53:55 2015 +0100 matrix: Optimize the 2D matrix conversion Check for a valid 2D affine transformation matrix while we're reading it, instead of before hand. src/graphene-matrix.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) commit 619c0ddd894cfb52c011afa86a2b9684dcb1d6c1 Author: Emmanuele Bassi Date: Wed Sep 9 15:52:18 2015 +0100 simd4x4: Flip the boolean check Use a boolean AND between conditions, and negate its result, instead of a boolean OR. This allows faster short-circuiting of expensive single channel read operations. src/graphene-simd4x4f.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 02944f4b9d37a5df65d479b9d5ace2ac9ffb0342 Author: Emmanuele Bassi Date: Wed Sep 9 15:51:29 2015 +0100 matrix: Fix a typo in the 2D matrix initializer We're setting the two fields with the same value. src/graphene-matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3842fef4a2f291b64d83a3977946b07c86ac46d6 Author: Emmanuele Bassi Date: Wed Sep 9 11:54:00 2015 +0100 Fix spacing in the filter script Conflicting file loading directives in Vim screwed up the tab stops. build/identfilter.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ce326efc310ee056a153df4bf1555f4dbc025229 Author: Emmanuele Bassi Date: Wed Sep 9 11:47:27 2015 +0100 build: Use an external script for filtering type names When building introspection data we need to turn our lowercase type names ending with '_t' into camel-case identifiers that match the expectations of GObject-Introspection. We currently use a Sed invocation, but we're also relying on GNU Sed extensions that are not portable to other operating systems — e.g. MacOS and *BSD. Instead of using Sed, we can use a small Python script that does the same transformation, with a higher chance at being portable. Fixes #42 Makefile.am | 3 ++- build/identfilter.py | 29 +++++++++++++++++++++++++++++ src/Makefile.am | 8 ++------ 3 files changed, 33 insertions(+), 7 deletions(-) commit 921a6246911d703f882155c37204abb3ab9f9d06 Author: Emmanuele Bassi Date: Wed Sep 9 10:35:10 2015 +0100 build: Clean up the introspection rules Use a separate variable to store the Sed incantantion, to improve readability. src/Makefile.am | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 5a64e0f848d8a5ee5eb7676eb69db7800294f567 Author: Emmanuele Bassi Date: Fri Aug 14 15:57:22 2015 +0100 Post-release version bump to 1.2.7 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0d9772290f70132341709fcc678fb1e2937e538 Author: Emmanuele Bassi Date: Fri Aug 14 15:55:48 2015 +0100 Release Graphene 1.2.6 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0bb1baed93020c0b2f63cd40097af5058b7fbc5d Author: Emmanuele Bassi Date: Fri Aug 14 11:06:05 2015 +0100 docs: Fix clashing ids doc/graphene-docs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 995c031faacf3192dab3fc0d5ff2285c8d6cf940 Author: Emmanuele Bassi Date: Fri Aug 14 10:40:32 2015 +0100 build: Fix configure when gtk-doc is missing configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb9cdcdf5848c8517add54e4e3f15b5202f202ba Author: Emmanuele Bassi Date: Fri Aug 14 10:36:29 2015 +0100 travis: Drop gtk-doc It's not in the whitelist, but we don't really need it, as we can build without gtk-doc. .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 50e6645a87f26da24d06e5a283c4363ef344c7bb Author: Emmanuele Bassi Date: Fri Aug 14 10:32:28 2015 +0100 travis: Use the new infrastructure Travis is now containerized, so we need to fix a bunch of pre-requisites. .travis.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 7b9381a721238e0b1907af1d8f5f5656bc0e8508 Author: Emmanuele Bassi Date: Fri Aug 14 10:22:00 2015 +0100 quaternion: Initialize the w component of the conjugate When calling invert() we're leaving the w component as it is; this cannot obviously work with uninitialized data. This also needs fixing in the test suite, since it was relying on a value being set to 0 by the compiler. Solves issue: #41 src/graphene-quaternion.c | 1 + src/tests/quaternion.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) commit 1f2c0e6185a926af73bf65fa751f1e78ae080aca Author: Emmanuele Bassi Date: Wed Aug 12 13:48:51 2015 +0100 docs: Mention the release notes README.md | 5 +++++ 1 file changed, 5 insertions(+) commit 13c175cbb428158a81a5807b7c303fba053fa2b2 Author: Emmanuele Bassi Date: Wed Aug 12 13:32:42 2015 +0100 Post-release version bump to 1.2.5 configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(+)