81 Commits

Author SHA1 Message Date
Henrik Rydgård dd125b2e4d Delete obsolete (and non-working) support for GPUs without non-pow-2 textures. 2026-05-24 14:15:34 +02:00
Henrik Rydgård 9218fe9b59 Rework the shutdown logic in the OpenGL backend. Eliminated race conditions. 2025-08-31 10:57:06 +02:00
Henrik Rydgård b813a6c30f Logging improvements 2025-08-31 00:59:51 +02:00
Henrik Rydgård 539abb8d4f More minor cleanups 2025-08-31 00:59:51 +02:00
Henrik Rydgård 00a13bfb14 Fix static analysis warnings (pointless move, empty instead of size) 2025-08-31 00:59:51 +02:00
Henrik Rydgård eaff38f161 Implement ImGui clipped batch texturing support in the other backends too 2024-11-26 09:38:30 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård 3065979528 iOS: Fix hang when task switching in GL mode 2024-05-29 18:21:58 +02:00
Henrik Rydgård f864f52b64 More app lifecycle work. Switching between Vulkan and OpenGL now works. 2024-05-24 11:48:44 +02:00
Henrik Rydgård cbb4236cd8 Vulkan: Attempt to fix some more shutdown race conditions, simplify. 2024-01-17 14:49:49 +01:00
Henrik Rydgård 626d901441 OpenGL: Fix hang that mostly happened when buffered commands == off 2023-09-11 00:30:52 +02:00
Henrik Rydgård 691c8b8d8d Write to the frame time history from the other backends too. Needed for the upcoming timing code. 2023-08-16 12:22:49 +02:00
Henrik Rydgård e651d6e59f Finish the separation of EndFrame and Present. 2023-08-13 18:40:35 +02:00
Henrik Rydgård 377704f195 OpenGL: Split submit and presentation into two tasks, but schedule them together 2023-08-13 18:40:35 +02:00
Henrik Rydgård 86fcb28d4d Remove "bool retainControl_" for simplicity. Not needed. 2023-08-13 18:40:35 +02:00
Henrik Rydgård cf83be8b3c Very small memory leak fix 2023-08-13 13:55:51 +02:00
Henrik Rydgård 0ccd29f2ba Revert "OpenGL: Separate submit/present for this backend as well"
This reverts commit 0143d67f9b.
2023-08-12 13:35:21 +02:00
Henrik Rydgård 0143d67f9b OpenGL: Separate submit/present for this backend as well 2023-08-10 17:46:10 +02:00
Henrik Rydgård 82934b9212 OpenGL queue-runner: Add command counts (debug builds only). Useful for checking optimizations. 2023-05-25 14:15:54 +02:00
Henrik Rydgård 62b41c6640 OpenGL: Add a simple pass list to gpu profiler 2023-05-24 14:08:19 +02:00
Henrik Rydgård 956d784bde Add FastVec, start using it for InitSteps 2023-05-23 08:54:40 +02:00
Henrik Rydgård 78eaa8c235 Make sure we never copy GLRRenderThreadTask objects 2023-05-23 08:53:48 +02:00
Henrik Rydgård c30895b6b4 Remove unnecessary variable 2023-05-23 08:53:48 +02:00
Henrik Rydgård e4a729d371 Remove unnecessary zero-initialization of GLRRenderCommand structs 2023-05-23 08:53:48 +02:00
Henrik Rydgård d7a5edeb6f GL: Break out GLPushBuffer from GLRenderManager.cpp/h 2023-05-23 08:41:09 +02:00
Henrik Rydgård 05b6bbdc56 Add a trivial profiling tool to the OpenGL backend - meaasure the time it takes to run a frame of commands.
Accessed from the in-game dev menu just like the Vulkan frame profiler.

With this we can easily see that actually submitting the GL commands is often the bottleneck on old
devices like a Galaxy S3.
2023-05-17 14:38:11 +02:00
Henrik Rydgård cc16eb8321 Shrink the GLRRenderCommand struct from 152 to 88 bytes
Turns out the VR work bloated it a bit, which can't be good.

Think it's fine to allocate these view matrices on the heap to get them
out of the way, there won't be that crazy many per frame usually.
2023-05-10 00:24:17 +02:00
Henrik Rydgård 1d053d2ea8 GLPushBuffer::Flush: Add debug-assert-and-bail prompted by suspicious callstack 2023-05-03 23:49:41 +02:00
Henrik Rydgård 5724bbd8e9 Correct size calculations in GLPushBuffer. I don't see how this failed as badly as in that crash report though... 2023-05-03 23:49:41 +02:00
Henrik Rydgård c9b7c815a1 ~GPU_Vulkan: Check that we still have a draw_ pointer before trying to drain the compile queue. 2023-05-03 22:33:34 +02:00
haoruiwang 7cbb7a09e5 [what][style][gpu] some coding style refine 2023-04-18 19:18:38 +08:00
Henrik Rydgård d502198aa3 Move GLFrameData out of GLRenderManager.
Small refactor to prepare for adding delayed readback support to the
OpenGL backend.
2023-02-07 12:12:00 +01:00
Henrik Rydgård 937975000b Add a ReadbackMode parameter to more functions in the FramebufferManager 2023-02-05 13:57:45 +01:00
Henrik Rydgård cb16f193ec Fix the problem. Still need to leave the loop with SDL even if we supply a swap function. 2023-01-30 15:45:05 +01:00
Henrik Rydgård 436a3e0d61 Cleaner exit from emuthread, as used by OpenGL. Don't know how it worked before... 2023-01-30 11:49:31 +01:00
Henrik Rydgård a0c893cc8f Fix ThreadFrame. All OK now except shutdown, it seems 2023-01-30 11:49:31 +01:00
Henrik Rydgård 2659fd6f66 Android work. Make the Android OpenGL exit prodecure make more sense 2023-01-30 11:49:31 +01:00
Henrik Rydgård b62572a78f Refactor the framedata/GPU thread management. 2023-01-30 11:49:31 +01:00
Henrik Rydgård bfab820947 Merge some functions 2023-01-30 11:24:53 +01:00
Henrik Rydgård 331d024a8c Add a flags parameter to InvalidateCachedState and rename it Invalidate.
Also rename the old InvalidationFlags enum to InvalidateCallbackFlags.
2022-12-01 19:15:38 +01:00
Henrik Rydgård 70d1d8fa07 Replace the "GetCurrentStepId"-based state invalidation with callbacks 2022-11-24 10:52:42 +01:00
Henrik Rydgård b4507cd5cc Make a lot more code VR build for all platforms 2022-11-06 14:36:51 +01:00
Henrik Rydgård 90d395a10d Remove "attachment" parameter from BindFramebufferAsTexture everywhere.
Not actually useful since our framebuffer objects don't support multiple
color images, and probably won't ever need to.
2022-10-20 10:15:19 +02:00
Henrik Rydgård aa51bfd1ef Use GPU "use" flags to replace IsVRBuild in the renderer. It remains elsewhere. 2022-10-17 19:57:11 +02:00
Lubos be2613d495 OpenXR - Move VR passes count calculation 2022-10-17 19:07:27 +02:00
Lubos bf14ca84d3 OpenXR - Revision of VR rendering 2022-10-08 14:38:49 +02:00
Henrik Rydgård 242efba6f7 Remove splitSubmit setting. Now we submit init commands before the acquire. 2022-09-17 01:07:30 +02:00
Lubos 3331fedab7 OpenXR - Better variable/methods naming 2022-09-15 00:03:41 +02:00
Lubos 0c2d47d74d OpenXR - Add code comments 2022-09-14 23:23:28 +02:00
Lubos 57ef2bb0d5 OpenXR - Ensure the head pose is locked during frame rendering 2022-09-14 20:36:33 +02:00