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/ComputeParams.cs | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'Ryujinx.Graphics.Gpu/Engine/ComputeParams.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/ComputeParams.cs b/Ryujinx.Graphics.Gpu/Engine/ComputeParams.cs index 5644ca81..c19b43d8 100644 --- a/Ryujinx.Graphics.Gpu/Engine/ComputeParams.cs +++ b/Ryujinx.Graphics.Gpu/Engine/ComputeParams.cs @@ -4,22 +4,36 @@ using System.Runtime.InteropServices; namespace Ryujinx.Graphics.Gpu.Engine { + /// + /// Compute uniform buffer parameters. + /// struct UniformBufferParams { public int AddressLow; public int AddressHighAndSize; + /// + /// Packs the split address to a 64-bits integer. + /// + /// Uniform buffer GPU virtual address public ulong PackAddress() { return (uint)AddressLow | ((ulong)(AddressHighAndSize & 0xff) << 32); } + /// + /// Unpacks the uniform buffer size in bytes. + /// + /// Uniform buffer size in bytes public ulong UnpackSize() { return (ulong)((AddressHighAndSize >> 15) & 0x1ffff); } } + /// + /// Compute dispatch parameters. + /// struct ComputeParams { public int Unknown0; @@ -61,6 +75,9 @@ namespace Ryujinx.Graphics.Gpu.Engine private UniformBufferParams _uniformBuffer6; private UniformBufferParams _uniformBuffer7; + /// + /// Uniform buffer parameters. + /// public Span UniformBuffers { get @@ -89,36 +106,65 @@ namespace Ryujinx.Graphics.Gpu.Engine public int Unknown62; public int Unknown63; + /// + /// Unpacks the work group X size. + /// + /// Work group X size public int UnpackGridSizeX() { return GridSizeX & 0x7fffffff; } + /// + /// Unpacks the work group Y size. + /// + /// Work group Y size public int UnpackGridSizeY() { return GridSizeYZ & 0xffff; } + /// + /// Unpacks the work group Z size. + /// + /// Work group Z size public int UnpackGridSizeZ() { return (GridSizeYZ >> 16) & 0xffff; } + /// + /// Unpacks the local group X size. + /// + /// Local group X size public int UnpackBlockSizeX() { return (BlockSizeX >> 16) & 0xffff; } + /// + /// Unpacks the local group Y size. + /// + /// Local group Y size public int UnpackBlockSizeY() { return BlockSizeYZ & 0xffff; } + /// + /// Unpacks the local group Z size. + /// + /// Local group Z size public int UnpackBlockSizeZ() { return (BlockSizeYZ >> 16) & 0xffff; } + /// + /// Unpacks the uniform buffers enable mask. + /// Each bit set on the mask indicates that the respective buffer index is enabled. + /// + /// Uniform buffers enable mask public uint UnpackUniformBuffersEnableMask() { return (uint)UniformBuffersConfig & 0xff; -- cgit v1.2.3