diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-01-01 12:39:09 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 92703af5558258da078d876b1d46e916b1065978 (patch) | |
| tree | 6579863103b145b3e7345e42fc03caf870622b43 /Ryujinx.Graphics.Gpu/Memory | |
| parent | 40ef18d7599971c7387779d752a73568685d3432 (diff) | |
Address PR feedback
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/Buffer.cs | 10 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/BufferManager.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs | 8 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/RangeList.cs | 16 |
5 files changed, 35 insertions, 19 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/Buffer.cs b/Ryujinx.Graphics.Gpu/Memory/Buffer.cs index 8af61d3d..4210ecb9 100644 --- a/Ryujinx.Graphics.Gpu/Memory/Buffer.cs +++ b/Ryujinx.Graphics.Gpu/Memory/Buffer.cs @@ -53,9 +53,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Gets a sub-range from the buffer. - /// This can be used to bind and use sub-ranges of the buffer on the host API. /// </summary> - /// <param name="address">Start address of the sub-range, must be greater or equal to the buffer address</param> + /// <remarks> + /// This can be used to bind and use sub-ranges of the buffer on the host API. + /// </remarks> + /// <param name="address">Start address of the sub-range, must be greater than or equal to the buffer address</param> /// <param name="size">Size in bytes of the sub-range, must be less than or equal to the buffer size</param> /// <returns>The buffer sub-range</returns> public BufferRange GetRange(ulong address, ulong size) @@ -78,9 +80,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Performs guest to host memory synchronization of the buffer data. + /// </summary> + /// <remarks> /// This causes the buffer data to be overwritten if a write was detected from the CPU, /// since the last call to this method. - /// </summary> + /// </remarks> /// <param name="address">Start address of the range to synchronize</param> /// <param name="size">Size in bytes of the range to synchronize</param> public void SynchronizeMemory(ulong address, ulong size) diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs index 44542349..de56baca 100644 --- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs @@ -76,10 +76,10 @@ namespace Ryujinx.Graphics.Gpu.Memory _cpStorageBuffers = new BuffersPerStage(Constants.TotalCpStorageBuffers); _cpUniformBuffers = new BuffersPerStage(Constants.TotalCpUniformBuffers); - _gpStorageBuffers = new BuffersPerStage[Constants.TotalShaderStages]; - _gpUniformBuffers = new BuffersPerStage[Constants.TotalShaderStages]; + _gpStorageBuffers = new BuffersPerStage[Constants.ShaderStages]; + _gpUniformBuffers = new BuffersPerStage[Constants.ShaderStages]; - for (int index = 0; index < Constants.TotalShaderStages; index++) + for (int index = 0; index < Constants.ShaderStages; index++) { _gpStorageBuffers[index] = new BuffersPerStage(Constants.TotalGpStorageBuffers); _gpUniformBuffers[index] = new BuffersPerStage(Constants.TotalGpUniformBuffers); @@ -387,7 +387,7 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Ensures that the compute engine bindings are visible to the host GPU. - /// This actually performs the binding using the host graphics API. + /// Note: this actually performs the binding using the host graphics API. /// </summary> public void CommitComputeBindings() { @@ -439,7 +439,7 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Ensures that the graphics engine bindings are visible to the host GPU. - /// This actually performs the binding using the host graphics API. + /// Note: this actually performs the binding using the host graphics API. /// </summary> public void CommitBindings() { @@ -543,11 +543,11 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> - /// This binds buffer into the host API, or updates data for already bound buffers. + /// This binds buffers into the host API, or updates data for already bound buffers. /// </summary> /// <param name="bindings">Bindings to bind or update</param> /// <param name="bind">True to bind, false to update</param> - /// <param name="isStorage">True to bind as storage buffer, false to bind as uniform buffers</param> + /// <param name="isStorage">True to bind as storage buffer, false to bind as uniform buffer</param> private void BindOrUpdateBuffers(BuffersPerStage[] bindings, bool bind, bool isStorage = false) { for (ShaderStage stage = ShaderStage.Vertex; stage <= ShaderStage.Fragment; stage++) @@ -608,8 +608,10 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Copy a buffer data from a given address to another. - /// This does a GPU side copy. /// </summary> + /// <remarks> + /// This does a GPU side copy. + /// </remarks> /// <param name="srcVa">GPU virtual address of the copy source</param> /// <param name="dstVa">GPU virtual address of the copy destination</param> /// <param name="size">Size in bytes of the copy</param> diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs index 3cbbd253..18779333 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryAccessor.cs @@ -50,7 +50,7 @@ namespace Ryujinx.Graphics.Gpu.Memory /// Reads a structure from GPU mapped memory. /// </summary> /// <typeparam name="T">Type of the structure</typeparam> - /// <param name="gpuVa">GPU virtual address where the strcture is located</param> + /// <param name="gpuVa">GPU virtual address where the structure is located</param> /// <returns>The structure at the specified memory location</returns> public T Read<T>(ulong gpuVa) where T : struct { diff --git a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs index 33be04d3..d0171b42 100644 --- a/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/MemoryManager.cs @@ -39,8 +39,10 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Maps a given range of pages to the specified CPU virtual address. - /// All addresses and sizes must be page aligned. /// </summary> + /// <remarks> + /// All addresses and sizes must be page aligned. + /// </remarks> /// <param name="pa">CPU virtual address to map into</param> /// <param name="va">GPU virtual address to be mapped</param> /// <param name="size">Size in bytes of the mapping</param> @@ -59,7 +61,7 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> - /// Maps a given range of pages to a allocated GPU virtual address. + /// Maps a given range of pages to an allocated GPU virtual address. /// The memory is automatically allocated by the memory manager. /// </summary> /// <param name="pa">CPU virtual address to map into</param> @@ -84,7 +86,7 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> - /// Maps a given range of pages to a allocated GPU virtual address. + /// Maps a given range of pages to an allocated GPU virtual address. /// The memory is automatically allocated by the memory manager. /// This also ensures that the mapping is always done in the first 4GB of GPU address space. /// </summary> diff --git a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs index 638108fe..d65814b3 100644 --- a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs +++ b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs @@ -77,9 +77,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Gets the first item on the list overlapping in memory with the specified item. + /// </summary> + /// <remarks> /// Despite the name, this has no ordering guarantees of the returned item. /// It only ensures that the item returned overlaps the specified item. - /// </summary> + /// </remarks> /// <param name="item">Item to check for overlaps</param> /// <returns>The overlapping item, or the default value for the type if none found</returns> public T FindFirstOverlap(T item) @@ -89,9 +91,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Gets the first item on the list overlapping the specified memory range. + /// </summary> + /// <remarks> /// Despite the name, this has no ordering guarantees of the returned item. /// It only ensures that the item returned overlaps the specified memory range. - /// </summary> + /// </remarks> /// <param name="address">Start address of the range</param> /// <param name="size">Size in bytes or the rangee</param> /// <returns>The overlapping item, or the default value for the type if none found</returns> @@ -157,10 +161,12 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Gets all items overlapping with the specified item in memory. + /// </summary> + /// <remarks> /// This method only returns correct results if none of the items on the list overlaps with /// each other. If that is not the case, this method should not be used. /// This method is faster than the regular method to find all overlaps. - /// </summary> + /// </remarks> /// <param name="item">Item to check for overlaps</param> /// <param name="output">Output array where matches will be written. It is automatically resized to fit the results</param> /// <returns>The number of overlapping items found</returns> @@ -171,10 +177,12 @@ namespace Ryujinx.Graphics.Gpu.Memory /// <summary> /// Gets all items on the list overlapping the specified memory range. + /// </summary> + /// <remarks> /// This method only returns correct results if none of the items on the list overlaps with /// each other. If that is not the case, this method should not be used. /// This method is faster than the regular method to find all overlaps. - /// </summary> + /// </remarks> /// <param name="address">Start address of the range</param> /// <param name="size">Size in bytes or the rangee</param> /// <param name="output">Output array where matches will be written. It is automatically resized to fit the results</param> |
