1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02:00
Ryujinx/Ryujinx.Graphics.Gpu/Image
riperiperi d64594ec74
Fix various issues with texture sync (#3302)
* Fix various issues with texture sync

A variable called _actionRegistered is used to keep track of whether a tracking action has been registered for a given texture group handle. This variable is set when the action is registered, and should be unset when it is consumed. This is used to skip registering the tracking action if it's already registered, saving some time for render targets that are modified very often.

There were two issues with this. The worst issue was that the tracking action handler exits early if the handle's modified flag is false... which means that it never reset _actionRegistered, as that was done within the Sync() method called later. The second issue was that this variable was set true after the sync action was registered, so it was technically possible for the action to run immediately, set the flag to false, then set it to true.

Both situations would lead to the action never being registered again, as the texture group handle would be sure the action is already registered. This breaks the texture for the remaining runtime, or until it is disposed.

It was also possible for a texture to register sync once, then on future frames the last modified sync number did not update. This may have caused some more minor issues.

Seems to fix the Xenoblade flashing bug. Obviously this needs a lot of testing, since it was random chance. I typically had the most luck getting it to happen by switching time of day on the event theatre screen for a while, then entering the equipment screen by pressing X on an event.

May also fix weird things like random chance air swimming in BOTW, maybe a few texture streaming bugs.

* Exchange rather than CompareExchange
2022-04-29 18:34:11 -03:00
..
AutoDeleteCache.cs Texture Sync, incompatible overlap handling, data flush improvements. (#2971) 2022-01-09 13:28:48 -03:00
FormatInfo.cs Allow swizzles to match with "undefined" components (#1538) 2020-09-11 09:48:48 +10:00
FormatTable.cs Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
ITextureDescriptor.cs shader cache: Fix invalid virtual address clean up (#1717) 2020-11-17 22:20:17 +01:00
Pool.cs Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
ReductionFilter.cs Address PR feedback 2020-01-09 02:13:00 +01:00
Sampler.cs Move texture anisotropy check to SetInfo (#2843) 2021-12-08 18:09:36 -03:00
SamplerDescriptor.cs Use a descriptor cache for faster pool invalidation. (#1977) 2021-01-29 14:19:06 +11:00
SamplerMinFilter.cs Add XML documentation to Ryujinx.Graphics.Gpu.Image 2020-01-09 02:13:00 +01:00
SamplerMipFilter.cs Add XML documentation to Ryujinx.Graphics.Gpu.Image 2020-01-09 02:13:00 +01:00
SamplerPool.cs Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
Texture.cs Allow copy texture views to have mismatching multisample state (#3152) 2022-04-08 11:26:48 +02:00
TextureBindingInfo.cs Simplify logic for bindless texture handling (#1667) 2020-11-09 19:35:04 -03:00
TextureBindingsManager.cs Fix res scale parameters not being updated in vertex shader (#3046) 2022-01-27 14:17:13 -03:00
TextureCache.cs Allow copy texture views to have mismatching multisample state (#3152) 2022-04-08 11:26:48 +02:00
TextureCompatibility.cs Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01:00
TextureComponent.cs Add XML documentation to Ryujinx.Graphics.Gpu.Image 2020-01-09 02:13:00 +01:00
TextureDependency.cs Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001) 2021-03-02 19:30:54 -03:00
TextureDescriptor.cs Improve Buffer Textures and flush Image Stores (#2088) 2021-03-08 18:43:39 -03:00
TextureDescriptorType.cs Add XML documentation to Ryujinx.Graphics.Gpu.Image 2020-01-09 02:13:00 +01:00
TextureGroup.cs Fix various issues with texture sync (#3302) 2022-04-29 18:34:11 -03:00
TextureGroupHandle.cs Fix various issues with texture sync (#3302) 2022-04-29 18:34:11 -03:00
TextureInfo.cs Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001) 2021-03-02 19:30:54 -03:00
TextureManager.cs Fix bug that could cause depth buffer to be missing after clear (#3067) 2022-01-31 00:11:43 -03:00
TextureMatchQuality.cs Prefer truly perfect texture matches over fomat aliased ones (#1754) 2020-11-27 19:46:23 +01:00
TextureMsaaMode.cs Add XML documentation to Ryujinx.Graphics.Gpu.Image 2020-01-09 02:13:00 +01:00
TexturePool.cs Implement S8D24 texture format and tweak depth range detection (#2458) 2022-03-15 03:42:08 +01: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 Perform unscaled 2d engine copy on CPU if source texture isn't in cache. (#3112) 2022-02-22 11:21:29 -03:00
TextureTarget.cs Fix TXQ for 3D textures. (#2613) 2021-09-02 00:17:43 -03:00
TextureViewCompatibility.cs Texture Sync, incompatible overlap handling, data flush improvements. (#2971) 2022-01-09 13:28:48 -03:00