mirror of
https://github.com/Ryujinx/SDL.git
synced 2026-05-19 06:46:50 +00:00
Anthony Pesch * Remove triple buffering support. As far as I can tell, this goes against the libdrm API; the EGL implementations themselves control the buffering. Removing it isn't absolutely necessary as it seemingly works on the Pi at least, but I noticed this while doing my work and explained my reasoning in the commit. * Replace the crtc_ready logic which allocates an extra bo to perform the initial CRTC configuration (which is required before calling drmModePageFlip) with a call to drmModeSetCrtc after the front and back buffers are allocated, avoiding this allocation. * Standardized the SDL_*Data variable names and null checks to improve readability. Given that there were duplicate fields in each SDL_*Data structure, having generic names such as "data" at times was very confusing. * Removed unused fields from the SDL_*Data structures and moves all display related fields out of SDL_VideoData and into SDL_DisplayData. Not required since the code only supports a single display right now, but this was helpful in reading and understanding the code initially. * Implement KMSDRM_GetDisplayModes / KMSDRM_SetDisplayMode to provide dynamic modeset support. These changes have been tested on a Raspberry Pi 4 and a Dell XPS laptop with an HD 520. As an update, I went back over the triple buffer changes and left them in. I didn't entirely get the code originally, I had just seen it calling KMSDRM_gbm_surface_lock_front_buffer twice for a single swap and had removed it because I was paranoid of bugs stemming from it while working on the modeset changes. I've made a few small changes to the logic that had thrown me off originally and rebased the changes: * The condition wrapping the call to release buffer was incorrect. * The first call to KMSDRM_gbm_surface_lock_front_buffer has been removed. I don't understand why it existed. * Added additional comments describing what was going on in the code (as it does fix the buffer release pattern of the original code before it). |
||
|---|---|---|
| .. | ||
| android | ||
| arm | ||
| cocoa | ||
| directfb | ||
| dummy | ||
| emscripten | ||
| haiku | ||
| khronos | ||
| kmsdrm | ||
| nacl | ||
| offscreen | ||
| pandora | ||
| psp | ||
| qnx | ||
| raspberry | ||
| uikit | ||
| vivante | ||
| wayland | ||
| windows | ||
| winrt | ||
| x11 | ||
| yuv2rgb | ||
| SDL_blit.c | ||
| SDL_blit.h | ||
| SDL_blit_0.c | ||
| SDL_blit_1.c | ||
| SDL_blit_A.c | ||
| SDL_blit_auto.c | ||
| SDL_blit_auto.h | ||
| SDL_blit_copy.c | ||
| SDL_blit_copy.h | ||
| SDL_blit_N.c | ||
| SDL_blit_slow.c | ||
| SDL_blit_slow.h | ||
| SDL_bmp.c | ||
| SDL_clipboard.c | ||
| SDL_egl.c | ||
| SDL_egl_c.h | ||
| SDL_fillrect.c | ||
| SDL_pixels.c | ||
| SDL_pixels_c.h | ||
| SDL_rect.c | ||
| SDL_rect_c.h | ||
| SDL_RLEaccel.c | ||
| SDL_RLEaccel_c.h | ||
| SDL_shape.c | ||
| SDL_shape_internals.h | ||
| SDL_stretch.c | ||
| SDL_surface.c | ||
| SDL_sysvideo.h | ||
| SDL_video.c | ||
| SDL_vulkan_internal.h | ||
| SDL_vulkan_utils.c | ||
| SDL_yuv.c | ||
| SDL_yuv_c.h | ||
| sdlgenblit.pl | ||