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

Android Vulkan: Project Diva Series, Little Blank Black Screen #10107

Open
TediExcaliber opened this issue Nov 12, 2017 · 21 comments
Open

Android Vulkan: Project Diva Series, Little Blank Black Screen #10107

TediExcaliber opened this issue Nov 12, 2017 · 21 comments
Labels
Depth / Z Issue involves depth drawing parameters. Vulkan
Milestone

Comments

@TediExcaliber
Copy link

Now I using v1.4.2-739-g3dd08b84f and when playing PD Series with vulkan some part of screen is going black... Yeah I know, it just small but sometime disturbing 😁 i dont know direcly what build version is starts this bug, but this bug is coming since I using builld 728

This bug happen in PD Extend and 2nd and maybe PD1 too... In backend Vulkan, i just try this on my Phone, cuz i dont have PC and I have try to changing some setting but not work.

Here the screenshot

http://imgur.com/0V7KKGo > OpenGL
http://imgur.com/N1ZscMb > Vulkan

@ghost
Copy link

ghost commented Nov 12, 2017

I can confirm this also happens in Windows. Except I only get it on the loading screens before and after songs.

@hrydgard hrydgard added this to the v1.6.0 milestone Nov 12, 2017
@TediExcaliber
Copy link
Author

Update: This bug also happen in some of my games

Like Dragonball Z Budokai AR, DW Strikeforce, and PoP Revelations

@hrydgard
Copy link
Owner

@TediExcaliber What phone are you on?

@TediExcaliber
Copy link
Author

TediExcaliber commented Nov 14, 2017 via email

@hrydgard
Copy link
Owner

Can you go back a few builds and try to figure out when this started to happen?

@TediExcaliber
Copy link
Author

TediExcaliber commented Nov 14, 2017 via email

@hrydgard
Copy link
Owner

Oh, okay. I tend to take fast internet for granted, sorry :)

@unknownbrackets
Copy link
Collaborator

Could you try exporting a GE debugger dump on PC - or ask someone to help? That's assuming it still happens in the latest git build.

To do this, open the game and select Debug -> GE debugger..., then when it's displaying the scene, press Record in the top right. After a second or so, it'll finish and save a trace of the drawing activity.

After that, check the memstick/PSP/SYSTEM/DUMP folder and it'll have created a file named something like "ULES12345_0000.ppdmp". You can zip that and then drag and drop it into a reply here.

-[Unknown]

@ghost
Copy link

ghost commented Dec 11, 2017

Is this what you need? Hope I did it correctly.

ULJM05681_0002.zip

@unknownbrackets unknownbrackets added the Depth / Z Issue involves depth drawing parameters. label Dec 22, 2017
@unknownbrackets
Copy link
Collaborator

If I disable clipping (which clamps depth), it leaves a solid black line underneath.

  • It starts out clearing depth to 0, which actually clears to 0.015625 (1/64.)
  • Next, it draws some UI across the entire bottom (including the black box area.) The depth value is, after transform, 65527.445313, which is rounded to 65527.453125.
  • When it goes to draw the full screen image on top, that depth value is constant at the bottom 6 pixels, and the rest has 0.015625 - no other depth values.
  • The full screen image is drawn with src >= dst depth testing, and depth clamping enabled.
  • The incoming source depth value is 65527.445313 for all vertices (it uses two full triangles - not a strip or fan.)
  • The resulting depth values range from:
    • Top rightish area: 65527.437500
    • Bottom leftish area: 65527.453125 (equal to the value actually there)
    • Middle between those triangles: 65527.421875 (less than the value actually there)

Depth clamping effects this, because it slightly alters the rounding. Since the bottom left is the correct value, the equality test passes. But the other corners aren't so lucky.

No pixel rounding is being performed. All three depth hacks (GPU_SCALE_DEPTH_FROM_24BIT_TO_16BIT, GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT, and GPU_ROUND_DEPTH_TO_16BIT) do fix it.

In OpenGL (non-accurate depth), depth is initially cleared to 0 (so it doesn't have the slight rounding issue), and the first draw sets depth to 65527.445313, which is the same value it results in.

So basically, the verts are being rounded differently since they don't target a representable depth value directly, in the accurate depth path (the one that doesn't incorrectly clip depth outside the viewport, and does clip it based on the depth range registers.)

-[Unknown]

@hrydgard hrydgard modified the milestones: v1.6.0, v1.7.0 Mar 24, 2018
@Leopard20
Copy link
Contributor

Leopard20 commented Apr 2, 2018

@hrydgard @unknownbrackets
I think the issue is already fixed. I have completed the game and haven't encountered this issue.
Or maybe it's a driver bug.

@ghost
Copy link

ghost commented Jun 6, 2018

It's absolutely not fixed. I'm using PPSSPP version 1.6.3-70-ga08fb8bd2 with Windows 7 and it's still happening in Diva 2nd.

@Leopard20
Copy link
Contributor

Well it is fixed for me (wasn't even there to begin with).

@Leopard20
Copy link
Contributor

Leopard20 commented Jun 6, 2018

Exactly the same scene as above, Vulkan backend, Android 7.0, Xiaomi Mi 5s Plus:

screenshot_2018-06-07-04-27-15-276_org ppsspp ppsspp

@unknownbrackets
Copy link
Collaborator

It may be card/driver specific, since it's a depth rounding issue.

-[Unknown]

@Leopard20
Copy link
Contributor

I'm pretty sure I didn't see it on my Windows PC either (Nvidia GTX 760m, driver version ~380-ish I think). But I'll check later to make sure.

@Leopard20
Copy link
Contributor

@TediExcaliber
IIRC, the Snapdragon 435 in Redmi 4x doesn't support Vulkan officially. Have you flashed the Vulkan injector on XDA? It may be related to that.

@ghost
Copy link

ghost commented Jun 7, 2018

I'm pretty sure I'm not imagining it. Windows 7, GTX 970, i5, very latest version of PPSSPP, resolution at x4. Happens on the loading screen before and after every song. Only happens when using Vulkan.

Loading screen before the song, it's always in the bottom right.

capture

Loading screen after the song, it's always in the top left.

capture

@hrydgard hrydgard modified the milestones: v1.10.0, Future Apr 26, 2020
@unknownbrackets
Copy link
Collaborator

It's possible the depth clamp behavior described in #12058 will fix this (at least it appears to in the software renderer.)

-[Unknown]

@ghost
Copy link

ghost commented Sep 21, 2022

How about this now after 3ff400e

@unknownbrackets
Copy link
Collaborator

As with the other issues, clipping against negative Z helped this but only works on a subset of devices right now. It's still broken on Mali devices.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Depth / Z Issue involves depth drawing parameters. Vulkan
Projects
None yet
Development

No branches or pull requests

4 participants