aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-07-03 19:41:27 -0300
committerGitHub <noreply@github.com>2020-07-04 00:41:27 +0200
commitdbeb50684d24bf43c2bdbc087f6b1f52f385acf2 (patch)
tree587a270df01e8f8f7b189d5911cf368aa879a8e1 /Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
parentb0d9ec8a8202039b21fb799707c8d26f37c4fbfd (diff)
Support inline index buffer data (#1351)
* Support inline index buffer data * Sort usings
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/BufferManager.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Memory/BufferManager.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
index 39d1cd6f..533b0576 100644
--- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
+++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs
@@ -104,6 +104,18 @@ namespace Ryujinx.Graphics.Gpu.Memory
}
/// <summary>
+ /// Sets a new index buffer that overrides the one set on the call to <see cref="CommitGraphicsBindings"/>.
+ /// </summary>
+ /// <param name="buffer">Buffer to be used as index buffer</param>
+ /// <param name="type">Type of each index buffer element</param>
+ public void SetIndexBuffer(BufferRange buffer, IndexType type)
+ {
+ _context.Renderer.Pipeline.SetIndexBuffer(buffer, type);
+
+ _indexBufferDirty = true;
+ }
+
+ /// <summary>
/// Sets the memory range with vertex buffer data, to be used for subsequent draw calls.
/// </summary>
/// <param name="index">Index of the vertex buffer (up to 16)</param>