PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
Other
10.98k stars 1.56k forks source link

Grand Theft Auto Liberty City Stories and Vice City stories transparency bug #378

Closed Blackbird88 closed 6 years ago

Blackbird88 commented 9 years ago

I already reported this years ago and it was closed on googlecode as won't fix, but I just want to make sure this bug is known. LCS http://i.imgur.com/fYr1u.jpg VCS http://i.imgur.com/DeyzT.jpg Googlecode issue https://code.google.com/p/pcsx2/issues/detail?id=943

gregory38 commented 9 years ago

Please retry latest git with

Blackbird88 commented 9 years ago

That depends if GTX 580 is OGL 4.5 capable. EDIT: It should be, but it's still not fixed here.

Bug is still there.

mirh commented 9 years ago

May depend on #600

Blackbird88 commented 9 years ago

Somehow I doubt that. This is transparency/alpha issue not depth issue.

gregory38 commented 9 years ago

it could be. It is hard to say.

Blackbird88 commented 9 years ago

LCS/VCS don't use same engine as III/VC/SA and they don't suffer from any other severe graphical glitches ever since they worked in PCSX2 back in 0.9.5 and maybe even sooner. This bug is only one that persisted.

aap commented 9 years ago

I tried to look into that bug a while ago by analyzing some frames with PIX (d3d9 hw) but for some reason PIX couldn't deal with them at all. The draw calls weren't displayed correctly when making a full snapshot (all render targets displayed wrong content) and while recording a stream showed the draw calls correctly I couldn't dissect the meshes and whatnot. I was able to figure out the VCS trails effect with a combination of both and I did see frames that didn't have that problem. These were always the very first frames to be displayed at all but I don't really know what you can conclude from this, maybe I'll take another look. I think the pixels failed the depth test but I'm not quite sure. Perhaps in the render target z isn't cleared properly? What you see behind the text is the sky box in any case. EDIT: I suspect the issue with PIX being unable to properly handle the frame may be related. Perhaps we should try to fix that? It would certainly help in analyzing the frames to see what was wrong if fixing the PIX bug didn't already expose the bug.

Blackbird88 commented 8 years ago

Here is the GS Dump you asked for @gregory38 http://www.mediafire.com/download/a7s064b4roz1cod/VCSAlphaIssue.zip

gregory38 commented 8 years ago

Did you test the "preload frame" hack?

Blackbird88 commented 8 years ago

Yes. I turned on all the acurrate options and that preload hack.

Blackbird88 commented 8 years ago

@gregory38 Not to be pushy or anything, but do you know why this bug exists yet please?

gregory38 commented 8 years ago

GS supports read/write texture. Standard GPU are either read or write (it is more complex but that the idea). With latest gl extension, we have a limited rw texture. But now texture cache need to be updated (and the gl renderer too)

gregory38 commented 8 years ago

Well, I know at least a gta game that suffer of this issue. But I didn't check if it is the same issue as this report.

Blackbird88 commented 8 years ago

Thanks! Hope it'll get fixed eventually.

aap commented 8 years ago

It's probably not the same issue I suspect because it looks fine in software mode. The GS read/write that happens in San Andreas doesn't work in software mode either.

gregory38 commented 8 years ago

Yes you're right. I run the gs dump above but I didn't spot any difference between the SW and the HW renderer. My logging detect some overlapping. But I know that gs dump doesn't support properly depth transfer.

Type:Others ID:3405 Severity:Info   Message:TC: dst Color hit (full): 4 (0x3c00, F:0x0)
Type:Others ID:3408 Severity:Info   Message:TC: Lookup Target(Color) 1280x1024, hit: 4 (0x3c00, F:0x0)
Type:Error  ID:3411 Severity:Mid    Message:ERROR: Source and Target are the same!
Type:Others ID:3411 Severity:Info   Message:TC: Remove Src Texture: 483 (0x3c00)
Type:Others ID:3411 Severity:Info   Message:TC: Lookup Target(Color) 1280x1024, hit: 4 (0x3c00, F:0x0)
Type:Others ID:3411 Severity:Info   Message:TC: dst Color hit (full): 482 (0x3e00, F:0x0)
Type:Others ID:3414 Severity:Info   Message:TC: Lookup Target(Color) 1280x1024, hit: 482 (0x3e00, F:0x0)
Type:Error  ID:3417 Severity:Mid    Message:ERROR: Source and Target are the same!
Type:Others ID:3417 Severity:Info   Message:TC: Remove Src Texture: 483 (0x3e00)
Type:Others ID:3417 Severity:Info   Message:TC: Lookup Target(Color) 1280x1024, hit: 482 (0x3e00, F:0x0)
Type:Others ID:3417 Severity:Info   Message:TC: dst Color hit (full): 4 (0x3c00, F:0x0)
Type:Others ID:3420 Severity:Info   Message:TC: Lookup Target(Color) 1280x1024, hit: 4 (0x3c00, F:0x0)
Type:Error  ID:3423 Severity:Mid    Message:ERROR: Source and Target are the same!
Blackbird88 commented 8 years ago

Looks like enabling HW depth in OGL renderer causes this now. Previously enabling it did nothing. image

gregory38 commented 8 years ago

Do you know what is the first version that introduce it? It is recent?

Blackbird88 commented 8 years ago

Yes it's very recent. Must've been your OGL changes.

gregory38 commented 8 years ago

Enable HW hack and add this new one on the ini

UserHacks_DisableGsMemClear=1

Does it fix your issue?

Blackbird88 commented 8 years ago

Nope. I'm looking through builds now. EDIT: Actually scratch what I said it's not very recent. How did I overlook this for so long :O It doesn't happen in native mode or SW. Strange. This game never had any upscaling issues with OGL's options.

Blackbird88 commented 8 years ago

Found it. It's caused by PCSX2/pcsx2@6002719 With this commit OGL HW+HW Depth option+Higher than native res causes this bug.

gregory38 commented 8 years ago

Do you mean that it is working in native resolution?

Blackbird88 commented 8 years ago

Yes.

gregory38 commented 8 years ago

I'm puzzled.

Blackbird88 commented 8 years ago

Puzzled? As in why it's broken?

ssakash commented 8 years ago

maybe one alternative would be to disable the no depth lookup optimization on upscaling resolutions ? but honestly I'm not sure why upscaling has problems with it :\

gregory38 commented 8 years ago

Well, why do you a need depth buffer that is neither read nor written in upscaling resolution? So I likely miss a piece of the equation.

Blackbird88 commented 8 years ago

Oh I thought my explanation was bad. Nvm :D

gregory38 commented 8 years ago

Could you generate me a gs dump?

Blackbird88 commented 8 years ago

Sure http://www25.zippyshare.com/v/bzuS9IhE/file.html That's 3x Native

gregory38 commented 8 years ago

Damn, I can't reproduce it. Did you enable any hack? Or other option?

Blackbird88 commented 8 years ago

No hacks. Unless you count HW depth as hack.

gregory38 commented 8 years ago

Could you generate me a long dump that start before the issue appear?

Blackbird88 commented 8 years ago

Here http://www117.zippyshare.com/v/mm2lo0fm/file.html

gregory38 commented 8 years ago

I mean a multiframe dump. Full detail here: http://forums.pcsx2.net/Thread-How-to-create-a-proper-GS-dump

In short, ctrl+shift+f8, and keep f8 pressed. Be aware file grow very quickly.

Blackbird88 commented 8 years ago

Okay http://www110.zippyshare.com/v/2bsNA4zs/file.html

gregory38 commented 8 years ago

Did you start the dump before the glitch ? Could you post your GSdx.ini file too.

Blackbird88 commented 8 years ago

There is no "before". It appears right when I start the game. http://pastebin.com/5cFbMu2s Happens with clean made INI too.

gregory38 commented 8 years ago

Euh, I guess you have some logo, start menu etc before, no? Did you use a save state?

Blackbird88 commented 8 years ago

I did. Does that matter? Only thing that is before is loading screen. Tried few of those. It's hard to do right without it being massive since I'm dealing with random load times. http://www95.zippyshare.com/v/lI7CqtNk/file.html

gregory38 commented 8 years ago

That a good question, I don't have the answer.

willkuer commented 8 years ago

Still the enulator should work without savestates. Therefore testcase should as well always be without savestates.

gregory38 commented 8 years ago

Will be fixed once the depth PR is merged.

Blackbird88 commented 8 years ago

Yeah I will close this when it's merged and ref the commit. Don't worry :)

Blackbird88 commented 8 years ago

Fixed in @c7f0a85 for OpenGL backend

gregory38 commented 8 years ago

Thanks you to follow your issue :+1:

swift21 commented 7 years ago

how did you fix that? can you tell me step by step?

Blackbird88 commented 7 years ago

There's no step-by-step. Just downloading latest nightly and selecting OpenGL in GSdx should do the trick.

swift21 commented 7 years ago

works fine with opengl but opengl also screwed my gpu up. something happens and white-ish colored pixels takes over the display until i change the resolution. is there any solution for this?