Commit Graph

3470 Commits

Author SHA1 Message Date
Henrik Rydgård
5d7a0516cc
Merge pull request #17475 from hrydgard/opengl-basic-profiler
Add a trivial profiling tool to the OpenGL backend
2023-05-17 15:01:16 +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
4f1be34f24 Revert "Remove the Android display resolution selector"
This reverts commit ea0eaa31e6.
2023-05-17 09:37:15 +02:00
Henrik Rydgård
444897a8b8 Some reordering to make the code make more sense (no actual effect) 2023-05-16 18:25:31 +02:00
Henrik Rydgård
081bdb323a Fix running some file formats from the Downloads folder
Due to how we mount stuff, we need to be able to navigate one step up
from the executable, and then re-attach the executable filename. To
allow this, in content URIs, treat ':' as a directory separator for
navigation purposes.

End result, you can now download cube.elf from the website and run it directly
from Downloads without using a file manager to move it.
2023-05-16 16:44:28 +02:00
Henrik Rydgård
07a96b8734
Merge pull request #17465 from hrydgard/android-content-uri-cpp
AndroidContentURI: Move code from the header to cpp.
2023-05-16 16:39:43 +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
cf9a628a2e AndroidContentURI: Move code from the header to cpp. Some assorted cleanup, add a unit test for Download paths 2023-05-16 16:08:51 +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
f593d65833 Avoid double-free in stereo mode 2023-05-10 10:13:54 +02:00
Henrik Rydgård
c882046251 Remove redundant render command 2023-05-10 09:23:10 +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
ce632ec079 IniFile: Fix writing 64-bit hex values. 2023-05-08 10:47:03 +02:00
Henrik Rydgård
311a1a0fe2 Fix glitch when mapping analog inputs, caused by multiple TriggerFinish caused by stray analog axis events.
ADd some guards all over the place against the same thing.
2023-05-06 15:33:28 +02:00
Henrik Rydgård
ac88e73768 TextDrawerAndroid: Handle a null fontName, saw some crash reports that looked like that. 2023-05-05 23:40:06 +02:00
Henrik Rydgård
0d0b0fc60b Turn some reported crashes into asserts, to try to confirm what's going on 2023-05-05 23:26:21 +02:00
Henrik Rydgård
cd33b79ae7 Fix an issue where stray KEY_UP events could confuse the control mapper into setting empty events
This had some not-so-good consequences, like inability to map anything
in VR, and sometimes empty MultiMappings would result that we could end
up asserting on before the previous commit.
2023-05-05 23:00:01 +02:00
Henrik Rydgård
38178d34b5 Sanity checks in InitSwapchain 2023-05-05 00:03:20 +02:00
Henrik Rydgård
7e1f907826 VulkanPushPool: Sprinkle a couple of asserts. 2023-05-04 10:25:16 +02:00
Henrik Rydgård
fcd11dfd4c Update a comment 2023-05-04 09:49:14 +02:00
Henrik Rydgård
3148a8a437 PopupMultiChoiceDynamic: Check that valueStr_ isn't null before writing to it. Don't see how this happened. 2023-05-04 08:59:12 +02:00
Henrik Rydgård
a132b72ba1 Paranoia 2023-05-04 01:24:31 +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
Henrik Rydgård
2cca0b265e Vulkan: Turn off the ubershader on T880, T860 and T830 on old driver versions. 2023-05-03 11:53:32 +02:00
Henrik Rydgård
aff455a7e6
Merge pull request #17391 from hrydgard/key-bind-popup-workaround
Better (but not great) workaround for key bindings that pop up dialogs.
2023-05-03 08:33:01 +02:00
Henrik Rydgård
52b7bf502f
Merge pull request #17392 from hrydgard/misc-crash-fixes
Misc crash fixes from mystery thread
2023-05-02 23:41:32 +02:00
Henrik Rydgård
97488c0a79 Vulkan: Before cleaning the shader managers, drain the shader compile queue.
Mainly paranoia, but might help with the mutex crash from #17364
2023-05-02 22:05:28 +02:00
Henrik Rydgård
c037f6731d Better (but not great) workaround for key bindings that pop up dialogs. 2023-05-02 21:36:17 +02:00
Henrik Rydgård
919979eece Disable excessive logging 2023-05-02 11:40:50 +02:00
Henrik Rydgård
ee7e8d7c06 Add a unit test, fix listing zip directories 2023-05-02 11:35:45 +02:00
Henrik Rydgård
35aff7eaf9 Fix logic in ZipFileReader file listing 2023-05-01 23:20:38 +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
a41fc74dba Add a debug assert in VulkanPushPool 2023-05-01 11:41:25 +02:00
Henrik Rydgård
838ef03815 Fix ScrollView crash (though the root cause is a race condition most likely) 2023-05-01 10:37:30 +02:00
Henrik Rydgård
efa167e2b4 Accept number format strings like "%i%%" (results in "30%" if i == 30).
Fallout from #17349
2023-04-30 10:40:32 +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
Henrik Rydgård
e0a67c7703 Don't use the cpu_features library on Android arm32.
Unbreaks Xperia Play, yay.

Also bumps the compile tools version in the gradle, unrelated but
doesn't hurt.
2023-04-29 23:54:47 +02:00
Henrik Rydgård
7723aebb9b Buildfixes 2023-04-28 21:56:39 +02:00
Henrik Rydgård
6945deec01 Replace a LOT of sprintf with snprintf, and a few strcpy with truncate_cpy 2023-04-28 21:04:05 +02:00
Henrik Rydgård
c02634c161 Add some paranoid format string checking in popup slider dialogs 2023-04-28 20:26:08 +02:00
Nemoumbra
12506a3474
Minor bugs (#17344)
* Fixed console acting like it's hidden while it's not

* Trailing whitespace removed
2023-04-28 15:18:01 +02:00
Henrik Rydgård
68be93467e Fix some checks around translation. 2023-04-27 12:05:11 +02:00
Henrik Rydgård
67aa951fec PopupMultiChoice: Don't range-check the int-value if being initialized from PopupMultiChoiceDynamic (valgrind) 2023-04-27 11:55:57 +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
Henrik Rydgård
321a112eff Rename SimpleBuf -> AlignedVector, use regular aligned memory instead of pages. 2023-04-24 12:04:34 +02:00