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

rsx: Fix a few texture data leaks #7314

Merged
merged 6 commits into from
Jan 26, 2020
Merged

rsx: Fix a few texture data leaks #7314

merged 6 commits into from
Jan 26, 2020

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Jan 24, 2020

  • Do not sample from incomplete textures! Raises minimum texel completeness to 99% if only one texture is found inside a range. This should exclude textures smaller than the required and avoid introducing black regions to partial blit engine textures.
  • If a trivial blit operation is happening, but a live shader_read resource exists in the same range, this signifies a flush is very likely to occur. Use CPU fallback instead for performance reasons.
  • Fix blit engine resources having needless memory barriers in vulkan.
  • Fix some leaking texels when flushing incomplete textures using the revised vulkan DMA system. Some extensions need to be added to properly handle strided data operations.

Fixes #6822

@incognitoh
Copy link

(BLUS30049) huge regression in speed compared to latest master. also the crowd/fans are glitched now. this game requires cpu blit to get past opening menu. this is using just standard 1280 x 720 resolution and cpu blit enabled

master:
m1
pr:
pr1
master:
m2
PR:
pr2

win10
gpu- gtx1070

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 25, 2020

The crowds are fine, the bug is that rpcs3 is behaving as if CPU blit is enabled. The crowds look like trash because you don't have WCB enabled. CPU blit is also why performance is so bad; I'm investigating why this is happening.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 25, 2020

Ok, this game is just poorly written, rpcs3 is actually correct in this case. Game is sampling a partial texture with overdeclared height which means we need to load from CPU to get the missing bits. I'll try and make the code more lenient but this just opens us up to more bugs in other games which do not like this kind of hack.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 25, 2020

Added a temporary workaround for broken games which hides this issue for now.

- Raise passing 'score' from 50% to 90% to filter out very incomplete
merge operations.
- Catch unfit sections passing the match test; possible for blit_dst
data but will likely be always harmless. Disabled in release builds by default.
- Attempt to identify blit operations that will be flushed immediately
after and just do them on CPU instead if the transformation is trivial.
- If only a single blit section is contributing to an atlas merge op, the
threshold should be 100%. The only acceptable result here is a
truncation.
- There still does not exist a ranged flush implementation which is required.
- TODO: Implement this properly
- Avoids WCB requirement for now to keep res scaling working correctly.
- TODO: Fix this properly
@kd-11 kd-11 changed the title [TESTERS NEEDED] rsx: Fix a few texture data leaks rsx: Fix a few texture data leaks Jan 25, 2020
@jokoputera
Copy link

I believe RayStorm HD having the same problem. But im not gonna create a new thread because that game is very much playable (>60fps), even though you need to turn on the CPU blitz. 🙏🏻

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

Successfully merging this pull request may close these issues.

Kingdom Hearts II FM Texture Issues / Gummy Ship Crash
3 participants