From 816398e4ca396c1a3d931a1524a20bc823d1e9b2 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Mon, 6 Jul 2020 09:43:06 +1200 Subject: [PATCH 1/3] glam 0.9 breaking changes. --- content/posts/newsletter-011/index.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/content/posts/newsletter-011/index.md b/content/posts/newsletter-011/index.md index bef74d99e..5d096e98a 100644 --- a/content/posts/newsletter-011/index.md +++ b/content/posts/newsletter-011/index.md @@ -69,6 +69,32 @@ If needed, a section can be split into subsections with a "------" delimiter. ## Library & Tooling Updates +### [glam](https://github.com/bitshifter/glam-rs) + +[glam] is a simple and fast linear algebra crate for games and graphics. + +This month [glam 0.9] was published to crates.io. This update is a breaking +change from 0.8. + +In 0.9 the `Vec3` type was changed from being a 128 byte SIMD vector type to a +tuple of three floats. This changes the size of `Vec3` from 16 bytes to 12 bytes +and the alignment from 16 bytes to 4 bytes. This might not effect all users but +if `Vec3` was used in a context where the size or alignment mattered, such as in +FFI or as input to shaders, this could cause breakage. + +The SIMD parts of `Vec3` were moved to a new type, `Vec3A` (`A` for Aligned) +which is 16 byte aligned and thus 16 bytes in size. The `Vec3A` type is still +there for users who want the performance benefits of the SIMD implementation. + +The motivation for this change was that it is potentially surprising and +confusing for new users that the `Vec3` type was not 12 bytes. Also it's common +that users needed a `Vec3` that was just 12 bytes. + +While glam is reasonably stable it has not yet reached a 1.0 release, so it +seemed like now is the time to address such issues in the API. + +[glam 0.9]: https://github.com/bitshifter/glam-rs/blob/master/CHANGELOG.md#090---2020-06-28 + ## Popular Workgroup Issues in Github From 52529efb3009b65d5d50edc63f03e61636b5b4f2 Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Mon, 6 Jul 2020 07:49:41 +0300 Subject: [PATCH 2/3] Newsletter 11: glam: Fmt tweaks --- content/posts/newsletter-011/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/posts/newsletter-011/index.md b/content/posts/newsletter-011/index.md index 67b2052ac..6d0266a64 100644 --- a/content/posts/newsletter-011/index.md +++ b/content/posts/newsletter-011/index.md @@ -500,7 +500,7 @@ The goal of the project is to be able to compose images without using the mouse. [vimnail-git]: https://github.com/TanTanDev/vimnail [vimnail-video]: https://youtu.be/2cSY43OcuZc -### [glam](https://github.com/bitshifter/glam-rs) +### [glam] [glam] is a simple and fast linear algebra crate for games and graphics. @@ -524,6 +524,7 @@ that users needed a `Vec3` that was just 12 bytes. While glam is reasonably stable it has not yet reached a 1.0 release so it seemed like now is the time to address such issues in the API. +[glam]: https://github.com/bitshifter/glam-rs [glam 0.9]: https://github.com/bitshifter/glam-rs/blob/master/CHANGELOG.md#090---2020-06-28 ## Popular Workgroup Issues in Github From be953c8d403fee19b84a6ba2cc4e1383439fe15c Mon Sep 17 00:00:00 2001 From: Andrey Lesnikov Date: Mon, 6 Jul 2020 07:50:12 +0300 Subject: [PATCH 3/3] Newsletter 11: glam: Move section up --- content/posts/newsletter-011/index.md | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/content/posts/newsletter-011/index.md b/content/posts/newsletter-011/index.md index 6d0266a64..24c4b7035 100644 --- a/content/posts/newsletter-011/index.md +++ b/content/posts/newsletter-011/index.md @@ -380,6 +380,33 @@ channel in the [PSP Homebrew discord server](https://discord.gg/WY8XhDG). [rust-psp]: https://github.com/overdrivenpotato/rust-psp +### [glam] + +[glam] is a simple and fast linear algebra crate for games and graphics. + +This month [glam 0.9] was published to crates.io. This update is a breaking +change from 0.8. + +In 0.9 the `Vec3` type was changed from being a 128 byte SIMD vector type to a +tuple of three floats. This changes the size of `Vec3` from 16 bytes to 12 bytes +and the alignment from 16 bytes to 4 bytes. This might not effect all users but +if `Vec3` was used in a context where the size or alignment mattered, such as in +FFI or as input to shaders, this could cause breakage. + +The SIMD parts of `Vec3` were moved to a new type, `Vec3A` (`A` for Aligned) +which is 16 byte aligned and thus 16 bytes in size. The `Vec3A` type is still +there for users who want the performance benefits of the SIMD implementation. + +The motivation for this change was that it is potentially surprising and +confusing for new users that the `Vec3` type was not 12 bytes. Also it's common +that users needed a `Vec3` that was just 12 bytes. + +While glam is reasonably stable it has not yet reached a 1.0 release so it +seemed like now is the time to address such issues in the API. + +[glam]: https://github.com/bitshifter/glam-rs +[glam 0.9]: https://github.com/bitshifter/glam-rs/blob/master/CHANGELOG.md#090---2020-06-28 + ### [This Month in Mun][mun-june] ![Language Server Diagnostics in action](mun-languageserver.gif) @@ -500,33 +527,6 @@ The goal of the project is to be able to compose images without using the mouse. [vimnail-git]: https://github.com/TanTanDev/vimnail [vimnail-video]: https://youtu.be/2cSY43OcuZc -### [glam] - -[glam] is a simple and fast linear algebra crate for games and graphics. - -This month [glam 0.9] was published to crates.io. This update is a breaking -change from 0.8. - -In 0.9 the `Vec3` type was changed from being a 128 byte SIMD vector type to a -tuple of three floats. This changes the size of `Vec3` from 16 bytes to 12 bytes -and the alignment from 16 bytes to 4 bytes. This might not effect all users but -if `Vec3` was used in a context where the size or alignment mattered, such as in -FFI or as input to shaders, this could cause breakage. - -The SIMD parts of `Vec3` were moved to a new type, `Vec3A` (`A` for Aligned) -which is 16 byte aligned and thus 16 bytes in size. The `Vec3A` type is still -there for users who want the performance benefits of the SIMD implementation. - -The motivation for this change was that it is potentially surprising and -confusing for new users that the `Vec3` type was not 12 bytes. Also it's common -that users needed a `Vec3` that was just 12 bytes. - -While glam is reasonably stable it has not yet reached a 1.0 release so it -seemed like now is the time to address such issues in the API. - -[glam]: https://github.com/bitshifter/glam-rs -[glam 0.9]: https://github.com/bitshifter/glam-rs/blob/master/CHANGELOG.md#090---2020-06-28 - ## Popular Workgroup Issues in Github