JinxRyu/Ryujinx.Graphics.Gpu/Image
riperiperi 79092310fa
Compare aligned size for largest mip level when considering sampler resize (#2306)
* Compare aligned size for largest mip level when considering sampler resize

When selecting a texture that's a view for a sampler resize, we should take care that resizing it doesn't change the aligned size of any larger mip levels.

This PR covers two cases:
- When creating a view of the texture, we check that the aligned size of the view shifted up to level 0 still matches the aligned size of the container. If it does not, a copy dependency is created rather than resizing.
- When searching for a texture for sampler, textures that do _not_ match our aligned size when both are shifted up by its base level are not considered an exact match, as resizing the found texture will cause the mip 0 aligned size to change. It will create a copy dependency view instead.

Fixes graphical errors and crashes (on flush) in various Unity games that use render-to-texture.

* Move shared code to its own method.
2021-05-24 17:35:26 +10:00
..
AutoDeleteCache.cs Memory Read/Write Tracking using Region Handles (#1272) 2020-10-16 17:18:35 -03:00
FormatInfo.cs Allow swizzles to match with "undefined" components (#1538) 2020-09-11 09:48:48 +10:00
FormatTable.cs Add another Depth32F texture format (#2304) 2021-05-22 01:15:08 +02:00
ITextureDescriptor.cs shader cache: Fix invalid virtual address clean up (#1717) 2020-11-17 22:20:17 +01:00
Pool.cs Improve handling for unmapped GPU resources (#2083) 2021-03-06 11:43:55 -03:00
ReductionFilter.cs Address PR feedback 2020-01-09 02:13:00 +01:00
Sampler.cs Add seamless cubemap flag in sampler parameters. (#1658) 2020-11-02 17:03:06 -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 Use a descriptor cache for faster pool invalidation. (#1977) 2021-01-29 14:19:06 +11:00
Texture.cs Compare aligned size for largest mip level when considering sampler resize (#2306) 2021-05-24 17:35:26 +10:00
TextureBindingInfo.cs Simplify logic for bindless texture handling (#1667) 2020-11-09 19:35:04 -03:00
TextureBindingsManager.cs Pass CbufSlot when getting info from the texture descriptor (#2291) 2021-05-19 20:05:43 +02:00
TextureCompatibility.cs Compare aligned size for largest mip level when considering sampler resize (#2306) 2021-05-24 17:35:26 +10: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 Improve linear texture compatibility rules (#2099) 2021-03-19 02:17:38 +01:00
TextureGroupHandle.cs Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001) 2021-03-02 19:30:54 -03:00
TextureInfo.cs Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001) 2021-03-02 19:30:54 -03:00
TextureManager.cs Use a different method for out of bounds blit (#2302) 2021-05-22 01:26:49 +02: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 Improve Buffer Textures and flush Image Stores (#2088) 2021-03-08 18:43:39 -03:00
TexturePoolCache.cs Remove unused texture and sampler pool invalidation code (#1648) 2020-11-01 15:17:29 -03:00
TextureScaleMode.cs Implement Zero-Configuration Resolution Scaling (#1365) 2020-07-07 04:41:07 +02:00
TextureSearchFlags.cs Fix depth stencil formats copy by matching equivalent color formats (#1198) 2020-07-13 21:41:30 +10:00
TextureTarget.cs shader cache: Fix invalid virtual address clean up (#1717) 2020-11-17 22:20:17 +01:00
TextureViewCompatibility.cs Texture/Buffer Memory Management Improvements (#1408) 2020-09-10 16:44:04 -03:00