mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-18 11:46:41 +00:00
da073fce61
* GPU: Fast path for adding one texture view to a group Texture group handles must store a list of their overlapping views, so they can be properly notified when a write is detected, and a few other things relating to texture readback. This is generally created when the group is established, with each handle looping over all views to find its overlaps. This whole process was also done when only a single view was added (and no handles were changed), however... Sonic Frontiers had a huge cubemap array with 7350 faces (175 cubemaps * 6 faces * 7 levels), so iterating over both handles and existing views added up very fast. Since we are only adding a single view, we only need to _add_ that view to the existing overlaps, rather than recalculate them all. This greatly improves performance during loading screens and a few seconds into gameplay on the "open zone" sections of Sonic Frontiers. May improve loading times or stutters on some other games. Note that the current texture cache rules will cause these views to fall out of the cache, as there are more than the hard cap, so the cost will be repaid when reloading the open zone. I also added some code to properly remove overlaps when texture views are removed, since it seems that was missing. This can be improved further by only iterating handles that overlap the view (filter by range), but so can a few places in TextureGroup, so better to do all at once. The full generation of overlaps could probably be improved in a similar way. I recommend testing a few games to make sure nothing breaks. * Address feedback |
||
---|---|---|
.. | ||
AutoDeleteCache.cs | ||
FormatInfo.cs | ||
FormatTable.cs | ||
ITextureDescriptor.cs | ||
Pool.cs | ||
PoolCache.cs | ||
ReductionFilter.cs | ||
Sampler.cs | ||
SamplerDescriptor.cs | ||
SamplerMinFilter.cs | ||
SamplerMipFilter.cs | ||
SamplerPool.cs | ||
SamplerPoolCache.cs | ||
Texture.cs | ||
TextureBindingInfo.cs | ||
TextureBindingsManager.cs | ||
TextureCache.cs | ||
TextureCompatibility.cs | ||
TextureComponent.cs | ||
TextureDependency.cs | ||
TextureDescriptor.cs | ||
TextureDescriptorType.cs | ||
TextureGroup.cs | ||
TextureGroupHandle.cs | ||
TextureInfo.cs | ||
TextureManager.cs | ||
TextureMatchQuality.cs | ||
TextureMsaaMode.cs | ||
TexturePool.cs | ||
TexturePoolCache.cs | ||
TextureScaleMode.cs | ||
TextureSearchFlags.cs | ||
TextureTarget.cs | ||
TextureViewCompatibility.cs |