0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 06:55:48 +00:00
Ryujinx/Ryujinx.Graphics.Gpu/Engine
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
..
Compute Implement a fast path for I2M transfers (#2467) 2021-07-12 16:48:57 -03:00
Dma Support non-contiguous copies on I2M and DMA engines (#2473) 2021-08-04 22:20:58 +02:00
GPFifo Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557) 2021-08-26 23:50:28 +02:00
InlineToMemory Support non-contiguous copies on I2M and DMA engines (#2473) 2021-08-04 22:20:58 +02:00
MME Handle indirect draw counts with non-zero draw starts properly (#2593) 2021-08-29 16:52:38 -03:00
Threed Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
Twod Lift textures in the AutoDeleteCache for all modifications. (#2615) 2021-09-11 21:52:54 +02:00
Types Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ConditionalRenderEnabled.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
DeviceStateWithShadow.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
MmeShadowScratch.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
SetMmeShadowRamControlMode.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ShaderTexture.cs Fix image binding format (#1625) 2020-10-20 19:03:20 -03:00