From 4a4e2f7c72301ba1dfb207f00c7c2fa0e9674223 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 31 Dec 2019 16:19:44 -0300 Subject: Add XML documentation to Ryujinx.Graphics.Gpu.Engine --- Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Engine/MethodDraw.cs') 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; + /// + /// Primitive type of the current draw. + /// public PrimitiveType PrimitiveType { get; private set; } + /// + /// Finishes draw call. + /// This draws geometry on the bound buffers based on the current GPU state. + /// + /// Current GPU state + /// Method call argument private void DrawEnd(GpuState state, int argument) { if (_instancedDrawPending) @@ -86,6 +95,12 @@ namespace Ryujinx.Graphics.Gpu.Engine } } + /// + /// Starts draw. + /// This sets primitive type and instanced draw parameters. + /// + /// Current GPU state + /// Method call argument private void DrawBegin(GpuState state, int argument) { if ((argument & (1 << 26)) != 0) @@ -106,11 +121,24 @@ namespace Ryujinx.Graphics.Gpu.Engine PrimitiveType = type; } + /// + /// Sets the index buffer count. + /// This also sets internal state that indicates that the next draw is a indexed draw. + /// + /// Current GPU state + /// Method call argument private void SetIndexBufferCount(GpuState state, int argument) { _drawIndexed = true; } + /// + /// 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. + /// public void PerformDeferredDraws() { // Perform any pending instanced draw. -- cgit v1.2.3