aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs58
1 files changed, 41 insertions, 17 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs b/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
index 8e222e71..106a6f3f 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Threed/ThreedClass.cs
@@ -498,34 +498,58 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
}
/// <summary>
- /// Clears the current color and depth-stencil buffers.
- /// Which buffers should be cleared can also specified with the arguments.
+ /// Performs a indexed or non-indexed draw.
/// </summary>
- /// <param name="argument">Method call argument</param>
- /// <param name="layerCount">For array and 3D textures, indicates how many layers should be cleared</param>
- public void Clear(int argument, int layerCount)
+ /// <param name="topology">Primitive topology</param>
+ /// <param name="count">Index count for indexed draws, vertex count for non-indexed draws</param>
+ /// <param name="instanceCount">Instance count</param>
+ /// <param name="firstIndex">First index on the index buffer for indexed draws, ignored for non-indexed draws</param>
+ /// <param name="firstVertex">First vertex on the vertex buffer</param>
+ /// <param name="firstInstance">First instance</param>
+ /// <param name="indexed">True if the draw is indexed, false otherwise</param>
+ public void Draw(
+ PrimitiveTopology topology,
+ int count,
+ int instanceCount,
+ int firstIndex,
+ int firstVertex,
+ int firstInstance,
+ bool indexed)
{
- _drawManager.Clear(this, argument, layerCount);
+ _drawManager.Draw(this, topology, count, instanceCount, firstIndex, firstVertex, firstInstance, indexed);
}
/// <summary>
- /// Performs a indirect multi-draw, with parameters from a GPU buffer.
+ /// Performs a indirect draw, with parameters from a GPU buffer.
/// </summary>
- /// <param name="indexCount">Index Buffer Count</param>
/// <param name="topology">Primitive topology</param>
- /// <param name="indirectBuffer">GPU buffer with the draw parameters, such as count, first index, etc</param>
- /// <param name="parameterBuffer">GPU buffer with the draw count</param>
+ /// <param name="indirectBufferAddress">Address of the buffer with the draw parameters, such as count, first index, etc</param>
+ /// <param name="parameterBufferAddress">Address of the buffer with the draw count</param>
/// <param name="maxDrawCount">Maximum number of draws that can be made</param>
- /// <param name="stride">Distance in bytes between each element on the <paramref name="indirectBuffer"/> array</param>
- public void MultiDrawIndirectCount(
- int indexCount,
+ /// <param name="stride">Distance in bytes between each entry on the data pointed to by <paramref name="indirectBufferAddress"/></param>
+ /// <param name="indexCount">Maximum number of indices that the draw can consume</param>
+ /// <param name="drawType">Type of the indirect draw, which can be indexed or non-indexed, with or without a draw count</param>
+ public void DrawIndirect(
PrimitiveTopology topology,
- BufferRange indirectBuffer,
- BufferRange parameterBuffer,
+ ulong indirectBufferAddress,
+ ulong parameterBufferAddress,
int maxDrawCount,
- int stride)
+ int stride,
+ int indexCount,
+ IndirectDrawType drawType)
{
- _drawManager.MultiDrawIndirectCount(this, indexCount, topology, indirectBuffer, parameterBuffer, maxDrawCount, stride);
+ _drawManager.DrawIndirect(this, topology, indirectBufferAddress, parameterBufferAddress, maxDrawCount, stride, indexCount, drawType);
+ }
+
+ /// <summary>
+ /// Clears the current color and depth-stencil buffers.
+ /// Which buffers should be cleared can also specified with the arguments.
+ /// </summary>
+ /// <param name="argument">Method call argument</param>
+ /// <param name="layerCount">For array and 3D textures, indicates how many layers should be cleared</param>
+ public void Clear(int argument, int layerCount)
+ {
+ _drawManager.Clear(this, argument, layerCount);
}
}
}