mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 17:18:55 +02:00
misc: chore: Merge into pattern
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user