Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLJM60571 Texture Corruption #8150

Open
cyj0912 opened this issue May 3, 2020 · 16 comments · Fixed by #8664
Open

BLJM60571 Texture Corruption #8150

cyj0912 opened this issue May 3, 2020 · 16 comments · Fixed by #8664
Assignees

Comments

@cyj0912
Copy link

cyj0912 commented May 3, 2020

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.

@kd-11
Copy link
Contributor

kd-11 commented May 4, 2020

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.

@cyj0912
Copy link
Author

cyj0912 commented May 4, 2020

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.

@kd-11 kd-11 self-assigned this May 4, 2020
@kd-11 kd-11 added the In Progress This issue is actively being investigated at the moment. label Jul 23, 2020
@kd-11
Copy link
Contributor

kd-11 commented Jul 25, 2020

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

@cyj0912
Copy link
Author

cyj0912 commented Jul 25, 2020

Lol that clarifies a lot. Thanks!

@kd-11
Copy link
Contributor

kd-11 commented Jul 25, 2020

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.

@kd-11
Copy link
Contributor

kd-11 commented Jul 29, 2020

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.

@kd-11
Copy link
Contributor

kd-11 commented Aug 1, 2020

Should be fixed by #8664

@kd-11 kd-11 removed the In Progress This issue is actively being investigated at the moment. label Aug 1, 2020
@RainKikyou
Copy link

RainKikyou commented Aug 2, 2020

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

@AniLeo AniLeo reopened this Aug 2, 2020
@kd-11
Copy link
Contributor

kd-11 commented Aug 2, 2020

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

@kd-11
Copy link
Contributor

kd-11 commented Aug 5, 2020

Retry with #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.

@RainKikyou
Copy link

RainKikyou commented Aug 9, 2020

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

@kd-11
Copy link
Contributor

kd-11 commented Apr 13, 2021

Please retest this. The texture subsystem has been rewritten since the last time I touched this issue.

@kd-11
Copy link
Contributor

kd-11 commented Jun 3, 2021

Closing. Request to reopen if you can still reproduce.

@kd-11 kd-11 closed this as completed Jun 3, 2021
@13xforever
Copy link
Contributor

13xforever commented Aug 17, 2022

it's still an issue unfortunately
image

with opengl
image

in the prologue it's one specific scene with one specific animation, same character will look fine after few dialog lines

log with several runs (vk normal, vk in strict mode, ogl in strict mode)
RPCS3.log.gz

@MSuih MSuih reopened this Aug 17, 2022
@kd-11 kd-11 added the In Progress This issue is actively being investigated at the moment. label Dec 14, 2022
@kd-11 kd-11 removed the In Progress This issue is actively being investigated at the moment. label Jun 7, 2023
@Triticum0
Copy link

Retested with v0.0.30-15914-2a1af17f. No changes

@granderx
Copy link

Still got the same problem, keep waiting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants