SVE/SVE2 is a new SIMD extension for AArch64. Compared to NEON, SVE/SVE2 brings the following benefits that are good for SDL projects:
- Lane prediction: we don't have to treat the tail part of a stride separately when the width is n times the hardware vector size
- Although the performance is almost no difference from NEON when the hardware vector size is 128bits, when the hardware provides a longer vector size, e.g. 256, 512, ... 2048, we can enjoy the large performance gain without modifying the source code or recompiling a library.
The functional correctness is validated in a dedicated [qemu project](https://github.com/GorgonMeducer/aarch64_qemu_mac_template/tree/SDL-SVE2-Acceleration-Validation).
The performance is tested on [Radxa Orion 6 N](https://radxa.com/products/orion/o6n/), which provides 4x A720 and 4x A520 processors. Since the vector size is 128 bits, which is the same as NEON, the performance is almost the same (or no worse than) the NEON acceleration.
Because the blend mode is explicitly set to SDL_BLENDMODE_NONE, it doesn't matter if there's a transparency channel in the texture format or not for opaque windows. This ensures that a 32-bit format is used with Metal instead of SDL_PIXELFORMAT_RGB565.
Now this keeps one FBO for each SDL_TEXTUREACCESS_TARGET texture, and doesn't
reuse it. We check if the FBO is "complete" once, at creation time, and
setting a render target merely has to bind the right FBO and never look back.
This simplifies the code and removes a guaranteed pipeline stall when setting
a new render target.
Fixes#15524.
CAudio::~CAudio() waited on MaoscBufferCopied(KErrAbort) to set
EStateDone, but that callback can never fire once the active scheduler
loop has exited, deadlocking every close.
- StopThread() before iStream->Stop() in ~CAudio()
- Force iState = EStateDone instead of waiting on a dead callback
- Add 5s timeout to AudioIsReady() poll in E32Main()
- Fix CleanupStack LIFO pop order (mainApp before gRenderer)
Some compositors may dispatch this too early, during the initial empty commit, when subsurfaces are attached to a toplevel window, but a buffer has yet to be committed to the parent surface. Don't set the frame callback until the initial empty commit is done, so it will be called when the actual parent surface frame is committed.