Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx.Graphics.Gpu/Image
riperiperi b0e410a828
Lift textures in the AutoDeleteCache for all modifications. (#2615)
* Lift textures in the AutoDeleteCache for all modifications.

Before, this would only apply to render targets and texture blit. Now it applies to image stores, the fast dma copy path and any other type of modification.

Image store always at least has one reference in the texture pool, so the function of the AutoDeleteCache keeping textures _alive_ is not useful, but a very important function for a while has been its use to flush textures in order of modification when they are dereferenced, so that their data is not lost.

Before, textures populated using image stores were being dereferenced and reloaded as garbage. Now, when these textures are dereferenced, their data will be put back into memory, and everything stays intact.

Fixes lighting breaking when switching levels in THPS1+2, and potentially some more UE4 games. I've tested a bunch more games for regressions and performance impact, but they all seem fine.

* Lift copy srcTexture so that it doesn't remain referenceless

* Perform lift before reference count change on unbind.

It's important to lift on unbind as that is the moment the texture was truly last modified, but definitely not after releasing every single reference.
2021-09-11 21:52:54 +02:00
..
AutoDeleteCache.cs Remove pool cache entries for incompatible overlapping textures (#2568) 2021-08-20 17:52:09 -03:00
FormatInfo.cs
FormatTable.cs
ITextureDescriptor.cs
Pool.cs Initial support for separate GPU address spaces (#2394) 2021-06-29 19:32:02 +02:00
ReductionFilter.cs
Sampler.cs
SamplerDescriptor.cs
SamplerMinFilter.cs
SamplerMipFilter.cs
SamplerPool.cs Initial support for separate GPU address spaces (#2394) 2021-06-29 19:32:02 +02:00
Texture.cs Lift textures in the AutoDeleteCache for all modifications. (#2615) 2021-09-11 21:52:54 +02:00
TextureBindingInfo.cs
TextureBindingsManager.cs Only reupload the texture scale array if it changes. (#2595) 2021-08-27 17:08:30 -03:00
TextureCache.cs Lift textures in the AutoDeleteCache for all modifications. (#2615) 2021-09-11 21:52:54 +02:00
TextureCompatibility.cs
TextureComponent.cs
TextureDependency.cs
TextureDescriptor.cs
TextureDescriptorType.cs
TextureGroup.cs Remove pool cache entries for incompatible overlapping textures (#2568) 2021-08-20 17:52:09 -03:00
TextureGroupHandle.cs
TextureInfo.cs
TextureManager.cs Use "Undesired" scale mode for certain textures rather than blacklisting (#2537) 2021-08-11 22:44:51 +02:00
TextureMatchQuality.cs
TextureMsaaMode.cs
TexturePool.cs Avoid deleting textures when their data does not overlap. (#2601) 2021-08-29 16:22:13 -03:00
TexturePoolCache.cs Initial support for separate GPU address spaces (#2394) 2021-06-29 19:32:02 +02:00
TextureScaleMode.cs Use "Undesired" scale mode for certain textures rather than blacklisting (#2537) 2021-08-11 22:44:51 +02:00
TextureSearchFlags.cs
TextureTarget.cs Fix TXQ for 3D textures. (#2613) 2021-09-02 00:17:43 -03:00
TextureViewCompatibility.cs