Support inline index buffer data (#1351)

* Support inline index buffer data

* Sort usings
This commit is contained in:
gdkchan 2020-07-03 19:41:27 -03:00 committed by GitHub
parent b0d9ec8a82
commit dbeb50684d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 146 additions and 5 deletions

View file

@ -103,6 +103,18 @@ namespace Ryujinx.Graphics.Gpu.Memory
_indexBufferDirty = true;
}
/// <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>