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: Virtual subimage views #14104

Merged
merged 25 commits into from
Jul 4, 2023
Merged

rsx: Virtual subimage views #14104

merged 25 commits into from
Jul 4, 2023

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Jun 27, 2023

This PR is part 2 of several restructuring PRs. This set reworks how we handle sampling a sub-region of a subresource by lowering the complex path of nested copies to a simple coordinate scale and clamp operation. This works very well for some usage cases, such as games that render static resources once then make subimages from the different sections for actual rendering. This PR can result in a massive speedup on smaller GPUs without super-fast GDDR6X memory but there are diminishing returns on the highest end stuff (e.g RTX 4090).
A modest speedup reported in GT series games, but there are other chokepoints that are addressed in followup PRs.

This PR is still WIP as I need more testing.
TODO:

  • Address the FIXMEs in texture cache
  • Add some debug overlay stats
  • Fix shader interpreter

Broken games:

  • TLOU
  • GT6

@kd-11 kd-11 marked this pull request as draft June 27, 2023 15:02
@Megamouse Megamouse added the RSX label Jun 27, 2023
@kd-11 kd-11 force-pushed the virtual-subimage-views branch from 84f70d7 to db507f0 Compare June 30, 2023 22:46
@kd-11 kd-11 marked this pull request as ready for review July 1, 2023 00:36
@kd-11 kd-11 force-pushed the virtual-subimage-views branch from ad04ccf to 02a0072 Compare July 2, 2023 01:17
@kd-11 kd-11 changed the title [WIP] rsx: Virtual subimage views rsx: Virtual subimage views Jul 2, 2023
@Kravickas
Copy link
Contributor

Kravickas commented Jul 2, 2023

GT6 1.22

F {RSX [0x0d4dc84]} SIG: Thread terminated due to fatal error: Unsupported image layout 0x5
(in file C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\rpcs3\Emu\RSX\VK\VKRenderPass.cpp:89[:25], in function set_layout)

RPCS3.log

@kd-11 kd-11 marked this pull request as draft July 2, 2023 15:54
kd-11 added 19 commits July 3, 2023 18:51
- Generated from inline strings in GLSLCommon.cpp
- TODO: Some corner cases still exist where format may not be a match after a cache merge.
- Decompose sequences of copies into the minimally required set.
  This does 2 things:
  a. Reduces GPU workload by doing less transfers
  b. Allows the clipping optimization to kick in and skip a ton of GPU work
…tor type

- We need to move more dangerous braced initializations to c++20
- Also adds a base address variable which will come in handy
@kd-11 kd-11 force-pushed the virtual-subimage-views branch from 02a0072 to 6d1e25d Compare July 3, 2023 18:03
@kd-11
Copy link
Contributor Author

kd-11 commented Jul 3, 2023

@Kravickas Please retest. The crash should be fixed.

@kd-11 kd-11 marked this pull request as ready for review July 3, 2023 18:29
@kd-11 kd-11 marked this pull request as draft July 3, 2023 18:31
@Kravickas
Copy link
Contributor

Yep, crash fixed. 👍

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

Successfully merging this pull request may close these issues.

3 participants