Commit graph

72 commits

Author SHA1 Message Date
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
Lubos
0e4f93d200 OpenXR - Fixing FOV better 2022-09-05 18:15:31 +02:00
Lubos
2195f4b2e7 OpenXR - Mismatched call order fixed 2022-09-04 14:08:03 +02:00
Lubos
fb875b94de OpenXR - Multipass rendering fixed 2022-09-04 14:01:17 +02:00
Lubos
1df1d79b9e OpenXR - Stereo without multiview added 2022-09-04 12:36:52 +02:00
Lubos
c2c0561be2 OpenXR - OPENXR ifdef removal 2022-08-27 17:33:37 +02:00
Lubos
af011c2cc9 OpenXR - Step closer to identify multiview FBO issue 2022-08-19 21:19:59 +02:00
Lubos
98f726af3b OpenXR - Use OpenGL ES 3 and ensure FBO pair calls 2022-08-19 16:59:39 +02:00
Lubos
43bd9b9086 Merge branch 'feature_openxr_6dof' into feature_openxr_stereo 2022-08-15 17:23:57 +02:00
Lubos
70c4781feb OpenXR - Option to set canvas distance added 2022-08-15 17:19:42 +02:00