Commit graph

2304 commits

Author SHA1 Message Date
Henrik Rydgård
df2f0df155 Make the Vulkan GPU log profiler a runtime developer setting.
I keep forgetting to disable the define on commit, this is a better
solution.
2021-12-19 22:50:14 +01:00
Henrik Rydgård
748b8287a6 Add format string support to Vulkan log-profiler 2021-12-19 22:21:34 +01:00
Unknown W. Brackets
148ca08047
Vulkan: Disable profiler by default again. 2021-12-19 09:12:58 -08:00
Henrik Rydgård
a9dcf482c6 Improve the check for "slow" GPUs (with regards to tex scaling). See #15238 2021-12-18 21:51:33 +01:00
Henrik Rydgård
1e9e3376be
Merge pull request #15238 from hrydgard/hardware-texscale-limits
Vulkan: Be more restrictive about hardware texture upscaling on "slow" GPUs
2021-12-18 16:47:43 +01:00
Henrik Rydgård
2851065889
Merge pull request #15237 from unknownbrackets/path-case
Path: Check for PSP case insensitively
2021-12-17 09:35:19 +01:00
Unknown W. Brackets
3e73ce87ee Path: Check for PSP case insensitively.
This allows a game to look up ms0:/psp/ eve with the PSP special case path
handling.
2021-12-16 15:06:15 -08:00
Henrik Rydgård
80ae4b039c Vulkan: Be more restrictive about texture upscaling on "slow" devices.
Applies the same rules as for software upscaling in this case.

Should fix the stutters seen in #15109
2021-12-16 21:00:49 +01:00
Henrik Rydgård
9755781704 Oops, accidentally enabled the logging GPU profiler by default. 2021-12-13 09:01:13 +01:00
Henrik Rydgård
b99a5b6613 Minor fixes 2021-12-12 23:21:28 +01:00
Henrik Rydgård
dc9816ceac Add hardcoded bool toggle for upscaling video, fix log, remove a comment, minor opt 2021-12-12 23:20:57 +01:00
Henrik Rydgård
10db19efc4 Add a 2x2 downsampled version of 4xBRZ as 2xBRZ (save memory bandwidth)
fmt
2021-12-12 23:19:29 +01:00
Henrik Rydgård
3833d935f4 Fixes when profiler is disabled.
Typo, validation fix

More fixes

Fix mipgen logging

Disable the logging profiler by default again

Important to use the macro
2021-12-12 12:42:40 +01:00
Henrik Rydgård
9945620504 Switch to macros to easily disable the new profiling. Add missing scope 2021-12-12 12:11:59 +01:00
Henrik Rydgård
55fe21db1e Add a simple GPU profiler to profile individual events, rather than full passes. 2021-12-12 12:11:54 +01:00
Henrik Rydgård
e1ff73061a
Merge pull request #15223 from hrydgard/multi-atlas
Split off the fonts from the atlas
2021-12-12 09:10:27 +01:00
Unknown W. Brackets
63e623ecb2 Build: Fix some format truncation warnings.
Generally all should be safe already, but better to be sure.
2021-12-11 10:45:27 -08:00
Unknown W. Brackets
0d4af49590 UI: Clarify error message.
Include both files, even if the platform only uses one of the two.
2021-12-11 09:01:15 -08:00
Henrik Rydgård
d4237fd542 Split the atlas into three, well two, but two different cases for the fonts.
Platforms that can use OS fonts don't need font_atlas.zim but they do
need ascii font for debug, so does use asciifont_atlas.zim.
2021-12-10 23:22:08 +01:00
Henrik Rydgård
b85a7e9a46 Name uniform buffers, add more asserts. Used this to track down the bug fixed in the previous commit. 2021-12-10 21:01:01 +01:00
Henrik Rydgård
7b07a1385a
Merge pull request #15220 from unknownbrackets/vulkan-exit
Vulkan: Fix use-after-free on shutdown
2021-12-10 10:37:43 +01:00
Henrik Rydgård
97f3b477ab
Merge pull request #15219 from unknownbrackets/vulkan-2d
Vulkan: Avoid desc set error in tests
2021-12-10 10:37:19 +01:00
Unknown W. Brackets
c2c16032fe Vulkan: Document lifetime for desc set pool. 2021-12-09 23:57:37 -08:00
Unknown W. Brackets
fe7b573a38 Vulkan: Fix use-after-free on shutdown. 2021-12-09 23:52:10 -08:00
Unknown W. Brackets
8d06431ea7 Vulkan: Use new desc sets in Draw and VulkanUtil.
It seems like a bug that destory device objects wasn't clearing descSets.
2021-12-09 19:03:17 -08:00
Unknown W. Brackets
1010d7ac0e Vulkan: Refactor common desc pool handling. 2021-12-09 18:39:55 -08:00
Henrik Rydgård
45308a16c0 Vulkan is strict about scissor rect, so let's clamp centrally.
Better than spreading the logic all over.

Fixes #15207
2021-12-08 22:38:01 +01:00
Unknown W. Brackets
7c7340e338 ThreadManager: Check for exchange failure.
Even if expected stays null, since it's weak assume it can fail.
2021-12-07 18:24:01 -08:00
Henrik Rydgård
a2f9f68565 Vulkan: More scissor dimension checks. See #15207 2021-12-07 21:46:10 +01:00
Henrik Rydgård
0179cb1811 Very minor logging improvement 2021-12-07 21:28:39 +01:00
Henrik Rydgård
466a731ece Detect and specify the max available Vulkan version, up to 1.2. 2021-12-07 21:26:14 +01:00
Unknown W. Brackets
f9a7ad3e3d ThreadManager: Use separate pool for IO blocking.
This prevents starving the compute pool (which may be used very regularly
parallel loops or other tasks) if the IO operations are slow.
2021-12-05 21:01:49 -08:00
Unknown W. Brackets
8b5173350f ThreadManager: Make TaskType a property of a Task. 2021-12-05 21:01:49 -08:00
Unknown W. Brackets
fd245f2863
Common: Correct shm_open() call.
Don't remember what happened here,
this was meant to be shm_open().
2021-12-03 14:30:32 -08:00
Unknown W. Brackets
212669d2bc Vulkan: Cleanup pipeline var shadowing. 2021-12-02 17:57:40 -08:00
Henrik Rydgård
cfe2716d49
Merge pull request #15178 from unknownbrackets/threads-atomic
Tweaks to thread manager enqueue and shutdown
2021-11-30 09:26:13 +01:00
Unknown W. Brackets
12b790bb81 ThreadManager: Protect against teardown hang/leak.
Make sure we lock during canceled checks/updates, and also try to free
tasks queued on threads that didn't end up running.
2021-11-27 08:57:19 -08:00
Unknown W. Brackets
de9a4dcede ThreadManager: Lock notify on global queue add.
Otherwise, it's possible the chosen thread might not wake up, and then it
may wait for another task to be enqueued - potentially causing a hang.
2021-11-27 08:57:19 -08:00
Unknown W. Brackets
d15af6e9d9 ThreadManager: Use atomic task optimistically.
This makes EnqueueTaskOnThread take priority as well.
Gives about 1% improvement in softgpu, reducing overhead a bit.
2021-11-27 08:07:12 -08:00
Unknown W. Brackets
3f3e0ea8cf softjit: Optimize typical alpha/depth test.
Messed with SSE4 then realized there's no point, just use SHR.
2021-11-26 08:21:14 -08:00
Henrik Rydgård
f991f6a789 Remove the old allocator visualizer. Keep the setting but hide it. Other feedback 2021-11-23 08:55:12 +01:00
Henrik Rydgård
2cbadefb29 Fix bugs in deletion. Delete redundant functions. 2021-11-22 19:02:08 +01:00
Henrik Rydgård
a7591d7826 Switch framebuffers to use VMA for allocation as well 2021-11-22 18:54:09 +01:00
Henrik Rydgård
8d5247ddf3 Convert the PushBuffer to use VMA. 2021-11-22 18:54:09 +01:00
Henrik Rydgård
0cbb7ab027 Change the PushBuffer API a bit to not take explicit memory types. 2021-11-22 18:54:09 +01:00
Henrik Rydgård
c2f594cc73 Remove the VulkanDeviceAllocator 2021-11-22 18:54:09 +01:00
Henrik Rydgård
1b1e585a35 More integration, use VMA in VulkanTexture 2021-11-22 18:54:09 +01:00
Henrik Rydgård
8f9ce03a8d Start integrating VMA 2021-11-22 18:54:08 +01:00
Henrik Rydgård
81fba1f4a4 Minor refactor 2021-11-21 22:08:53 +01:00
Henrik Rydgård
29f54befbd Comment improvement, restore accidental deletion 2021-11-21 21:34:05 +01:00