-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vulkan Performance Issues in Hot Shots Golf Open Tee - UCUS98614 #12355
Comments
This does a lot of block transfers (RAM -> VRAM via memcpy), 272 of them per frame to be exact.
Each copy is 480 times 16 bits long, and it skips the stride. The source image is tightly packed, so it's essentially doing this (based on the log): for (int y = 0; y < 272; ++y) {
memcpy(dst16 + y * 512, src16 + y * 480, 480 * sizeof(uint16_t));
} Using an allocator for On the green, I do get some slight flicker when trying to shoot. In software rendering, the elements that flicker are simply not visible. We seem to be missing every other frame's uploads, based on memcpy upload logs (it's doing the thing I mentioned above.) This happens because we somehow detect the second framebuffer as 481 pixels wide (not 480), and therefore deem it a dangerous guess at a framebuffer copy. -[Unknown] |
Got this game now (well, Everybody's Golf). Yeah I think using an allocator is the way to go here for sure. In fact I believe not using one might have lost us performance in other games too, as our VulkanTexture without an allocator will simply have to make its own allocation and that's super expensive on some drivers. I got it working without any nasty double-frees, so I'm just gonna commit that first at least after testing a little on Android. Ideally we should detect and combine these, but it's not easy to do in this case. |
…images. Fixes #12355 (or at a minimum, will improve it).
…images. Fixes #12355 (or at a minimum, will improve it).
Lending to my "maybe texture replacement slowness is mainly allocation" concern, heh. Thanks, forgot about this one. -[Unknown] |
What happens?
When you take a shot the bottom power bar fills, at that moment there is severe slowdown in the Vulkan driver, slowdown which is not present in the OpenGL and D3D11 backends. Furthermore, when you are inside the green, besides the the slowdown (on Vulkan) there is also severe flickering in all three mentioned backends.
This is also present in the Android version of the emulator.
What should happen?
No slowdown on Vulkan as it is on the other two backends, plus no flickering when inside the green.
What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.
PC:
Windows 10pro 1903
PPSSPP 1.9 (also present in 1.8 and 1.7)
Nvidia 1080ti with various drivers.
Mobile:
Android 9
Chipset | Hisilicon Kirin 710 (12 nm)
CPU | Octa-core (4x2.2 GHz Cortex-A73 & 4x1.7 GHz Cortex-A53)
GPU | Mali-G51 MP4
EDIT
The second game, Hot Shots Golf Open Tee 2 - UCUS98693, also suffers from exactly the same issues.
The text was updated successfully, but these errors were encountered: