1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-08 21:41:42 +00:00
Ryujinx/Ryujinx.Graphics.Gpu
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
..
Engine Lift textures in the AutoDeleteCache for all modifications. (#2615) 2021-09-11 21:52:54 +02:00
Image Lift textures in the AutoDeleteCache for all modifications. (#2615) 2021-09-11 21:52:54 +02:00
Memory Handle indirect draw counts with non-zero draw starts properly (#2593) 2021-08-29 16:52:38 -03:00
Shader Fix TXQ for 3D textures. (#2613) 2021-09-02 00:17:43 -03:00
Synchronization Improved Logger (#1292) 2020-08-04 01:32:53 +02:00
ClassId.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
Constants.cs Improve linear texture compatibility rules (#2099) 2021-03-19 02:17:38 +01:00
GpuChannel.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
GpuContext.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
GraphicsConfig.cs Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557) 2021-08-26 23:50:28 +02:00
Ryujinx.Graphics.Gpu.csproj infra: Migrate to .NET 5 (#1694) 2020-11-15 19:27:15 +01:00
Window.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00