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

MGS: Peace Walker: Character model glitch with IR interpreter #10650

Closed
awwang opened this issue Feb 26, 2018 · 22 comments
Closed

MGS: Peace Walker: Character model glitch with IR interpreter #10650

awwang opened this issue Feb 26, 2018 · 22 comments
Labels
IRInterpreter Occurs with IR Interpreter but not with another CPU backend.
Milestone

Comments

@awwang
Copy link

awwang commented Feb 26, 2018

In Metal Gear Solid: Peace Walker, character models do not show up properly, and and appear to be "stretched" off screen.

Screenshot

Everything else renders/runs fine as far as I can tell, except character models as mentioned.

I am running PPSSPP on iOS 11.1.2 (iPhone 8) and installed through Impactor. Using the IR Interpreter.

@unknownbrackets unknownbrackets added the IRInterpreter Occurs with IR Interpreter but not with another CPU backend. label Jun 24, 2018
@zetenynagy
Copy link

@hrydgard sorry for mentioning you, just incase this issue slipped by you, it has been affecting me as well

@hrydgard hrydgard added this to the v1.7.0 milestone Jun 24, 2018
@unknownbrackets
Copy link
Collaborator

Does this happen on desktop too (when using IR Interpreter)?

It'd help if someone has the game and wants to try debugging the IR:
https://github.com/hrydgard/ppsspp/wiki/How-to-debug-the-JIT

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Oct 6, 2018

Not a regression, while unfortunate I'm bumping this to 1.8.0.

@hrydgard hrydgard modified the milestones: v1.7.0, v1.8.0 Oct 6, 2018
@hrydgard hrydgard changed the title MGS: Peace Walker: Character model glitch MGS: Peace Walker: Character model glitch with IR interpreter Feb 6, 2019
@hrydgard hrydgard modified the milestones: v1.8.0, v1.9.0 Feb 13, 2019
@unknownbrackets
Copy link
Collaborator

At least on Windows in the demo (using the workaround in #3365), this seems to be working correctly.

Is this still an issue in the latest git build? Unfortunately, iOS is generally problematic as far as builds and the latest OS, so it may be necessary to use Xcode to compile to test. Make sure the version says "v1.8.0-565-gd8db8ecfc" or higher.

-[Unknown]

@Chaseroni
Copy link

Running PPSSPP 1.9.3 on iOS still exhibits this behavior with IR interpreter. Its a shame because the game runs beautifully otherwise. The character models remain glitched.

@FlutterOfficialGithub
Copy link

Just Switch To Interpreter It works for me

@ghost
Copy link

ghost commented Sep 15, 2021

Just Switch To Interpreter It works for me

Too slow using Interpreter.
Screenshot_2021-09-15-16-30-36-849_org ppsspp ppsspp
IR Interpreter is close to dynarec (jit) performance.
Screenshot_2021-09-15-16-30-49-541_org ppsspp ppsspp
MGSPW_IR_INTERPRETER.ppdmp.zip

@ghost
Copy link

ghost commented Oct 1, 2021

Maybe related to #12991

@ghost
Copy link

ghost commented Jul 12, 2022

Disabled JIT Functionality VFPU_VEC can fix this issue using the latest build 🎉

@anr2me
Copy link
Collaborator

anr2me commented Jul 22, 2022

This issue seems to be exist only on mobile platform (ARM/ARM64 only?) since i can't reproduce it on Windows but can reproduce it on Android.

Does IR have a separated codes for ARM and x86 just like JIT?

Edit: Apparently i can reproduce it on Ubuntu (WSL2), so i guess it wasn't specific to ARM/ARM64, may be because it use VM? not sure about a real linux box
image
image
image
image
image

@hrydgard
Copy link
Owner

hrydgard commented Sep 9, 2022

Yeah this is some kind of bug in the IR interpreter / compiler, probably repros on all platforms with that.

@unknownbrackets
Copy link
Collaborator

I think I couldn't reproduce this in the demo, at least, on Windows. I don't think I tried Android or WSL2. Not sure why it'd be different, though...

-[Unknown]

@unknownbrackets
Copy link
Collaborator

VRot is VFPU_VEC, I suspect that's the most likely culprit here. ARM and x86 don't do IR differently (currently, eventually it'd be nice to have a jti backend from IR), but sin() and cos() are used, which might differ between those platforms.

Some things to try:

  1. DISABLE only IRFrontend::Comp_VRot() and see if that makes this work.
  2. Check for an overlap hazard, i.e. if anything in Handle vrot overlap and vscl/vmscl prefixes more accurately #16302 helps.

-[Unknown]

@anr2me
Copy link
Collaborator

anr2me commented Nov 18, 2022

I've tried inserting DISABLE; on the first line of IRFrontend::Comp_VRot() function, but it didn't fix this issue.
image

@anr2me
Copy link
Collaborator

anr2me commented Nov 18, 2022

Okay, disabling IRFrontend::Comp_VV2Op(...) alone seems to fix this issue, but i only tested this briefly on Ubuntu(WSL2), not sure about Android since i need a large free space to build Android version (i'm running out of free space)
image

@anr2me
Copy link
Collaborator

anr2me commented Nov 18, 2022

To be more precise, disabling case 2: // vneg inside IRFrontend::Comp_VV2Op() function will also fixes this issue.
image

@unknownbrackets
Copy link
Collaborator

Okay, that's very interesting and pretty specific. I'll dig into vneg soon and see what could be wrong.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Had a little to check and cleaned up something that MIGHT cause an issue there and COULD explain a difference between Windows and Linux. Do these changes help at all?

master...unknownbrackets:ppsspp:ir-vneg

-[Unknown]

@anr2me
Copy link
Collaborator

anr2me commented Nov 19, 2022

Had a little to check and cleaned up something that MIGHT cause an issue there and COULD explain a difference between Windows and Linux. Do these changes help at all?

master...unknownbrackets:ppsspp:ir-vneg

-[Unknown]

Yes, this fixes the issue on Ubuntu(WSL2), not sure about Android as there is no android artifact yet

@unknownbrackets
Copy link
Collaborator

Build should be available soon - will close if we can confirm this fixes it on Android or iOS too, but I expect it to.

-[Unknown]

@anr2me
Copy link
Collaborator

anr2me commented Nov 19, 2022

Build should be available soon - will close if we can confirm this fixes it on Android or iOS too, but I expect it to.

-[Unknown]

I've tried the Android build and it also got fixed now on the latest dev build

@unknownbrackets
Copy link
Collaborator

Hurray, thanks for checking.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IRInterpreter Occurs with IR Interpreter but not with another CPU backend.
Projects
None yet
Development

No branches or pull requests

7 participants