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.1k stars 2.16k forks source link

Kidou Keisatsu Patlabor - Kamubakku MiniPato another screen problem #17061

Open sum2012 opened 1 year ago

sum2012 commented 1 year ago

Game or games this happens in

ULJS00026

What area of the game

Game issue history: #16992 In-game

What happens

1

What should happen

This is softgpu 2

GE frame capture

ULJS00026-BAD2.zip

Platform

Windows

Mobile phone model or graphics card

Nvidia Geforce 710

PPSSPP version affected

v1.14.4-736-gebd8a6391

Last working version

https://github.com/hrydgard/ppsspp/issues/16992#issuecomment-1445125401

Graphics backend (3D API)

Vulkan

Checklist

hrydgard commented 1 year ago

This still happens. Checked the dump with renderdoc and the vertex data of the "missing" draw call is full of NaNs after the vertex shader. The other draws look normal.

This is very odd because the position data is the same, and the matrices are also the same, except a small tweak to pos. The only other change in the UBOs is small tweaks to u_depthRange and u_cullRangeMin/Max. Really struggling to see what could cause NaNs here... Well, I suppose we might be triggering the range culling. Does seem to be the case.

Same thing happens in OpenGL and D3D11. D3D9 fails entirely but meh.

sum2012 commented 10 months ago

v1.16.6-333-gecab50346 still happens

hrydgard commented 9 months ago

Tiny adjustments to the range Z culling range makes the GE dump work, so I think this is a precision issue where our culling limits are just a smidge too tight. This single change is enough (on Vulkan): maxValues[2] = z.second + 1.0f/65536.0f; in ShaderUniforms.cpp.

hrydgard commented 9 months ago

This can now be worked around with the new setting. Pushing forward to the next version, since any change to the culling will need a lot of testing.

sum2012 commented 9 months ago

Do I need open another issue for Nvidia gpu ? ( No color for police) EDIT: Only error in D3D11 and Vulkan 1 Test on AMD cpu 7900 of internal gpu no problem

sum2012 commented 9 months ago

What mean "Disable culling" ? I want try to translate

hrydgard commented 9 months ago

I guess "Triangle removal outside of bounds" or something would be more accurate, but actually explaining the setting doesn't fit in a line...

The PSP will remove triangles that have corners that are either outside an X/Y range of 0..4096x0..4096 (offset by the offset register), or outside a Z range of 0 to 1. Some games rely on this. We still have some very small inaccuracies in both mechanisms, so we now have a setting to turn this behavior off.

If you have a better idea for a name for the setting let me know! :)

hrydgard commented 3 weeks ago

I'll do this minor adjustment right after the 1.18 release.