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

Star Wars: The Clone Wars - Graphic glitch [Android/Windows] #12949

Closed
Saramagrean opened this issue May 22, 2020 · 18 comments · Fixed by #15691
Closed

Star Wars: The Clone Wars - Graphic glitch [Android/Windows] #12949

Saramagrean opened this issue May 22, 2020 · 18 comments · Fixed by #15691
Labels
GE emulation Backend-independent GPU issues
Milestone

Comments

@Saramagrean
Copy link
Contributor

What happens?

Graphic glitch (pink overlay) in-game happen in all backends.

SW-TCW-1

Try all versions (0.3-1.9.3 latest git build) encounter all the same problems.

What should happen?

No graphic glitch.

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

  • Windows 10 (64 bit, CPU: Intel i5 6200U, GPU: Intel HD 520)
  • Huwei P9+ (Android 9.0, Kirin 955, Mali T-880)
  • PPSSPP v1.9.3-922-gc861bc0d7 with default settings.

GE Dump: DUMP.zip

@Panderner
Copy link
Contributor

Screenshot_2020-05-22-23-40-20-66_2f85358b2198d26f8aca533d68bee793
it's works fine for me, I'm using Realme C2 Android 9 Pie and v1.9.3-913-g1dec77214

@ghost
Copy link

ghost commented May 25, 2020

I can repro this issue on my phone.
Screenshot_20200525-140240
Screenshot_20200525-140308

@unknownbrackets
Copy link
Collaborator

Hm, Mali and Intel, but not PowerVR?

There's a screenshot - US version - that looks fine here on Mali-450:
https://report.ppsspp.org/game/ULUS10477_1.00

But there are bad looking screenshots here for one of the EUR version:
https://report.ppsspp.org/game/ULES01284_1.00

Is this an issue that only happens on the European release? I wonder if it's attempting some depth buffering...

-[Unknown]

@Panderner
Copy link
Contributor

USA Version:
Screenshot_2020-05-25-19-14-05-07_2f85358b2198d26f8aca533d68bee793

Europe Version:
Screenshot_2020-05-25-19-14-51-64_2f85358b2198d26f8aca533d68bee793

USA Version is ok. This bug is only happens in the Europe version of the game

@Panderner
Copy link
Contributor

but it doesn't occur in software renderer.
Here's a Screenshot I'm using software renderer in the Europe version of this game:
Screenshot_2020-05-25-19-25-53-76_2f85358b2198d26f8aca533d68bee793

@unknownbrackets
Copy link
Collaborator

In the dump, everything is fine at first. Originally, it draws to 0x04000000 with depth at 0x04110000.

At 11495/11702, it draws to a temp buffer at 0x00154000, a simple stretch. But then it draws with blend fixed ZERO + fixed ZERO and stencil REPLACE FF over that. So, forget that earlier draw.

At 11527/11702, unsatisfied with the earlier waste of time, it stretches again. But this time it uses an alpha test to make sure it will not draw anything and this will also be a waste of time. But maybe in other scenes, stencil is used and would result in some more interesting effect.

After doing some things that would probably result in bloom for the above, at 11598/11702 it textures from 0x0418c200. This is where things go wrong.

Actually, 0x0418c200 should be within that 0x04154000 buffer it's been working so hard to keep blank. Specifically, it's at an offset of (128, 224). It later uses 0x04184200 which has the same problem (offset of (128, 192)...)

We assume it's a mistake when it tries to access 224/272 of a buffer directly, with an X offset. Maybe we need to be smarter about that being drawn to immediately prior.

-[Unknown]

@unknownbrackets unknownbrackets added the GE emulation Backend-independent GPU issues label May 25, 2020
@hrydgard hrydgard added this to the v1.11.0 milestone May 25, 2020
@hrydgard
Copy link
Owner

hrydgard commented May 25, 2020

Nice breakdown Unknown, I'm tagging it for v1.11.

I have some ideas in the back of my mind about a complete rework of GPU memory management, but it might be a pipe dream...

@unknownbrackets
Copy link
Collaborator

Yeah, it's complex. I think we could potentially rely on the safeWidth and safeHeight to safely texture from this late in a buffer.

-[Unknown]

@hrydgard hrydgard modified the milestones: v1.11.0, v1.12.0 Dec 13, 2020
@ghost
Copy link

ghost commented May 23, 2021

Testing on PPSSPP v1.11.3

OpenGL

Screenshot_2021-05-23-11-24-11-167_org ppsspp ppsspp

Vulkan

Screenshot_2021-05-23-11-24-27-603_org ppsspp ppsspp

@Panderner
Copy link
Contributor

Same happens for my PC for all backends:
2021-05-23 (7)
2021-05-23 (6)

I recommend you to use USA version of this game but not the Europe Version.

@Panderner
Copy link
Contributor

Panderner commented Jun 2, 2021

This issue is also related for all versions (except Europe version) of MotorStorm: Arctic Edge (#7552)

@hrydgard hrydgard modified the milestones: v1.12.0, Future-Prio Aug 29, 2021
@ghost
Copy link

ghost commented Oct 5, 2021

I found a solution for this graphic glitch together with Star Wars: The Force Unleashed #9572

Just add "Star Wars: The Clone Wars" and "Star Wars: The Force Unleashed" game id to [Force04154000Download] compat.ini fix graphics issue of those two game, but the performance penalty is huge :(

What can you say about this hrydgard?

@Panderner
Copy link
Contributor

Please Note: German and Italian Version (ULES01285) does not reproduce this issue:
Screenshot_2021-10-06-09-10-44-629_org ppsspp ppsspp

@ghost
Copy link

ghost commented Oct 6, 2021

Please Note: German and Italian Version (ULES01285) does not reproduce this issue: Screenshot_2021-10-06-09-10-44-629_org ppsspp ppsspp

Yes I know that Europe can only reproduce this, but I find a way to fix the graphics glitch but the perf penalty is huge. Hrydgard need to improve the Vram

@Panderner
Copy link
Contributor

Europe can only reproduce this

ULES01284 can reproduce this but ULES1285 doesn't.

@Saramagrean
Copy link
Contributor Author

Saramagrean commented Jul 13, 2022

Enable [Force04154000Download] in compat.ini file, can remove this glitch. :)

SW-EU

@unknownbrackets
Copy link
Collaborator

Right, this is all because we're avoiding writing everything back to RAM due to speed reasons. Software renderer probably looks fine, based on my above explanation.

Maybe the safest thing, as much as I hate them, is a compat.ini hack that allows texturing from odd offsets in this game.

-[Unknown]

@ghost
Copy link

ghost commented Jul 14, 2022

Enable [Force04154000Download] in compat.ini file, can remove this glitch. :)

SW-EU

Yes it's fixes the graphics issue of both star wars the force unleashed but the performance penalty is huge on mobile devices.

hrydgard added a commit that referenced this issue Jul 15, 2022
Could probably also be fixed by changing the heuristic a bit, but since
we're in heuristic land anyway and close to a release, I feel this is
the safest option.

Also sneaks in a logspam reduction
@hrydgard hrydgard modified the milestones: Future-Prio, v1.13.0 Jul 15, 2022
hrydgard added a commit that referenced this issue Jul 15, 2022
Add a simple compat flag to workaround the Clone Wars issue, #12949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants