Commit Graph

163 Commits

Author SHA1 Message Date
Henrik Rydgård 7c4b9bac90 Cache textures created by MakePixelsTexture and reuse where appropriate. 2023-05-30 14:07:44 +02:00
Henrik Rydgård 0b1abf1de9 Add untested UpdateTextureLevels functionality to three of the four backends 2023-05-30 13:28:04 +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 f1f0bfae2d Driveby simplification, reduce logspam 2023-05-23 17:09:40 +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 a4baed4c0c Minor GLPushBuffer cleanup (now same API as the VK one) 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 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 8f2069ef71 GLQueueRunner: Combine BindVertexBuffer with BindIndexBuffer 2023-05-10 09:23:10 +02:00
Henrik Rydgård 42ce619705 Vulkan fastforward: Check the current presentation mode instead of the Vsync setting.
After 1.15, I'm gonna clean up the presentation mode/vsync management
across the code base. This works around #17308 for now.
2023-04-26 12:02:42 +02:00
Unknown W. Brackets 58abc7a154 GLES: Avoid shader error for uint with GLSL 1.2. 2023-04-23 09:49:24 -07:00
haoruiwang 7cbb7a09e5 [what][style][gpu] some coding style refine 2023-04-18 19:18:38 +08:00
Henrik Rydgård 25fbfd7a89 Finish up OpenGL compressed texture format checks. Show in dev screen 2023-03-12 12:20:10 +01:00
Henrik Rydgård 49e5460c9c Remove count parameter from SetViewports. No use foreseen. 2023-02-25 07:12:53 +01:00
Henrik Rydgård 5ad111cfc4 Return value fix 2023-02-08 08:59:47 +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 4427cb4fc3 Add parameter to thin3d::CopyFramebufferToMemory to specify blocking mode. Not yet implemented. 2023-02-04 23:40:36 +01:00
Henrik Rydgård d43452f0ce Fix to shutdown sequence 2023-01-30 11:49:31 +01:00
Henrik Rydgård d83f84fdfd DrawContext destructor: Need to call DestroyPresets earlier. 2022-12-29 17:32:49 +01:00
Henrik Rydgård e209227be1 Delete dead code path (initialize EGL from C++ on Android) 2022-12-20 23:17:51 +01:00
Henrik Rydgård 6922ee7e52 Add some asserts in the hope of gathering some more info (and consolidating some crashes). 2022-12-18 21:58:20 +01:00
Henrik Rydgård 675c282286 Hides the D3D9 option on Intel Xe graphics.
For whatever reason, it really doesn't work for me, while all three other
backends work perfectly. So let's just hide it.

You can still enable it through the ini file for debugging purposes.
2022-12-11 20:55:09 +01:00
Unknown W. Brackets a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00
Henrik Rydgård b7a3cf56cc OpenGL: Fix lifetime issue with uniform/sampler "locs" for thin3d pipelines 2022-12-09 20:52:19 +01:00
Henrik Rydgård 0ad6218dc4 Fix "usePrevFrame" shaders for OpenGL 2022-12-09 17:28:58 +01:00
Henrik Rydgård 4dfce4f6bc Basically working MSAA on desktop GPUs! Some glitches remain. 2022-12-01 22:49:00 +01:00
Henrik Rydgård 6daecb4e2b Add check for tiling GPUs. We'll use this to inform on what MSAA modes to support. 2022-12-01 22:48:59 +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 390bf3e912 Fix Burnout Dominator lens flare on OpenGL ES
Not the prettiest solution, but works: Use R8_UNORM as a fallback
if R16_UNORM is not available.
2022-11-29 13:05:18 +01:00
Henrik Rydgård 973eec5b42 Another tweak to the OpenGL adreno bug detection.
See #16015
2022-11-27 20:02:06 +01:00
Henrik Rydgård d97035fffc Merge pull request #16434 from unknownbrackets/stencil-opt
Vulkan: Use stencil export when available
2022-11-25 10:06:41 +01:00
Unknown W. Brackets b33662550f Vulkan: Use stencil export when available.
This prevents multiple passes to upload stencil buffers.
2022-11-24 18:48:46 -08:00
Henrik Rydgård 55b1dc6ef4 Warning fixes 2022-11-24 12:14:52 +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 39f2ddd128 Add compat flag / bug check for games on old Adreno/GL affected by #16015
See #16015

Partly derived from https://github.com/hrydgard/ppsspp/compare/master...unknownbrackets:ppsspp:adreno-deadlock

But this one surgically activates it only for the known affected games, to avoid any additional
performance regressions in the release.

Entirely untested.
2022-11-24 10:05:35 +01:00
Henrik Rydgård f6fcc9e9a7 Add a way to view the "GPU_USE_" flags at runtime. Useful for sanity checking on-device. 2022-11-23 16:17:41 +01:00
Henrik Rydgård dd0409d68c OpenGL ES: Crash as early as possible if things are bad
There's a huge variety of crash report in the Play Console of various
opengl failures. Try to concentrate them to early points in
initialization
2022-11-08 10:43:38 +01:00
Henrik Rydgård 91259aaad7 Always use array textures for framebuffers in Vulkan for simplicity. 2022-10-27 11:05:58 +02:00
Henrik Rydgård 0de12f5ca9 Some refactoring of framebuffer views, layer issues, more work. 2022-10-27 11:05:58 +02:00
Henrik Rydgård fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård 7a620962aa thin3d: Replace hint at future MRT support with basic multi layer support 2022-10-27 11:05:58 +02: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
Unknown W. Brackets 179c1e4a3b GLES: Enable EXT_depth_clamp where supported.
Seems like Freedreno may support this.
2022-10-10 00:54:29 -07:00
Herman Semenov 29b87e0c0b Merge branch 'master' into master 2022-10-03 07:49:13 +00:00
Unknown W. Brackets 59a489f883 Draw: Add COLOR1 semantic. 2022-10-01 12:14:46 -07:00
lainon b304551747 Code readability, vec reserve() and remove excess c_str() 2022-09-30 12:31:32 +03:00
Henrik Rydgård aa19712fc3 Unify depth texture and framebuffer fetch checks 2022-09-20 10:47:49 +02:00