mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-05 07:48:55 +02:00
misc: chore: Merge duplicated 'if' branches
This commit is contained in:
@@ -852,11 +852,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
||||
bool hasDepth = dsFormat.Format.HasDepth();
|
||||
bool hasStencil = dsFormat.Format.HasStencil();
|
||||
|
||||
if (hasStencil && (!clearStencil || (clearAffectedByStencilMask && _state.State.StencilTestState.FrontMask != 0xff)))
|
||||
{
|
||||
fullClear = false;
|
||||
}
|
||||
else if (hasDepth && !clearDepth)
|
||||
if (hasStencil && (!clearStencil || (clearAffectedByStencilMask && _state.State.StencilTestState.FrontMask != 0xff)) ||
|
||||
hasDepth && !clearDepth)
|
||||
{
|
||||
fullClear = false;
|
||||
}
|
||||
|
||||
@@ -1187,12 +1187,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
return matchQuality;
|
||||
}
|
||||
|
||||
if (!TextureCompatibility.LayoutMatches(Info, info))
|
||||
{
|
||||
return TextureMatchQuality.NoMatch;
|
||||
}
|
||||
|
||||
if (!TextureCompatibility.SizeMatches(Info, info, forSampler))
|
||||
if (!TextureCompatibility.LayoutMatches(Info, info)
|
||||
|| !TextureCompatibility.SizeMatches(Info, info, forSampler))
|
||||
{
|
||||
return TextureMatchQuality.NoMatch;
|
||||
}
|
||||
@@ -1277,17 +1273,9 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
||||
int offset = Range.FindOffset(range);
|
||||
|
||||
if (offset < 0 || !_sizeInfo.FindView(offset, out firstLayer, out firstLevel))
|
||||
{
|
||||
return TextureViewCompatibility.LayoutIncompatible;
|
||||
}
|
||||
|
||||
if (!TextureCompatibility.ViewLayoutCompatible(Info, info, firstLevel))
|
||||
{
|
||||
return TextureViewCompatibility.LayoutIncompatible;
|
||||
}
|
||||
|
||||
if (info.GetSlices() > 1 && LayerSize != layerSize)
|
||||
if (offset < 0 || !_sizeInfo.FindView(offset, out firstLayer, out firstLevel) ||
|
||||
!TextureCompatibility.ViewLayoutCompatible(Info, info, firstLevel) ||
|
||||
info.GetSlices() > 1 && LayerSize != layerSize)
|
||||
{
|
||||
return TextureViewCompatibility.LayoutIncompatible;
|
||||
}
|
||||
|
||||
@@ -243,11 +243,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
}
|
||||
else if ((lhs.FormatInfo.Format == Format.D24UnormS8Uint ||
|
||||
lhs.FormatInfo.Format == Format.S8UintD24Unorm ||
|
||||
lhs.FormatInfo.Format == Format.X8UintD24Unorm) && rhs.FormatInfo.Format == Format.B8G8R8A8Unorm)
|
||||
{
|
||||
return TextureMatchQuality.FormatAlias;
|
||||
}
|
||||
else if (lhs.FormatInfo.Format == Format.D32FloatS8Uint && rhs.FormatInfo.Format == Format.R32G32Float)
|
||||
lhs.FormatInfo.Format == Format.X8UintD24Unorm) && rhs.FormatInfo.Format == Format.B8G8R8A8Unorm ||
|
||||
lhs.FormatInfo.Format == Format.D32FloatS8Uint && rhs.FormatInfo.Format == Format.R32G32Float)
|
||||
{
|
||||
return TextureMatchQuality.FormatAlias;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user