Rpcs3: BLJM60571 Texture Corruption

Created on 4 May 2020  路  11Comments  路  Source: RPCS3/rpcs3

Quick summary

Untitled

Details

The texture is in B8G8R8A8_UNORM and optimal tiling. The fragment shader just samples the texture straight onto screen, so it shouldn't be the shader's problem. This looks like a texture format issue to me, but I don't know how RSX works so I am not sure.

I don't have time to dig down further, but I hope the corruption pattern will ring a bell to people who are familiar with RSX like @kd-11.

Bug RSX

Most helpful comment

It's a 2D Japanese visual novel, which only renders sprites.

The full log of a few minutes of gameplay and the RSX capture is here:
logandcapture.zip

Also, this is what that texture normally should look like, and to the right is the correct framebuffer result:
normal_renderdoc

Thanks for looking into this if you've got time.

All 11 comments

I need more context, e.g which title is this? Also need some logs and RSX capture. Note that RSX has its own tiling format, but it is unlikely to break like this as a decoder for it is fully implemented.

It's a 2D Japanese visual novel, which only renders sprites.

The full log of a few minutes of gameplay and the RSX capture is here:
logandcapture.zip

Also, this is what that texture normally should look like, and to the right is the correct framebuffer result:
normal_renderdoc

Thanks for looking into this if you've got time.

The texture in question is marked as swizzled during rendering, but is actually stored in linear format.

Lol that clarifies a lot. Thanks!

The swizzle operation is not being done using blit engine and is loaded straight from memory as-is, but the texture configuration registers are clearly expecting a swizzled input, right down to pitch not being set. There are only two ways to use the PS3 GPU to swizzle, one being blit engine and the other being swizzled RTTs. Ofc we cannot do swizzled RTTs on PC, at least not in user space without some extra work being done. I could not find any commands relating to this however, but it is possible that this is done once when the program first loads and the generated textures reused throughout.

Just to update, I was right, the game is using a swizzled raster to generate the texture but we only support linear readback. I haven't had time to complete the fix, but it should be finished soon.

still have some errors, but most of errors are fixed
The character problem under the following should happen randomly
QQ鎴浘20200802213242
QQ鍥剧墖20200802214356
QQ鎴浘20200802215657

This is a completely different problem now, looks like broken synchronization to me. I'll get back around to this at some point.

Retry with https://github.com/RPCS3/rpcs3/pull/8696 which fixes some problems with the last patch. If that doesn't fix it, at least provide a save for this game as it is torture trying to get ingame every time you change something in the code.

very strangely, I tried rsx caputure, but it turned out to be correct to open rsx caputure
QQ鍥剧墖20200809083527
QQ鎴浘20200809084135

i save the savedata in here
QQ鍥剧墖20200809083812
QQ鎴浘20200809083806
QQ鍥剧墖20200809085821

this rsx caputure+ savedata https://drive.google.com/file/d/1zBA8_2Ii4hxbNXHu09q4HiNi6hE6zSIM/view?usp=sharing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JohnGodgames picture JohnGodgames  路  3Comments

Luffykun007 picture Luffykun007  路  3Comments

iBlackS0ul picture iBlackS0ul  路  3Comments

xiangzhai picture xiangzhai  路  3Comments

XeClutch picture XeClutch  路  3Comments