Commit Graph

57 Commits

Author SHA1 Message Date
Philip Deuchler 4968e819c0
Remove stdarch_arm_crc32 feature as it is now stable (#566)
Fixes #565
2024-06-11 10:31:35 +00:00
Samson dc6034f666
Replace platform-intrinsic with core_intrinsics (#559)
Co-authored-by: Sebastian <s3bk@protonmail.com>
2024-03-05 11:09:28 +00:00
Jonas Pleyer e4fcda0d52
remove stdsimd feature flag (#548)
* remove stdsimd feature flag

* include suggestion from @jayvdb for including aarch64 flags

* change nightly feature flag to pf_rustc_nightly

---------

Co-authored-by: Sebastian <s3bk@protonmail.com>
2024-02-12 17:10:23 +00:00
Jonas Pleyer 30830f271a
fix f32x4_basic_ops test (#551) 2024-02-12 15:46:06 +00:00
Tails a3ceb814ca
copy PartialEq impl from F32x4 (#546) 2023-09-30 12:30:10 +00:00
MeiHui FAN 38709546b3
Stop using old-style simd_shuffle (#542) 2023-08-30 23:26:35 +00:00
Josh Matthews 9e5f07edb4 Work around const argument issue for shuffling, per https://github.com/rust-lang/stdarch/pull/1160. 2021-05-22 11:44:00 -04:00
Berkus Decker bd6d015e6f Fix arm simd shuffling arguments
According to packed_simd docs, the syntax for simd_shuffle4()
is as follows:

"The indices must be in range [0, M * N) where M is the number of input
vectors (1 or 2)and N is the number of lanes of the input vectors. The
indices i in range [0, N) refer to the i-th element of vec0, while the
indices in range [N, 2*N) refer to the i - N-th element of vec1."

I did not find implementation or documentation for simd_shuffle4() but
I believe packed_simd implements exactly the same interface.

Plus, implementing this change has fixed font-kit glyph output on
an Apple M1 mac (64-bit arm).
2021-01-10 23:36:01 +02:00
Sam Schanken 714421b3c6 Implement BitAnd, BitOr, and Not for U32x2 in scalar version. 2020-06-13 17:18:49 -07:00
Patrick Walton 13f9fdc96c Use SIMD a bit more in the new tiling code. 2020-05-16 10:38:34 -07:00
Josh Matthews 43adc9c24a
Fix arm I32x4 min/max operations that require on floating point values. 2020-04-07 15:35:03 -04:00
Josh Matthews e87b330123
Add min/max to i32x2. 2020-04-07 12:42:28 -04:00
Josh Matthews db205f71d6
Fix incorrect cast ordering in arm simd. 2020-04-07 12:31:28 -04:00
Josh Matthews f2b668f9d7
Add missing import. 2020-04-07 12:28:37 -04:00
Patrick Walton b29ffdf3fa Add missing packed comparisons to the scalar implementation of `I32x2` 2020-03-27 10:04:42 -07:00
Patrick Walton e913f83eee Remove obsolete TODOs 2020-02-27 04:03:08 -08:00
Patrick Walton 5a21557a6d Implement basic linear gradients.
This is not a very efficient implementation yet, but it seems to work.
2020-02-10 16:01:05 -08:00
Sebastian K de0f9055ed fix scalar simd impls 2020-01-24 00:24:22 +03:00
Patrick Walton 3f72847294 Add a few missing methods to geometry and SIMD; fix SIMD tests 2020-01-14 21:31:22 -08:00
Patrick Walton ee9187849b Support `pathfinder_simd` on 32-bit x86.
Closes #249.
2020-01-14 13:03:31 -08:00
Patrick Walton eb66459ef4 Fold the `.round()` method on SIMD vectors into float-to-int conversion.
This drops our requirements from SSE4.1 to SSE2.

Closes #241.
2019-12-29 15:05:01 -08:00
Patrick Walton 0bb6b88859 Stop using AVX2 when packing pixels.
Partially addresses #241.
2019-12-29 12:38:36 -08:00
Patrick Walton 986792349f Use the SSE2 `_mm_movemask_ps` on x86 instead of the SSE4.1 `_mm_test_all_ones`
and `_mm_test_all_zeros`.

Partially addresses #241.
2019-12-29 12:13:58 -08:00
Patrick Walton b886c157c1 Use 2-lane instead of 4-lane SIMD types for 2D vectors.
Also, this commit rewrites the `add_fill()` method to stop using shuffle
instructions, which can be slow and make the code overly complicated. The
shuffle instructions have been removed from the various SIMD backends.
2019-06-26 16:38:37 -07:00
Luis de Bethencourt 70e9adc0da Add more tests for F32x4 2019-06-05 17:30:31 -04:00
Patrick Walton dc45dc459e Remove unused `LineSegment2F::cross` and vector cross product functions 2019-06-03 15:50:39 -07:00
Patrick Walton a1b0df0a42 Rename `Point2DF` to `Vector2F`, `Point3DF` to `Vector4F`, and `LineSegmentF`
to `LineSegment2F`.

Straw poll on Twitter suggested that these names were preferred.
2019-06-03 12:39:29 -07:00
Patrick Walton e1bcc11ace Change the `F32` and `I32` suffixes to `F` and `I` to match the C API.
They're shorter and less noisy.
2019-05-29 19:17:16 -07:00
Patrick Walton 5dd9e8b67d
Merge pull request #173 from luisbg/scalar
Start adding tests for scalar::F32x4
2019-05-29 14:21:33 -07:00
Luis de Bethencourt 9f4bcd8c42 Start adding tests for scalar::F32x4 2019-05-29 17:04:28 -04:00
Patrick Walton 5133bbfe1a Use unit vectors instead of angles for arcs.
This makes things faster and will also simplify the implementation of round
joins.
2019-05-29 12:14:47 -07:00
luisbg 16813b9ebe Test I32x4 swizzles 2019-05-28 16:50:22 -04:00
luisbg b887690b73 Complete I32x4 swizzles 2019-05-28 16:50:17 -04:00
Luis de Bethencourt 7240dafb05 Add test_i32x4_swizzles 2019-05-28 13:24:41 -04:00
Luis de Bethencourt 3ccd1fce20 Complete test_f32x4_swizzles 2019-05-27 21:43:25 -04:00
Luis de Bethencourt 8c0415c9b9 Remove cross method from F32x4
Silencing the following rustc warning:
warning: unused variable: `other`

Followup to Pull Request #152.
Instead of marking `other` unused (`_other`) we can remove the method
entirely.
2019-05-24 12:19:13 -04:00
Patrick Walton 639a8f39e8 Add Moiré demo 2019-05-11 11:53:50 -07:00
Patrick Walton 328e804378 Run `rustfmt` on the SIMD crate 2019-04-29 16:57:21 -07:00
Patrick Walton cb9fe3edf2 Bounds check SIMD on ARM.
Closes #126.
2019-04-18 14:05:30 -07:00
Patrick Walton 79b26bb9bd Split out the swizzles into separate modules 2019-03-28 21:25:33 -07:00
Patrick Walton ae192ffee7 Add ARM SIMD 2019-03-28 19:26:47 -07:00
Patrick Walton 6ca5dc5f62 Add basic barrel distortion support for VR 2019-03-20 13:41:04 -07:00
Nicolas Silva 301075ef86 Fix swizzles in scalar.rs. 2019-03-20 17:19:11 +01:00
Patrick Walton 9c404dfdc1 Add an Android port 2019-03-12 13:55:26 -07:00
Patrick Walton d1728dfe6d Update the scalar SIMD fallback 2019-03-08 12:30:07 -08:00
Patrick Walton 4dff13ef00 Use an advancing cursor when laying out UI elements 2019-03-06 10:47:52 -08:00
Patrick Walton ae450b063e WIP: Factor out GL code 2019-03-04 14:55:32 -08:00
Patrick Walton 1e3298fdb7 Switch to guard-band style clipping to eliminate artefacts 2019-02-22 13:15:00 -08:00
Patrick Walton d7f6d9eb3d Allow the canvas to be dragged in 2D mode 2019-02-12 14:49:24 -08:00
Patrick Walton a8cc87bfd7 Make the effects window togglable 2019-02-07 16:38:24 -08:00
Patrick Walton 3d0463999c Add a SIMD integer rect type 2019-02-05 10:55:01 -08:00
Patrick Walton fe410e066f Add a SIMD rect type 2019-02-05 10:03:20 -08:00
Patrick Walton df59fd9792 Rename `Point4DF32` to `Point3DF32` 2019-02-01 17:07:03 -08:00
Patrick Walton 42bb7acddb Add some tests for SIMD 2019-02-01 16:58:35 -08:00
Patrick Walton f9aed5b077 Add some more SIMD stuff 2019-02-01 15:19:44 -08:00
Patrick Walton 2487d71879 Add more shuffles and rename combines for clarity 2019-02-01 12:16:42 -08:00
Patrick Walton 0b0c913332 Split out SIMD into a separate crate 2019-02-01 11:48:10 -08:00