diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2022-08-11 18:07:37 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-11 18:07:37 -0300 |
| commit | a5ff0024fb33964c802e1712e5b11a52390603e7 (patch) | |
| tree | fdc0b7781541215cd728b8e0288b729f73dbad88 /Ryujinx.Graphics.Vulkan | |
| parent | f9661a54d21c3020783d14fd9935bb7b741a6915 (diff) | |
Rename ToSpan to AsSpan (#3556)
Diffstat (limited to 'Ryujinx.Graphics.Vulkan')
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/NativeArray.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/PipelineBase.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/PipelineUid.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Vulkan/ShaderCollection.cs | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/Ryujinx.Graphics.Vulkan/NativeArray.cs b/Ryujinx.Graphics.Vulkan/NativeArray.cs index 9d66ce8d..f7407439 100644 --- a/Ryujinx.Graphics.Vulkan/NativeArray.cs +++ b/Ryujinx.Graphics.Vulkan/NativeArray.cs @@ -31,7 +31,7 @@ namespace Ryujinx.Graphics.Vulkan Length = length; } - public Span<T> ToSpan() + public Span<T> AsSpan() { return new Span<T>(Pointer, Length); } diff --git a/Ryujinx.Graphics.Vulkan/PipelineBase.cs b/Ryujinx.Graphics.Vulkan/PipelineBase.cs index 1f0080c4..b66124f5 100644 --- a/Ryujinx.Graphics.Vulkan/PipelineBase.cs +++ b/Ryujinx.Graphics.Vulkan/PipelineBase.cs @@ -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); diff --git a/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs b/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs index 2553101d..4f73b17b 100644 --- a/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs +++ b/Ryujinx.Graphics.Vulkan/PipelineDynamicState.cs @@ -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()); } } } diff --git a/Ryujinx.Graphics.Vulkan/PipelineUid.cs b/Ryujinx.Graphics.Vulkan/PipelineUid.cs index e8137559..8ea52e20 100644 --- a/Ryujinx.Graphics.Vulkan/PipelineUid.cs +++ b/Ryujinx.Graphics.Vulkan/PipelineUid.cs @@ -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; } diff --git a/Ryujinx.Graphics.Vulkan/ShaderCollection.cs b/Ryujinx.Graphics.Vulkan/ShaderCollection.cs index 5447b1f5..82866f7b 100644 --- a/Ryujinx.Graphics.Vulkan/ShaderCollection.cs +++ b/Ryujinx.Graphics.Vulkan/ShaderCollection.cs @@ -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++) { |
