Skip to content
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

UI font not rendering on Poco c40 phone #16931

Closed
hrydgard opened this issue Feb 7, 2023 · 10 comments · Fixed by #17027
Closed

UI font not rendering on Poco c40 phone #16931

hrydgard opened this issue Feb 7, 2023 · 10 comments · Fixed by #17027
Labels
Platform-specific (Android) User Interface PPSSPP's own user interface / UX
Milestone

Comments

@hrydgard
Copy link
Owner

hrydgard commented Feb 7, 2023

Reported through e-mail.

This is a weird one, never seen us have problems with this on any device with stock Android, which the reporter says it has.

Screenshot_2023-02-07-23-36-44-951_org ppsspp ppsspp

Very odd. Maybe we can detect this and fallback to atlas fonts, but this really shouldn't be happening,..

It's a Poco C40, with these specs:

image

Seems normal...

@hrydgard hrydgard added the User Interface PPSSPP's own user interface / UX label Feb 7, 2023
@hrydgard hrydgard added this to the v1.15.0 milestone Feb 7, 2023
@unknownbrackets
Copy link
Collaborator

I suppose if we drew an A with the font drawer and all 0 bits, we could fall back to the atlas.

-[Unknown]

@hrydgard
Copy link
Owner Author

Sure, but it's an Android device, it can surely draw fonts. So I just don't get this ... Maybe it just can't load our .ttf for some reason?

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Feb 12, 2023

I feel like it means the flash on the device is acting up or something...

-[Unknown]

@ghost
Copy link

ghost commented Feb 12, 2023

edit ppsspp.ini
GraphicsBackend = 3 (VULKAN)
to
GraphicsBackend = 0 (OPENGL)

@hrydgard
Copy link
Owner Author

@Negan145 Does that really help?

I got another report of this, also on Poco C40.

@ghost
Copy link

ghost commented Feb 12, 2023

@hrydgard 5 months ago, someone posted on facebook group, same issue like this.
then, i searched what the problem is.

This is because the JR510 uses Google SwiftShader, a software tool to use the CPU for graphics rendering via a graphics library Volcano. The problem is that, being the CPU of the JR510 and therefore of POCO C40 definitely poco performing, any app or game that uses Vulkan libraries is likely to prove unusable.

And the anomalous is that the Mali-G52 GPU supports the Vulkan APIs, but Xiaomi or JLQ have decided not to implement them on the software side and prefer the Google tool instead.

source: gizchina

@hrydgard
Copy link
Owner Author

OK, I guess we need to reject Vulkan on this phone then. I'm not sure exactly how to best detect it. Maybe the string in System Name (Settings/Tools/System Information in PPSSPP) will be unique enough...

@hrydgard
Copy link
Owner Author

hrydgard commented Feb 24, 2023

I keep getting reports of this. To make sure we get it right, I've ordered one of these devices to test on, not very expensive. So expect some kind of fix in the near future.

@hrydgard
Copy link
Owner Author

hrydgard commented Feb 27, 2023

OK, I've got an affected device (C40) now, and can reproduce. OpenGL is fine, so how can it be ttf rendering? Turns out it's not.

So we have a bit of a discrepancy between our "VulkanLoader" which tries to detect eligible devices, and the actual choosing later. We initially reject SwiftShader, but if the render backend is set to Vulkan, we still push ahead and create it anyway. Turns out it's not only a slow software driver which can just about play Cave Story, but also badly deficient in other ways:

02-27 23:18:10.248  4512  4761 E PPSSPP  : [G3D] VKDEBUG: ERROR(validation:-1094930823) Validation Error: [ VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251 ] Object 0: handle = 0xb400007b7e6cecc8, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbebcae79 | vkCreateImage(): Format VK_FORMAT_R4G4B4A4_UNORM_PACK16 is not supported for this combination of parameters and VkGetPhysicalDeviceImageFormatProperties returned back VK_ERROR_FORMAT_NOT_SUPPORTED. The Vulkan spec states: Each of the following values (as described in Image Creation Limits) must not be
02-27 23:18:10.248  4512  4761 E PPSSPP  :  undefined : imageCreateMaxMipLevels, imageCreateMaxArrayLayers, imageCreateMaxExtent, and imageCreateSampleCounts (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251)

So yeah, that's not great. It does seem we might not be properly checking for the R4G4B4A4 format (though I thought we did already for MoltenVK?), but we also should simply not decide to use Vulkan in this case.

Will fix both issues.

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Feb 28, 2023

That's terrible. I suppose it's useful to at least allow Debug to use software Vulkan / Swiftshader. I have seen reports including SwiftShader... let's see if it's any other phones so far.

Some stats:

  • There are 12 game playability reports, Android and Windows. Some of the Windows ones are rated positively, but the Android ones are all poor marks.
  • Some of the reports are with a JLQ JR510, which is the one mentioned here. Everything else is Intel, and clearly older devices lacking AVX and often lacking SSE4.
  • Vulkan, GLES (ANGLE), and Direct3D are all represented in Swiftshader reports.
  • Logs have been reported for 125 games with Swiftshader in use, 842 total reports (that's not that many.)
  • Most of the reports look like Direct3D.

-[Unknown]

hrydgard added a commit that referenced this issue Feb 28, 2023
…d by VulkanMayBeAvailable.

Fixes #16931

Can still use these devices in debug builds by modifying the ini.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform-specific (Android) User Interface PPSSPP's own user interface / UX
Projects
None yet
2 participants