yuzu/src/video_core/renderer_opengl
comex 994f497781 Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main thread
EmuWindow::PollEvents was called from the GPU thread (or the CPU thread
in sync-GPU mode) when swapping buffers.  It had three implementations:

- In GRenderWindow, it didn't actually poll events, just set a flag and
  emit a signal to indicate that a frame was displayed.

- In EmuWindow_SDL2_Hide, it did nothing.

- In EmuWindow_SDL2, it did call SDL_PollEvents, but this is wrong
  because SDL_PollEvents is supposed to be called on the thread that set
  up video - in this case, the main thread, which was sleeping in a
  busyloop (regardless of whether sync-GPU was enabled).  On macOS this
  causes a crash.

To fix this:

- Rename EmuWindow::PollEvents to OnFrameDisplayed, and give it a
  default implementation that does nothing.

- In EmuWindow_SDL2, do not override OnFrameDisplayed, but instead have
  the main thread call SDL_WaitEvent in a loop.
2020-11-23 17:58:49 -05:00
..
gl_arb_decompiler.cpp shader: Partially implement texture cube array shadow 2020-10-28 17:12:40 -03:00
gl_arb_decompiler.h gl_arb_decompiler: Implement an assembly shader decompiler 2020-06-11 22:12:07 -03:00
gl_buffer_cache.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_buffer_cache.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_device.cpp video_core: Enforce -Wunused-variable and -Wunused-but-set-variable 2020-10-02 21:19:35 -03:00
gl_device.h Merge pull request #4359 from ReinUsesLisp/clamp-shared 2020-07-21 04:51:05 -03:00
gl_fence_manager.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_fence_manager.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_framebuffer_cache.cpp gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_framebuffer_cache.h gl_state: Remove completely 2020-02-28 17:56:35 -03:00
gl_query_cache.cpp renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
gl_query_cache.h renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore 2020-09-19 01:46:37 -03:00
gl_rasterizer.cpp Merge pull request #4954 from lioncash/compare 2020-11-22 09:55:23 +08:00
gl_rasterizer.h gl_arb_decompiler: Implement robust buffer operations 2020-10-20 03:34:32 -03:00
gl_resource_manager.cpp gl_shader_util: Use std::string_view instead of star pointer 2020-08-23 21:23:54 -03:00
gl_resource_manager.h gl_shader_util: Use std::string_view instead of star pointer 2020-08-23 21:23:54 -03:00
gl_sampler_cache.cpp Create an "Advanced" tab in the graphics configuration tab and add anisotropic filtering levels. 2020-02-27 21:34:00 -05:00
gl_sampler_cache.h video_core: Add missing override specifiers 2019-07-07 13:38:39 -04:00
gl_shader_cache.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_shader_cache.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_shader_decompiler.cpp shader: Partially implement texture cube array shadow 2020-10-28 17:12:40 -03:00
gl_shader_decompiler.h glsl: Squash constant buffers into a single SSBO when we hit the limit 2020-05-31 21:33:49 -03:00
gl_shader_disk_cache.cpp video_core: Enforce -Wredundant-move and -Wpessimizing-move 2020-10-28 02:44:50 -03:00
gl_shader_disk_cache.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_shader_manager.cpp gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders 2020-07-18 01:59:57 -03:00
gl_shader_manager.h gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders 2020-07-18 01:59:57 -03:00
gl_shader_util.cpp gl_shader_util: Use std::string_view instead of star pointer 2020-08-23 21:23:54 -03:00
gl_shader_util.h gl_shader_util: Use std::string_view instead of star pointer 2020-08-23 21:23:54 -03:00
gl_state_tracker.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_state_tracker.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_stream_buffer.cpp gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shaders 2020-07-18 01:59:57 -03:00
gl_stream_buffer.h gl_stream_buffer: Use InvalidateBufferData instead unmap and map 2020-06-24 02:36:14 -03:00
gl_texture_cache.cpp video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
gl_texture_cache.h video_core: Remove all Core::System references in renderer 2020-09-06 05:28:48 -03:00
maxwell_to_gl.h video_core: Enforce -Werror=switch 2020-09-16 17:48:01 -03:00
renderer_opengl.cpp Overhaul EmuWindow::PollEvents to fix yuzu-cmd calling SDL_PollEvents off main thread 2020-11-23 17:58:49 -05:00
renderer_opengl.h renderer_opengl: Remove emulated mailbox presentation 2020-09-20 16:29:41 -03:00
utils.cpp buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00
utils.h buffer_cache: Return handles instead of pointer to handles 2020-04-16 02:33:34 -03:00