servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.56k stars 198 forks source link

Fix arm simd shuffling arguments #452

Closed berkus closed 3 years ago

berkus commented 3 years ago

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, 2N) 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).

Closes #450

jdm commented 3 years ago

@bors-servo r+ Looks reasonable; thanks!

bors-servo commented 3 years ago

:pushpin: Commit bd6d015 has been approved by jdm

bors-servo commented 3 years ago

:hourglass: Testing commit bd6d015e6ff7ccc68fa50662e5b714aa4d5e9d45 with merge 20adbeed149713ae4354cede3a30ca0f622c9943...

bors-servo commented 3 years ago

:sunny: Test successful - checks-travis Approved by: jdm Pushing 20adbeed149713ae4354cede3a30ca0f622c9943 to master...