Frank Praznik
3b60ee666e
wayland: Note that setting the damage region in the frame callback is explicitly to work around a driver bug
2024-07-10 10:46:39 -04:00
Sam Lantinga
2ba76dbe80
Simplified SDL_Surface
...
SDL_Surface has been simplified and internal details are no longer in the public structure.
The `format` member of SDL_Surface is now an enumerated pixel format value. You can get the full details of the pixel format by calling `SDL_GetPixelFormatDetails(surface->format)`. You can get the palette associated with the surface by calling SDL_GetSurfacePalette(). You can get the clip rectangle by calling SDL_GetSurfaceClipRect().
SDL_PixelFormat has been renamed SDL_PixelFormatDetails and just describes the pixel format, it does not include a palette for indexed pixel types.
SDL_PixelFormatEnum has been renamed SDL_PixelFormat and is used instead of Uint32 for API functions that refer to pixel format by enumerated value.
SDL_MapRGB(), SDL_MapRGBA(), SDL_GetRGB(), and SDL_GetRGBA() take an optional palette parameter for indexed color lookups.
2024-07-10 00:48:18 -07:00
Brick
40ed098ce8
Improve the bucket distribution of SDL_HashTable
...
SDL_HashID does no hashing, which isn't good if the lower bits of the key aren't evenly distributed.
2024-07-09 20:50:26 +01:00
Brick
d604555142
Replace BlitRGBtoRGBSurfaceAlphaMMX
2024-07-08 20:59:42 +01:00
Brick
d37f8fa2b3
Optimize BlitRGBtoRGBSurfaceAlpha
2024-07-08 20:59:42 +01:00
Brick
fde2378ccd
Refactor alpha blitters, move the SSE41/AVX2 versions into SDL_blit_A.c
2024-07-08 20:59:42 +01:00
Sam Lantinga
d6c8485f28
Make sure we're actually running on Windows before using D3D renderers
2024-07-08 11:36:11 -07:00
Brick
c457dbb629
Fix BlitNtoNPixelAlpha for formats with no dst alpha
2024-07-08 10:53:46 -07:00
Brick
95b683ac3e
Tidy up/optimize BlitNtoNPixelAlpha_SSE4_1
2024-07-08 10:53:46 -07:00
Brick
070e48f66e
Tidy up/optimize BlitNtoNPixelAlpha_AVX2
2024-07-08 10:53:46 -07:00
Brick
5d875aa94e
Fix rounding in MULT_DIV_255
2024-07-08 10:53:46 -07:00
Isaac Aronson
b7b513b70b
Fix bytes_per_pixel rename
2024-07-08 10:53:46 -07:00
Isaac Aronson
44d397282d
Re-enable intrinsic blitters
2024-07-08 10:53:46 -07:00
Isaac Aronson
b34faf732d
Implement fast 255 mult-div in SDL_blit_auto
2024-07-08 10:53:46 -07:00
Isaac Aronson
8d099d8976
Fix formatting
2024-07-08 10:53:46 -07:00
Isaac Aronson
8e3afd56f5
Restore BlitARGB 555 and 565 blending algorithms
2024-07-08 10:53:46 -07:00
Isaac Aronson
5cec91e27a
Implement accurate, performant 32-bit scalar blitter for ARGB dst case
2024-07-08 10:53:46 -07:00
Isaac Aronson
e5bbe32641
Implement alpha blend as macro and replace inaccurate blitters
2024-07-08 10:53:46 -07:00
Isaac Aronson
0f351cd6af
Remove ARM32 assembly/pixman blitters
2024-07-08 10:53:46 -07:00
Isaac Aronson
f5ee88c2cf
Implement mathematically correct scalar blitters
2024-07-08 10:53:46 -07:00
Isaac Aronson
9590a47629
Implement visually accurate SIMD blitters
2024-07-08 10:53:46 -07:00
Isaac Aronson
f6f12d0451
Revert "Remove buffer in SSE4.1, use unpacklo and packus intrinsics"
...
This reverts commit 149cd55840e7fdfd5ecde5c545aede5822abd14e.
2024-07-08 10:53:46 -07:00
Isaac Aronson
a027ad9788
Remove buffer in SSE4.1, use unpacklo and packus intrinsics
2024-07-08 10:53:46 -07:00
Isaac Aronson
2432b6686e
Add back in buffer free removed during testing
2024-07-08 10:53:46 -07:00
Isaac Aronson
380bcff018
Allow arbitrary dstfmt in 1 pixel case; naming and const cleanup
2024-07-08 10:53:46 -07:00
Isaac Aronson
87958f44d0
Support arbitrary destination formats; remove buffer from AVX2
2024-07-08 10:53:46 -07:00
Isaac Aronson
c80c540be3
Support older GCC and clang that lack some intrinsics
2024-07-08 10:53:46 -07:00
Isaac Aronson
e8cba442c5
Clean up API surface to use attribute macros and rename convertPixels
2024-07-08 10:53:46 -07:00
Isaac Aronson
bac318fc27
Check for SSE4.1 first as more common
2024-07-08 10:53:46 -07:00
Isaac Aronson
735cf5a6f9
Relocate intrinsic modules to src/video/
2024-07-08 10:53:46 -07:00
Isaac Aronson
f68a7edcf8
Properly shortcut only when AVX2 or SSE4.1 available
2024-07-08 10:53:46 -07:00
Isaac Aronson
3e0581c625
Merge upstream and sdl3-blitters
2024-07-08 10:53:46 -07:00
Frank Praznik
159d7087c6
wayland: Only set the window geometry when viewports are unsupported
...
Setting the window geometry on the xdg-toplevel path is a hack used to prevent protocol violations if a buffer with an old size is committed. Since viewports decouple the window geometry from the buffer size, this is not needed if viewports are supported.
Fixes an invalid window geometry warning and incorrect window overview size for fullscreen windows in GNOME.
2024-07-08 11:40:54 -04:00
Sam Lantinga
4fa5196820
Revert "Switch pixel format loss fields to number of bits"
...
This reverts commit 3c90b1c1f6 .
It turns out this is problematic for sdl2-compat. We're investigating a more complete separation between SDL2 and SDL3 surfaces, but in the meantime, I'll fix the breakage.
2024-07-07 19:41:05 -07:00
Giovanni Petrantoni
a057240984
Fix vision os fake screen size
...
It never really worked, as the value was arbitrary, digging apple docs showed the right values.
2024-07-06 20:49:23 -07:00
Sam Lantinga
3c90b1c1f6
Switch pixel format loss fields to number of bits
...
This makes more sense and handles pixel formats with > 8 bits per channel
Fixes https://github.com/libsdl-org/SDL/issues/10168
2024-07-06 11:37:16 -07:00
mariob92
9389712917
wgl/glx: Fix attribute list for SDL_GL_FLOATBUFFERS
...
This commit fixes the attribute list in the WGL and GLX code when requesting a floating point pixel format. The name of the attribute was missing in the list.
Fixes libsdl-org#10189
2024-07-06 11:35:19 -07:00
Sam Lantinga
e52603ac8f
Support format conversion and YUV surfaces in SDL_SoftStretch()
...
These are slow paths, but at least they'll do the right thing now.
Fixes https://github.com/libsdl-org/SDL/issues/9496
2024-07-06 05:32:31 -07:00
Sam Lantinga
4ba2e9f4f4
Improved detection of Nintendo Switch Pro controller report mode
...
Fixes https://github.com/libsdl-org/SDL/issues/10182
2024-07-06 05:29:12 -07:00
Sam Lantinga
6d64d821fb
Fixed display hotplug events
...
The add event was accidentally removed in 30e176d6ba
2024-07-05 15:55:56 -07:00
Sam Lantinga
753f3f8609
Fixed crash when disconnecting external display on iOS
2024-07-05 15:51:20 -07:00
Sam Lantinga
e559b271b5
Clear the wave format so the channel map is cleared before returning from SDL_LoadWAV_IO()
2024-07-05 12:44:25 -07:00
Sam Lantinga
c347bee7b8
Fixed IME cursor location (thanks @zturtleman!)
2024-07-05 12:33:17 -07:00
Sam Lantinga
2d05dcc1f7
The same VID/PID is used for the FlyDigi Apex 4
2024-07-05 10:04:59 -07:00
Sam Lantinga
4f71218e17
Allow for floating point error in matching framerates
...
Fixes https://github.com/libsdl-org/SDL/issues/10053
2024-07-05 09:23:41 -07:00
Ryan C. Gordon
4b5309cd98
main: Move SDL_RunApp bits from src/core to src/main.
...
Fixes #10170 .
2024-07-05 08:52:25 -07:00
Max Maisel
607b1f225c
Drain HIDAPI buffer in SDL_hidapi_steamdeck.c.
...
Add a loop around SDL_hid_read() in the Steam Deck HIDAPI driver as it
is done in other HIDAPI drivers. This loop reads data from the device and
processes it until the input buffer is empty which ensures that clients
always get the latest data.
This fixes an input latency issue if the application polls the events
slower than the hardware generates them.
2024-07-05 08:25:52 -07:00
Sam Lantinga
c7ed78a9ef
Try to create an accelerated renderer for the window surface even if SDL_HINT_RENDER_DRIVER is "software"
...
This case is properly handled inside SDL_CreateWindowTexture()
Fixes https://github.com/libsdl-org/SDL/issues/10155
2024-07-05 08:18:45 -07:00
Sam Lantinga
065ec2d518
Actually return an error when the surface is invalid
2024-07-05 08:12:05 -07:00
Sam Lantinga
c057849035
Return the correct error from SDL_CreateSoftwareRenderer() when the surface is NULL
2024-07-05 08:05:40 -07:00