Manuel Alfayate Corchete
21003b7db2
[KMS/DRM] Small refactoring on the SwapWindow function.
2020-12-31 14:31:29 +01:00
Manuel Alfayate Corchete
e1fb969b76
[KMS/DRM] Correct comments about last bugfix.
2020-12-31 01:40:15 +01:00
Manuel Alfayate Corchete
e34caa9779
[KMS/DRM] Correct EGL/GL library loading on window creation, thus saving window re-creation.
2020-12-31 01:31:57 +01:00
Sylvain Becker
d81fe9239f
SDL_BlitScaled: remove un needed -1 +1 offset in calculation
2020-12-30 22:03:32 +01:00
Sylvain Becker
80cf8a8b76
SDL_BlitScaled: also prevent crash if dest width or height is negative
2020-12-29 17:29:31 +01:00
Sylvain Becker
f08b9a5b6b
SDL_BlitScaled: prevent crash if dest width or height is 0
2020-12-29 16:02:52 +01:00
Manuel Alfayate Corchete
427c96ec11
[KMS/DRM] Rework some functions.
2020-12-29 14:24:38 +01:00
Sam Lantinga
3cb0e840e6
Fixed bug 5422 - KMSDRM_LEGACY: Add OpenBSD support
...
wahil1976
This patch adds support for OpenBSD to KMSDRM_LEGACY. Note that the patch won't be ported to the atomic KMSDRM backend because OpenBSD does not support atomic KMS properly yet.
2020-12-28 11:47:53 -08:00
Manuel Alfayate Corchete
7539ac8087
[KMS/DRM] Restore hacky code to point to TTY buffer on surface destruction b/c I lack alternatives.
2020-12-28 18:22:07 +01:00
Manuel Alfayate Corchete
86b81abea6
[KMS/DRM_LEGACY] Prevent mouse cursor from staying onscreen after window destruction. Patch by Ozkan Sezer.
2020-12-28 16:19:19 +01:00
Manuel Alfayate Corchete
0feaf7d196
[KMS/DRM][Vulkan] Correct non-existing property. Remove hacky surface destruction code (TTY buffer isn't there after a Vulkan window is created).
2020-12-28 14:37:58 +01:00
Sylvain Becker
7186584b8d
fix indentation (bug 5313)
2020-12-28 10:41:37 +01:00
Sylvain Becker
c2735c0bb9
Better scaling fallbacks for the SW renderer (bug 5313)
2020-12-27 23:53:28 +01:00
Ozkan Sezer
a6beb2d264
SDL_PrivateLowerBlitScaled: remove unused local var 'a'
2020-12-28 01:10:02 +03:00
Sylvain Becker
30df2e4e36
Scaling fallbacks for the SW renderer (bug 5313)
2020-12-27 23:00:11 +01:00
Sylvain Becker
f9b5f6cc0f
Forward scale mode to SW renderer (Bug 5313)
2020-12-27 20:28:24 +01:00
Manuel Alfayate Corchete
46d31d570d
[KMS/DRM][Vulkan] Fix segfault when changing fullscren mode and permanent cursor when changing between Vulkan and GL renderers in vkQuake3. Tidy up window destruction code.
2020-12-27 00:43:06 +01:00
Sam Lantinga
9838611a8b
Fixed compiler crash building for iOS with clang 11.0.3
2020-12-23 15:52:12 -08:00
Sylvain Becker
4aebad77bd
SDL_SoftStretchLowerLinear: try to make xcode buildbot compile (Bug 5313)
2020-12-23 22:50:50 +01:00
Sam Lantinga
93ccdee8c1
Fixed bug 5404 - stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
...
Cameron Cawley
stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
The default implementation is based on the one used in the Windows RT video driver.
2020-12-23 13:47:49 -08:00
Sylvain Becker
8e20376f1a
SDL_SoftStretchLinear: use SDL_INLINE (bug 5313)
2020-12-23 22:09:01 +01:00
Sylvain Becker
7b8d5b7dc3
SDL_SoftStretchLinear: fix implicit conversion (bug 5313)
2020-12-23 22:02:28 +01:00
Sylvain Becker
ae8a270f61
Add SDL_SoftStretchLowerLinear() (Bug 5313)
2020-12-23 21:37:40 +01:00
Sylvain Becker
050ee9a410
Split SDL_SoftStretch in Lower and Uppler functions (Bug 5313)
2020-12-23 21:32:01 +01:00
Manuel Alfayate Corchete
09fcc9ed17
[KMS/DRM][Vulkan] Fix small warning, thanks to Ozkan Sezer for spotting it.
2020-12-23 16:45:23 +01:00
Manuel Alfayate Corchete
a6dc838d52
[KMS/DRM][Vulkan] Only try to create a display mode when no suitable mode is found.
2020-12-23 16:22:46 +01:00
Manuel Alfayate Corchete
2fc987c28f
[Buildsystem] Add guards for not building with KMSDRM support if EGL is not available.
2020-12-22 14:15:33 +01:00
Sam Lantinga
4cd981609b
Fixed whitespace
2020-12-21 09:44:25 -08:00
Manuel Alfayate Corchete
8766d6040b
[Video/KMSDRM] Fix potetial access to freed structure and complete errorchecks.
2020-12-21 17:29:24 +01:00
Manuel Alfayate Corchete
b06ef3a18c
[Video/KMSDRM] Manually re-show the cursor on window creation, if needed.
2020-12-21 01:53:11 +01:00
Ozkan Sezer
4198f0e52c
fix uninitialized warnings in KMSDRM_CreateCursor()
2020-12-21 01:20:30 +03:00
Manuel Alfayate Corchete
a8dbcab132
[Video/KMSDRM] Don't copy the cursor bitmap to the cursor GBM BO until we're showing it.
2020-12-20 21:48:05 +01:00
Manuel Alfayate Corchete
2756b0f337
[Video/KMSDRM] Init and deinit mouse stuff at the same time that GBM stuff.
2020-12-20 14:29:58 +01:00
Manuel Alfayate Corchete
cf71e01734
[Video/KMSDRM] Remove auxiliary AMDGPU compatibility workarounds not needed anymore.
2020-12-19 23:32:09 +01:00
Manuel Alfayate Corchete
af1f91cb36
[Video/KMSDRM] Correct typo.
2020-12-19 20:21:07 +01:00
Manuel Alfayate Corchete
cf48955680
[Video/KMSDRM] Honor the device index in Vulkan. Add notes about the display index.
2020-12-19 20:15:50 +01:00
Manuel Alfayate Corchete
ab3a390e26
[Video/KMSDRM] Better ATOMIC caps testing: patch by Oskan Sezer.
2020-12-19 17:35:04 +01:00
Manuel Alfayate Corchete
436499f3ec
[Video/KMSDRM] Comment out some debug info, adjust comments for future work.
2020-12-19 02:08:59 +01:00
Ozkan Sezer
6b81cac420
remove duplicated SDL_SetError after calling check_atomic_modesetting()
2020-12-19 01:25:50 +03:00
Manuel Alfayate Corchete
8952a61324
[Video/KMSDRM] Re-arrange display members setup.
2020-12-18 23:17:42 +01:00
Manuel Alfayate Corchete
f60f8d5d84
[Video/KMSDRM]: Add Vulkan support to the KMSDRM backend.
2020-12-18 22:53:51 +01:00
Ozkan Sezer
6ac0b23d3a
SDL_DirectFB_video.c: DSPF_ABGR requires directfb >= 1.5.0 -- add guard.
2020-12-18 21:37:20 +03:00
Ozkan Sezer
6c4ab48471
SDL_kmsdrmvideo.c: check atomic modesetting in check_modesetting()
...
.. so that KMSDRM_CreateDevice() can fail and SDL_VideoInit() would
move on to next bootstrap member which is kmsdrm_legacy. hopefully
fixes bug #5393 .
2020-12-18 17:50:02 +03:00
Ozkan Sezer
10625f9d89
SDL_windowsmessagebox.c: go back to hg rev 14458 state.
...
encountering a NULL caption in AddDialogString() is intended, i.e.
AddDialogStaticIcon() sends it as NULL on purpose.
2020-12-17 23:50:00 +03:00
Ozkan Sezer
4d6eb30523
SDL_windowsmessagebox.c (AddDialogControl): add back NULL caption check.
...
because AddDialogStaticIcon() sends a NULL caption -- fixes bug #5401 .
2020-12-17 23:28:20 +03:00
Ozkan Sezer
90456670b5
more "'for' loop initial declarations are only allowed in C99 mode" fixes
2020-12-17 14:11:00 +03:00
Ozkan Sezer
ed4fcb2cfc
kmsdrm_legacy build fixes:
...
- add missing '_LEGACY' to symbol names
- perform missing 2.0.14 portage
- fix 'for' loop initial declarations are only allowed in C99 mode errors
2020-12-16 03:24:10 +03:00
Ozkan Sezer
9940e71088
Import two post-2.0.12 fixes to kmsdrm_legacy:
...
Fix build breakage without EGL:
https://hg.libsdl.org/SDL/rev/f2606fe53654e305ab9badb821d9d3afb7f92f49
Fix KMSDRM_CreateWindow segfault when starting L?VE2D engine (bug 5199)
https://hg.libsdl.org/SDL/rev/d2e69a78939463d9ff9448a5f4efd1e208bb97b0
2020-12-16 00:10:30 +03:00
Sam Lantinga
f8839289b0
Potential fix for bug 5393 - KMSDRM: using atomic mode setting breaks GPU compatibility
...
Substring
I was trying the KMSDRM video backend with some very simple programs that were working ok on 2.0.12. The same code won?t work on the current dev branch and I get:
DEBUG: check_modesetting: probing ?/dev/dri/card0?
DEBUG: /dev/dri/card0 connector, encoder and CRTC counts are: 4 5 6
DEBUG: check_modesetting: probing ?/dev/dri/card0?
DEBUG: /dev/dri/card0 connector, encoder and CRTC counts are: 4 5 6
DEBUG: KMSDRM_VideoInit()
DEBUG: Opening device /dev/dri/card0
DEBUG: Opened DRM FD (3)
DEBUG: no atomic modesetting support.
DEBUG: Video subsystem has not been initialized
INFO: Using SDL video driver: (null)
DEBUG: Video subsystem has not been initialized
After carefully checking, the radeon driver doesn?t support atomic modesetting. That?s not the only problem : the same happens with the amdgpu driver if we disable Display Core (kernel parameter amdgpu.dc=0, which is required to get analogue outputs working).
This is a major regression in the KMSDRM driver.
Using atomic mode setting is great, but having no fallback to the "standard KMS" is bad.
2020-12-15 12:22:48 -08:00
Sam Lantinga
ee85a41a32
Fixed compile warning
2020-12-13 02:10:46 -08:00