-
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
GTA : LCS - All character and vehicle models are invisible on M1 Mac #15149
Comments
maybe related to #14514? |
Ok, meanwhile I managed to get at least version 1.11.3 running on M1 Mac, which also does not have the mentioned issues, by fixing homebrew's failing install of PPSSPP. Seems homebrew broke because I upgraded to Monterey, so I had to enter Finally I manually started So I'm currently enjoying the game by means of an "unofficial" homebrew build. |
This could simply be broken Vertex Cache which I guess affects OGL on 1.12.3. |
@LunaMoo thanks for trying to help. I tried 1.12.3 with and without vertex cache on Vulkan and OpenGL And I tried the artifact 1.12.3-232-gb6e7fe1aa only with vertex cache enabled, because the option cannot be disabled there, also on both Vulkan and OpenGL. The result for both of these mentioned versions is, that characters and vehicles are still invisible, except for tiny time spans. |
If you can compile, it'd be very interesting if you could try a few more builds. See here: This does seem similar to #14514, but that happens in v1.11.3. Both seem likely to be graphics driver bugs. If we can know what change introduced this issue, it might help lead to a fix for both. I don't have the affected devices, but the more you can narrow the haystack down via bisecting, the better. There are about 1700 commits between v1.11.3 and v1.12.3, but with 4 tests you could narrow that down to 100 commits. With a total of 7-8 tests you could narrow it down to 10 or less. That would probably point to where the problem is coming from. -[Unknown] |
Confirmed, and it's not working on any version I'm able to build on M1. Very weird!
|
If you could post a framedump where it's definitely happening, I'd like to check what's rendering differently for the objects that aren't visible. Since I won't reproduce the problem (don't have M1), a screenshot showing that same framedump (just load it as if it were a game) would be necessary. The simpler the scene, the better. It seems like there must be something unique about those objects. Software renderer ought to be able to validate that it's not CPU related at all. I assume things will show fine there, if slow. -[Unknown] |
Need to fix our framedumping to handle GTA's rather unique presentation method first, but will try to get around to it soon. |
I just took three framedumps of the bus arriving in the intro scene. On OpenGL, Vulkan and software-rendering. EDIT: on PPSSPP 1.12.3, M1 Mac |
This does happen with the software renderer, so whatever the issue, it goes deep... |
I don't know if it can help but i have installed a older version on my iphone (1.9.3) and two of GTA games was fixed , no more invisible characters or graphical issues. |
Yeah the problem seems to be unique to ARM builds of PPSSPP for Mac. Those older builds would have been x86-64 builds running under Rosetta, which for some reason is not affected. Thanks for reporting though! |
I am also experiencing the invisible characters on Intel based Mac, on Big Sur 11.6.1. Maybe a noob question, but how can I rollback to 1.10.3? |
It should be possible to rollback using Xcode. As far as Brew, it seems like you're meant to clone an older version of the Brew repo (which I've done before but is annoying and slow.) You'd basically be trying to run an x86 build through Rosetta, which works. Since updating the unit test and headless tests, can anyone with M1 try running them and report if any fail? That might give us a much more controlled example of failure that would be easier to fix. Also, as I remember, it seems more or less like a CPU/math issue. Some ideas to validate:
My goal is to get a frame dump of EXACTLY the same scene from the PC and M1 devices, so we have two frame dumps that ought to be identical, but aren't. Then we can compare and at least know where they're different - matrix values, vertices, something else? But it is important that they would be identical if it weren't for this bug, or it won't help. Looking at this: Arguments are slightly different, but it doesn't seem to impact our sin/cos calls. Probably not related anyway, since this occurs even with all jits off. -[Unknown] |
Another idea / question: if we compile a Debug build (not RelWithDebInfo), or otherwise compile with -O0, does anything change? -[Unknown] |
Well the issue is that framedumps are a mess in this game, making it hard to judge. I'm gonna use the mentioned methods to look into it again soon, though, and possibly fix the framedump problem too (and yup, also check unoptimized) |
Well, the framedumps from the "EDIT: on PPSSPP 1.12.3, M1 Mac" comment do work fine (they have two frames in them, but it's hard to tell exactly why - maybe it's actually rendering two frames per vblank right now...) I do think we should fix it to identify "frames" better, but it's hard because of the various presentation methods... Ideally I just want a PC version of that same scene. I see a lot of cases in that dump of identical verts in prim calls, but I have seen games do that sometimes to null out verts. -[Unknown] |
Hey, FYI: I do have a Windows PC, M1 and can also test the OpenEmu version against it. Just tell me how long a scene should be and which versions/settings you need the emulator to be on. |
Hey,
See file attached to test it. |
Hello, If you need anything else, just ask me. I can for example give you a reproducable dump (With 1 Weapon the upper body of the character always disappears when aiming on a target and always reappears when stopping to aim) |
Windows, green shirt drawn at 1086/1983: They are explicitly set to NAN in the dump at 09FFA63C, using Since the CPU core doesn't affect it, I think an option might be:
-[Unknown] |
That's a really good idea! Missed that you made a branch first so made my own, master...interpreter-nan-check, might combine them. Tested mine on PC to make sure no spurious nans are logged (had to add some exclusions), will test on Mac and track this down tonight. |
Alright, had to just have a quick look before doing other stuff today. first hit is Int_VScl which doesn't feel like a likely root cause. Could also be one of the scalar VFPU instructions, they would not be caught by WriteVector... I'll mess around more later. |
Outside transfer/lsu, everything should use WriteVector or WriteMatrix (to apply prefixes.) Maybe worth looking at matrix too, though. Perhaps more likely there (like that compiler bug for LBP back in the day...) Vscl does seem pretty unlikely. Maybe FPU is more likely than I thought... -[Unknown] |
Mac NaN stats on that first scene with the mob boss: new frame, vfpu nans produced:
That's a lot. I do think many are coming from an unused fourth channel, especially vh2f / lv.q. PC: new frame, vfpu nans produced:
Yeah, that confirms my theory about vh2f/lv.q, but doesn't quite help pinpointing the source... Six candidates (in addition to matrices and FPU), hm. In non-surprising news, USE_VFPU_SQRT doesn't fix it. |
I pushed a new version of the branch which does matrix values and tries to avoid logging for nan propagation (didn't really test it, though.) If VScl is the culprit, maybe it's related to swizzle? In that case, this gets tricky but I'm thinking what I added in the latest commit. That will log the Vscl # per frame that resulted in NAN. If we can catch it right after the save state, we could do something like master...unknownbrackets:m1-nan-log Maybe we'll find it has something to do with denormals? -[Unknown] |
I pushed a new version of the debugging branch: https://github.com/hrydgard/ppsspp/compare/master...unknownbrackets:ppsspp:m1-nan-log?expand=1 This one logs FPU nan production as well as vrsq 0/inf production. -[Unknown] |
I don't now if it is related to this issue, but both LCS and VCS crashing after intro on 1.14.3. (both with Vulcan and OGL) |
It would help if you could try earlier git builds and find when it started crashing. -[Unknown] |
Hm, no problems getting in-game in a fresh build in either Vulkan or OpenGL, on my Macbook Air M1. |
I have just tried with 1.14.4 and still crashing both games. Will check earlier builds. (Other games are OK) Anyway many thanks for your prompt reply! |
Does that mean v1.14-13-g5406c4f97a doesn't work? That didn't really have any changes except a somewhat minor one to the UI. Are you downloading these builds from GitHub or building locally? We know the glitch still happens, although we don't know why. More pictures won't help at this time. Some math equation is calculating "not a number" as the result instead of the expected number, and it's only happening on M1. But the equation is complex and involves a lot of equations within the game's code, so we're not quite sure what specific step the M1 macs are calculating an unexpected result for. -[Unknown] |
correct, 1.14-13-g5406c4f97a the first one that doesn't work. I am downloading the artifacts from GitHub. As for the glitch I know that you are aware of the M1 specific problem, that it isn't easy to track back. (only included the pics to remember myself which was the last "working" build) |
For some reason, on intel hardware, with the same version of moltenvk obtained from https://github.com/hrydgard/ppsspp/releases/tag/v1.14.4, the issue is observed on the native build but not windows build ran under cxwine 22.0.1 (https://github.com/Gcenx/WineskinServer/releases) |
Wow, that is a super interesting result! Rules out that it's ARM64-specific! What if you use software rendering on that setup? |
Just a shot in the dark: could it be the same issue cemu had, regarding Metal alignment requirements? |
Software rendering enabled The pairs of floating legs on the final screenshots does resemble #14514 With software rendering disabled for a higher resolution rendering |
Does #16816 help that, then? This applies the alignment from a quick look at the cemu pull request. I'm not sure how that'd help the NANs we saw, but maybe this indicates there's some misaligned read involved. Worth trying that branch with hardware transform off, jit off, etc. -[Unknown] |
Well, from cppreferce: "It is undefined behavior to read from the member of the union that wasn't most recently written. Many compilers implement, as a non-standard language extension, the ability to read inactive members of a union." I wonder if reinterpret_cast works fine... Edit: reinterpret_cast is UB too, yeah just memcpy seems fine (or C++20 bit_cast). |
Oh darn, I thought unions were the "approved" way to bitcast. I guess memcpy it is... Will play with it tomorrow. |
It seems like they aren't on C++ yeah... does #16817 help? -[Unknown] |
Some poking around with my convenient partial revert #16927 resulted in this result: Removing:
from vfpu_sin() in MIPSVFPUUtils.cpp is enough to get things working again on both Intel and ARM64 Macs. Most curious. |
Hello, sorry to bother you, but GTA LC & VC still crashing me, no matter whatever backend I am using. I am on MacOS 12.6.3, M1 Max. Tried resetting PPSSPP, different rom (I know..) but still crashing both game right after the intro scene. Any other game in my library just runs perfectly fine. |
I am on the build which fixing the 16928 issue. |
I would guess your ISO is broken, or maybe you're using some cheat that doesn't quite work? I have an ISO file I dumped myself from UMD and it works just fine on both my Macs, as far as I can tell. |
Lucky I just test chinese patched of GTA still work (in windows) |
Game or games this happens in
ULUS-10041 GTA:Liberty City Stories
What area of the game / PPSSPP
One minute into the game when one watches the intro, it becomes clear that all characters and vehicles are invisible most of the time, and only partly "flash" into existence for very brief periods.
I also tested OpenEmu which uses 1.10.3. And that version is not affected and shows all characters and vehicles correctly. But in OpenEmu one cannot even access any of PPSSPP's settings, so using that "frontend" is rather pointless.
Also you guys do not provide 1.10.3 readily compiled for M1.
Brew provides PPSSPP 1.10.3, too, but crashes during installation of PPSSPP. See [#72631].(Homebrew/homebrew-core#72631)
And RetroArch for M1 is missing the PPSSPP core entirely.
So the only way to play this game is OpenEmu, which is not configurable and uses 1x-PSP-resolution -.-
What should happen
Characters and vehicles should be clearly visible, when they are on screen.
Logs
No response
Platform
macOS
Mobile phone model or graphics card
M1
PPSSPP version affected
1.12.3
Last working version
1.10.3
Graphics backend (3D API)
OpenGL / GLES and Vulkan
Checklist
The text was updated successfully, but these errors were encountered: