* - WritableRegion: enable wrapping IMemoryOwner<byte>
- IVirtualMemoryManager impls of GetWritableRegion() use pooled memory when region is non-contiguous.
- IVirtualMemoryManager: add GetReadOnlySequence() and impls
- ByteMemoryPool: add new method RentCopy()
- ByteMemoryPool: make class static, remove ctor and singleton field from earlier impl
* - BytesReadOnlySequenceSegment: move from Ryujinx.Common.Memory to Ryujinx.Memory
- BytesReadOnlySequenceSegment: add IsContiguousWith() and Replace() methods
- VirtualMemoryManagerBase:
- remove generic type parameters, instead use ulong for virtual addresses and nuint for host/physical addresses
- implement IWritableBlock
- add virtual GetReadOnlySequence() with coalescing of contiguous segments
- add virtual GetSpan()
- add virtual GetWritableRegion()
- add abstract IsMapped()
- add virtual MapForeign(ulong, nuint, ulong)
- add virtual Read<T>()
- add virtual Read(ulong, Span<byte>)
- add virtual ReadTracked<T>()
- add virtual SignalMemoryTracking()
- add virtual Write()
- add virtual Write<T>()
- add virtual WriteUntracked()
- add virtual WriteWithRedundancyCheck()
- VirtualMemoryManagerRefCountedBase: remove generic type parameters
- AddressSpaceManager: remove redundant methods, add required overrides
- HvMemoryManager: remove redundant methods, add required overrides, add overrides for _invalidAccessHandler handling
- MemoryManager: remove redundant methods, add required overrides, add overrides for _invalidAccessHandler handling
- MemoryManagerHostMapped: remove redundant methods, add required overrides, add overrides for _invalidAccessHandler handling
- NativeMemoryManager: add get properties for Pointer and Length
- throughout: removed invalid <inheritdoc/> comments
* - WritableRegion: enable wrapping IMemoryOwner<byte>
- IVirtualMemoryManager impls of GetWritableRegion() use pooled memory when region is non-contiguous.
- IVirtualMemoryManager: add GetReadOnlySequence() and impls
- ByteMemoryPool: add new method RentCopy()
- ByteMemoryPool: make class static, remove ctor and singleton field from earlier impl
* add PagedMemoryRange enumerator types, use them in IVirtualMemoryManager implementations to consolidate page-handling logic and add a new capability - the coalescing of pages for consolidating memory copies and segmentation.
* new: more tests for PagedMemoryRangeCoalescingEnumerator showing coalescing of contiguous segments
* make some struct properties readonly
* put braces around `foreach` bodies
* encourage inlining of some PagedMemoryRange*Enumerator members
* DynamicRingBuffer:
- use ByteMemoryPool
- make some methods return without locking when size/count argument = 0
- make generic Read<T>()/Write<T>() non-generic because its only usage is as T = byte
- change Read(byte[]...) to Read(Span<byte>...)
- change Write(byte[]...) to Write(Span<byte>...)
* change IAudioRenderer.RequestUpdate() to take a ReadOnlySequence<byte>, enabling zero-copy audio rendering
* HipcGenerator: support ReadOnlySequence<byte> as IPC method parameter
* change IAudioRenderer/AudioRenderer RequestUpdate* methods to take input as ReadOnlySequence<byte>
* MemoryManagerHostTracked: use rented memory when contiguous in `GetWritableRegion()`
* rebase cleanup
* dotnet format fixes
* format and comment fixes
* format long parameter list - take 2
* - add support to HipcGenerator for buffers of type `Memory<byte>`
- change `AudioRenderer` `RequestUpdate()` and `RequestUpdateAuto()` to use Memory<byte> for output buffers, removing another memory block allocation/copy
* SplitterContext `UpdateState()` and `UpdateData()` smooth out advance/rewind logic, only rewind if magic is invalid
* DynamicRingBuffer.Write(): change Span<byte> to ReadOnlySpan<byte>
* HipcGenerator: skip do-nothing call to MemoryMarshal.Cast<byte, byte>() in generated code
* HipcGenerator: fix method name typos
* HipcGenerator: make generated methods use stackalloc for `isBufferMapAlias` bool array
* HipcGenerator: make generated GetCommandHandlers() method return a FrozenDictionary<int, CommandHandler>
* HipcGenerator: return `FrozenDictionary<,>.Empty` when there are no command implementations, otherwise create `FrozenDictionary` from a `IEnumerable<KeyValuePair<,>>`` instead of a `Dictionary<,>``
* Add workflow to perform automated checks for PRs
* Downgrade Microsoft.CodeAnalysis to 4.4.0
This is a workaround to fix issues with dotnet-format.
See:
- https://github.com/dotnet/format/issues/1805
- https://github.com/dotnet/format/issues/1800
* Adjust editorconfig to be more compatible with Ryujinx code-style
* Adjust .editorconfig line endings to match .gitattributes
* Disable 'prefer switch expression' rule
* Remove naming styles
These are the default rules, so we don't need to override them.
* Silence IDE0060 in .editorconfig
* Slightly adjust .editorconfig
* Add lost workflow changes
* Move .editorconfig comment to the top
* .editorconfig: private static readonly fields should be _lowerCamelCase
* .editorconfig: Remove alignment for declarations as well
* editorconfig: Add rule for local constants
* Disable CA1822 for HLE services
* Disable CA1822 for ViewModels
Bindings won't work with static members, but this issue is silently ignored.
* Run dotnet format for the whole solution
* Check result code of SDL_GetDisplayBounds
* Fix dotnet format style issues
* Add missing trailing commas
* Update Microsoft.CodeAnalysis.CSharp to 4.6.0
Skipping 4.5.0 since it breaks dotnet format
* Restore old default naming rules for dotnet format
* Add naming rule exception for CPU tests
* checks: Include all files before excluding paths
* Fix dotnet format issues
* Check dotnet format version
* checks: Run dotnet format with severity info again
* checks: Disable naming style rules until they won't crash the process anymore
* Remove unread private member
* checks: Attempt to run analyzers 3 times before giving up
* checks: Enable naming style rules again with the new retry logic
* dotnet format style --severity info
Some changes were manually reverted.
* Address most dotnet format whitespace warnings
* Apply dotnet format whitespace formatting
A few of them have been manually reverted and the corresponding warning was silenced
* dotnet format whitespace after rebase