RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
15.2k stars 1.89k forks source link

DX12/GL/Vulkan: Turbo: Super Stunt Squad black textures #1867

Closed SakataGintokiYT closed 7 years ago

SakataGintokiYT commented 8 years ago
Turbo Super Stunt Squad :
Fotoszok.pl

{PPU[0x9] Thread (main_thread) [0x008ab518]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00bf8bc)

{PPU[0x9] Thread (main_thread) [0x008ab518]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00b324c)

{PPU[0x9] Thread (main_thread) [0x008ab518]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00b31ac)

{PPU[0x9] Thread (main_thread) [0x008ab518]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00befcc)

{PPU[0x9] Thread (main_thread) [0x008ab518]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00c61fc)

With lib_io

{PPU[0xa] Thread (main_thread) [0x00ba263c]} HLE TODO: Unimplemented syscall syscall_510 -> CELL_OK {PPU[0xa] Thread (main_thread) [0x00ba2680]} HLE TODO: Unimplemented syscall syscall_512 -> CELL_OK {PPU[0xa] Thread (main_thread) [0x00ba27f4]} HLE TODO: Unimplemented syscall syscall_514 -> CELL_OK

Log : https://gist.github.com/SakataGintokiYT/d3ed35f625a7d71ff52673dc9617b0a8
Shaderlog : https://mega.nz/#!JRwnXIxb!IGrNiC5Sn2JsOmMSlwZ57kIr98wfegT-C4AJchb_TjQ

Pac-Man and the Ghostly Adventures
Fotoszok.pl

{PPU[0x9] Thread (main_thread) [0x008bff10]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00bf8ac)

{PPU[0xb] Thread (main_thread) [0x008ab518]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00bf8bc)

{PPU[0xb] Thread (main_thread) [0x008bff10]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00c61fc)

{PPU[0x9] Thread (main_thread) [0x008bff10]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00befbc)

{PPU[0xb] Thread (main_thread) [0x008bff10]} sys_io TODO: cellPadPeriphGetInfo(info=*0xd00befbc)

With lib_io

{PPU[0xa] Thread (main_thread) [0x00bb263c]} HLE TODO: Unimplemented syscall syscall_510 -> CELL_OK {PPU[0xa] Thread (main_thread) [0x00bb2680]} HLE TODO: Unimplemented syscall syscall_512 -> CELL_OK {PPU[0xa] Thread (main_thread) [0x00bb967c]} HLE TODO: Unimplemented syscall syscall_514 -> CELL_OK

Log : https://gist.github.com/SakataGintokiYT/089dbfcf99f934e0f746f77c0f0fd5ce
Shaderlog : https://mega.nz/#!cQg0gQjJ!lz8Zv_Djx8ng1leXlGlOT68yDJxkzKFPxZs7STi39BY
dbz400 commented 8 years ago

How about Vulkan?

SakataGintokiYT commented 8 years ago

@raven02 The same issue on Og l/ vulkan ;}

dbz400 commented 8 years ago

i see. thanks @SakataGintokiYT

SakataGintokiYT commented 7 years ago

{Vulkan} Pac-Man and the Ghostly Adventures: {RenderDoc}

Fotoszok.pl

Title.Screen.rdc In.Game.rdc


{Vulkan} Turbo Super Stunt Squad : {RenderDoc}

Fotoszok.pl

Menu.rdc In.Game.rdc Character.select.rdc

SakataGintokiYT commented 7 years ago

@kd-11 Do you know how to fix this issue with black textures in these games ?

kd-11 commented 7 years ago

I'll investigate when I have some time

kd-11 commented 7 years ago

@SakataGintokiYT could you upload the ogl trace? Its much easier to debug

SakataGintokiYT commented 7 years ago

@kd-11 [debug] Read data from cell when initializing RTVs] [5a46560d]

Log: OpenGL-RenderDoc:

kd-11 commented 7 years ago

@SakataGintokiYT Does enabling read/write color buffers make a difference with opengl? The misses I'm seeing would be affected by that I think.

SakataGintokiYT commented 7 years ago

@kd-11 with: read/write color buffers

Fotoszok.pl

OpenGL-RenderDoc:

SakataGintokiYT commented 7 years ago

@kd-11

Cache views of fbo data in pinned PBOs [4ccb9799]

Fatal error
Unhandled Win32 exception 0xC0000005.
Segfault reading location 0000000000000000 at 00007ffd91cfca20.
Instruction address: 00007ffd91cfca20.
Function address: 00007ffd91cfc830 (base+0xc830).
Module name: 'VCRUNTIME140.dll'.
Module base: 00007ffd91cf0000.
RPCS3 image base: 0000000000010000.

Log:

kd-11 commented 7 years ago

Yea, that's what I feared. However, it does confirm that this game is trying to read data from a locked section view. Will add more info to the log and try to figure this one out.

kd-11 commented 7 years ago

https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-398 I forgot that vm::protect actually does modify page properties. Also, remember to disable r/w buffers since I dont want anything to interfere with this test.

SakataGintokiYT commented 7 years ago

@kd-11

[debug] Fix rtt surface dimensions [47334cfc]


Fatal error
Unhandled Win32 exception 0xC0000005.
Segfault reading location 0000000000000000 at 00007ff82a04ca20.
Instruction address: 00007ff82a04ca20.
Function address: 00007ff82a04c830 (base+0xc830).
Module name: 'VCRUNTIME140.dll'.
Module base: 00007ff82a040000.
RPCS3 image base: 0000000000010000.

Log:

kd-11 commented 7 years ago

Looks like a failed map operation.

kd-11 commented 7 years ago

https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-400 If it fails to run, enable debug output and attach log.

SakataGintokiYT commented 7 years ago

@kd-11 [Initialize pbo target 5c1fee42]

Unhandled Win32 exception 0xC0000005.
Segfault reading location 0000000007231000 at 00007ff83179cb7c.
Instruction address: 00007ff83179cb7c.
Function address: 00007ff83179c830 (base+0xc830).
Module name: 'VCRUNTIME140.dll'.
Module base: 00007ff831790000.
RPCS3 image base: 0000000000010000.

with enable debug output Log:

kd-11 commented 7 years ago

Looks like map succeeded, but something else failed. https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-401 dumps info to log file. I still expect the crash, but hopefully this will give me enough information.

SakataGintokiYT commented 7 years ago

@kd-11 [debug] Dump more info from texture cache [ a886e058 ]


Fatal error
Unhandled Win32 exception 0xC0000005.
Segfault reading location 000000000ae01000 at 00007ffbc414cb7c.
Instruction address: 00007ffbc414cb7c.
Function address: 00007ffbc414c830 (base+0xc830).
Module name: 'VCRUNTIME140.dll'.
Module base: 00007ffbc4140000.
RPCS3 image base: 0000000000010000.

Log:

kd-11 commented 7 years ago

Looks like it needs more work. Will update soon.

kd-11 commented 7 years ago

https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-402 Expect very poor performance with this one until I get around to cleaning and optimizing the code.

kd-11 commented 7 years ago

I know there may be some missing drawings, this is due to odd pitch handling. I'll have to run more tests to determine correct behavior for these double-pitch textures (MSAA?). I believe the same issue affects catherine half-width sampling.

SakataGintokiYT commented 7 years ago

@kd-11 [gl/surface_cache/debug] Fix surface cache] -4fe50289

Fotoszok.pl

OpenGL-RenderDoc:

shaderlog:

Log:

SakataGintokiYT commented 7 years ago

@kd-11 Very nice progress in Bakugan: Battle Brawlers ^_^

Fotoszok.pl
kd-11 commented 7 years ago

Looks like super stunt squad menu is trying to perform some kind of blend operation. Blending is set to off, but once can clearly see the shader is attempting to overwrite the render with the background image and sets the alpha component to a computed variable. That might actually be unrelated to this bug. As for bakugan, its the wierd pitch issue again it seems.

kd-11 commented 7 years ago

Retry with https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-408 Doesn't fix the wrong background for super squad, but maybe it could help bakugan a bit? If not, that means pitch is used differently than we assume and we ought to modify how we upload textures to the GPU. Hopefully fixes crashing with games like persona 4. Requires ARB_direct_state_access/opengl 4.5 but I'll water it down before merging.

al0xf commented 7 years ago

If you by crashing in Persona 4 mean black screen but otherwise running in Persona 4 Arena then it makes no (visible) difference.

kd-11 commented 7 years ago

For persona 4, yes, the crash is what I'm interested in right now.

SakataGintokiYT commented 7 years ago

@kd-11

[ogl] Minor adjustments to buffer cache [Bakugan: Battle Brawlers]

Fotoszok.pl

Log: ShaderLog: OpenGL-Render-Doc:


[ Turbo: Super Stunt Squad]

Fotoszok.pl

Log: ShaderLog: OpenGL-Render-Doc:

AniLeo commented 7 years ago

@kd-11 Persona 5 is slightly improved too

Master build https://rpcs3.net/blog/wp-content/uploads/2017/02/p5jpg.jpg

Your build screenshot_308

kd-11 commented 7 years ago

The broken graphics in bakugan are a regression I inadvertently introduced while rewriting the texture cache. I'm hunting down which part of the changes causes the misalignment with the fragment constants buffer. Some other titles are also affected.

kd-11 commented 7 years ago

https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-421 fixes the regression. Please retest.

Nekotekina commented 7 years ago

@kd-11 Can you fix framebuffer copying in Vulkan? It's blackscreen in some homebrews when the frame is "rendered" on the Cell side.

kd-11 commented 7 years ago

@Nekotekina Will do so as soon as I've confirmed that GL works properly. Same goes for DX12, although DX12 has the basics done.

SakataGintokiYT commented 7 years ago

@kd-11

Fotoszok.pl
Zangetsu38 commented 7 years ago

SplatterHouse have exactly same issue render, look my issue for see detail ^^ capture d ecran 2017-02-13 18 15 02

kd-11 commented 7 years ago

Ok. I'll have to do software "scaling" to get around this. Will push an update using nearest scaling and we can see what happens.

kd-11 commented 7 years ago

https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-422 adds software scaling for upto 2 and 4 samples per pixel. It implements the inverse of the fix we committed for catherine, but this time for programs that copy the data and re-use it.

SakataGintokiYT commented 7 years ago

@kd-11

Fotoszok.pl
kd-11 commented 7 years ago

Lol. That seems worse somehow. Not sure what is going on there; looks like I've made a wrong assumption about byte order somehow.

Zangetsu38 commented 7 years ago

@kd-11 Very good, just very pixelize lol and oh i just see with picture, but in OGL, have polyghon line, same Catherine. For pizelize maybe caused by OGL, Vulkan and DX12 maybe don't have this, but actually I have only black screen with this. But strange, Splatterhouse very good result, or Bakugan eu very buged lol capture d ecran 2017-02-13 21 57 51

kd-11 commented 7 years ago

I'm using nearest mode scaling for this test. I'll have to figure out why it didn't work for bakugan. Will update to use the GPU to perform the scaling which might be faster and at least better quality. Vulkan and DX12 are still unimplemented because I'm using GL as a test platform right now. Its just easier that way.

Zangetsu38 commented 7 years ago

Ah ok I understand, it is like for catherine so, once it is good for ogl you apply it on the other two ^^

kd-11 commented 7 years ago

https://ci.appveyor.com/project/kd-11/rpcs3/build/0.0.1-424 Should fix CPU scaling for Bakugan. I can work on GPU accelerated scaling from there.

SakataGintokiYT commented 7 years ago

@kd-11

Fotoszok.pl

shaderlog: Log: OpenGL-RenderDoc:

kd-11 commented 7 years ago

Looks like the framebuffer does not divide evenly by the pitch. This will be fixed using GPU scaling as it will be too slow to do on the CPU.

Zangetsu38 commented 7 years ago

I think No change for Splatterhouse RenderDoc+Log capture d ecran 2017-02-14 14 45 10

kd-11 commented 7 years ago

https://github.com/RPCS3/rpcs3/pull/2391 GPU scaling is not yet implemented, but hopefully bakugan is not misaligned.

SakataGintokiYT commented 7 years ago

@kd-11 [Bakugan: Battle Brawlers] F {rsx::thread} class std::system_error thrown: device or resource busy: device or resource busy

kd-11 commented 7 years ago

I've pushed a fix for overflow when padding rows. Should hopefully fix the bakugan crash