Rename ToSpan to AsSpan (#3556)
This commit is contained in:
parent
f9661a54d2
commit
a5ff0024fb
44 changed files with 281 additions and 281 deletions
|
@ -31,7 +31,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
Length = length;
|
||||
}
|
||||
|
||||
public Span<T> ToSpan()
|
||||
public Span<T> AsSpan()
|
||||
{
|
||||
return new Span<T>(Pointer, Length);
|
||||
}
|
||||
|
|
|
@ -582,7 +582,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_newState.PipelineLayout = internalProgram.PipelineLayout;
|
||||
_newState.StagesCount = (uint)stages.Length;
|
||||
|
||||
stages.CopyTo(_newState.Stages.ToSpan().Slice(0, stages.Length));
|
||||
stages.CopyTo(_newState.Stages.AsSpan().Slice(0, stages.Length));
|
||||
|
||||
SignalStateChange();
|
||||
}
|
||||
|
@ -921,7 +921,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
protected void UpdatePipelineAttachmentFormats()
|
||||
{
|
||||
var dstAttachmentFormats = _newState.Internal.AttachmentFormats.ToSpan();
|
||||
var dstAttachmentFormats = _newState.Internal.AttachmentFormats.AsSpan();
|
||||
FramebufferParams.AttachmentFormats.CopyTo(dstAttachmentFormats);
|
||||
|
||||
int maxAttachmentIndex = FramebufferParams.MaxColorAttachmentIndex + (FramebufferParams.HasDepthStencil ? 1 : 0);
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
private void RecordScissor(Vk api, CommandBuffer commandBuffer)
|
||||
{
|
||||
api.CmdSetScissor(commandBuffer, 0, (uint)ScissorsCount, _scissors.ToSpan());
|
||||
api.CmdSetScissor(commandBuffer, 0, (uint)ScissorsCount, _scissors.AsSpan());
|
||||
}
|
||||
|
||||
private void RecordStencilMasks(Vk api, CommandBuffer commandBuffer)
|
||||
|
@ -132,7 +132,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
private void RecordViewport(Vk api, CommandBuffer commandBuffer)
|
||||
{
|
||||
api.CmdSetViewport(commandBuffer, 0, (uint)ViewportsCount, Viewports.ToSpan());
|
||||
api.CmdSetViewport(commandBuffer, 0, (uint)ViewportsCount, Viewports.AsSpan());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,22 +52,22 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!SequenceEqual<VertexInputAttributeDescription>(VertexAttributeDescriptions.ToSpan(), other.VertexAttributeDescriptions.ToSpan(), VertexAttributeDescriptionsCount))
|
||||
if (!SequenceEqual<VertexInputAttributeDescription>(VertexAttributeDescriptions.AsSpan(), other.VertexAttributeDescriptions.AsSpan(), VertexAttributeDescriptionsCount))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SequenceEqual<VertexInputBindingDescription>(VertexBindingDescriptions.ToSpan(), other.VertexBindingDescriptions.ToSpan(), VertexBindingDescriptionsCount))
|
||||
if (!SequenceEqual<VertexInputBindingDescription>(VertexBindingDescriptions.AsSpan(), other.VertexBindingDescriptions.AsSpan(), VertexBindingDescriptionsCount))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SequenceEqual<PipelineColorBlendAttachmentState>(ColorBlendAttachmentState.ToSpan(), other.ColorBlendAttachmentState.ToSpan(), ColorBlendAttachmentStateCount))
|
||||
if (!SequenceEqual<PipelineColorBlendAttachmentState>(ColorBlendAttachmentState.AsSpan(), other.ColorBlendAttachmentState.AsSpan(), ColorBlendAttachmentStateCount))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SequenceEqual<Format>(AttachmentFormats.ToSpan(), other.AttachmentFormats.ToSpan(), ColorBlendAttachmentStateCount + (HasDepthStencil ? 1u : 0u)))
|
||||
if (!SequenceEqual<Format>(AttachmentFormats.AsSpan(), other.AttachmentFormats.AsSpan(), ColorBlendAttachmentStateCount + (HasDepthStencil ? 1u : 0u)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
PipelineState pipeline = _state.ToVulkanPipelineState(_gd);
|
||||
|
||||
// Copy the shader stage info to the pipeline.
|
||||
var stages = pipeline.Stages.ToSpan();
|
||||
var stages = pipeline.Stages.AsSpan();
|
||||
|
||||
for (int i = 0; i < _shaders.Length; i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue