Fix: Issue #1475 Texture Compatibility Check methods need to be centralized (#1482)

* Texture Compatibility Check methods need to be centralized #1475

* Fix spacing

* Fix spacing

* Undo removal of .ToString()

* Move isPerfectMatch back to Texture.cs

Rename parameters in TextureCompatibility.cs for consistency

* Add switch from 1474 to TextureCompatibility as requested by mageven.

* Actually add TextureCompatibility changes to the PR (Add DeriveDepthFormat method)

* Alignment corrections + Derive method signature adjustment.

* Removed empty line as erquested

* Remove empty lines

* Remove blank lines, fix alignment

* Fix alignment

* Remove emtpy line
This commit is contained in:
sharmander 2020-08-31 20:06:27 -04:00 committed by GitHub
parent 92f7f163ef
commit bc19114bb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 355 additions and 333 deletions

View file

@ -634,7 +634,7 @@ namespace Ryujinx.Graphics.Gpu.Image
// deletion.
_cache.Lift(overlap);
}
else if (!overlap.SizeMatches(info))
else if (!TextureCompatibility.SizeMatches(overlap.Info, info))
{
// If this is used for sampling, the size must match,
// otherwise the shader would sample garbage data.
@ -707,7 +707,7 @@ namespace Ryujinx.Graphics.Gpu.Image
// The size only matters (and is only really reliable) when the
// texture is used on a sampler, because otherwise the size will be
// aligned.
if (!overlap.SizeMatches(info, firstLevel) && isSamplerTexture)
if (!TextureCompatibility.SizeMatches(overlap.Info, info, firstLevel) && isSamplerTexture)
{
texture.ChangeSize(info.Width, info.Height, info.DepthOrLayers);
}