1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-19 04:52:01 +00:00
Ryujinx/Ryujinx.Graphics.Gpu/Shader
jhorv 5131b71437
Reducing memory allocations (#4537)
* add RecyclableMemoryStream dependency and MemoryStreamManager

* organize BinaryReader/BinaryWriter extensions

* add StreamExtensions to reduce need for BinaryWriter

* simple replacments of MemoryStream with RecyclableMemoryStream

* add write ReadOnlySequence<byte> support to IVirtualMemoryManager

* avoid 0-length array creation

* rework IpcMessage and related types to greatly reduce memory allocation by using RecylableMemoryStream, keeping streams around longer, avoiding their creation when possible, and avoiding creation of BinaryReader and BinaryWriter when possible

* reduce LINQ-induced memory allocations with custom methods to query KPriorityQueue

* use RecyclableMemoryStream in StreamUtils, and use StreamUtils in EmbeddedResources

* add constants for nanosecond/millisecond conversions

* code formatting

* XML doc adjustments

* fix: StreamExtension.WriteByte not writing non-zero values for lengths <= 16

* XML Doc improvements. Implement StreamExtensions.WriteByte() block writes for large-enough count values.

* add copyless path for StreamExtension.Write(ReadOnlySpan<int>)

* add default implementation of IVirtualMemoryManager.Write(ulong, ReadOnlySequence<byte>); remove previous explicit implementations

* code style fixes

* remove LINQ completely from KScheduler/KPriorityQueue by implementing a custom struct-based enumerator
2023-03-17 13:14:50 +01:00
..
DiskCache Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
HashTable Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
CachedShaderBindings.cs GPU: Swap bindings array instead of copying (#4003) 2022-12-04 18:18:40 +01:00
CachedShaderProgram.cs GPU: Swap bindings array instead of copying (#4003) 2022-12-04 18:18:40 +01:00
CachedShaderStage.cs New shader cache implementation (#3194) 2022-04-10 10:49:44 -03:00
ComputeShaderCacheHashTable.cs GPU: Eliminate CB0 accesses when storage buffer accesses are resolved (#3847) 2022-11-17 18:47:41 +01:00
GpuAccessor.cs Vulkan: Add workarounds for MoltenVK (#4202) 2023-01-13 01:31:21 +01:00
GpuAccessorBase.cs Move gl_Layer to vertex shader if geometry is not supported (#4368) 2023-02-25 10:39:51 +00:00
GpuAccessorState.cs New shader cache implementation (#3194) 2022-04-10 10:49:44 -03:00
GpuChannelComputeState.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
GpuChannelGraphicsState.cs Vulkan: Add workarounds for MoltenVK (#4202) 2023-01-13 01:31:21 +01:00
GpuChannelPoolState.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
ResourceCounts.cs New shader cache implementation (#3194) 2022-04-10 10:49:44 -03:00
ShaderAddresses.cs New shader cache implementation (#3194) 2022-04-10 10:49:44 -03:00
ShaderCache.cs Move gl_Layer to vertex shader if geometry is not supported (#4368) 2023-02-25 10:39:51 +00:00
ShaderCacheHashTable.cs GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
ShaderCacheState.cs
ShaderCodeAccessor.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
ShaderDumper.cs Removed unused usings. (#3593) 2022-08-18 18:04:54 +02:00
ShaderDumpPaths.cs Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
ShaderSpecializationList.cs GPU: Use lazy checks for specialization state (#4004) 2022-12-04 18:41:17 +01:00
ShaderSpecializationState.cs Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
TransformFeedbackDescriptor.cs Rename ToSpan to AsSpan (#3556) 2022-08-11 18:07:37 -03:00