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

Vulkan issue with hardware transform on Mali #15661

Closed
Gelo021 opened this issue Jul 8, 2022 · 76 comments
Closed

Vulkan issue with hardware transform on Mali #15661

Gelo021 opened this issue Jul 8, 2022 · 76 comments
Labels
GE emulation Backend-independent GPU issues Mali GPU Vulkan
Milestone

Comments

@Gelo021
Copy link

Gelo021 commented Jul 8, 2022

Screenshot_2022-07-07-02-51-20-51_2f85358b2198d26f8aca533d68bee793
As you can see no effect at vulkan
Unlike openGL
Screenshot_2022-07-07-02-51-57-22_2f85358b2198d26f8aca533d68bee793

im using realme8i

@hrydgard
Copy link
Owner

hrydgard commented Jul 8, 2022

Need more detail, what game is this? Can you take a GE frame capture? https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Jul 8, 2022
@hrydgard hrydgard added this to the Future-Prio milestone Jul 8, 2022
@Gelo021
Copy link
Author

Gelo021 commented Jul 8, 2022

Can i ask how can i put here the recording.ppmdp???

Btw its Monster hunter 3rd Hd ver.

@hrydgard
Copy link
Owner

hrydgard commented Jul 8, 2022

you can zip it and then drop it in the text box you're typing in.

@hrydgard
Copy link
Owner

hrydgard commented Jul 8, 2022

you'll have to do it on a PC, just drag drop the file into a post you're typing right here in this issue.

@Gelo021
Copy link
Author

Gelo021 commented Jul 8, 2022

Can i just email it dont own one 🙄

@hrydgard
Copy link
Owner

hrydgard commented Jul 8, 2022

sure. [email protected]

@Gelo021
Copy link
Author

Gelo021 commented Jul 8, 2022

recording.zip

@hrydgard
Copy link
Owner

hrydgard commented Jul 9, 2022

Thanks, I'll take a look soon.

@ghost
Copy link

ghost commented Jul 11, 2022

recording.zip

Screenshot_2022-07-11-20-31-12-309_org ppsspp ppsspp
This is the ge dump you uploaded can't see what's wrong here?

@Gelo021
Copy link
Author

Gelo021 commented Jul 13, 2022

@Gamemulatorer even toukiden kiwami

Record_2022-07-14-00-22-57_2f85358b2198d26f8aca533d68bee793.mp4

No effects at all

@ghost
Copy link

ghost commented Jul 14, 2022

@Gamemulatorer even toukiden kiwami

Record_2022-07-14-00-22-57_2f85358b2198d26f8aca533d68bee793.mp4
No effects at all

Are you using default settings only?

@Gelo021
Copy link
Author

Gelo021 commented Jul 14, 2022

@Gamemulatorer yes im using default setting

I only change the resolution nothing else dont know whats wrong with my vulkan tho openGL works fine

@Gelo021
Copy link
Author

Gelo021 commented Jul 14, 2022

Maybe my android just recently updated to android 12 dont know, just maybe

@hrydgard hrydgard modified the milestones: Future-Prio, v1.13.0 Jul 14, 2022
@Gelo021
Copy link
Author

Gelo021 commented Jul 14, 2022

Hi @hrydgard kinda figured out whats the problem

Record_2022-07-15-02-09-51_2f85358b2198d26f8aca533d68bee793.mp4

@hrydgard
Copy link
Owner

Hm, that's interesting! Think we had another bug recently related to hardware transform.. Maybe something with the clip planes, or similar?

@hrydgard hrydgard changed the title Vulkan issue Vulkan issue with hardware transform on Mali Jul 15, 2022
@ghost
Copy link

ghost commented Jul 15, 2022

Yes HW transform is kinda buggy on vulkan mali gpu.

@hrydgard
Copy link
Owner

I need to get a .ppdmp from a place where the difference is obvious between hardware and software transform on Mali.

I've tried messing around with the Toukiden Kiwami demo, but I can't seem to find a difference myself.

A savestate from the demo showing the issue would also work to debug this.

@Gelo021
Copy link
Author

Gelo021 commented Jul 16, 2022

@hrydgard how can i help 😊

@Gelo021
Copy link
Author

Gelo021 commented Jul 16, 2022

Okay i get it u want ne to upload an existing bug
With a non exisitingbug

So i will get 1 with hardware tranform on and off someting like that ????

@unknownbrackets
Copy link
Collaborator

The GE frame dump is like a "3D screenshot." It only has the things you see in it. If the screenshot doesn't show the issue, then it doesn't help with fixing the issue.

I'd suggest you turn OFF hardware transform, and then make the effect happen. Create the frame dump right then.

I see the issue in the video, but the video is 2D (just a picture of the 3D.) We need a 3D screenshot (frame dump) to investigate the issue. But we need it to show the issue, just like the video does.

-[Unknown]

@Gelo021
Copy link
Author

Gelo021 commented Jul 16, 2022

NPJH50878.zip

@unknownbrackets u mean like this ?

@ghost
Copy link

ghost commented Jul 17, 2022

What is this?
Screenshot_2022-07-17-20-20-53-401_org ppsspp ppsspp

@Gelo021
Copy link
Author

Gelo021 commented Jul 17, 2022

NPJH50878.zip

@hrydgard hrydgard modified the milestones: Future-Prio, v1.14.0 Nov 1, 2022
@IrfanH495
Copy link

@Gamemulatorer
default settings
Screenshot_20221102-011738_PPSSPP
Screenshot_20221102-011751_PPSSPP

@IrfanH495
Copy link

Turning OFF HW Transform introduce this new graphic issue on Burnout Legend using the latest build. Screenshot_2022-07-18-15-10-44-638_org ppsspp ppsspp
HW Transform ON Screenshot_2022-07-18-15-10-55-697_org ppsspp ppsspp
GE Dump ULUS10025.ppdmp.zip

@IrfanH495 can you please try to reproduce this issue on your Samsung M20 Exynos Mali GPU 😁

the screenshot you shared is different, what is a different map.

@IrfanH495
Copy link

@Gamemulatorer
Screenshot_20221102-013303_PPSSPP
Screenshot_20221102-013314_PPSSPP

@ghost
Copy link

ghost commented Nov 2, 2022

@Gamemulatorer Screenshot_20221102-013303_PPSSPP Screenshot_20221102-013314_PPSSPP

So still causes glitches if hw transform is off...
Are using vulkan backend in this screenshots?

@unknownbrackets
Copy link
Collaborator

Have the issues changed? It looks like only the sky is missing in that last one.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2022

Sky in this game is notorious for issues on Mali btw, it's the motivation for the EQUAL_WZ_CORRUPTS_DEPTH bug flag... so might be software culling going just slightly wrong?

@ghost
Copy link

ghost commented Nov 3, 2022

@IrfanH495 can you experience crash/freeze on this game using vulkan? see #16295 (comment)

@Saramagrean
Copy link
Contributor

@Gamemulatorer Crash on Vulkan every game since v1.13.2-1384-gd6bd08cae. if enabled Geometry shader setting (OPPO F5 - Mediatek MT6763T Helio P23, Mali G71 MP2).

@unknownbrackets
Copy link
Collaborator

What driver version is shown under system information?

-[Unknown]

@ghost
Copy link

ghost commented Nov 3, 2022

@Gamemulatorer Crash on Vulkan every game since v1.13.2-1384-gd6bd08cae. if enabled Geometry shader setting (OPPO F5 - Mediatek MT6763T Helio P23, Mali G71 MP2).

But my vivo y11 is snapdragon 439 vulkan version 1.1.128

@ghost
Copy link

ghost commented Nov 3, 2022

Always freeze during selecting cars
Screenshot_20221104_012210_2f85358b2198d26f8aca533d68bee793

@ghost
Copy link

ghost commented Nov 3, 2022

Entered adb shell
Success! ※\(^o^)/※
--------- beginning of system
--------- beginning of crash
--------- beginning of main
11-03 23:50:55.735  9903  9903 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
11-03 23:51:05.460 10825 10825 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
11-03 23:52:07.257 14934 14934 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
11-03 23:56:57.168 19065 19065 E PpssppActivity: Got ACTION_VIEW without a valid uri, trying param
11-03 23:56:57.168 19065 19065 E PpssppActivity: Shortcut missing parameter!
11-03 23:56:58.239 19065 19065 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
11-03 23:56:59.203 19065 19065 E PpssppActivity: Got ACTION_VIEW without a valid uri, trying param
11-03 23:56:59.204 19065 19065 E PpssppActivity: Shortcut missing parameter!
11-03 23:56:59.213 19065 19065 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
11-04 01:19:33.292 27306 27306 E PpssppActivity: Got ACTION_VIEW without a valid uri, trying param
11-04 01:19:33.292 27306 27306 E PpssppActivity: Shortcut missing parameter!
11-04 01:19:34.354 27306 27306 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
11-04 01:19:35.490 27306 27306 E PpssppActivity: Got ACTION_VIEW without a valid uri, trying param
11-04 01:19:35.491 27306 27306 E PpssppActivity: Shortcut missing parameter!
11-04 01:19:35.504 27306 27306 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
11-04 01:20:17.662 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE001 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE001 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE001
11-04 01:20:17.666 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE001 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE001 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE001
11-04 01:20:17.669 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE002 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE002 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE002
11-04 01:20:17.673 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE002 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE002 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE002
11-04 01:20:17.677 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE003 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE003 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE003
11-04 01:20:17.681 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE003 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE003 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE003
11-04 01:20:17.684 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE004 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE004 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE004
11-04 01:20:17.688 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE004 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE004 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE004
11-04 01:20:17.692 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE005 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE005 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE005
11-04 01:20:17.695 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE005 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE005 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE005
11-04 01:20:17.699 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE006 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE006 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE006
11-04 01:20:17.703 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE006 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE006 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE006
11-04 01:20:17.706 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE007 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE007 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE007
11-04 01:20:17.710 27306 27413 E PpssppActivity: contentUriGetFileInfo exception: java.lang.IllegalArgumentException: Failed to determine if 3136-6161:PSP/SAVEDATA/ULUS10025SAVE007 is child of 3136-6161:PSP: java.io.FileNotFoundException: Missing file for 3136-6161:PSP/SAVEDATA/ULUS10025SAVE007 at /storage/3136-6161/PSP/SAVEDATA/ULUS10025SAVE007
11-04 01:20:56.414 27306 27306 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onResume)
11-04 01:20:56.416 27306 27306 I PPSSPPNativeActivity: onResume
11-04 01:20:56.485 27306 27306 W PPSSPPNativeActivity: ensureRenderLoop - not starting thread, needs surface
11-04 01:20:56.524 27306 27306 W PPSSPPNativeActivity: ensureRenderLoop: Starting thread
11-04 01:20:56.526 27306 28169 I PPSSPPNativeActivity: Starting the render loop: Surface(name=null)/@0x3e2a756
11-04 01:22:14.069 27306 27306 I InputDeviceState: Registering input device with 0 axes: Virtual
11-04 01:22:14.069 27306 27306 I InputDeviceState: Vendor ID:0 productId: 0 sources: 00000301
11-04 01:22:14.070 27306 27306 I PPSSPPNativeActivity: Input player registered: desc = a718a782d34bc767f4689c232d64d527998ea7fd
11-04 01:22:17.275 27306 27306 I PPSSPPNativeActivity: onPause
11-04 01:22:17.283 27306 27306 I PPSSPPNativeActivity: Joining render thread...
11-04 01:22:17.283 27306 27306 I PPSSPPNativeActivity: exitEGLRenderLoop
11-04 01:22:29.676 28577 28577 I PPSSPP  : EARLY: JNI_OnLoad
11-04 01:22:29.688 28577 28577 E PpssppActivity: Got ACTION_VIEW without a valid uri, trying param
11-04 01:22:29.688 28577 28577 E PpssppActivity: Shortcut missing parameter!
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: NativeApp.setDisplayParameters(720 x 1406, dpi=320, refresh=60.00)
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: RecalcDPI: display_xres=720 display_yres=1406
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: RecalcDPI: g_dpi=320.000000 g_dpi_scale_x=0.750000 g_dpi_scale_y=0.750000
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: RecalcDPI: dp_xscale=0.750000 dp_yscale=0.749644
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: RecalcDPI: dp_xres=540 dp_yres=1054
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: RecalcDPI: pixel_xres=0 pixel_yres=0
11-04 01:22:29.698 28577 28577 I PPSSPP  : EARLY: NativeResized - setting flag
11-04 01:22:29.704 28577 28577 D PPSSPPNativeActivity: Landscape: true
11-04 01:22:29.716 28577 28577 I PPSSPPNativeActivity: Ext storage: mounted /storage/emulated/0
11-04 01:22:29.716 28577 28577 I PPSSPPNativeActivity: Ext files dir: /storage/emulated/0/Android/data/org.ppsspp.ppsspp/files
11-04 01:22:29.716 28577 28577 I PPSSPPNativeActivity: getSdCardPaths: Attempting fallback
11-04 01:22:29.716 28577 28577 I PPSSPPNativeActivity: End of storage paths
11-04 01:22:29.717 28577 28577 I PPSSPP  : NativeApp.init() -- begin
11-04 01:22:29.730 28577 28577 I PPSSPP  : NativeApp.init(): device name: 'vivo:vivo 1906'
11-04 01:22:29.730 28577 28577 I PPSSPP  : NativeApp.init(): External storage path: /storage/emulated/0
11-04 01:22:29.730 28577 28577 I PPSSPP  : NativeApp.init(): Launch shortcut parameter: 
11-04 01:22:29.730 28577 28577 I PPSSPP  : EARLY: ThreadManager::Init(compute threads: 8, all: 16)
11-04 01:22:29.737 28577 28577 I PPSSPP  : EARLY: Reading '/data/user/0/org.ppsspp.ppsspp/files/memstick_dir.txt' to find memstick dir.
11-04 01:22:29.747 28577 28577 I PPSSPP  : EARLY: Memstick Directory from memstick_dir.txt: 'content://com.android.externalstorage.documents/tree/3136-6161%3APSP/document/3136-6161%3APSP'
11-04 01:22:30.038 28577 28577 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (Initialize)
11-04 01:22:30.128 28577 28577 I PPSSPPNativeActivity: OpenGL ES 3.0 detected.
11-04 01:22:30.142 28577 28577 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onCreate)
11-04 01:22:30.164 28577 28577 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
11-04 01:22:30.188 28577 28577 I NativeSurfaceView: NativeSurfaceView
11-04 01:22:30.206 28577 28577 I PPSSPPNativeActivity: setcontentview before
11-04 01:22:30.244 28577 28577 I PPSSPPNativeActivity: setcontentview after
11-04 01:22:30.244 28577 28577 W PPSSPPNativeActivity: ensureRenderLoop - not starting thread, needs surface
11-04 01:22:30.253 28577 28577 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onResume)
11-04 01:22:30.266 28577 28577 I PPSSPPNativeActivity: onResume
11-04 01:22:30.325 28577 28577 W PPSSPPNativeActivity: ensureRenderLoop - not starting thread, needs surface
11-04 01:22:30.413 28577 28577 I PPSSPPNativeActivity: onAttachedToWindow
11-04 01:22:30.478 28577 28577 W PPSSPPNativeActivity: ensureRenderLoop: Starting thread
11-04 01:22:30.491 28577 28636 I PPSSPPNativeActivity: Starting the render loop: Surface(name=null)/@0xe778291
11-04 01:22:30.566 28577 28577 I PPSSPPNativeActivity: onPause
11-04 01:22:30.586 28577 28577 I PPSSPPNativeActivity: Joining render thread...
11-04 01:22:30.586 28577 28577 I PPSSPPNativeActivity: exitEGLRenderLoop
11-04 01:22:31.197 28577 28636 I PPSSPPNativeActivity: Left the render loop: Surface(name=null)/@0xe778291
11-04 01:22:31.200 28577 28577 I PPSSPPNativeActivity: joining render loop thread...
11-04 01:22:31.200 28577 28577 W PPSSPPNativeActivity: Joined render loop thread.
11-04 01:22:31.200 28577 28577 I PPSSPPNativeActivity: Joined render thread
11-04 01:22:31.200 28577 28577 I PPSSPPNativeActivity: onPause completed
11-04 01:22:31.205 28577 28577 I PPSSPPNativeActivity: onStop - do nothing special
11-04 01:22:31.205 28577 28577 I PPSSPPNativeActivity: onDestroy
11-04 01:22:31.232 28577 28577 E PpssppActivity: Got ACTION_VIEW without a valid uri, trying param
11-04 01:22:31.232 28577 28577 E PpssppActivity: Shortcut missing parameter!
11-04 01:22:31.241 28577 28577 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onCreate)
11-04 01:22:31.242 28577 28577 E PPSSPPNativeActivity: updateSystemUiVisibility: decor view not yet created, ignoring for now
11-04 01:22:31.243 28577 28577 I NativeSurfaceView: NativeSurfaceView
11-04 01:22:31.249 28577 28577 I PPSSPPNativeActivity: setcontentview before
11-04 01:22:31.262 28577 28577 I PPSSPPNativeActivity: setcontentview after
11-04 01:22:31.262 28577 28577 W PPSSPPNativeActivity: ensureRenderLoop - not starting thread, needs surface
11-04 01:22:31.270 28577 28577 I PPSSPPNativeActivity: Setting requested rotation: 5 ('5') (onResume)
11-04 01:22:31.270 28577 28577 I PPSSPPNativeActivity: onResume
11-04 01:22:31.295 28577 28577 W PPSSPPNativeActivity: ensureRenderLoop - not starting thread, needs surface
11-04 01:22:31.311 28577 28577 I PPSSPPNativeActivity: onAttachedToWindow
11-04 01:22:31.339 28577 28577 W PPSSPPNativeActivity: ensureRenderLoop: Starting thread
11-04 01:22:31.340 28577 28656 I PPSSPPNativeActivity: Starting the render loop: Surface(name=null)/@0x4044c8a
11-04 01:22:32.830 28577 28577 I PPSSPPNativeActivity: Setting shuttingDown = true and calling Finish
11-04 01:22:32.856 28577 28577 I PPSSPPNativeActivity: onPause
11-04 01:22:32.863 28577 28577 I PPSSPPNativeActivity: Joining render thread...
11-04 01:22:32.864 28577 28577 I PPSSPPNativeActivity: exitEGLRenderLoop
11-04 01:22:32.926 28577 28656 I PPSSPPNativeActivity: Left the render loop: Surface(name=null)/@0x4044c8a
11-04 01:22:32.927 28577 28577 I PPSSPPNativeActivity: joining render loop thread...
11-04 01:22:32.927 28577 28577 W PPSSPPNativeActivity: Joined render loop thread.
11-04 01:22:32.927 28577 28577 I PPSSPPNativeActivity: Joined render thread
11-04 01:22:32.927 28577 28577 I PPSSPPNativeActivity: onPause completed
11-04 01:22:33.268 28577 28577 I PPSSPPNativeActivity: onStop - do nothing special
11-04 01:22:33.283 28577 28577 I PPSSPPNativeActivity: onDestroy

@Saramagrean
Copy link
Contributor

Saramagrean commented Nov 4, 2022

What driver version is shown under system information?

-[Unknown]

Here.
313220464_192060573310245_3275530360197185918_n
314396960_192109589972010_7439671994052749900_n

@ghost
Copy link

ghost commented Nov 6, 2022

Always freeze during selecting cars Screenshot_20221104_012210_2f85358b2198d26f8aca533d68bee793

This was regress by b92ea74

EDIT: Note, this was fixed in #16357

@hrydgard
Copy link
Owner

hrydgard commented Nov 6, 2022

Thanks for testing, that's quite surprising! Will look into it.

@ghost
Copy link

ghost commented Nov 6, 2022

Thanks for testing, that's quite surprising! Will look into it.

I will create a separate issue for that.

@ghost
Copy link

ghost commented Nov 13, 2022

Issue still can reproduce in vulkan with software transform.
Screenshot_20221113-211459

@hrydgard
Copy link
Owner

The issue has become a misnomer since the remaining problem is with software transform, not hardware transform, heh.

Anyway, I can repro this in Burnout Legends on my Galaxy S8, nothing else seems to have the problem.

The game has a similar problem on S8 in hardware transform if you disable vendor driver bug workarounds, EQUAL_WZ_CORRUPTS_DEPTH, but it doesn't really look the same, there the clearing draw is corrupt, with this issue the clearing draw doesn't seem to happen (so the z buffer quickly becomes useless leading to the artifacts).

Turning off culling in software transform "fixes" it (it's the clearing draw that's not happening)

SoftwareTransformCommon.cpp line ~593:

		// If we don't support custom cull in the shader, process it here.
		if (false && !gstate_c.Use(GPU_USE_CULL_DISTANCE) && vertexCount > 0 && !throughmode) {

So yeah, this is basically software triangle culling that's probably very slightly off. It's not used on PC since we have cull and clip planes there, so that's why it doesn't repro there.

@hrydgard
Copy link
Owner

Although, hm, I forced it to take this path on PC with

	// features |= GPU_USE_CULL_DISTANCE;

but it doesn't repro..

@unknownbrackets
Copy link
Collaborator

An interesting thing here: for 2/7602, 5/7602, and 6/7602 (which is where depth gets cleared for me), the viewport Z scale here is -0.0f, and the offset is 0.0f. I didn't think that was common. It doesn't use that later in the draw.

On Mali, we don't always use accurate depth. Created #16442. I do wonder if we still need to disable accurate depth ever, though. I think as long as you have depth clamp + (clip/cull OR geometry) then you probably are best off with accurate depth.

Anyway, I guess from the screenshots bad things are happening even for 2/7602. For that draw, nothing should be culled - z should be approximately 80% of w for all verts. This is true whether accurate depth is on or off, though... I don't see any reason this would get culled.

-[Unknown]

hrydgard added a commit that referenced this issue Nov 27, 2022
Basically, software culling fails in some configuration, like the one we
end up with on Mali.

As noted by unknownbrackets in #15661, the viewport Z scale, offset is -0.0, 0.0.

We end up with CalcCullParams computing minZValue == maxZValue == 1.0f,
and with the vertices ending up with z,w == 1.0, 1.0.
and as a result, the inside/outside calculations will always decide that
it's outside.

Changing the comparisons from >= / <= to > / < fixes the problem, but I
don't know if this might break something else.

Anyhow, here's the simple way to repro on PC:

Change the ending of GPU_Vulkan::CheckFeatures to:

```c
	return GPU_USE_LIGHT_UBERSHADER | GPU_USE_BLEND_MINMAX | GPU_USE_TEXTURE_NPOT | GPU_USE_INSTANCE_RENDERING |
		GPU_USE_VERTEX_TEXTURE_FETCH | GPU_USE_TEXTURE_FLOAT | GPU_USE_16BIT_FORMATS | GPU_USE_TEXTURE_LOD_CONTROL |
		GPU_USE_DEPTH_TEXTURE | GPU_USE_ACCURATE_DEPTH;
```
unknownbrackets added a commit that referenced this issue Nov 27, 2022
@unknownbrackets
Copy link
Collaborator

Are there any issues left here or is this fixed now?

-[Unknown]

@hrydgard
Copy link
Owner

I think we can close this now

@Gelo021
Copy link
Author

Gelo021 commented Nov 28, 2022

Too much work out here glad it fixed

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 Mali GPU Vulkan
Projects
None yet
Development

No branches or pull requests

5 participants