-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Comments
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 |
Can i ask how can i put here the recording.ppmdp??? Btw its Monster hunter 3rd Hd ver. |
you can zip it and then drop it in the text box you're typing in. |
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. |
Can i just email it dont own one 🙄 |
sure. [email protected] |
Thanks, I'll take a look soon. |
@Gamemulatorer even toukiden kiwami Record_2022-07-14-00-22-57_2f85358b2198d26f8aca533d68bee793.mp4No effects at all |
Are you using default settings only? |
@Gamemulatorer yes im using default setting I only change the resolution nothing else dont know whats wrong with my vulkan tho openGL works fine |
Maybe my android just recently updated to android 12 dont know, just maybe |
Hi @hrydgard kinda figured out whats the problem Record_2022-07-15-02-09-51_2f85358b2198d26f8aca533d68bee793.mp4 |
Hm, that's interesting! Think we had another bug recently related to hardware transform.. Maybe something with the clip planes, or similar? |
Yes HW transform is kinda buggy on vulkan mali gpu. |
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. |
@hrydgard how can i help 😊 |
Okay i get it u want ne to upload an existing bug So i will get 1 with hardware tranform on and off someting like that ???? |
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] |
@unknownbrackets u mean like this ? |
the screenshot you shared is different, what is a different map. |
Have the issues changed? It looks like only the sky is missing in that last one. -[Unknown] |
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? |
@IrfanH495 can you experience crash/freeze on this game using vulkan? see #16295 (comment) |
@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). |
What driver version is shown under system information? -[Unknown] |
But my vivo y11 is snapdragon 439 vulkan version 1.1.128 |
|
Thanks for testing, that's quite surprising! Will look into it. |
I will create a separate issue for that. |
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:
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. |
Although, hm, I forced it to take this path on PC with
but it doesn't repro.. |
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] |
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; ```
Empirical attempt at fixing #15661
Are there any issues left here or is this fixed now? -[Unknown] |
I think we can close this now |
Too much work out here glad it fixed |
As you can see no effect at vulkan
Unlike openGL
im using realme8i
The text was updated successfully, but these errors were encountered: