wgpu_native really seems to like statically linking itself
(as shown by it not implementing the functionality for dynamic linking),
so I added an option to statically link it alongside SDL.
How I implemented this almost certainly goes against some convention or
guideline in SDL but I'm shooting blind here. I have no idea what to do.
Currently only supports Wayland, and it's quite..... bad
This is a DRAFT! Just a small proof-of-concept.
I'll submit a draft PR to the SDL project to see if I should continue
development.
If this is greenlit, I might making consider a WGPU SDL_GPU backend if
wgpu-native is in a good enough state (maybe Dawn if it isn't?)
No promises though! Don't get angry at me if I don't!
Current known issues:
1: Error handling is sparse.
2: It only supports the shared library version of wgpu-native, and it
does that by just loading it whenever it needs to do something
3: wgpu-native is bad and doesn't implement wgpuGetProcAddress so we're
just using SDL_LoadFunction instead. I'd much prefer using the native
wgpuGetProcAddress but alas....
Some sensors will occasionally report two identical timestamps in a row.
This leads to the timestamp wrapping calculation to underflow, subtracting
0x80000000 from the timestamp whenever it happens. By adjusting the wrap
test, we can just directly add zero to the timestamp, fixing the underflow.
Previously something like SDL_GetCurrentDisplayMode() would have this output:
```
RETURN VALUE
*) Returns a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.
```
Now it doesn't have the junk at the start of the text:
```
RETURN VALUE
Returns a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.
```
That also covers removal of the call `SDLActivity.onNativeAccel`,
plus a change of comment under SDL_android.c.
Definitions were previously used while an accelerometer could be listed as a joystick.
This reverts commit 6b4ae68460.
It turns out this deadlock is possible for any joystick event delivery combined with an event watcher that locks joysticks. I'm reverting this change for now, and will be working on a better global solution for this problem.
There's no need to use the "A" version of GetModuleFileName on GDK; it returns
a UTF-8 string directly on this platform, but we can still use the UTF-16 "W"
version and cut down on code duplication.
This code runs once and caches the results, so we can take the one-time string
conversion overhead.
(for SDL_PROP_APP_METADATA_NAME_STRING if unset. If SDL_GetExeName() returns
NULL, it'll fallback to good ol' "SDL Application", as usual.)
Fixes#15692.
core/unix had a more-limited copy of filesystem/unix's implementation, called
SDL_GetExeName(). Replace that with a real implementation in filesystem, and
allow each platform to implement it as appropriate.
Implemented for Unix and Windows; most implementations are currently FIXME
stubs at the moment.
Reference Issue #15692.
If a mode with a closer refresh was found, but it had the same color depth as the current best match, it was being dropped. Only ignore the new mode if the color depth is below the current best match.
* SVE2 was actually disabled in fdfbbce, this issue is fixed
- The macro __ARM_FEATURE_SVE is only defined when the compilation target is set as -march=armv8-m+sve2
* Improves 8888 alpha-blending performance
- Now, in In-Order AArch64 processors, e.g. A520, SVE2 is better than NEON with the 128bit vector width
- For Out-of-order processors, NEON is still better than SVE2 (We could improve this in the future), the performance is improved from 3.0 to 3.6.
* The 8888 -> RGB565 performance is also improved (from 7.4 to 9.3)
This readds the "opengles" renderer, updated from SDL2 to work on SDL3.
Fixes#15661.
Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>