misc: chore: Merge into pattern

This commit is contained in:
KeatonTheBot
2025-09-24 13:51:15 -05:00
parent 503dea74c2
commit fa682d406e
157 changed files with 470 additions and 546 deletions
@@ -482,7 +482,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed.ComputeDraw
private readonly ulong GetVertexBufferSize(ulong vbAddress, ulong vbEndAddress, int vbStride, bool indexed, bool instanced, int firstVertex, int vertexCount)
{
IndexType indexType = _state.State.IndexBufferState.Type;
bool indexTypeSmall = indexType == IndexType.UByte || indexType == IndexType.UShort;
bool indexTypeSmall = indexType is IndexType.UByte or IndexType.UShort;
ulong vbSize = vbEndAddress - vbAddress + 1;
ulong size;
@@ -250,13 +250,11 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
};
}
if (mayConvertVtgToCompute && (size == VertexAttribSize.Rgb10A2 || size == VertexAttribSize.Rg11B10))
if (mayConvertVtgToCompute && size is VertexAttribSize.Rgb10A2 or VertexAttribSize.Rg11B10)
{
value |= AttributeType.Packed;
if (type == VertexAttribType.Snorm ||
type == VertexAttribType.Sint ||
type == VertexAttribType.Sscaled)
if (type is VertexAttribType.Snorm or VertexAttribType.Sint or VertexAttribType.Sscaled)
{
value |= AttributeType.PackedRgb10A2Signed;
}
@@ -1111,7 +1111,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
private void UpdateVertexBufferState()
{
IndexType indexType = _state.State.IndexBufferState.Type;
bool indexTypeSmall = indexType == IndexType.UByte || indexType == IndexType.UShort;
bool indexTypeSmall = indexType is IndexType.UByte or IndexType.UShort;
_drawState.IsAnyVbInstanced = false;