Rename ToSpan to AsSpan (#3556)
This commit is contained in:
parent
f9661a54d2
commit
a5ff0024fb
44 changed files with 281 additions and 281 deletions
|
@ -12,7 +12,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
|
|||
#pragma warning disable CS0169
|
||||
private uint _e0;
|
||||
#pragma warning restore CS0169
|
||||
public ref uint this[int index] => ref ToSpan()[index];
|
||||
public Span<uint> ToSpan() => MemoryMarshal.CreateSpan(ref _e0, 256);
|
||||
public ref uint this[int index] => ref AsSpan()[index];
|
||||
public Span<uint> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, 256);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -331,8 +331,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
|
|||
|
||||
_context.Renderer.Pipeline.SetPatchParameters(
|
||||
_state.State.PatchVertices,
|
||||
_state.State.TessOuterLevel.ToSpan(),
|
||||
_state.State.TessInnerLevel.ToSpan());
|
||||
_state.State.TessOuterLevel.AsSpan(),
|
||||
_state.State.TessInnerLevel.AsSpan());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -515,7 +515,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!graphicsState.AttributeTypes.ToSpan().SequenceEqual(GraphicsState.AttributeTypes.ToSpan()))
|
||||
if (!graphicsState.AttributeTypes.AsSpan().SequenceEqual(GraphicsState.AttributeTypes.AsSpan()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
/// <returns>Span of varying locations</returns>
|
||||
public ReadOnlySpan<byte> AsSpan()
|
||||
{
|
||||
return MemoryMarshal.Cast<uint, byte>(VaryingLocations.ToSpan()).Slice(0, Math.Min(128, VaryingCount));
|
||||
return MemoryMarshal.Cast<uint, byte>(VaryingLocations.AsSpan()).Slice(0, Math.Min(128, VaryingCount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue