hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.11k stars 2.16k forks source link

Outrun 2006 glitches on Odroid N2 and Vim3 (32bit userspace) & Mali-G52 GPU #12222

Closed shantigilbert closed 2 years ago

shantigilbert commented 5 years ago

What happens?

Outrun 2006 shows some GFX issues where the car is located, here is a video

https://www.youtube.com/watch?v=Z91kLA-z1-U

What should happen?

no GFX issues

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

Hardware: Odroid N2 and VIM3 OS: EmuELEC (64bit with 32bit user space) Version: Latest GIT version

The odroid N2 uses an Amlogic S922x The VIM3 uses a A311D CPU Both use the same GPU Mali-G52

This might be something on my side, maybe a compilation flag, maybe I am missing something for this GPU.

This happens in the stand alone emulator as well as the Libretro core, same binary, using the same PBP file runs perfectly fine in another device with the Amlogic S095 and a Mali-450 GPU

And these are the arguments I am using to compile the latest GIT version

-DUSE_SYSTEM_FFMPEG=ON \
                        -DARMV7=ON \
                        -DUSING_FBDEV=ON \
                        -DUSING_EGL=ON \
                        -DUSING_GLES2=ON \
                        -DUSING_X11_VULKAN=OFF"

I would be more than happy to send any logs requested. I was thinking this might be related to #11999 but I am not 100% sure its the same issue.

ghost commented 5 years ago

I think it's the same thing.

https://github.com/hrydgard/ppsspp/issues/12107

unknownbrackets commented 5 years ago

Closing this as a duplicate of #12107.

-[Unknown]

shantigilbert commented 5 years ago

@unknownbrackets considering that #12107 and #11999 are closed as fixed and this issue is still present I am not sure how they are duplicate. My issue happens with gles and that other issue was (it seems) with vulkan.

hrydgard commented 5 years ago

So with a fresh build from right now you are still seeing the issue in the video in the first post of this thread? If so then yeah, this needs reopening.

shantigilbert commented 5 years ago

Yes, I compiled a version with the commit that fixed those other issues (https://github.com/hrydgard/ppsspp/commit/3b4e37145fc57796ab256d07f296e6250d9dad18) and it's still present

unknownbrackets commented 5 years ago

Darn, okay. And to confirm, it looks fine in other devices, right?

It does seem guardband related...

-[Unknown]

shantigilbert commented 5 years ago

@unknownbrackets I have several Amlogic devices:

Works fine on GPU MALI-450 Libretro and Standalone: S905 S905x

S912 with Mali-T820MP3 GPU Only works on Libretro (since standalone gives me an error related to EGLDisplay because of Libhybris, but that is another issue) but on Libretro it looks fine albeit rather slow.

Its just on the S922x and A311D which use the same GPU Mali-G52 that this issue is present, on the standalone and the Libretro core.

shantigilbert commented 5 years ago

I just got confirmation that the black clipping is also on Amlogic S905X2 with GPU G31-MP2

shantigilbert commented 5 years ago

Just to add a bit more to this, GTA vice city stories doesn't render the floor at all so the character just clips through the world. Burnout legends just crashes when the race is starting.

shantigilbert commented 4 years ago

And this also happens on Amlogic devices with S905x3 which also uses a Mali-G31-MP2, so it seems this might be something that affects all of the newish MALI gpus on 32bit user space?

shantigilbert commented 4 years ago

Just wondering if there is any chance for a review on this issue? now with the Odroid N2+ PPSSPP runs extremely well, but this bug is still present which makes a few games unplayable :(

unknownbrackets commented 2 years ago

Has this improved at all in the latest git builds? What GL extensions does this device have (shown in the settings -> tools -> system information screen)?

It could be that the recent changes to depth culling and to use user half-spaces might've improved this.

-[Unknown]

shantigilbert commented 2 years ago

Has this improved at all in the latest git builds? What GL extensions does this device have (shown in the settings -> tools -> system information screen)?

It could be that the recent changes to depth culling and to use user half-spaces might've improved this.

-[Unknown]

I do no longer use the 32bit version, we switched to 64bit a while ago. But if required I can compile a 32bit version it and test it if you give me a few days.

shantigilbert commented 2 years ago

Well I had time and I tested it. There are still small issues in outrun, mostly the ocean does not appear and reflections on the car appear as a solid color but the big black box that was under the car is gone, so it looks much better now. (note than on AARCH64 everything looks fine, ocean and reflections)

hrydgard commented 2 years ago

Cool. The other glitches are known and happen on other GPUs, so I'll close this specific one. The ocean problem has no solution yet, car reflections are not working correctly in the game unless you have OpenGL ES 3.0 or something more powerful, so could be that the old drivers are not up to scratch.

shantigilbert commented 2 years ago

BTA: I did had to force enable neon via patch as when I ran it it complaing that neon was required, so I am guessing it was not detected

--- a/Common/ArmCPUDetect.cpp
+++ b/Common/ArmCPUDetect.cpp
@@ -332,11 +332,11 @@
    bASIMD = CheckCPUFeature("asimd");
    num_cores = GetCoreCount();
 #endif
-#if PPSSPP_ARCH(ARM64)
+
    // Whether the above detection failed or not, on ARM64 we do have ASIMD/NEON.
    bNEON = true;
    bASIMD = true;
-#endif
+
 }

 // Turn the cpu info into a string we can show
hrydgard commented 2 years ago

Hm, interesting. Think we should rework the CPU detection here a bit, if feature detection fails it should just assume NEON since it's pretty much universal nowadays.