Commit graph

10 commits

Author SHA1 Message Date
Diego Frias a168bec7ef AK/SIMDExtras: Fix masking logic in shuffle_or_0 2024-07-27 15:02:37 +02:00
Diego Frias 9cc3e7d32d LibWasm: Fix SIMD shuffle and swizzle
`swizzle` had the wrong operands, and the vector masking boolean logic
was incorrect in the internal `shuffle_or_0` implementation. `shuffle`
was previously implemented as a dynamic swizzle, when it uses an
immediate operand for lane indices in the spec.
2024-07-24 23:23:09 +02:00
Dan Klishch 7e9dc9c1fd AK: Use bit_cast in SIMDExtras.h/AK::Detail::byte_reverse_impl
This necessitates marking bit_cast as ALWAYS_INLINE since emitting it as
a function call there will create an unnecessary potential SSE
registers -> plain registers/memory round-trip.
2024-07-17 09:56:13 -06:00
Hendiadyoin1 9c583154b0 AK: Add generic SIMD shuffle/reverse functions
(cherry picked from commit 1b8fd5c35afda8f797f1e8a39c332fa14950006e)
2024-07-17 09:56:13 -06:00
Hendiadyoin1 873b03f661 AK: Add generic SIMD vector load/store functions
(cherry picked from commit 27c386797df64b9c4dcbe6a27e57d9f54837e9b4)
2024-07-17 09:56:13 -06:00
Ali Mohammad Pur 3c176bafee LibWasm: Implement a few SIMD instructions 2023-08-21 13:39:32 +03:30
Karol Kosek b5420b8a9a LibGfx: Implement PNG filtering on write
Is it another great upgrade to our PNG encoder like in 9aafaec259?
Well, not really - it's not a 2x or 55x improvement like you saw there,
but still it saves something:

- a screenshot of a blank Serenity desktop dropped from about 45 KiB
  to 40 KiB.
- re-encoding NASA photo of the Earth to PNG again saves about 25%
  (16.5 MiB -> 12.3 MiB), compared to not using filters.

[1]: https://commons.wikimedia.org/wiki/File:The_Blue_Marble_(remastered).jpg
2022-07-10 15:01:07 +02:00
Jelle Raaijmakers 11c807ebd1 LibGL+LibSoftGPU: Implement the stencil buffer
This implements an 8-bit front stencil buffer. Stencil operations are
SIMD optimized. LibGL changes include:

* New `glStencilMask` and `glStencilMaskSeparate` functions
* New context parameter `GL_STENCIL_CLEAR_VALUE`
2022-01-17 12:49:00 +01:00
Stephan Unverwerth f9c5c120f6 AK/SIMD: Suppress psabi warnings and add explanatory comment 2022-01-09 21:03:08 +01:00
Stephan Unverwerth 7adcdecc7b AK: Add SIMDExtras.h with SIMD related functions
Adds a header to AK with helper functions for writing vectorized code.

Co-authored-by: Hendiadyoin <leon2002.la@gmail.com>
2022-01-09 16:21:13 +03:30