diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-31 16:19:44 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 4a4e2f7c72301ba1dfb207f00c7c2fa0e9674223 (patch) | |
| tree | 77719af6b5dfcff14bf825977d1abd8abc63b1b1 /Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs | |
| parent | d1c0a64e6a60b5c6f288c5d152e4f35fb587d988 (diff) | |
Add XML documentation to Ryujinx.Graphics.Gpu.Engine
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs b/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs index 5c5a1dee..d2571d3d 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs @@ -22,8 +22,17 @@ namespace Ryujinx.Graphics.Gpu.Engine private int _instanceIndex; + /// <summary> + /// Primitive type of the current draw. + /// </summary> public PrimitiveType PrimitiveType { get; private set; } + /// <summary> + /// Finishes draw call. + /// This draws geometry on the bound buffers based on the current GPU state. + /// </summary> + /// <param name="state">Current GPU state</param> + /// <param name="argument">Method call argument</param> private void DrawEnd(GpuState state, int argument) { if (_instancedDrawPending) @@ -86,6 +95,12 @@ namespace Ryujinx.Graphics.Gpu.Engine } } + /// <summary> + /// Starts draw. + /// This sets primitive type and instanced draw parameters. + /// </summary> + /// <param name="state">Current GPU state</param> + /// <param name="argument">Method call argument</param> private void DrawBegin(GpuState state, int argument) { if ((argument & (1 << 26)) != 0) @@ -106,11 +121,24 @@ namespace Ryujinx.Graphics.Gpu.Engine PrimitiveType = type; } + /// <summary> + /// Sets the index buffer count. + /// This also sets internal state that indicates that the next draw is a indexed draw. + /// </summary> + /// <param name="state">Current GPU state</param> + /// <param name="argument">Method call argument</param> private void SetIndexBufferCount(GpuState state, int argument) { _drawIndexed = true; } + /// <summary> + /// Perform any deferred draws. + /// This is used for instanced draws. + /// Since each instance is a separate draw, we defer the draw and accumulate the instance count. + /// Once we detect the last instanced draw, then we perform the host instanced draw, + /// with the accumulated instance count. + /// </summary> public void PerformDeferredDraws() { // Perform any pending instanced draw. |
