Commit Graph

81 Commits

Author SHA1 Message Date
Henrik Rydgård 64461329e7 More minor fixes and cleanups 2026-01-02 14:20:20 +01:00
Henrik Rydgård 7cc4a0f3a3 Add more accurate sleep function (well, not more accurate on Windows unfortunately) 2025-10-21 12:11:23 +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 e1527233d9 Add the EmuScreen pass assert on OpenGL as well 2024-10-14 14:35:35 +02:00
Henrik Rydgård 2ba4eaf3dd First part of the const changes etc 2024-09-17 15:13:13 +02:00
Herman Semenov 3c66f149d3 [Common/Core/Windows] Removed excess check pointer before delete or free() 2024-09-17 11:34:42 +02:00
Henrik Rydgård 3065979528 iOS: Fix hang when task switching in GL mode 2024-05-29 18:21:58 +02:00
Herman Semenov 8e580045cd Fixed condition always false using unsigned int and logical AND 0 & 4 2024-04-11 16:56:59 +03: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 d891aaf9cd Remove code that pretended that we supported multiple vertex streams
Don't really see that we'll have much use for this feature, so simplify
it away. Only single vertex stream data is now supported by the thin3d
API.
2023-11-13 01:15:28 +01:00
Henrik Rydgård 4d465678cd GL: Add resilience to delete-null bugs (but assert in debug builds) 2023-09-26 00:49:59 +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 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 2bee5b64e4 Add new icon cache, for caching small images.
It doesn't try to insert or fetch missing things itself, re-fetching is up to the caller.

This will be required for handling the many achievement icons.

Saving/loading the cache to a single file on disk is implemented but not
hooked up yet. It works without it, though of course will have to
re-fetch things on the next startup.
2023-06-18 14:11:12 +02:00
Henrik Rydgård 880379c15d Extract some minor changes from #17497 2023-06-12 20:20:06 +02:00
Henrik Rydgård ad8827ae70 Cleanup, address feedback 2023-05-26 10:28:10 +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 edd208791e Add tag field to GLRFramebuffer for debugging 2023-05-24 13:47:51 +02:00
Henrik Rydgård 84da0327d6 GLQueueRunner: Make DrawIndexed parameters more consistent. 2023-05-23 17:49:11 +02:00
Henrik Rydgård d7ea2ebf8a GL: Add tags to push buffers for debug purposes. Double the default vertex buffer size. 2023-05-23 15:53:41 +02:00
Henrik Rydgård cb38c43d7e GL render manager: Merge the two stencil commands, for more compact command lists 2023-05-23 09:14:23 +02:00
Henrik Rydgård 37906384ee Use the faster pushes. 2023-05-23 08:54:41 +02:00
Henrik Rydgård 558e29a9bb Switch to the copy-free method of initializing initsteps 2023-05-23 08:54:41 +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 c729519cf5 Merge pull request #17442 from hrydgard/glr-render-command-shrink
Shrink the GLRRenderCommand struct from 152 to 88 bytes
2023-05-16 16:38:41 +02:00
Henrik Rydgård b27c427547 We always bind and draw together, so let's combine them to one command. 2023-05-10 10:56:25 +02:00
Henrik Rydgård c7caefe6d8 Have Draw and DrawIndexed share command and struct. Will make the next change easier. 2023-05-10 10:40:33 +02:00
Henrik Rydgård d5e0299b0b GLR: Share union struct between Draw/DrawIndex 2023-05-10 10:32:13 +02:00
Henrik Rydgård 8f2069ef71 GLQueueRunner: Combine BindVertexBuffer with BindIndexBuffer 2023-05-10 09:23:10 +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 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 d4249c1d73 OpenGL: Add an assert to catch a class of crash bugs early. Also assorted paranoia. 2023-05-01 11:56:26 +02:00
Henrik Rydgård 3d477003c4 Fix issue where if Break on Load was set, we'd crash once we started running in a few games 2023-04-30 10:06:43 +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