ppsspp icon indicating copy to clipboard operation
ppsspp copied to clipboard

JIT/Dynarec crash upon loading a game on RISC-V

Open archanox opened this issue 1 year ago • 5 comments

Game or games this happens in

ULUS-10093 WRC

What area of the game / PPSSPP

When loading the game with Dynarec enabled. Even with all JIT functionality disabled.

Original issue #19266

What should happen

The game should load with the JIT backend.

Logs

55:23:389 Core/System.cpp:428 N[BOOT]: PPSSPP v1.17-884-gcfcca0ed13
55:23:756 root         N[G3D]: GLES/ShaderManagerGLES.cpp:1153 Precompile: Compiled and linked 30 programs (11 vertex, 20 fragment) in 1.4 milliseconds
55:23:756 root         N[G3D]: GLES/GPU_GLES.cpp:108 Precompiling the shader cache from '/home/debian/.config/ppsspp/PSP/SYSTEM/CACHE/ULUS10093.glshadercache'
55:23:756 root         N[BOOT]: UI/EmuScreen.cpp:384 Booted /media/debian/Storage/Isos/World_Rally_Championship_USA_PSP-pSyPSP.iso...
55:23:762 user_main    E[SYSTEM]: Common/Log.cpp:73 (/media/debian/Storage/ppsspp/Core/MIPS/IR/IRRegCache.cpp:operator():806): [false] (ULUS10093 WRC, 0.4s) Unexpected type: ?
(/media/debian/Storage/ppsspp/Core/MIPS/IR/IRRegCache.cpp:operator():806): [false] (ULUS10093 WRC, 0.4s) Unexpected type: ?
Trace/breakpoint trap

Platform

Linux / BSD

Mobile device model or graphics card (GPU)

Radeon HD 7850

PPSSPP version affected

v1.17-884-gcfcca0ed13

Last working version

No response

Graphics backend (3D API)

OpenGL / GLES

Checklist

  • [X] Test in the latest git build in case it's already fixed.
  • [X] Search for other reports of the same issue.
  • [X] Try resetting settings or older versions and include if the issue is related.
  • [X] Try without any cheats and without loading any save states.
  • [X] Include logs or screenshots of issue.

archanox avatar Jun 19 '24 04:06 archanox

Hm, this problem is slightly different. Does it affect all games?

hrydgard avatar Jun 19 '24 14:06 hrydgard

Yeah all games with Dynarec, and same error with and without everything ticked in the JIT functionality list.

archanox avatar Jun 20 '24 00:06 archanox

Just tested this recently on a SpacemiT K1/M1, and this issue is not there, but an older JIT issue has reappeared when loading into the race in WRC.

NB, just for future reference this new device advertises rv64imafdcv_sscofpmf_sstc_svpbmt_zicbom_zicboz_zicbop_zihintpause

Whilst the previous sg2042 device supports rv64gc_zfh_xtheadba_xtheadbb_xtheadbs_xtheadcmo_xtheadcondmov_xtheadfmemidx_xtheadfmv_xtheadint_xtheadmac_xtheadmemidx_xtheadmempair_xtheadsync_xtheadvector

archanox avatar Aug 14 '24 09:08 archanox

I've just now tried the same game, same machine with latest upstream, unfortunately the same issue is there and I'm unable to see any visible errors in the terminal, unless there's a verbosity that needs to be changed?

Screenshot from 2024-09-14 00-01-08

I still feel the regression happened after the RISC-V JIT was implemented and during the IR JIT for other platforms.

archanox avatar Sep 13 '24 14:09 archanox

I managed to find the verbose logging output, which yields me this after selecting my vehicle and stage prior to loading into the actual game.

10:43:411 __StreamThre W[SCEIO]: HLE/sceIo.cpp:2330 8002032a=sceIoWaitAsync(5, 09fdd21c[000000000000f990]): no async pending
10:43:459 idle0        I[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:1 Decimating FBO for 04154000 (256x256 8888), age 6
10:43:851 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: tinfo 80 count 22
10:43:851 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: tinfo 81 count 68
10:43:900 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: NuWarning - ..\nu2api.jwrcpsp\nu3d\psp\psp_final_obj\..\nugscn.c Line 2126 : Scene file out of date. Reconvert From Direct Mem.
10:43:900 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: 
10:43:903 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: NuWarning - ..\nu2api.jwrcpsp\nu3d\psp\psp_final_obj\..\nugscn.c Line 2126 : Scene file out of date. Reconvert From Direct Mem.
10:43:904 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: 
10:43:905 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: NuWarning - ..\nu2api.jwrcpsp\nu3d\psp\psp_final_obj\..\nugscn.c Line 2126 : Scene file out of date. Reconvert From Direct Mem.
10:43:905 bgProc_Threa I[PRINTF]: HLE/sceIo.cpp:1197 stdout: 
10:45:573 __StreamThre I[ME]: HLE/sceAtrac.cpp:196 1=sceAtracGetAtracID(00001000)
10:45:809 __StreamThre I[ME]: HLE/AtracCtx.cpp:699 0=sceAtracSetData(1, 08c7cd2c, 00020000): atrac3+ stereo audio
10:45:991 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:1 Creating 8888 FBO at 04154000/04110000 stride=256 256x256 (force=1)
10:45:991 user_main    I[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:5 Creating FBO for 04154000 (z: 04110000) : 256 x 256 x 8888
10:45:992 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/5) time on : 0.92 ms, 1.06 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:008 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:1 Creating 5551 FBO at 04154000/04110000 stride=128 128x272 (force=1)
10:46:009 user_main    I[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:5 Creating FBO for 04154000 (z: 04110000) : 128 x 272 x 5551
10:46:009 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:2 Copy: Multiple dst vfb candidates for (dst: 04154000, size: 69632):
 - 04154000 8888 256x256 y=0 h=68 * 
 - 04154000 5551 128x272 y=0 h=272
 (COLOR)
10:46:022 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:2 Didn't find a destination candidate for 0415c000/32/4 0,0 32x128
10:46:022 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:2 Didn't find a destination candidate for 0415c000/32/4 0,0 32x128
10:46:024 user_main    W[G3D]: Common/TextureCacheCommon.cpp:1085 Ignoring possible texturing from framebuffer at 04154000 +0x128 / 128x272
10:46:152 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:2 Didn't find a destination candidate for 0415c000/32/4 0,0 32x128
10:46:153 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:2 Didn't find a destination candidate for 0415c000/32/4 0,0 32x128
10:46:189 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/5) time on : 198.22 ms, 198.36 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:206 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/5) time on : 214.59 ms, 214.75 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:212 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/5) time on : 215.25 ms, 221.20 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:252 user_main    W[FRAMEBUF]: Common/FramebufferManagerCommon.cpp:2 Didn't find a destination candidate for 0415c000/32/4 0,0 32x128
10:46:584 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/5) time on : 592.93 ms, 593.08 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:808 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/1) time on : 167.08 ms, 167.17 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:839 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/2) time on : 520.51 ms, 520.63 ms since scheduling  rpType: 0001 sampleBits: 1 (game)
10:46:847 user_main    I[G3D]: Vulkan/VulkanRenderManager.cpp:136 Pipeline (x/2) time on : 528.62 ms, 528.75 ms since scheduling  rpType: 0001 sampleBits: 1 (game)

I don't think it's mentioned on this issue, but the game hasn't crashed and is still running with audio etc, just the screen is purely white as shown previously. You can get visibility back when entering the pause menu. image

archanox avatar Sep 13 '24 15:09 archanox

Closing, as this issue no longer occurs. Perhaps due to #20352 but maybe due to #20375.

archanox avatar Jun 21 '25 07:06 archanox