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

Save/Load text garbled using Software Rendering on Linux #17885

Closed
4 of 5 tasks
skrublordFey opened this issue Aug 10, 2023 · 11 comments
Closed
4 of 5 tasks

Save/Load text garbled using Software Rendering on Linux #17885

skrublordFey opened this issue Aug 10, 2023 · 11 comments
Labels
Milestone

Comments

@skrublordFey
Copy link

skrublordFey commented Aug 10, 2023

Game or games this happens in

ULUS10584 - Persona 2: Innocent Sin

What area of the game

At game save/load.

What happens

All system text is completely garbled when going to the menu while using Software Rendering. Issue is fixed when using Hardware Rendering, but in games like Persona 2, there are various graphical glitches that occur if you don't have Software Rendering enabled, and thus this isn't preferable.
20230810144332_1

What should happen

Here's how it looks in Hardware Rendering:
20230810144222_1

And to showcase this is a Deck-exclusive issue, here's the same file showcasing fine on my PC using Software Rendering:
image

GE frame capture

No response

Platform

Linux / BSD

Mobile phone model or graphics card

Steam Deck

PPSSPP version affected

1.15.4

Last working version

No response

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try changing graphics settings to determine if one causes the glitch (especially speed hacks or enhancements/replacements.)
  • Include logs or screenshots of issue.
@fp64
Copy link
Contributor

fp64 commented Aug 17, 2023

I've also seen this in several games (e.g. "Soulcalibur: Broken Destiny").
Seems Linux-specific, as this text shows up fine in SW renderer on Win32 build.

@hrydgard hrydgard added this to the v1.17.0 milestone Aug 17, 2023
@hrydgard
Copy link
Owner

Quite mystifying how this could apply only to the software rasterizer actually, so much so that tagging it feels dubious... And only on Deck. Really no idea what's going on here :/

@fp64
Copy link
Contributor

fp64 commented Aug 17, 2023

Um... it's not Deck in my case (sorry, I should have been clearer).
But yes only Linux+SoftGPU in my case. OpenGL in Linux is ok, Win32 in SW is ok.

@hrydgard
Copy link
Owner

Oh, sorry I was confused. That's important info, thanks! Still bizarre.

@hrydgard hrydgard changed the title Save/Load text garbled using Software Rendering on Steam Deck Save/Load text garbled using Software Rendering on Linux Aug 17, 2023
@unknownbrackets
Copy link
Collaborator

Hm, I feel like I changed it at one point to properly respect behavior around > 512 wide textures, and maybe the atlas doesn't work right? That said, SDL2_ttf may work around this.

-[Unknown]

@unknownbrackets unknownbrackets added the Font Atlas Related to UI fonts, not in game fonts. label Aug 19, 2023
@fp64
Copy link
Contributor

fp64 commented Aug 20, 2023

Haven't tested with SDL2_ttf. The textDrawer in PPGeDraw.cpp seems to be NULL in both SW and OpenGL.

@fp64
Copy link
Contributor

fp64 commented Aug 20, 2023

Just tested: building with SDL2_ttf fixes this for me.

@fp64
Copy link
Contributor

fp64 commented Aug 25, 2023

So yes, removing texture clamping by 512, like here

__m128i bound = _mm_set1_epi32(width > 512 ? 511 : width - 1);

fixes it. Not sure what else it breaks though.

@unknownbrackets
Copy link
Collaborator

Well, that behavior is accurate, it's just not compatible with the hack PPGe rendering is using with the atlas. If it were run on a PSP, it also would not work.

I thought I'd made some of the atlas calls subreference the texture when looking at texture coordinates farther into the texture to avoid this problem (i.e. doing what would also work on the PSP.) Maybe I just planned on it, or maybe I missed a spot...

-[Unknown]

@fp64
Copy link
Contributor

fp64 commented Sep 11, 2023

Another option would be to make a super-dumb fallback TextDrawer for PPGe's use only, I suppose?

@hrydgard
Copy link
Owner

hrydgard commented Dec 7, 2023

I think #18126 fixed this, closing.

@hrydgard hrydgard closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants