* Update audio renderer to REV13: Add support for compressor statistics and volume reset
* XML docs
* Disable stats reset
* Wrong comment
* Fix more XML docs
* PR feedback
Ryujinx was not hinting application name, so on some platforms (e.g.
Linux) volume control shows Ryujinx as 'SDL Application'. This can cause
confusion.
This commit fixes name in volume control applets on some platforms.
see: https://wiki.libsdl.org/SDL2/SDL_HINT_APP_NAME
* Add Texture Size Capacity and 8GB Dram Build
* Update AutoDeleteCache.cs
* Dynamic Texture Cache (WIP)
* Change to float Multiplier, in-case it needs fine-tuning.
* Delete src/src.sln
* Update AutoDeleteCache.cs
* Format
* Fix Formatting
* Add DefaultTextureSizeCapacity and MemoryScaleFactor
- Also remove redundant New Lines
* Fix 4GB dram crashing
* Format newline
* Refractor
- Added Initialize() function to TextureCache and AutoDeleteCache
- Removed GetMaxTextureCapacity() function and instead added _maxCacheMemoryUsage
- Added private const MaxTextureSizeCapacity to AutoDelete Cache
- Added TextureCache.Initialize() to MemoryManager in order to fetch MaxGpuMemory at the right time.
- Moved and Changed Logger.Info for Gpu Memory to Logger.Notice and Moved it to PrintGpuInformation function.
- Opted to use a ternary operator for the Initialize function, I think it looks cleaner than bunch of if statements.
* Update src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* maxMemory to CacheMemory, use Clamp instead of Ternary. Changed MinTextureCapacity 1GiB to 512 MiB
* Update src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Format comment
* comment context
* Increase TextureSize capacity for OpenGL back to 1024
- Added a new const ulong for OpenGLTextureSizeCapacity
* Fix changes from last commit.
* Adjust last OpenGL changes.
* Remove garbage VSC file
* Update src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Update src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Update src/Ryujinx.Graphics.Gpu/Image/AutoDeleteCache.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* refactor(perf): pass MemoryOwner<byte> around as itself rather than IMemoryOwner<byte>
* fix(perf): get span via MemoryOwner<byte>.Span property instead of through Memory property
* fix: incorrect comment change
* Allow creating texture aliases on texture pool
* Delete old image format override code
* New format incompatible alias
* Missing bounds check
* GetForBinding now takes FormatInfo
* Make FormatInfo struct more compact
This way exceptions thrown during the execution of CheckLaunchState()
will correctly invoke the unhandled exception handler
and cause Ryujinx to crash.
* Add area sampling scaler to allow for super-sampled anti-aliasing.
* Area scaling filter doesn't have a scaling level.
* Add further clarification to the tooltip on how to achieve supersampling.
* ShaderHelper: Merge the two CompileProgram functions.
* Convert tabs to spaces in area scaling shaders
* Fixup Vulkan and OpenGL project files.
* AreaScaling: Replace texture() by texelFetch() and use integer vectors.
No functional difference, but it cleans up the code a bit.
* AreaScaling: Delete unused sharpening level member.
Also rename _scale to _sharpeningLevel for clarity and consistency.
* AreaScaling: Delete unused scaleX/scaleY uniforms.
* AreaScaling: Force the alpha to 1 when storing the pixel.
* AreaScaling: Remove left-over sharpening buffer.
* Vulkan: Feedback loop improvements
This PR allows the Vulkan backend to detect attachment feedback loops. These are currently used in the following ways:
- Partial use of VK_EXT_attachment_feedback_loop_layout
- All renderable textures have AttachmentFeedbackLoopBitExt
- Compile pipelines with Color/DepthStencil feedback loop flags when present
- Support using FragmentBarrier for feedback loops (fixes regressions from https://github.com/Ryujinx/Ryujinx/pull/7012 )
TODO:
- AMD GPUs may need layout transitions for it to properly allow textures to be used in feedback loops.
- Use dynamic state for feedback loops. The background pipeline will always miss since feedback loop state isn't known on the GPU project.
- How is the barrier dependency flag used? (DXVK just ignores it, there's no vulkan validation...)
- Improve subpass dependencies to fix validation errors
* Mark field readonly
* Add feedback loop dynamic state
* fix: add MoltenVK resolver workaround
fix: add MoltenVK resolver workaround
* Formatting
* Fix more complaints
* RADV dcc workaround
* Use dynamic state properly, cleanup.
* Use aspects flags in more places
TryDequeue checks for _disposed before taking the lock. If another
thread calls Dispose before it takes the lock, it won't get woken up by
the PulseAll call, and will deadlock in Monitor.Wait.
Double-checking _disposed with the lock taken should avoid this.
While building I got some warnings, so I updated the dependency.
`warning NU1903: Package 'SixLabors.ImageSharp' 2.1.8 has a known high severity vulnerability, https://github.com/advisories/GHSA-63p8-c4ww-9cg7`
* Fix arbitrary sorting by "Favorite" in the UI by making it the same as sorting alphabetically while giving favorites priority.
* Use a more engineered solution rather than string hacks.
* Address code style warnings. Add null checking. Make title name comparison case insensitive.
* one more style fix
---------
Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
* refactor: replace usage of ByteMemoryPool with MemoryOwner<byte>
* refactor: delete unused ByteMemoryPool and ByteMemoryPool.ByteMemoryPoolBuffer types
* refactor: change IMemoryOwner<byte> return types to MemoryOwner<byte>
* fix(perf): get span via `MemoryOwner<T>.Span` directly instead of `MemoryOwner<T>.Memory.Span`
* fix(perf): get span via MemoryOwner<T>.Span directly instead of `MemoryOwner<T>.Memory.Span`
* fix(perf): get span via MemoryOwner<T>.Span directly instead of `MemoryOwner<T>.Memory.Span`
* optimization: Load application metadata only for applications with IDs
* Load applications when necessary
This prevents loading applications when launching an application
directly from the command line (or a shortcut).
Instead, applications will be loaded after the emulation was stopped by the user.
* Show the title in the configured language when launching an application
* Rename DesiredTitleLanguage to DesiredLanguage
* chore: replace `ByteMemoryPool` usage with `MemoryOwner<byte>`
* refactor: `PixelConverter.ConvertR4G4ToR4G4B4A4()` - rename old `outputSpan` to `outputSpanUInt16`, reuse same output `Span<byte>` as newly-freed name `outputSpan`
* eliminate temporary buffer allocations
* chore, perf: use MemoryOwner<byte> instead of IMemoryOwner<byte>
* Don't load files from hidden subdirectories
* Catch FileNotFoundException in TryGetApplicationsFromFile()
* Skip non-existent files and bad symlinks when loading applications
Vulkan spec states that input topology should always be PatchList when a tessellation pipeline is present. The AMD GPU on windows crashes so hard it BSODs the machine if this isn't the case, so it's forced here just in case.
I'm not sure what providing a different topology here would even do, as you'd think it would always be a patch list input.
This barrier has always been missing, but it only became apparent when #7012 merged.
I also added some barriers in case the target buffer used here is used by other commands, though right now it isn't.
Fixes a regression where water would turn white on AMD GPUs with the proprietary driver. May fix other issues on this driver.
* Fix checking for the wrong update metadata file
* Apply the same fix for dlc.json
* Use the base application ids for updates and DLCs in the GUI too
This shouldn't actually change anything, since the program index part of the application id
should always be 0 for all applications currently seen by the GUI.
This was just done for completeness.
* More guarantees for buffer correct placement, defer guest requested buffers
* Split RP on indirect barrier rn
* Better handling for feedback loops.
* Qualcomm barriers suck too
* Fix condition
* Remove unused field
* Allow render pass barriers on turnip for now
* Add default values to ApplicationData directly
* Refactor application loading
It should now be possible to load multi game XCIs.
Included updates won't be detected for now.
Opening a game from the command line currently only opens the first one.
* Only include program NCAs where at least one tuple item is not null
* Get application data by title id and add programIndex check back
* Refactor application loading again and remove duplicate code
* Actually use patch ncas for updates
* Fix number of applications found with multi game xcis
* Don't load bundled updates from multi game xcis
* Change ApplicationData.TitleId type to ulong & Add TitleIdString property
* Use cnmt files and ContentCollection to load programs
* Ava: Add updates and DLCs from gamecarts
* Get the cnmt file from its NCA
* Ava: Identify bundled updates in updater window
* Fix the (hopefully) last few bugs
* Add idOffset parameter to GetNcaByType
* Handle missing file for dlc.json
* Ava: Shorten error message for invalid files
* Gtk: Add additional string for bundled updates in TitleUpdateWindow
* Hopefully fix DLC issues
* Apply formatting
* Finally fix DLC issues
* Adjust property names and fileSize field
* Read the correct update file
* Fix wrong casing for application id strings
* Rename TitleId to ApplicationId
* Address review comments
* Apply suggestions from code review
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Gracefully fail when loading pfs for update and dlc window
* Fix applications with multiple programs
* Fix DLCWindow crash on GTK
* Fix some GUI issues
* Remove IsXci again
* Don't add duplicates to update/dlc windows
* Avoid double lookup
* Preserve DLC enabled state for bundled DLCs
* Fix DLCWindow not opening using GTK
* Fix missing information when loading applications from file
* Address review feedback
Rename ContentCollection to ContentMetaData
Fix casing issues in log messages
Use null as the default value for updatePath
* Fix re-adding bundled DLCs every time
* Fix bundled DLCs disappearing
* Abstract common code to open application pfs
* Remove unused imports
* Fix file exists check when loading DLCs
* Load bundled DLCs only using dlc.json
* Load AoC items correctly
* Add all DLCs from a PFS
* Add argument to launch a specific application id
* Use application-id argument for shortcuts if necessary
* Return the application id from the control NCA if possible
* GetApplicationInformation: Don't overwrite application ids
Move SaveDataOwnerId check to the top, since it seems to be more reliable.
* Get application ids from CNMT again
This commit reverts some parts of 61615b8f0d6f90ae86778958ddc38eaf6dc280ab.
Since the issue wasn't actually related to the application id in CMNTs, we can remove the wrong assumptions.
* Revert erroneous axaml change from adca8900
* Rename title to application
* Wrap nsp/pfs0 case with curly braces
* Check if _applicationData.ControlHolder.ByteSpan is zeros only once
* Catch exceptions while loading applications from nsps
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Rebased
Transformation all at once
Use SkiaSharp instead of ImageSharp
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Change back unintentionally changed comment
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
* Do not use template updates for buffer textures and buffer images
* No need to do it for images
* Simply buffer texture existence check
* Pipeline is now unused on DescriptorSetUpdater
* Fix some validation errors
* Whitespace correction
* Resolve some runtime validation errors.
* Whitespace
* Properly fix usage realted validation error by setting Extended Usage image creation flag.
* Only if supported
* Remove checking extension for features that are core functionality of Vulkan 1.2
* Ensure descriptor sets are only re-used when all command buffers using it have completed
* Fix some SPIR-V capabilities
* Set update after bind flag if we exceed limits
* Simpler fix for Intel
* Format whitespace
* Make struct readonly
* Add barriers for extra set arrays too
* Dynamic state for Depth Bounds should not be passed to PipelineDynamicStateCreateInfo as the command to set them is never called.
Do not pass pointer to viewport and scissor as those dynamic states should be supported on all devices.
Same as above for DepthBias values.
* Code Review Suggestion
* Pipeline derivation is not implemented and is not suggested.
* Depth Bounds are not used.
* feat: add new types MemoryOwner and SpanOwner
* use SpanOwner instead of new array allocation
* change for loop condition to `fences.Length` instead of `count` to elide Span boundary checks on `fences`
* Key textures using set and binding (rather than just binding)
* Extend full bindless to cover cases with phi nodes
* Log error on bindless access failure
* Shader cache version bump
* Remove constant buffer match to reduce the chances of full bindless triggering
* Re-enable it for constant buffers, paper mario does actually need it
* Format whitespace
* Report base and extra sets from the backend
* Pass texture set index everywhere
* Key textures using set and binding (rather than just binding)
* Start using extra sets for array textures
* Shader cache version bump
* Separate new commands, some PR feedback
* Introduce new manual descriptor set reservation method that prevents it from being used by something else while owned by an array
* Move bind extra sets logic to new method
* Should only use separate array is MaximumExtraSets is not zero
* Format whitespace
* intel workaround
built on top of the amd workaround
* forgot to update the note
* Logic Change
Enabled workaround for all vendors that aren't nvidia
* Applied Suggestions
* Kernel: Wake cores from idle directly rather than through a host thread
Right now when a core enters an idle state, leaving that idle state requires us to first signal the core's idle thread, which then signals the correct thread that we want to run on the core. This means that in a lot of cases, we're paying double for a thread to be woken from an idle state.
This PR moves this process to happen on the thread that is waking others out of idle, instead of an idle thread that needs to be woken first.
For compatibility the process has been kept as similar as possible - the process for IdleThreadLoop has been migrated to TryLeaveIdle, and is gated by a condition variable that lets it run only once at a time for each core. A core is only considered for wake from idle if idle is both active and has been signalled - the signal is consumed and the active state is cleared when the core leaves idle.
Dummy threads (just the idle thread at the moment) have been changed to have no host thread, as the work is now done by threads entering idle and signalling out of it.
This could put a bit of extra work on threads that would have triggered `_idleInterruptEvent` before, but I'd expect less work than signalling all those reset events and the OS overhead that follows. Worst case is that other threads performing these signals at the same time will have to wait for each other, but it's still going to be a very short amount of time.
Improvements are best seen in games with heavy (or very misguided) multithreading, such as Pokemon: Legends Arceus. Improvements are expected in Scarlet/Violet and TOTK, but are harder to measure.
Testing on Linux/MacOS still to be done, definitely need to test more games as this affects all of them (obviously) and any issues might be rare to encounter.
* Remove _idleThread entirely
* Use spinwait so we don't completely blast the CPU with cmpxchg
* Didn't I already do this
* Cleanup
* Implementing new features in the latest Concentus library - span-in, span-out Opus decoding (so we don't have to make temporary buffer copies), returning a more precise error code from the decoder, and automatically linking the native opus library with P/invoke if supported on the current system
* Remove stub log messages and commit package upgrade to 2.1.0
* use more correct disposal pattern
* Bump to Concentus 2.1.1
* Bump to Concentus 2.1.2
* Don't bother pulling in native opus binaries from Concentus package (using ExcludeAssets).
* Fix opus MS channel count. Explicitly disable native lib probe in OpusCodecFactory.
* Bump to package 2.2.0 which has split out the native libs, as suggested.
---------
Co-authored-by: Logan Stromberg <lostromb@microsoft.com>
* GPU: Migrate buffers on GPU project, pre-emptively flush device local mappings
Essentially retreading #4540, but it's on the GPU project now instead of the backend. This allows us to have a lot more control + knowledge of where the buffer backing has been changed and allows us to pre-emptively flush pages to host memory for quicker readback. It will allow us to do other stuff in the future, but we'll get there when we get there.
Performance greatly improved in Hyrule Warriors: Age of Calamity. Performance notably improved in TOTK (average). Performance for BOTW restored to how it was before #4911, perhaps a bit better.
- Rewrites a bunch of buffer migration stuff. Might want to tighten up how dispose stuff works.
- Fixed an issue where the copy for texture pre-flush would happen _after_ the syncpoint.
TODO: remove a page from pre-flush if it isn't flushed after a certain number of copies.
* Add copy deactivation
* Fix dependent virtual buffers
* Remove logging
* Fix format issues (maybe)
* Vulkan: Remove backing swap
* Add explicit memory access types for most buffers
* Fix typo
* Add device local force expiry, change buffer inheritance behaviour
* General cleanup, OGL fix
* BufferPreFlush comments
* BufferBackingState comments
* Add an extra precaution to BufferMigration
This is very unlikely, but it's important to cover loose ends like this.
* Address some feedback
* Docs
* Block input updates while swkbd is open in foreground mode
* Flush internal driver state before unblocking input updates
* Rename Flush to Clear and remove unnecessary attribute
* Clear the driver state only if the GamepadDriver isn't null
* Update audio renderer to REV12: Add support for splitter biquad filter
* Formatting
* Official names
* Update BiquadFilterState size + other fixes
* Update tests
* Update comment for version 2
* Size test for SplitterDestinationVersion2
* Should use Volume1 if no ramp
* Block input updates while swkbd is open in foreground mode
* Flush internal driver state before unblocking input updates
* Rename Flush to Clear and remove unnecessary attribute
* Add "Follow OS theme" option
* Update App.axaml.cs
* Add "Follow OS theme" option
* Update App.axaml.cs
* Remove `this`
* Remove annotation for nullable reference
* Change into switch expression to make it concise
* Change comments to XML docs
* Update en_US.json
* Fix icons in About dialog do not response to "auto" theme
The theme icons seemingly use Dark variant event when the OS theme is light. In addition, I added ThemeManager common to make it accessible for both App and AboutWindow
* Newline at the end
* newline moment
* Update ThemeManager.cs
* bait to switch to lf
* change to lf
* temp. revert
* Add back ThemeManager.cs common, pls pass the format check
* I found the mistake: should have put `ThemeManager.OnThemeChanged();` in try block
Finally solve the formatting check
* test formatting
* Update App.axaml.cs
* Ok i seem to forget to add version lol
* Fix info CA1816
* Truncate game title and details if they exceed DiscordRPC limit.
* Update implementation to a byte total check.
* Track if the string has actually been modified correctly.
* Allow an early function return and simplify logic.
* Better handling of large input strings and minimise loop opportunities.
* Remove unused using.
* Update to `applicationName` over `titleName`.
* Add files via upload
* Update IHidServer.cs
mistakes...
* format
how do i do it
* Update src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs
Co-authored-by: Agatem <agaatem@outlook.com>
* Update src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs
Co-authored-by: Agatem <agaatem@outlook.com>
* bruh
* Apply suggestions from code review
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* use readuint32 instead
* second thought
* i hope it works
thanks someone higher up with the same thing
* pid
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* styles i think
* Apply suggestions from code review
Co-authored-by: makigumo <makigumo@users.noreply.github.com>
---------
Co-authored-by: Agatem <agaatem@outlook.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: makigumo <makigumo@users.noreply.github.com>
* Do not save window dimensions when maximized.
* Implement option to disable window size/position memory.
* Remove logging statements
* Implement menubar items for common window sizes.
* formatting fixes
* Set 720p window as a composite value.
* Remove unused using
* Fix exception paramter.
* Force restore window when a size change is requested
* Fix some resizing bugs.
* [Ava]: Fix Cursor States On Windows
It's been sometime since the last PR #5415 was made and last time i was waiting for Ava 11 to be merged before re-writing the code and along the way forgot about the PR.
Anyway this PR supersedes both #5288 and #5415, and fixes issue: #5136
* Now, the bounds for which the cursor should be detected in renderer should be accurate to any scaling / resolution, taking into account the status and the menu bar. ( This issue was partially resolved by #6450 )
* Reduced the number of times the cursor updates from per frame update to updating only when the cursor state needs to be changed.
* Fixed the issue wherein you weren't able to resize the window, because of the cursor passthrough which caused the cursor to reset from the reset icon or flicker.
* Fixed the issue caused by #6450 which caused the cursor to disappear over the submenus while cursor was set to always hide.
* Changed the cursor state to not disappear while the game is being loaded. ( Needs Feedback ).
* Removed an unused library import.
* PR feedback
* Fix excessive line breaks and whitespaces and other feedback
* Add a check before calculating cursor idle time, such that it calculates only while the cursor mode is OnIdle.
* PR Feedback
* Rework the cursor state check code block
Co-Authored-By: gdkchan <5624669+gdkchan@users.noreply.github.com>
* PR Feedback
* A simpler version of the previous implementation.
Co-Authored-By: gdkchan <5624669+gdkchan@users.noreply.github.com>
* PR Feedback
* PR Feedback
---------
Co-authored-by: gdkchan <5624669+gdkchan@users.noreply.github.com>
* Fix direct keyboard not working when connected with a controller
- Pass KeyboardDriver to NpadController.GetHLEKeyboardInput().
- Always fetch all keyboards if Direct Keyboard is turned on.
- Remove unnecessary return null.
* Get Keyboard Inputs outside of the controller loop.
- Moved GetHLEKeyboardInput outside of the controller loop.
- Made GetHLEKeyboardInput public static from public
* Removed extra newline
* Update src/Ryujinx.Input/HLE/NpadManager.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Update src/Ryujinx.Input/HLE/NpadController.cs
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
The delta position of the mouse should be the difference between the current and last position. Subtracting the last deltas doesn't really make sense.
Won't implement pointer lock for first person games, but might stop some super weird behaviour with the mouse values appearing totally random.
* Add support for bindless textures from shader input (vertex buffer)
* Shader cache version bump
* Format whitespace
* Remove cache entries on pool removal, disable for OpenGL
* PR feedback
* perf: use ByteMemoryPool
* feat: KPageTableBase/KPageTable new methods to read and write `ReadOnlySequence<byte>`
* new: add IWritableBlock.Write(ulong, ReadOnlySequence<byte>) with default impl
* perf: use GetReadOnlySequence() instead of GetSpan()
* perf: make `Parcel` IDisposable, use `ByteMemoryPool` for internal allocation, and make Parcel consumers dispose of it
* remove comment about copySize
* remove unnecessary Clear()
* rebase
* add methods Ryyjinx.Common EmbeddedResources and SteamUtils
* GAL changes - change SetData() methods and ThreadedTexture commands to use IMemoryOwner<byte> instead of SpanOrArray<byte>
* Ryujinx.Graphics.Texture: change texture conversion methods to return IMemoryOwner<byte> and allocate from ByteMemoryPool
* Ryujinx.Graphics.OpenGL: update ITexture and Texture-like types with SetData() methods to take IMemoryOwner<byte> instead of SpanOrArray<byte>
* Ryujinx.Graphics.Vulkan: update ITexture and Texture-like types with SetData() methods to take IMemoryOwner<byte> instead of SpanOrArray<byte>
* Ryujinx.Graphics.Gpu: update ITexture and Texture-like types with SetData() methods to take IMemoryOwner<byte> instead of SpanOrArray<byte>
* Remove now-unused SpanOrArray<T>
* post-rebase cleanup
* PixelConverter: remove unsafe modifier on safe methods, and remove one unnecessary cast
* use ByteMemoryPool.Rent() in GetWritableRegion() impls
* fix formatting, rename `ReadRentedMemory()` to `ReadFileToRentedMemory()``
* Texture.ConvertToHostCompatibleFormat(): dispose of `result` in Astc decode branch
* Add support for large sampler arrays on Vulkan
* Shader cache version bump
* Format whitespace
* Move DescriptorSetManager to PipelineLayoutCacheEntry to allow different pool sizes per layout
* Handle array textures with different types on the same buffer
* Somewhat better caching system
* Avoid useless buffer data modification checks
* Move redundant bindings update checking to the backend
* Fix an issue where texture arrays would get the same bindings across stages on Vulkan
* Backport some fixes from part 2
* Fix typo
* PR feedback
* Format whitespace
* Add some missing XML docs
* - 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>
* Delete old 16KB page workarounds
* Rename Supports4KBPage to UsesPrivateAllocations
* Format whitespace
* This one should be false too
* Update XML doc
* ts: Migrate service to Horizon project
This PR migrate the `ts` service (stored in `ptm`) to the Horizon project:
- It stubs all known IPCs.
- IpcServer consts are checked by RE.
Closes#6480
* Fix args
* Add host tracked memory manager mode
* Skipping flush is no longer needed
* Formatting + revert unrelated change
* LightningJit: Ensure that dest register is saved for load ops that do partial updates
* avoid allocations when doing address space lookup
Add missing improvement
* IsRmwMemory -> IsPartialRegisterUpdateMemory
* Ensure we iterate all private allocations in range
* PR feedback and potential fixes
* Simplified bridges a lot
* Skip calling SignalMappingChanged if Guest is true
* Late map bridge too
* Force address masking for prefetch instructions
* Reprotection for bridges
* Move partition list validation to separate debug method
* Move host tracked related classes to HostTracked folder
* New HostTracked namespace
* Move host tracked modes to the end of enum to avoid PPTC invalidation
---------
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
* Move some init logic out of PrintGpuInformation, then delete it
* Disable push descriptors for Intel ARC on Windows
* Re-add PrintGpuInformation just to show it in the log
AMD GPUs (possibly just RDNA 3) could hang with the previous value
until the MaxQueryRetries was hit.
Fix#6056
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
* New translations en_us.json (French)
* New translations en_us.json (Spanish)
* New translations en_us.json (Arabic)
* New translations en_us.json (German)
* New translations en_us.json (Greek)
* New translations en_us.json (Hebrew)
* New translations en_us.json (Italian)
* New translations en_us.json (Japanese)
* New translations en_us.json (Korean)
* New translations en_us.json (Polish)
* New translations en_us.json (Russian)
* New translations en_us.json (Turkish)
* New translations en_us.json (Ukrainian)
* New translations en_us.json (Chinese Simplified)
* New translations en_us.json (Chinese Traditional)
* New translations en_us.json (Portuguese, Brazilian)
* New translations en_us.json (Thai)
* Add missing Thai language name
* Add new languages
* Enable RTL for Arabic
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This fixes a longstanding issue with resolution scale that could result in flickering graphics, typically the first frame something is drawn, or on camera cuts in cutscenes.
The root cause of the issue is that texture scale can be changed when binding textures or images. This typically happens because a texture becomes a view of a larger texture, such as a 400x225 texture becoming a view of a 800x450 texture with two levels. If the 400x225 texture is bound as a render target and has state [1x Undesired], but the storage texture is [2x Scaled], the render target texture's scale is changed to [2x Scaled] to match its new storage. This means the scale changed after the render target state was processed...
This can cause a number of issues. When render target state is processed, texture scales are examined and potentially changed so that they are all the same value. If one texture is scaled, all textures must be. If one texture is blacklisted from scaling, all of them must be. This results in a single resolution scale value being assigned to the TextureManager, which also scales the scissor and viewport values.
If the scale is chosen as 1x, and a later texture binding changes one of the textures to be 2x, the scale in TextureManager no longer matches all of the bound textures. What's worse, the scales in these textures could mismatch entirely. This typically results in the support buffer scale, viewport and scissor being wrong for at least one of the bound render targets.
This PR fixes the issue by re-evaluating render target state if any scale mismatches the expected scale after texture bindings happen. This can actually cause scale to change again, so it must loop back to perform texture bindings again. This can happen as many times as it needs to, but I don't expect it to happen more than once. Problematic bindings will just result in a blacklist, which will propagate to other bound targets.
* WIP: Separate guest/host tracking + unaligned protection
Allow memory manager to define support for single byte guest tracking
* Formatting
* Improve docs
* Properly handle cases where the address space bits are too low
* Address feedback
* - add new abstract class `VirtualMemoryManagerBase`
- rename `MemoryManagerBase` to `VirtualMemoryManagerRefCountedBase` and derive from `VirtualMemoryManagerBase`
- change `AddressSpaceManager`, `HvMemoryManager`, `MemoryManager`, and `MemoryManagerHostMapped` to implement abstract members and use the inherited `void VirtualMemoryManagerBase.Read(TVirtual va, Span<byte> data)` implementation.
* move property `AddressSpaceSize` up by the other properties
* nuget: bump SixLabors.ImageSharp from 1.0.4 to 2.1.3 (#3976)
* nuget: bump SixLabors.ImageSharp from 1.0.4 to 2.1.3
Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 1.0.4 to 2.1.3.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v1.0.4...v2.1.3)
---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update for 2.x changes
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mary <mary@mary.zone>
* Update SixLabors.ImageSharp to 2.1.7
This is the latest version we can update to without the license change.
* Update SixLabors.ImageSharp.Drawing to v1.0.0
This is the latest version we can update to without the license change.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mary <mary@mary.zone>
* LightningJit: Disable some cache ops and CTR_EL0 access on Windows Arm
* Format whitespace
* Delete unused code
* Fix typo
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
---------
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
* misc: Move Ryujinx project to Ryujinx.Gtk3
This breaks release CI for now but that's fine.
Signed-off-by: Mary Guillemard <mary@mary.zone>
* misc: Move Ryujinx.Ava project to Ryujinx
This breaks CI for now, but it's fine.
Signed-off-by: Mary Guillemard <mary@mary.zone>
* infra: Make Avalonia the default UI
Should fix CI after the previous changes.
GTK3 isn't build by the release job anymore, only by PR CI.
This also ensure that the test-ava update package is still generated to
allow update from the old testing channel.
Signed-off-by: Mary Guillemard <mary@mary.zone>
* Fix missing copy in create_app_bundle.sh
Signed-off-by: Mary Guillemard <mary@mary.zone>
* Fix syntax error
Signed-off-by: Mary Guillemard <mary@mary.zone>
---------
Signed-off-by: Mary Guillemard <mary@mary.zone>
* 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<,>``
* OpenGL: Mask out all color outputs with no fragment shader
This appears to match Vulkan's behaviour, which is needed for stencil shadows in Penny's Big Breakaway. It's far from the only issue, you can try the Full Bindless PR if you want to see it in a more intact state.
* Remove unused member
* Implement virtual buffer copies
* Introduce TranslateAndCreateMultiBuffersPhysicalOnly, use it for copy and clear
* Rename VirtualBufferCache to VirtualRangeCache
* Fix potential issue where virtual range could exist in the cache, without a physical buffer
* Fix bug that could cause copy with negative size on CopyToDependantVirtualBuffer
* Remove virtual copy back for SyncAction
* GetData XML docs
* Make field readonly
* Fix virtual buffer modification tracking
* Remove CopyFromDependantVirtualBuffers from ExternalFlush
* Move things around a little to avoid perf impact
- Inline null check for CopyFromDependantVirtualBuffers
- Remove extra method call for SynchronizeMemoryWithVirtualCopyBack, prefer calling CopyFromDependantVirtualBuffers separately
* Fix up XML doc
---------
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Disables push descriptors on older NVIDIA GPUs (10xx and below), since it is clearly broken beyond comprehension. The existing workaround wasn't good enough and a more thorough one will probably cost more performance than the feature gains. The workaround has been removed.
Fixes#6331.
If more than 16 barriers were queued at one time, the _queuedBarrierCount would no longer match the number of remaining barriers, because when breaking out of the loop consuming them it deleted all barriers, not just the 16 that were consumed.
Should fix freezes that started occurring with #6240. Fixes issue #6338.
Enable input focus proxy, makes WM_TAKE_FOCUS capability to be exposed.
This fix menu on gamescope, for real this time....
Signed-off-by: Mary Guillemard <mary@mary.zone>
* WIP barrier batch
* Add store op to image usage barrier
* Dispose the barrier batch
* Fix encoding?
* Handle read and write on the load op barrier.
Load op consumes read accesses but does not add one, as the only other operation that can read is another load.
* Simplify null check
* Insert barriers on program change in case stale bindings are reintroduced
* Not sure how I messed this one up
* Improve location of bindings barrier update
This is also important for emergency deferred clear
* Update src/Ryujinx.Graphics.Vulkan/BarrierBatch.cs
Co-authored-by: Mary Guillemard <thog@protonmail.com>
---------
Co-authored-by: Mary Guillemard <thog@protonmail.com>
* Fix Push Descriptors
* Use push descriptor templates
* Use reserved bindings
* Formatting
* Disable when using MVK
("my heart will go on" starts playing as thousands of mac users shed a tear in unison)
* Introduce limit on push descriptor binding number
The bitmask used for updating push descriptors is ulong, so only 64 bindings can be tracked for now.
* Address feedback
* Fix logic for binding rejection
Should only offset limit when reserved bindings are less than the requested one.
* Workaround pascal and older nv bug
* Add GPU number detection for nvidia
* Only do workaround if it's valid to do so.
* macOS: Stop storing user data in Documents for some users; fix symlinks
* Use SupportedOSPlatform tag, catch exceptions, log warning instead of error
* Provide best path hints to user if symlink fixup fails
---------
Co-authored-by: jcm <butt@butts.com>
* Update About Window like requested in PR #6267
* Feedback
* Apply suggestions from code review
Co-authored-by: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com>
* Fix indents
---------
Co-authored-by: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com>
* Add missing RID exclusions for linux-arm64
Signed-off-by: Mary Guillemard <mary@mary.zone>
* Remove libsoundio.so from linux-arm64 deployment
This is a x86_64 library.
Signed-off-by: Mary Guillemard <mary@mary.zone>
---------
Signed-off-by: Mary Guillemard <mary@mary.zone>
* ci: Enable Linux ARM64 on build and release
Signed-off-by: Mary <mary@mary.zone>
* Address gdkchan comment
Signed-off-by: Mary <mary@mary.zone>
---------
Signed-off-by: Mary <mary@mary.zone>
Previously we were only doing it for Vulkan, but it turns out that
not setting it when PROGRAM_POINT_SIZE is set is considered UB
on OpenGL Core.
Signed-off-by: Mary <mary@mary.zone>
This makes IOpenGLContext.HasContext not static and be implementable.
By doing this, we can support more than WGL and WGL.
This also allows the SDL2 headless version to run under Wayland.
Signed-off-by: Mary <mary@mary.zone>
* Write/read guest state to context for sync points, stop reserving stack for them
* Fix UsedGprsMask not being updated when allocating with preferencing
* POP should be also considered a return
* Switch from using Flex panel to a Wrap panel for Grid view. This allows keyboard navigation.
* Stop using Flex panel in favor of Avalonia Wrap Panel.
* Redact usernames from logs
* Changed internal vars to private and applied naming rules
* Use Directory.GetParent() instead of DirectoryInfo
* Update src/Ryujinx.Common/Logging/Logger.cs
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* AccountService: Cache token data
This method appears to indicate that the token returned should be cached. I've made it so that it generates a token that lasts until its expiration time, and reuses it on subsequent calls.
* Private naming convention
* Vulkan: Add Render Pass / Framebuffer Cache
Cache is owned by each texture view.
- Window's way of getting framebuffer cache for swapchain images is really messy - it creates a TextureView out of just a vk image view, with invalid info and no storage.
* Clear up limited use of alternate TextureView constructor
* Formatting and messages
* More formatting and messages
I apologize for `_colorsCanonical[index]?.Storage?.InsertReadToWriteBarrier`, the compiler made me do it
* Self review, change GetFramebuffer to GetPassAndFramebuffer
* Avoid allocations on Remove for HashTableSlim
* Member can be readonly
* Generate texture create info for swapchain images
* Improve hashcode
* Remove format, samples, size and isDepthStencil when possible
Tested in a number of games, seems fine.
* Removed load op barriers
These can be introduced later.
* Reintroduce UpdateModifications
Technically meant to be replaced by load op stuff.
* Cpu: Implement Vpadal and Vrintr instructions
This PR superseed last instructions left in #2242.
Since I'm not a CPU guy I've just ported the code and nothing more.
Please be precise during review if there are some changes to be done.
It should fixes#1781
Co-Authored-By: Piyachet Kanda <piyachetk@gmail.com>
* Addresses gdkchan's feedback
* Addresses gdkchan's feedback 2
* Apply suggestions from code review
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* another fix
* Update InstEmitSimdHelper32.cs
* Correct fix
* Addresses gdkchan's feedback
* Update CpuTestSimdCvt32.cs
---------
Co-authored-by: Piyachet Kanda <piyachetk@gmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Updates `Avalonia.Svg` from 11.0.0.10 to 11.0.0.13
Updates `Avalonia.Svg.Skia` from 11.0.0.10 to 11.0.0.13
And reflect update changes as dependabot can't do it.
Superseed #6209
* Migrate friends service to new IPC
* Add a note that the pointer buffer size and domain counts are wrong
* Wrong length
* Format whitespace
* PR feedback
* Fill in structs from PR feedback
* Missed that one
* Somehow forgot to save that one
* Fill in enums from PR review
* Language enum, NotificationTime
* Format whitespace
* Fix the warning
* Remove GetBaseApplicationDirectory() & Move logs directory to user base path
We should assume the application directory might be write-protected.
* Use Ryujinx.sh in Ryujinx.desktop
This desktop file isn't really used right now,
so this changes effectively nothing.
* Use properties in ReleaseInformation.cs and add ConfigName property
* Configure config filename in Github workflows
* Add a separate config step for macOS
Because they use BSD sed instead of GNU sed
* Keep log directory at the old location for dev environments
* Add FileSystemUtils since Directory.Move() doesn't work across filesystems
Steal CopyDirectory code from https://learn.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories
* Fix "Open Logs folder" button pointing to the wrong directory
* Add execute permissions to Ryujinx.sh
* Fix missing newlines
* AppDataManager: Use FileSystemUtils.MoveDirectory()
* Make dotnet format happy
* Add a fallback for the logging directory
* Mod: Do LayeredFs loading Parallel to improve speed
This fixes and superseed #5672 due to inactivity, nothing more.
(See original PR for description)
Testing are welcome.
Close#5661
* Addresses gdkchan's feedback
* commit to test mako change
* Revert "commit to test mako change"
This reverts commit 8b0caa8a21.
* Adjust workflow paths to exclude all markdown files
* editorconfig: Add default charset and adjust indention for a few file types
* Reformat README.md and add a link to our documentation
* Add generic Mako workflow and remove old Mako steps
* editorconfig: Move charset change to a different PR
* Update compatibility stats
Co-authored-by: Ac_K <Acoustik666@gmail.com>
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Allow skipping draws with broken pipeline variants on Vulkan
* Move IsLinked check to CreatePipeline
* Restore throw on error behaviour for background compile
* Can't remove SetAlphaTest pragmas yet
* Double new line
* Fs: Log when Commit fails due to PathAlreadyInUse
This fixes and superseed #5418, nothing more.
(See original PR for description)
Co-Authored-By: James R T <jamestiotio@gmail.com>
* Update IFileSystem.cs
---------
Co-authored-by: James R T <jamestiotio@gmail.com>
* Replace vendor id lookup with driver name
* Create separate field for driver name, handle OpenGL
* Document changes in VulkanPhysicalDevice.cs
* Always display driver over vendor
* Replace Vulkan 1.2 requirement with VK_KHR_driver_properties
* Remove empty line
* Remove redundant unsafe block
* Apply suggestions from code review
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* ssl: Retrieve remote hostnames if the provided hostname is empty
This avoids crashing with an AuthenticationException.
* ssl: Remove unused variable from RetrieveHostName
* Vulkan: Use staging buffer for temporary constants
Helper shaders and post processing effects typically need some parameters to tell them what to do, which we pass via constant buffers that are created and destroyed each time.
This can vary in cost between different Vulkan drivers. It shows up on profiles on mesa and MoltenVK, so it's worth avoiding. Some games only do it once (BlitColor for present), others multiple times. It's also done for post processing filters and FSR upscaling, which creates two buffers.
For mirrors, I added the ability to reserve a range on the staging buffer for use as any type of binding. This PR allows these constant buffers to be instead temporarily allocated on the staging buffer, skipping allocation and buffer management costs entirely.
Two temporary allocations do remain:
- DrawTexture, because it doesn't have access to the command buffer scope
- Index buffer indirect conversion, because one of them is a storage buffer and thus is a little more complicated.
There's a small cost in that the uniform buffer takes up more space due to alignment requirements. At worst that's 256 bytes (on a GTX 1070) but more modern GPUs should have a better time.
Worth testing across different games and post effects to make sure they still work.
* Use temporary buffer for ConvertIndexBufferIndirect
* Simplify alignment passing for now
* Fix shader params length for CopyIncompatibleFormats
* Set data for helpershaders without overlap checks
The data is in the staging buffer, so its usage range is guarded using that.
Turns out that ElementAt for Queue<T> runs the default implementation as it doesn't implement IList, which enumerates elements of the queue up to the given index. This code was creating `count` enumerators and iterating way more queue items than it needed to at higher counts. The solution is just to use one enumerator and break out of the loop when we get the count that we need.
3.5% of backend time was being spent _just_ enumerating at the usual spot in SMO.
* Fix architecture preference for MacOS game shortcuts
* Detect arch and then pass it to script
Co-authored-by: jcm <john.moody@coloradocollege.edu>
* Remove old script write call in `CreateShortcutMacos`
* Turn launch script into EmbeddedResource
* Added final newline
---------
Co-authored-by: jcm <john.moody@coloradocollege.edu>
* Add a separate device memory manager
* Still need this
* Device writes are always tracked
* Device writes are always tracked (2)
* Rename more instances of gmm to mm
* Input: Improve controller identification
Controllers were identified before by a combination of their _global_ index in the list of controllers and their GUID. The problem is, disconnecting and reconnecting a controller can change its global index; the controller can appear at the end. This would give it another ID, and the controller would need to be reconfigured.
This happened to me a lot with a switch pro controller and a USB game controller, it was essentially random which appeared first. Now, it consistently detects them.
This PR changes the controller identification to be a combination of an index of controllers with the same GUID (generally 0), and its GUID. It also reworks managing the list of controllers to properly consider instance IDs.
This also changes the NpadManager to attempt to reuse old controllers when refreshing input configuration, which can prevent input from going dead for seconds whenever a controller connects or disconnects (and the switch pro controller just entirely dying).
Testing with different controller types, OS and Avalonia is welcome. Remember that the target is connecting a ton of controllers, and pulling/reconnecting them.
* Remove double empty line
* Implement a new JIT for Arm devices
* Auto-format
* Make a lot of Assembler members read-only
* More read-only
* Fix more warnings
* ObjectDisposedException.ThrowIf
* New JIT cache for platforms that enforce W^X, currently unused
* Remove unused using
* Fix assert
* Pass memory manager type around
* Safe memory manager mode support + other improvements
* Actual safe memory manager mode masking support
* PR feedback
* Move most of signal handling to Ryujinx.Cpu project
* Format whitespace
* Remove unused member
* Format whitespace
* This does not need to be public anymore
This prevents a small allocation each time this method is called. This is a top 3 SOH allocation during gameplay in most games, and eliminating it is pretty free.
* Remove redundant code and fix small issues
* Log amiibo exceptions
* Add more checks when getting Amiibo data
* Fall back to online data if local file is inaccessible
* Make dotnet format happy
* Add Hebrew locale files to ItemGroups
* Align all windows RTL for testing
This should be controlled with a binding that selects the appropriate layout based on current language
* Update FlowDirection as Locale changes
* Fix Settings NavigationViewItem FlowDirection
* Fix remaining text
* Fix input menu directionality
* Fix RTL not rendering
* Fix rebase errors
* Local Amiibo.json should be used if connection failed
Currently Ryujinx is not loading any Amiibo if connection fails, even if the Amiibo.json exists.
This fix will use the local file and show a Dialog if connection fails.
* using local Amiibo.json & fixed Amiibo.json date comparison
Using local Amiibo.json when connection fails and comparison without milliseconds for LastModified that comes from https://amiibo.ryujinx.org/ and the local one (The JSON file has milliseconds on it, those will cause an error when comparing the date from the header because the header one doesn't has milliseconds on it). Both changes made for Avalonia UI.
* Fixed date comparison
Same date comparison fix, but made for normal UI (Not for AvaloniaUI).
This error can be prevented if the file in https://amiibo.ryujinx.org/ did not have the date with milliseconds.
* Securely trying to get a list of Amiibo (For normal UI)
* Securely trying to get a list of Amiibo (Change for AvaloniaUI)
* Date comparison reverted
* Apply suggestions from code review
* Use fallback amiibo.json if remote file is not valid (Normal UI)
* Use fallback amiibo.json if remote file is not valid (Avalonia UI)
* Code styles corrected.
* Code styles corrected in AmiiboWindowViewModel.
* Readded Ryujinx.Common.Logging using.
* Fixed using order.
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Pass MultiRange to BufferManager
* Implement support for multi-range buffers using Vulkan sparse mappings
* Use multi-range for remaining buffers, delete old methods
* Assume that more buffers are contiguous
* Dispose multi-range buffers after they are removed from the list
* Properly init BufferBounds for constant and storage buffers
* Do not try reading zero bytes data from an unmapped address on the shader cache + PR feedback
* Fix misaligned sparse buffer offsets
* Null check can be simplified
* PR feedback
* Improve indication of emulation being paused by the User
* Use localised for Paused
* Backup original title - PR comments fix
* Add common helper method to assemble App title
* feat: add nanosleep for linux and macos
* Add Windows 0.5ms sleep
- Imprecise waits for longer waits with clock alignment
- 1/4 the spin time on vsync timer
* Remove old experiment
* Fix event leak
* Tweaking for MacOS
* Linux tweaks, nanosleep vsync improvement
* Fix overbias
* Cleanup
* Fix realignment
* Add some docs and some cleanup
NanosleepPool needs more, Nanosleep has some benchmark code that needs removed.
* Rename "Microsleep" to "PreciseSleep"
Might have been confused with "microseconds", which no measurement is performed in.
* Remove nanosleep measurement
* Remove unused debug logging
* Nanosleep Pool Documentation
* More cleanup
* Whitespace
* Formatting
* Address Feedback
* Allow SleepUntilTimePoint to take EventWaitHandle
* Remove `_chrono` stopwatch in SurfaceFlinger
* Move spinwaiting logic to PreciseSleepHelper
Technically, these achieve different things, but having them here makes them easier to reuse or tune.
* Enable copy dependency between RGBA8 and RGBA32 formats
* Take packed flag into account for texture formats
* Account for widths not being a multiple of each other
* Don't try to alias depth textures as color, fix log condition
* PR feedback
This package seems to be required for triming now but isn't restored by default.
This changes the flatpak pusher to publish so we are sure that the package is in the cache.
Signed-off-by: Mary Guillemard <mary@mary.zone>
* Change TargetFramework to net8.0
* Disable info messages
* Fix warings
* Disable additional analyzer messages
* Fix typo
* Add whitespace
* Fix ref vs in warnings
* Use explicit [In] on array parameters
* No need to guard Remove with Contains
* Use 'ArgumentOutOfRangeException.ThrowIf...' instead of explicitly throwing a new exception instance
* Bump .NET SDK version
* Enable JsonSerializerIsReflectionEnabledByDefault
* Use 8.0.100 GA release
* Bump System package versions
---------
Co-authored-by: Zoltan Csizmadia <Zoltan.Csizmadia@vericast.com>
* Add default values to ApplicationData directly
* Refactor application loading
It should now be possible to load multi game XCIs.
Included updates won't be detected for now.
Opening a game from the command line currently only opens the first one.
* Only include program NCAs where at least one tuple item is not null
* Get application data by title id and add programIndex check back
* Refactor application loading again and remove duplicate code
* Actually use patch ncas for updates
* Fix number of applications found with multi game xcis
* Don't load bundled updates from multi game xcis
* Change ApplicationData.TitleId type to ulong & Add TitleIdString property
* Use cnmt files and ContentCollection to load programs
* Ava: Add updates and DLCs from gamecarts
* Get the cnmt file from its NCA
* Ava: Identify bundled updates in updater window
* Fix the (hopefully) last few bugs
* Add idOffset parameter to GetNcaByType
* Handle missing file for dlc.json
* Ava: Shorten error message for invalid files
* Gtk: Add additional string for bundled updates in TitleUpdateWindow
* Hopefully fix DLC issues
* Apply formatting
* Finally fix DLC issues
* Adjust property names and fileSize field
* Read the correct update file
* Fix wrong casing for application id strings
* Rename TitleId to ApplicationId
* Address review comments
* Fix formatting issues
* Apply suggestions from code review
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Gracefully fail when loading pfs for update and dlc window
* Fix applications with multiple programs
* Fix DLCWindow crash on GTK
* Fix some GUI issues
* Remove IsXci again
---------
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* remove duplicate basePath arg, add --fullscreen arg
* Changing FriendlyName to set "Ryujinx" text
* Fix GetArgsString using the base path
* Change desktop path to the Applications folder when creating shortcut on Mac
Co-authored-by: Nicko Anastassiu <134955950+nickoanastassiu@users.noreply.github.com>
* Move Create Shortcut button to top of context menu
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Co-authored-by: Nicko Anastassiu <134955950+nickoanastassiu@users.noreply.github.com>
* Implement reprotect method on virtual memory manager (currently stubbed)
* Force all exclusive memory accesses to be ordered on AppleHv
* Format whitespace
* Fix test build
* Fix comment copy/paste
* Fix wrong bit for isLoad
* Update src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
---------
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
* Fixed formatting/parsing issues with ApplicationData properties TimePlayed, LastPlayed, and FileSize
Replaced double-based TimePlayed property with TimeSpan?-based one in ApplicationData and ApplicationMetadata
Added a migration for TimePlayed, just like in #4861
Consolidated ApplicationData's FileSize* properties into one FileSize property
Added a formatting/parsing helper class ValueFormatUtils for TimeSpans, DateTimes, and file sizes
Added new value converters for TimeSpans and file sizes for the Avalonia UI
Added TimePlayedSortComparer
Fixed sort order in LastPlayedSortComparer
Fixed sort order for ApplicationData fields TimePlayed, LastPlayed, and FileSize
Fixed crashes caused by SortHelper
Replaced SystemInfo.ToMiBString with ToGiBString backed by ValueFormatUtils
Replaced SaveModel.GetSizeString() with ValueFormatUtils
* Additional ApplicationLibrary changes that got lost in the last commit
* Removed unneeded usings
* Removed converters as they are no longer needed
* Updated comment on FormatDateTime
* Removed base10 parameter from ValueFormatUtils
FormatFileSize now always returns base 2 values with base 10 units
Made ParseFileSize capable of parsing both base 2 and base 10 units
* Removed nullable attribute from TimePlayed property
Centralized TimePlayed update code into ApplicationMetadata
* Changed UpdateTimePlayed() to use TimeSpan logic
* Removed JsonIgnore attributes from ApplicationData
* Implemented requested format changes
* Fixed mistakes in method documentation comments
* Made it so the Last Played value "Never" is localized in the Avalonia UI
* Implemented suggestions
* Remove unused import
* Did a comment refinement pass in ValueFormatUtils.cs
* Reordered ValueFormatUtils methods and sorted them into #regions
* Integrated functionality from #5056
Also removed Logger print from last_played migration code
* Implemented suggestions
* Moved ValueFormatUtils and SystemInfo to namespace Ryujinx.Ui.Common
* common: Respect proper value format convention and use base10 by default
This could be discuss again in another issue/PR, for now revert to the previous behavior.
Signed-off-by: Mary Guillemard <mary@mary.zone>
---------
Signed-off-by: Mary Guillemard <mary@mary.zone>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Co-authored-by: Mary Guillemard <mary@mary.zone>
Added a KEvent for each ServerBase which signals whenever a session is added to the _sessions list, which allows it to rerun the ReplyAndReceive with the new session handle.
This greatly reduces the presence of ServerBase on profiles, especially of games that aren't particularly busy. It should also increase responsiveness when adding session objects, as it doesn't take at most 1ms for them to start working.
It also reduces the load on KTimeManager, which could allow it to spin less often. I have noticed that a bunch of games still do 1ms waits (they actually request a bit less than 1ms), so they still end up spinning to the next millisecond. Maybe for waits like this, it could attempt to nudge the timepoints to snap to each other when they're close enough, and also snap to whole millisecond waits when close enough.
* Add relevant files from private repo
Hopefully I didn't miss anything.
JsonHelper.cs is a debug only change
I only added line 810-812 in IUserLocalCommunicationService.cs
for the new Spacemeowx2Ldn case.
* Add a small README.md
just for fun
* Add note about NetCoreServer update to 5.1.0
* Fix a few issues
Fix usage of wrong broadcast address
Log warning if empty userstring was received
and don't add them to outNetworkInfo
* Add warning about incompatibility with public LDN version
* Add missing changes from old_master
* Adjust ldn_mitm for Ryujinx/Ryujinx#3805
* ldn: Adapt to changes from #4582
* ldn_mitm: First cleanup iteration
* ldn_mitm: Second cleanup iteration
* Credit spacemeowx2 in README.md
* Address first review comments by AcK
Adhere to Ryujinx coding style
Remove leftover log calls
Change category of a few log calls
Remove leftover debug notes
* Replace return type with void for methods always returning true
* Address first review comments by riperiperi
Purely stylistic changes:
- Adhere to naming style for internal fields
- Improve code formatting
* Throw InvalidOperationException when calling wrong ldn proxy methods
* Add missing newlines in LanDiscovery.Scan()
* Fix Linux not receiving broadcast packets
* Remove ILdnUdpSocket
It's very unlikely that we will ever need a udp client.
Thus we should simplify LanDiscovery initialization
and remove the parameter of InitUdp().
* ldn_mitm: Improve formatting
* fixup! Fix Linux not receiving broadcast packets
By opening the udp server on 'LocalBroadcastAddr'
Linux refused to answer packets going to LocalAddr.
So in order to fix this problem, Linux now opens two LdnProxyUdpServers.
* ldn_mitm: Fix assigning incorrect NodeIds
This just made connecting a lot more reliable! Thanks @riperiperi
* Fix node ids when leaving/joining
* Change NodeId behaviour to work like RyuLdn
* Change timing for accept and network info being reported.
* Wait for connection before sending anything.
* Remove ConnectAsync() from ILdnTcpSocket
* Only broadcast scan responses if we're hosting a network.
* Fix some filters, scan network duplication.
* Fix silly mistake
* Don't die on duplicates, just replace.
* Lock around node updates
These can happen from multiple threads.
* ldn_mitm: Fix namespaces for Types
Improve formatting
Add warning if compression failed
* Add quicker scan, forgetting networks that disappear.
* Always force a network sync when updating AdvertiseData
* Fix TCP frame size being too large for compressed frames
* Allow ldn_mitm to pass -1 id for room localcommunicationids.
* ldn_mitm: Match server socket options
* ldn_mitm: Use correct socket options
* ldn_mitm: Remove TCP broadcast socket options
* config: Rename Spacemeowx2Ldn to LdnMitm
* ldn_mitm: Generate random fake SSID
* ldn_mitm: Adjust logging statements/levels
* ldn_mitm: Add missing Stop() call for udp2
* ldn_mitm: Adjust formatting
* ldn_mitm: Add stub comments and adjust existing ones
* ldn: Add LdnConst class & set tx/rx buffer sizes correctly
* Move LdnConst out of UserServiceCreator
Replace a few values with LdnConsts
* ldn: Adjust namespaces and client names
* ldn_mitm: Adjust formatting
* ldn: Rename RyuLdn to LdnRyu
* Replace LanProtocol.Read() refs with scoped refs
* Add MIT license for ldn_mitm
* Clarify that network interface is also used for LDN
Although it's currently only used by ldn_mitm,
it would probably be more confusing to exclude RyuLdn there.
* Fix giving a station node id 0
* Update Nuget packages
* Remove LdnHelper
* Add update functions for EnableInternetAccess setting
* ldn: Log MultiplayerMode and DisableP2P
* ldn: Adjust namespaces
* Apply formatting
* Conform to Ryujinx code style
* Remove ldn_mitm from THIRDPARTY.md
It shouldn't have been there in the first place.
* Improve formatting
---------
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Update to LibHac v0.19.0
- PartitionFileSystem classes now fully match Nintendo's implementation. Current code creating a PartitionFileSystem now need to use the Initialize method.
- Implementing nn::gcsrv and nn::sdmmcsrv now means the FS server now uses that abstraction instead of the old one where we passed in an IDeviceOperator.
* Add GetFileSystemAttribute
* So much boilerplate
* Slow and steady
* Restructure + Ack suggestions
* Restructure + Ack suggestions
* Restructure
* Clean
* Propogate those fields i forgot about
* It builds
* Progress
* Almost there
* Fix stupid mistake
* Fix more stupid mistakes
* Actually fix fuck ups
* Start localising
* r/therestofthefuckingowl
* Localise ButtonKeyAssigner
* Are you feeling it now mr krabs
* We’re done at last
* Crimes against code
* Try me in the Hague
* Please be quiet
* Crimes are here to stay
* Dispose stuff
* Cleanup a couple things
* Visual fixes and improvements
One weird bug
* Fix rebase errors
* Fixes
* Ack Suggestions
Remaining ack suggestions
Update src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Update src/Ryujinx.Ava/UI/Models/Input/ControllerInputConfig.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Formatting and error
More Ava 11-ness
Whoops
* Code style fixes
* Style fixes
* Analyzer fix
* Remove all ReflectionBindings
* Remove ambigious object
* Remove redundant property
* Old man yells at formatter
* r e a d o n l y
* Fix profiles
* Use new Sliders
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Added basic implementation for shortcut creation
Currently bitmaps (.bmp) are used as the source file, colours are good (unlike .ico rn) but are scaled poorly on desktop.
* Icons display properly in shortcut
* code cleanup
* Moved shortcut logic to specific file, added Ava UI for shortcuts
* Added linux .desktop shortcut creation
* fixes to .shortcut data
* code issue fixes
* Added basic implementation for shortcut creation
Currently bitmaps (.bmp) are used as the source file, colours are good (unlike .ico rn) but are scaled poorly on desktop.
* Icons display properly in shortcut
* code cleanup
* Moved shortcut logic to specific file, added Ava UI for shortcuts
* Added linux .desktop shortcut creation
* fixes to .shortcut data
* code issue fixes
* added back shortcut to new contextmenu file
* Replaced COM reference with ComImport for shortcut functionality
* remove specific platform values and regions
* Move ShortcutHelper to Ryujinx.Ui.Common.Helpers
* Adjust styling and structure
* code feedback changes
* Added MacOS support using .app folder
* Added basic implementation for shortcut creation
Currently bitmaps (.bmp) are used as the source file, colours are good (unlike .ico rn) but are scaled poorly on desktop.
* Icons display properly in shortcut
* code cleanup
* Moved shortcut logic to specific file, added Ava UI for shortcuts
* Added linux .desktop shortcut creation
* fixes to .shortcut data
* code issue fixes
* Added basic implementation for shortcut creation
Currently bitmaps (.bmp) are used as the source file, colours are good (unlike .ico rn) but are scaled poorly on desktop.
* Icons display properly in shortcut
* code cleanup
* Moved shortcut logic to specific file, added Ava UI for shortcuts
* Added linux .desktop shortcut creation
* fixes to .shortcut data
* code issue fixes
* Replaced COM reference with ComImport for shortcut functionality
* remove specific platform values and regions
* Move ShortcutHelper to Ryujinx.Ui.Common.Helpers
* Adjust styling and structure
* code feedback changes
* adjust tooltip message
* added shortcut-template.desktop file
* set shortcut icon location to .local/share/icons
* Linux code feedback changes
* change InteropServices to new securifybv.ShellLink Package
* added ShellLink to readme, updated shortcut comment
* Code feedback changes
* Added MacOS Support (As per Jose Estrada's PR)
* dotnet format
* Small restructuring
* Embed template files into Ryujinx.Ui.Common
* Disable "CreateShortcut" option for flatpak builds
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Co-authored-by: Jose Estrada <joseestradacobo@gmail.com>
* Add scrollable custom control based on TickFrequency
* Use custom slider to update value when pointer wheel scrolled
* Remove extra xaml file
* Address formatting issues
* Only scroll one element at a time
* Add OnPointerWheelChanged event to VolumeStatus button
Co-authored-by: Ahmad Tantowi <ahmadtantowi@outlook.com>
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
* GPU: Add fallback when textureGatherOffsets is not supported.
This PR adds a fallback for GPUs or APIs that don't support an equivalent to the method `textureGatherOffsets`, where each of the 4 gathered texels has an individual offset. This is done by reusing the existing code to handle non-const offsets for texture instructions, though it has also been corrected as there were a few implementation issues.
MoltenVK reports support for this capability, and it didn't error when we initially released the MacOS build, but that has since changed. MVK still reports support, but spirv-cross has been fixed in a way that it _attempts_ to use this capability, but the metal compiler errors since it doesn't exist.
Some other fixes:
- textureGatherOffsets emulation has been changed significantly. It now uses 4 texture sample instructions (not gather), calculates a base texel (i=0 j=0) and adds the offsets onto it before converting into a tex coord. The final result is offset into a texel center, so it shouldn't be subject to interpolation, though this isn't perfect and could have some error with floating point formats with linear sampling. It is subject to texture wrap mode as it should be, which is why texelFetch was not used.
- Maybe gather should be used here with component `w` (i=0, j=0), though this multiplies number of texels fetched by 4... The way it was doing this before _was_ wrong_, but doing it right would avoid issues with texel center precision.
- textureGatherOffset (singular) now performs textureGather with the offset applied to the coords, rather than the slower fallback where each texel is fetched individually.
* Increment shader cache version, remove unused arg
* Use base texture size for gather coord offset.
Implicit LOD for gather is not supported.
* Use 4 texture gathers for offsets emulation
Avoids issues with interpolation at cost of performance
(not sure how bad this is)
* Address Feedback
* GPU: Add HLE macros for popular NVN macros
* Remove non-vector equality check
The case where it's not hardware accelerated will do the check integer-wise anyways.
* Whitespace 😔
* Address Feedback
* HLE: Fix Mii crc generation
Validating CRCs for data and device involves calculating the crc of all data including the crc being checked, which should then be 0.
The crc should be _generated_ on all data _before_ the crc in the struct. It shouldn't include the crcs themselves.
This fixes all generated miis (eg. default) having invalid crcs. This does not affect mii maker, as that generates its own charinfo.
Does not fix MK8D crash.
* Fix other mii issues
* Fully define all fields for Nickname and Ver3StoreData
Fixes an issue where the nickname for a mii would only have the first character on some method calls.
* Add Array96 type
* Strings should not be concatenated using '+' in a loop
* fix IDE0090
* undo GenerateLoadOrStore
* prefer string interpolation
* Update src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
Co-authored-by: Mary <thog@protonmail.com>
---------
Co-authored-by: Mary <thog@protonmail.com>
* Delete DecibelToLinearExtended and fix Log10 function
* Fix CopyBuffer and ClearBuffer
* Change effect states from class to struct + formatting
* Formatting
* Make UpdateLowPassFilter readonly
* More compressor fixes
* Implement NGC service
* Use raw byte arrays instead of string for _wordSeparators
* Silence IDE0230 for _wordSeparators
* Try to silence warning about _rangeValuesCount not being read on SparseSet
* Make AcType enum private
* Add abstract methods and one TODO that I forgot
* PR feedback
* More PR feedback
* More PR feedback
* GPU: Don't create tracking handles for buffer textures
Buffer texture memory is handled by the buffer cache - the texture shouldn't create any tracking handles as they aren't used. This change simply makes them create and iterate 0 tracking handles, while keeping the rest of the texture group around.
This prevents a possible issue where many buffer textures are created as views of overlapping buffer ranges, and virtual regions have many dependant textures that don't actually contribute anything to handle state.
Should improve performance in Mortal Kombat 1, possibly certain UE4 games when FIFO raises to 100%.
* Fix interval tree bug
* Don't check view compatibility for buffer textures
* Reduce the amount of descriptor pool allocations on Vulkan
* Formatting
* Slice can be simplified
* Make GetDescriptorPoolSizes static
* Adjust CanFit calculation so that TryAllocateDescriptorSets never fails
* Remove unused field
* Impl first attempt to LDN
* Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Mac addresses are now randomly assigned on the server. (fixes joining lobbies)
- Fixed the "connected" handler for stations to actually find a
- Added info retrieval when connected to a station.
- Users that disconnect are now removed from rooms they were in. (still need to broadcast tho)
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
* We may just be "initialized". Ignore this for now.
* Lots of WIP
* Add Disconnect packet
* Improve signalling of internal events.
* Fix scan.
* Fix some more stupid things.
* Enable NoDelay on all sockets.
* Add station accept policy, disconnect function.
* Limit max number of games.
* Split out networking stuff from HLE, so it can be swapped.
* Update logging calls.
* Missed a spot.
* Call SignalDisconnect instead of SetState
* Add comment to GetNetworkInfo
* Update configuration + UI
Now has its own tab, more options.
* Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
* some cleanup
* More fix
* Correctly handle errors when connecting.
* Disable *Private call and clean symbols
* Structs cleanup
* Big cleanup
* Fix InvalidHandle (in MK8D and other games)
* Add Reject and Private Network support (v1)
RyuLdn Version bumped to 1.
* Add Initialize Packet
Allows users to keep Mac Addresses assigned by the server.
* Add SetWirelessControllerRestriction and some cleanup
* LDN-2 Initial Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
* Misc Changes
* Fix GetNetworkInfo
* Fix some small issues
* Implement GetNetworkInfoLatestUpdate
* Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
* Fix ARMS Scan (and other games using wrong LocalCommunicationId
* Fix latest update when host leaves
* Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
* Fix the localCommunicationId = -1
* Don't set Connect flag for nodes already in the room before joining.
* Make IUserLocalCommunicationService disposable
* Don't dispose if there's no client.
* LDN-2-2 Rebase
Make this work.
- Endianness swap on all IPs.
- Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever.
- Fixed the "connected" handler for stations to actually find a
- The communication service does a bit better with being closed now.
- Some locking around the game instance dictionary.
We may just be "initialized". Ignore this for now.
Put sockets behind an interface, so that they can be swapped for something proxyable
Lots of WIP
Implement scan filter.
Improve signalling of internal events.
Fix scan.
Fix 0 width data, scan reply end delay removed.
Fix some more stupid things.
Enable NoDelay on all sockets.
Add station accept policy, disconnect function.
Limit max number of games.
Split out networking stuff from HLE, so it can be swapped.
Update logging calls.
Missed a spot.
SetAdvertiseData when open, don't return games that have accept policy 1
Update configuration + UI
Now has its own tab, more options.
Don't Keepalive, it causes problems.
Refactoring IUserLocalCommunicationService
( Expected new issues :'( )
some cleanup
More fix
Correctly handle errors when connecting.
Disable *Private call and clean symbols
Structs cleanup
Big cleanup
Fix InvalidHandle (in MK8D and other games)
Add Reject and Private Network support (v1)
Disable TcpNoDelay option on linux.
Add SetWirelessControllerRestriction and some cleanup
Misc cleanup, implement broadcast flag.
Misc Changes
Fix GetNetworkInfo
Fix some small issues
Disable LAN by default til the config is added.
Fix Splatoon 2
- Stub nfp IUser::StartDetection / IUser::StopDetection.
- Stub ntc IEnsureNetworkClockAvailabilityService and needed calls.
Cleanup previous fixes
Stub IAudioInManager/IAudioIn for Splatoon 2 LAN
Add LAN settings to multiplayer tab
LAN Play > LAN Mode
Implement GetNetworkInfoLatestUpdate
Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF
Fix ARMS Scan (and other games using wrong LocalCommunicationId
Fix latest update when host leaves
Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId"
This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75.
Fix the localCommunicationId = -1
Don't set Connect flag for nodes already in the room before joining.
Make IUserLocalCommunicationService disposable
Fix crash when using LAN mode on linux.
Actually use that call
Don't dispose if there's no client.
Fix the settings window crash
Fix configurationFileUpdated
* Make LDN compatible with Ryujinx/Ryujinx#3805
* Ava: Add Ldn options to SettingsNetworkTab
* Ava: Add update events for multiplayer options
* Apply formatting
* Remove LdnHelper
* ldn: Fix hardcoded /24 subnet mask
* Fix naming rule violations
* Add missing summary doc tag
* Remove NetCoreServer dependency
* Address code style issues and typos
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Call CloseStation/CloseAccessPoint to reduce code duplication
* Fix typo
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Fix missing trailing commas
* Extract AddressList from AddressEntry
* Use AcceptPolicy as a type for LdnNetworkInfo.StationAcceptPolicy
* Add Flags attribute to ScanFilterFlag
* Rename struct members for LdnNetworkInfo
* Remove extra line
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Extract NetworkErrorMessage from NetworkError
* Fix missing trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* Horizon: Migrate wlan and stubs latest services
This PR migrate empty wlan services, values are found by RE.
Latest firmwares added some other services which are now stubbed and up-to-date.
* Fix imports ordering
* Replace image barriers inside render pass with more generic memory barrier
* Remove forceStorage since it was creating images with storage bit for formats that are not StorageImage compatible
* Add missing flags on subpass dependency
* Don't call vkCmdSetScissor with a scissor count of 0
* One semaphore per swapchain image
* Remove compute stage from read to write barriers
* Try to improve Pipeline.Barrier nonsense
* Set PipelineStateFlags based on supported stages
Just some simple changes to the buffer conversion shaders. (stride conversion, D32S8 to D24S8)
The first change is using a device local buffer for converted vertex buffers, since they're only read/written on the GPU. These paths don't trigger on NVIDIA, but if you force them to use it demonstrates the full extent writing to host owned memory from compute absolutely destroys them. AMD GPUs are less heavily affected by this issue, but since the game in question was writing 230MB from compute, I imagine it should have some effect.
The second change is allowing the buffer conversion shaders to scale their work group count. While dividing the work between 32 invocations works OK for M1 macs, it's not so great for anything with more cores like AMD GPUs, which should be able to do a lot more parallel copies. Now, it scales by roughly 100 elements per invocation.
Some stride change cases could be improved further by either limiting vertex buffer size somehow (reading the index buffer could help, but is always risky) or only updating regions that changed, rather than invalidating the whole thing.
* Implement vertex and geometry shader conversion to compute
* Call InitializeReservedCounts for compute too
* PR feedback
* Set clip distance mask for geometry and tessellation shaders too
* Transform feedback emulation only for vertex
#5576 changed where the position was declared, but forgot to add the Invariant declaration to position when the ReducedPrecision flag was enabled. This was causing weird graphical bugs in a bunch of games, mostly to do with mismatching depth between multiple draws of the same geometry.
Maybe the attempt to add it to Position in DeclareInputOrOutput can be removed now, assuming that path is never used.
* mm: Migrate service in Horizon project
This PR migrate the `mm:u` service to the Horizon project, things were checked by some RE aswell, that's why some vars are renamed, the logic should be the same as before.
Tests are welcome.
* Lock _sessionList instead
* Fix comment
* Fix Session fields order
* Move shuffle handling out of the backend to a transform pass
* Handle subgroup sizes higher than 32
* Stop using the subgroup size control extension
* Make GenerateShuffleFunction static
* Shader cache version bump
* Vulkan: Periodically free regions of the staging buffer
There was an edge case where a game could submit tens of thousands of small copies over the course of over half a minute to unique fences. This could result in a large stutter when the staging buffer became full and it tried to check and free thousands of completed fences.
This became visible with some games and mirrors on Windows, as they don't submit any buffer data via the staging buffer, but may submit copies of the support buffer.
This change makes the Vulkan backend check for staging buffer completion on each command buffer submit, so it can't get backed up with 1000s of copies to check.
* Add comment
* pr_triage: Fix invalid workflow
* Don't assign reviewers to draft PRs
* Add team review request for developers team
* Introduce Mako to make team reviewers work
* Initial implementation of buffer mirrors
Generally slower right now, goal is to reduce render passes in games that do inline updates
Fix support buffer mirrors
Reintroduce vertex buffer mirror
Add storage buffer support
Optimisation part 1
More optimisation
Avoid useless data copies.
Remove unused cbIndex stuff
Properly set write flag for storage buffers.
Fix minor issues
Not sure why this was here.
Fix BufferRangeList
Fix some big issues
Align storage buffers rather than getting full buffer as a range
Improves mirrorability of read-only storage buffers
Increase staging buffer size, as it now contains mirrors
Fix some issues with buffers not updating
Fix buffer SetDataUnchecked offset for one of the paths when using mirrors
Fix buffer mirrors interaction with buffer textures
Fix mirror rebinding
Move GetBuffer calls on indirect draws before BeginRenderPass to avoid draws without render pass
Fix mirrors rebase
Fix rebase 2023
* Fix crash when using stale vertex buffer
Similar to `Get` with a size that's too large, just treat it as a clamp.
* Explicitly set support buffer as mirrorable
* Address feedback
* Remove unused fragment of MVK workaround
* Replace logging for staging buffer OOM
* Address format issues
* Address more format issues
* Mini cleanup
* Address more things
* Rename BufferRangeList
* Support bounding range for ClearMirrors and UploadPendingData
* Add maximum size for vertex buffer mirrors
* Enable index buffer mirrors
Enabled on all platforms for the IbStreamer.
* Feedback
* Remove mystery BufferCache change
Probably macos related?
* Fix mirrors not creating when staging buffer is empty.
* Change log level to debug
This branch changes the buffer copy fast path to notify memory tracking for all resources that aren't buffers. This fixes cases where games would copy buffer data directly into texture memory, which before would only work if the texture did not already exist. I imagine this happens when the guest driver is moving data between allocations or uploading it.
Since this only affects the fast path, cases where the source data has been modified from GPU (fast path copy destination doesn't count) will still fail to notify the texture, though I don't imagine games will do this. This should be resolved in future.
This should fix some texture issues with guest OpenGL games on switch, such as Dragon Quest Builders.
This may also be useful in future for games that move shader data around memory, if we end up using memory tracking for those.
* Move some properties out of ShaderConfig
* Stop using ShaderConfig on backends
* Replace ShaderConfig usages on Translator and passes
* Move remaining properties out of ShaderConfig and delete ShaderConfig
* Remove ResourceManager property from TranslatorContext
* Move Rewriter passes to separate transform pass files
* Fix TransformPasses.RunPass on cases where a node is removed
* Move remaining ClipDistancePrimitivesWritten and UsedFeatures updates to decode stage
* Reduce excessive parameter passing a bit by using structs more
* Remove binding parameter from ShaderProperties methods since it is redundant
* Replace decoder instruction checks with switch statement
* Put GLSL on the same plan as SPIR-V for input/output declaration
* Stop mutating TranslatorContext state when Translate is called
* Pass most of the graphics state using a struct instead of individual query methods
* Auto-format
* Auto-format
* Add backend logging interface
* Auto-format
* Remove unnecessary use of interpolated strings
* Remove more modifications of AttributeUsage after decode
* PR feedback
* gl_Layer is not supported on compute
ForceDpiAware.Windows has a side effect of forcing the application DPI to be the same as the primary monitor. This isn't good if you have multiple monitors with different DPI.
On Avalonia, I don't think there are any downsides to disabling this. When it's disabled, `ForceDpiAware.GetWindowScaleFactor` always returns 1.
* It builds
(Doesn’t run waiting on FluentAvalonia Preview 5 Release)
* Enable CompiledBindings by default
* Ignore `PointerPressedEventArgs` Init warning
* Define MIME and UTI Types
* Update `UserProfileImageSelectorView` to StorageProvider API
* PFS0 Magic
* Update `MainWindowViewModel` to StorageProvider API
* Update `SettingsUIView` to StorageProvider API
* Update `ApplicationHelper` to StorageProvider API
* Use `IsCheckChanged`
* Rename events
* Update Fluent Avalonia to Preivew 5
* More package updates
* Fix long selection bar
* return glyph value directly, instead of using a binding
* fix menu item checkboxes
* Fix build
* Update to Preview 6
Unicorn conflict
Fix remaining package oopsie
* Fix issues from merge
* Fix some warnings
* Warnings
* Squashed commit of the following:
commit 79d1c190db
Author: Mary <mary@mary.zone>
Date: Sun Apr 16 11:38:07 2023 +0200
chore: Update Silk.NET to 2.17.1 (#4686)
commit 2bc88467eb
Author: Ac_K <Acoustik666@gmail.com>
Date: Sun Apr 16 09:37:31 2023 +0000
Update README.md
commit baf8752e74
Author: Vincenzo Nizza <vincenzonizzaufficio@gmail.com>
Date: Sun Apr 16 11:19:33 2023 +0200
Ensure the updater doesn't delete hidden or system files (#4626)
* Copy desktop.ini to update directory if it exists in HomeDir
* EnumerateFilesToDelete() exclude files with "Hidden" and "System" attributes
commit d5e4378aea
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sun Apr 16 09:02:06 2023 +0000
nuget: bump DynamicData from 7.13.1 to 7.13.5 (#4654)
Bumps [DynamicData](https://github.com/reactiveui/DynamicData) from 7.13.1 to 7.13.5.
- [Release notes](https://github.com/reactiveui/DynamicData/releases)
- [Changelog](https://github.com/reactivemarbles/DynamicData/blob/main/ReleaseNotes.md)
- [Commits](https://github.com/reactiveui/DynamicData/compare/7.13.1...7.13.5)
---
updated-dependencies:
- dependency-name: DynamicData
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit 6dbcdfea47
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Sun Apr 16 09:09:02 2023 +0200
Ava: Fix nca extraction window never closing & minor cleanup (#4569)
* ava: Remove unused doWhileDeferred parameters
* ava: Minimally improve swkbd dialog
It's currently impossible to get the dialog to redirect focus to the InputBox.
* ava: Fix nca extraction dialog never closing
Also contains some minor cleanup
commit c5258cf082
Author: NitroTears <73270647+NitroTears@users.noreply.github.com>
Date: Sun Apr 16 11:03:35 2023 +1000
Ability to hide file types in Game List (#4555)
* Added HiddenFileTypes to config state, and check to file enumeration
* Added hiddenfiletypes checkboxes to the UI
* Added Ava version of HiddenFileTypes
* Inverted Hide to Show with file types, minor formatting
* all variables with a reference to 'hidden' is now 'shown'
* one more variable name changed
* review feedback
* added FileTypes extension methof to get the correlating config value
* moved extension method to new folder and file in Ryujinx.Ui.Common
* added default case for ToggleFileType
* changed exception type to OutOfRangeException
commit 5c89e22bb9
Author: Daniel Shala <daniel.shala08@gmail.com>
Date: Sat Apr 15 18:11:24 2023 +0200
Added check for eventual symlink when displaying game files. (#4526)
* Added check for eventual symlink when displaying game files.
* Moved symlink check logic
* Moved symlink check logic
* Fixed prev commit
---------
Co-authored-by: Daniel Shala <danielshala00@gmail.com>
commit 11ecff2ff0
Author: Alex Barney <thealexbarney@gmail.com>
Date: Fri Apr 14 16:00:34 2023 -0700
Rename Hipc to Cmif where appropriate (#3880)
commit 4c3f09644a
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Wed Apr 12 20:18:40 2023 +0100
Move swkbd message null check into constructor (#4671)
commit e187a8870a
Author: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Date: Wed Apr 12 03:09:47 2023 +0200
HLE: Deal with empty title names properly (#4643)
* hle: Deal with empty titleNames in some languages
* gui: Fix displaying the wrong title name
* Remove unnecessary bounds check
* Fix a NRE when getting the version string
* Restore empty string logic
commit a64fee29dc
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 08:23:41 2023 +0100
Vulkan: add situational "Fast Flush" mode (#4667)
* Flush in the middle of long command buffers.
* Vulkan: add situational "Fast Flush" mode
The AutoFlushCounter class was added to periodically flush Vulkan command buffers throughout a frame, which reduces latency to the GPU as commands are submitted and processed much sooner. This was done by allowing command buffers to flush when framebuffer attachments changed.
However, some games have incredibly long render passes with a large number of draws, and really aggressive data access that forces GPU sync.
The Vulkan backend could potentially end up building a single command buffer for 4-5ms if a pass has enough draws, such as in BOTW. In the scenario where sync is waited on immediately after submission, this would have to wait for the completion of a much longer command buffer than usual.
The solution is to force command buffer submission periodically in a "fast flush" mode. This will end up splitting render passes, but it will only enable if sync is aggressive enough.
This should improve performance in GPU limited scenarios, or in games that aggressively wait on synchronization. In some games, it may only kick in when res scaling. It won't trigger in games like SMO where sync is not an issue.
Improves performance in Pokemon Scarlet/Violet (res scaled) and BOTW (in general).
* Add conversions in milliseconds next to flush timers.
commit 9ef94c8292
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:55:04 2023 +0100
ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext (#4661)
* ARMeilleure: Move TPIDR_EL0 and TPIDRRO_EL0 to NativeContext
Some games access these system registers several tens of thousands of times in a second from many different threads. While this isn't really crippling, it is a lot of wasted time spent in a reverse pinvoke transition.
Example games are Pokemon Scarlet/Violet and BOTW. These games have a lot of different potential bottlenecks so it's unlikely you will see a consistent improvement, but it definitely disappears from the cpu profile.
* Remove unreachable code.
* Add ulong conversion for offsets
* Nit
commit 915d6d044c
Author: riperiperi <rhy3756547@hotmail.com>
Date: Tue Apr 11 07:32:31 2023 +0100
OpenGL: Fix OBS/Overlays again by binding FB before present (#4668)
This seems to have been removed by the Post-Processing PR, but it is required for the display in OBS to be the right way up and properly scaled.
I've tested this with AA and FSR on MK8D and it seems to behave properly. Testing is welcome.
commit a4780ab33b
Author: MutantAura <44103205+MutantAura@users.noreply.github.com>
Date: Mon Apr 10 23:04:31 2023 +0100
Force activate parent window before dialog is shown (#4663)
* Fix build
Extraction dialogue not working
* Avalonia Preview 7
Needs Fluent Avalonia update still…
* Fix Render Scaling
* Update Fluent Avalonia
* Remove `pfs0` as runnable file type
* Restore Info.plist formatting
* Plist Format
* Update Avalonia.Svg.Skia
* Update theme code (TODO)
* swtich to using theme variants for light dark
* Fix crashes
* Text centering issues
* Update `TitleUpdateViewModel` to StorageProvider API
* Fixed for new PR
(Will crash on launch)
* Fixes…
* UI: Fix sections extraction (#4820)
* UI: Fix sections extraction
There is currently an issue when the update NCA doesn't contains the section we want to extract, this is fixed by adding a check.
I have fixed the inverted handler of ExeFs/Logo introduced in #4755.
Fixes#4521
* Addresses feedback
* Fix issues…
* Preview 8
* Fix fuck ups
* Fixes
* More cleanup
* Ava 11 RC
Maybe there is a god
* Update FluentAvalonia
* update svg
* Second RC (kill me)
* It builds
* Ava 11
* Remove unnecessary usings
* Fix build
* Formatting
* GAS GAS GAS!!!!
* Fix DLC Window Crash
* Linux runner try not to crash challenge (impossible)
* Add app.manifest
* Fix accidental Silk.NET.Vulkan bump
* Try fix truncation
* Linux fix popup Windows
* Fix cutoff text on windows
* Status bar styling fixes
* Volume Toggle Split Button Fixes
* Fix load bar color
* Fix shortcuts
* Best we're gonna get
* Fix spacing
Co-authored-by: Exhigh <exhigh01@gmail.com>
* Formatting
* Fix Profile Dropdown
* Fix Window Startup Position
* Format Fixes
* Fix stupid mistake
* Fix accidental change
* Scaling Handler (peri pls make sure is working)
* Remove Locale Reflection Binding Use + Unsued Usings
* Fix formatting
Code styling
Ughhhh
Fix interface
Make TimeZoneConverter internal
* Remove bell workaround (no longer needed)
* Disable accent menu
* Update to Ava 11.0.2
* Peri suggestions
* Formatting
* Cleanup a bunch of jank
* Dependency update
* Berry fixes and suggestions
* Final suggestions
* Rename assemblyIdentity to Ryujinx.Emulator.Avalonia
---------
Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Exhigh <exhigh01@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
* GPU: Don't sync/bind index buffer when it's not in use
Sometimes draws don't use an index buffer. It's not necessary to check or upload data for the current index buffer binding as it won't be used.
This fixes Pokemon: Legends Arceus updating a stale index buffer for every draw during its TFB pass, which was all non-indexed draws.
This probably didn't cost much on normal PCs, but it had a large impact on MacOS, which the macos1 release build avoided by mirroring index buffers (the PR currently does not). Needs buffer mirrors still for the rest of the performance.
There are additional cases where index buffers are bound or checked with non-indexed draws on the backend, but this one was straightforward to fix and has the largest impact. Testing is welcome to ensure nothing weird broke.
* Fix case with _rebind
* checks: Add retry logic to dotnet format style step as well
I can't imagine dotnet format whitespace ever segfaulting,
so hopefully it won't be needed there.
* checks: Replace bash scripts with unstable-commands action
* build: Add unstable-commands action for test step
* Fix incorrect fragment origin when YNegate is enabled
* Shader cache version bump
* Do not update support buffer if shader does not read gl_FragCoord
* Pass unscaled viewport size to the support buffer
* 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.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Address or silence dotnet format IDE1006 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA2208 warnings
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* Address dotnet format CA2211 warnings
* Address dotnet format CA1822 warnings
* Address or silence dotnet format CA1069 warnings
* Make dotnet format succeed in style mode
* Address or silence dotnet format CA2211 warnings
* Address review comments
* Address dotnet format CA2208 warnings properly
* Make ProcessResult readonly
* 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
* Add previously silenced warnings back
I have no clue how these disappeared
* Revert formatting changes for while and for-loops
* Format if-blocks correctly
* Run dotnet format style after rebase
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format analyzers after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Disable 'prefer switch expression' rule
* Add comments to disabled warnings
* Fix a few disabled warnings
* Fix naming rule violation, Convert shader properties to auto-property and convert values to const
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Run dotnet format after rebase
* Use using declaration instead of block syntax
* Address IDE0251 warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Fix naming rule violations
* Fix typo
* Add trailing commas, use targeted new and use array initializer
* Fix build issues
* Fix remaining build issues
* Remove SuppressMessage for CA1069 where possible
* Address dotnet format issues
* Address formatting issues
Co-authored-by: Ac_K <acoustik666@gmail.com>
* Add GetHashCode implementation for RenderingSurfaceInfo
* Explicitly silence CA1822 for every affected method in Syscall
* Address formatting issues in Demangler.cs
* Address review feedback
Co-authored-by: Ac_K <acoustik666@gmail.com>
* Revert marking service methods as static
* Next dotnet format pass
* Address review feedback
---------
Co-authored-by: Ac_K <acoustik666@gmail.com>
* Fix some validation errors and silence the annoying pipeline barrier error
* Remove bogus decref/incref on index buffer state
* Make unsafe blit opt-in rather than opt-out
* Remove Vulkan debugger messages blacklist
* Adjust GetImageUsage to not set the storage bit for multisample textures if not supported
* Move support buffer update out of the backends
* Fix render scale init and remove redundant state from SupportBufferUpdater
* Stop passing texture scale to the backends
* XML docs for SupportBufferUpdater
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format IDE1006 warnings
* Address dotnet format CA1816 warnings
* Address dotnet format CA1822 warnings
* Address or silence dotnet format CA1069 warnings
* Make dotnet format succeed in style mode
* Address dotnet format CA1401 warnings
* Address remaining dotnet format analyzer warnings
* Address review comments
* dotnet-format fixes after rebase
* 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
* Format if-blocks correctly
* Another rebase, another dotnet format run
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Remove a few unused parameters
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Address IDE0260 warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* dotnet format pass with new editorconfig
* Fix naming style issues
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Revert one suggestion
* Second dotnet format pass and fix build issues
* Final pass of dotnet format
* Add trailing commas
* Fix formatting issues
* Keep unnecessary assignment in IconColorPicker.cs
* Use using declarations and extend resource lifetimes
* Fix rebase issues
* Adjust comment spacing
* Fix typo
* Fix naming issues
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Revert unintentional change
* Remove unused file
* Remove static keyword from ViewModels
Binding of static members doesn't work and is silently ignored.
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Nintendo controllers notoriously have the A/B and X/Y buttons swapped, compared to the standard.
In order to combat this, when setting the default controller layout, Ryujinx checks whether the controller name contains "Nintendo", and swaps the mapping accordingly.
However, the reason the mapping is inverted in the first place is because SDL has `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS` set to 1 by default. By setting it to 0, the mapping will be based on the buttons' position instead.
So, by doing it (and removing the `isNintendoStyle` variable), we get the following advantages:
- The mapping will be the same on all controllers, removing the need to adjust custom mappings depending on what controller is used
- Users who already set `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS` to 0 globally for other games/applications (like me) won't have a wrong default mapping
- Checking whether the controller name contains "Nintendo" is ugly
Disadvantages:
- Breaks the controller configuration for existing users who are using a Nintendo controller
* Stop identifying shader textures with handle and cbuf, use binding instead
* Remove now unused code
* Consider image operations as having accurate type information too
I don't know why that was not the case before
* Fix missing unscale on InsertCoordNormalization, stop calling SetUsageFlagsForTextureQuery when not needed
* Shader cache version bump
* Change get texture methods to return descriptors created from ResourceManager state
This is required to ensure that reserved textures and images will not be bound as a guest texture/image
* Fix BindlessElimination.SetHandle inserting coords at the wrong place
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1069 warnings
* Address or silence dotnet format CA2211 warnings
* Address remaining dotnet format analyzer warnings
* Address review comments
* 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
* Format if-blocks correctly
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Another rebase, another dotnet format run
* Run dotnet format style after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Disable 'prefer switch expression' rule
* Add comments to disabled warnings
* Remove a few unused parameters
* Replace MmeShadowScratch with Array256<uint>
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Run dotnet format after rebase
* Address IDE0251 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First pass of dotnet format
* Add unsafe dotnet format changes
* Fix typos
* Add trailing commas
* Disable formatting for FormatTable
* Address review feedback
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA2208 warnings
* Address or silence dotnet format CA2211 warnings
* Address review comments
* 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
* Format if-blocks correctly
* Run dotnet format whitespace after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Remove a few unused parameters
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Address IDE0251 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Fix naming rule violations, remove redundant code and fix build issues
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Add trailing commas
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Address review feedback
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA2208 warnings
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* Address dotnet format CA1822 warnings
* Make dotnet format succeed in style mode
* Address dotnet format CA2208 warnings properly
* 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
* Format if-blocks correctly
* Another rebase, another dotnet format run
* Run dotnet format whitespace after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Fix build issues
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Second dotnet format pass
* Update src/Ryujinx/Modules/Updater/Updater.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Add trailing commas and improve formatting
* Fix formatting and naming issues
* Rename nvStutterWorkaround to nvidiaStutterWorkaround
* Use using declarations and extend resource lifetimes
* Fix GTK issues
* Add formatting for generated files
* Add trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Address dotnet format CA1822 warnings
* 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
* Revert formatting changes for while and for-loops
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Remove a few unused parameters
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Add trailing commas and fix formatting issues
* Convert if-else chain to switch block
* Address review feedback
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0059 warnings
* Address dotnet format CA1816 warnings
* Fix new dotnet-format issues after rebase
* 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
* Format if-blocks correctly
* Another rebase, another dotnet format run
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format analyzers after rebase
* Run dotnet format style after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Disable 'prefer switch expression' rule
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Run dotnet format after rebase
* Address IDE0251 warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Fix naming rule violations
* Remove redundant code
* Rename generics
* Address review feedback
* Remove SetOrigin
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format IDE1006 warnings
* Address dotnet format CA1816 warnings
* Address most dotnet format whitespace warnings
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Remove a few unused parameters
* Adjust namespaces
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Address review feedback
* Remove redundant unsafe modifiers
* Fix build issues
* Add GC.SuppressFinalize() call
* Add trailing commas and fix naming rule violations
* Remove unused members and assignments
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Fix new dotnet-format issues after rebase
* Address review comments
* 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
* Format if-blocks correctly
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* cpu tests: Disable CA2211 for CodeBaseAddress and DataBaseAddress
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* First dotnet format pass
* Fix naming rule violations
* Remove naming rule violation exceptions
* Fix comment style
* Use targeted new
* Remove redundant code
* Remove comment alignment
* Remove naming rule exceptions
* Add trailing commas
* Use nameof expression
* Reformat to add remaining trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Silence dotnet format IDE0060 warnings
* Address dotnet format CA1401 warnings
* dotnet-format fixes after rebase
* 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
* Another rebase, another dotnet format run
* Run dotnet format style after rebase
* Add comments to disabled warnings
* Remove a few unused parameters
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Small optimizations
* Remove alignment
* Apply formatting
* Fix build issues
* Final pass for dotnet format
* Add trailing commas
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Add trailing commas
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0052 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1069 warnings
* Address remaining dotnet format analyzer warnings
* Address review comments
* 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
* Revert formatting changes for while and for-loops
* Another rebase, another dotnet format run
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format analyzers after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Disable 'prefer switch expression' rule
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Address review feedback
* Add trailing commas
* Remove SuppressMessage for IDE0066
* Make explicit Equals implementation implicit
* macOS: Fix warning in some shell scripts
In a way to continue the cleaning of the project, there are some warnings which can be easily fixed.
* Try to fix CI
* Fix APP_ARGUMENTS
* Addresses feedback
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* 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
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Add trailing commas
* Fix naming and formatting issues
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0052 warnings
* Address or silence dotnet format IDE1006 warnings
* Address or silence dotnet format CA1069 warnings
* Address review comments
* Address most dotnet format whitespace warnings
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Rename Operand.cs to IOperand.cs
* Update src/Spv.Generator/Module.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Remove NotNullWhen attribute and use conditional access to avoid NRE
* Fix duplicated enum values
* Remove unread member
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format CA2208 warnings
* 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
* Format if-blocks correctly
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Address review feedback
* Update src/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format IDE1006 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA2211 warnings
* Silence CA1806 and CA1834 issues
* Fix formatting for switch expressions
* 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
* Revert formatting changes for while and for-loops
* Format if-blocks correctly
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format analyzers after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Remove a few unused parameters
* Replace MmeShadowScratch with Array256<uint>
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Run dotnet format after rebase
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Second dotnet format pass
* Fix build issues
* Fix StructArrayHelpers.cs
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Fix return statements
* Fix naming rule violations
* Update src/Ryujinx.Common/Utilities/StreamUtils.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Add trailing commas
* Address review feedback
* Address review feedback
* Rename remaining type parameters to TKey and TValue
* Fix manual formatting for logging levels
* Fix spacing before comments
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format IDE1006 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1069 warnings
* Address remaining dotnet format analyzer warnings
* Address review comments
* 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
* Format if-blocks correctly
* Another rebase, another dotnet format run
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Address review feedback
* Assign Decommit to ReplacePlaceholder
* Run final dotnet format pass
* Organize imports again
* Add trailing commas
* Add missing newline
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* 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
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Remove redundant code, convert to auto-properties and fix naming rule violations
* Remove bogus change
* Address review feedback
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Address or silence dotnet format IDE1006 warnings
* Fix IDE0090 after rebase
* 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
* Format if-blocks correctly
* Another rebase, another dotnet format run
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Address review feedback
* cpu: Implement VCVT (between floating-point and fixed-point) instruction
Rebase, fix and superseed of https://github.com/Ryujinx/Ryujinx/pull/2915
(Since I only have little CPU knowledge, I hope I have done everything good)
* Update Ptc.cs
* Fix wrong cast
* Rename tests
* Addresses feedback
Co-Authored-By: gdkchan <5624669+gdkchan@users.noreply.github.com>
* Remove extra empty line
---------
Co-authored-by: gdkchan <5624669+gdkchan@users.noreply.github.com>
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Address or silence dotnet format IDE1006 warnings
* 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
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Fix empty lines before return
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Add trailing commas, remove redundant code and remove static modifier from Surface.HighBd
* Fix naming rule violations
* Fix naming rule violations
* Fix empty line before return
* Fix comment style
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Remove comment alignment
* Address review feedback
* Separate comments by 2 spaces and fix other formatting issues
* Make HighBd an auto-property
* Replace if-chain with if-else-chain
* Fix new naming rule violations
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format CA1069 warnings
* Address or silence dotnet format CA2211 warnings
* Address review comments
* Fix formatting for switch expressions
* 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
* Format if-blocks correctly
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Disable 'prefer switch expression' rule
* Add comments to disabled warnings
* Fix naming rule violation, Convert shader properties to auto-property and convert values to const
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Run dotnet format after rebase
* Address IDE0251 warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Run dotnet format after rebase
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Fix naming rule violations
* Add trailing commas
* Remove unused members and most unnecessary value assignments
* Remove more unnecessary assignments
* Remove NRE suppressor
* 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
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Run dotnet format pass
* Remove left-over files and adjust namespaces
* Fix alignment
* dotnet format style --severity info
Some changes were manually reverted.
* Address most dotnet format whitespace warnings
* Add comments to disabled warnings
* dotnet format whitespace after rebase
* 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
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0052 warnings
* Address or silence dotnet format IDE1006 warnings
* Address or silence dotnet format CA2208 warnings
* Address dotnet format CA1822 warnings
* Address or silence dotnet format CA1069 warnings
* Silence CA1806 and CA1834 issues
* Address dotnet format CA1401 warnings
* Fix new dotnet-format issues after rebase
* Address review comments
* Address dotnet format CA2208 warnings properly
* Fix formatting for switch expressions
* 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
* Add previously silenced warnings back
I have no clue how these disappeared
* Revert formatting changes for OpCodeTable.cs
* Enable formatting for a few cases again
* Format if-blocks correctly
* Enable formatting for a few more cases again
* Fix inline comment alignment
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Disable 'prefer switch expression' rule
* Add comments to disabled warnings
* Remove a few unused parameters
* Adjust namespaces
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Start working on disabled warnings
* Fix and silence a few dotnet-format warnings again
* Address IDE0251 warnings
* Address a few disabled IDE0060 warnings
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Remove unnecessary formatting exclusion
* Add unsafe dotnet format changes
* Change visibility of JitSupportDarwin to internal
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0052 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* Address most dotnet format whitespace warnings
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Add trailing commas, log errors instead of throwing and remove redundant code
* dotnet format style --severity info
Some changes were manually reverted.
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* Address most dotnet format whitespace warnings
* dotnet format whitespace after rebase
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Address most dotnet format whitespace warnings
* dotnet format whitespace after rebase
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Address dotnet format CA1816 warnings
* Address most dotnet format whitespace warnings
* Run dotnet format style after rebase
* Run dotnet format analyzers after rebase
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Update src/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceDriver.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* 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
* Add previously silenced warnings back
I have no clue how these disappeared
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* dotnet format style --severity info
Some changes were manually reverted.
* Address or silence dotnet format CA1806 and a few CA1854 warnings
* 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
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Address dotnet format CA1822 warnings
* 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
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Silence IDE0060 in .editorconfig
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Final dotnet format pass and fix naming rule violations
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Remove unused constant
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* Address review comments
* Address most dotnet format whitespace warnings
* Add comments to disabled warnings
* Address IDE0251 warnings
* dotnet format whitespace after rebase
* Remove SuppressMessage attribute for removed rule
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* 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
* Add comments to disabled warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Final dotnet format pass and fix naming rule violations
* dotnet format style --severity info
Some changes were manually reverted.
* Address most dotnet format whitespace warnings
* Address IDE0251 warnings
* dotnet format whitespace after rebase
* dotnet format style --severity info
Some changes were manually reverted.
* Address dotnet format CA1816 warnings
* Address dotnet format CA1401 warnings
* Address most dotnet format whitespace warnings
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Address review feedback
* dotnet format style --severity info
Some changes were manually reverted.
* Restore a few unused methods and variables
* Address dotnet format CA1816 warnings
* Address most dotnet format whitespace warnings
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* Fix regression introduced by 1.1733 on Intel iGPUs
* Should have actually figured the variable, oops.
* maybe something goes wrong here? honestly lost
* Shader cache bump
* misc: Implement address space size workarounds
This adds code to support userland with less than 39 bits of address
space available by testing reserving multiple sizes and reducing
guess address space when needed.
This is required for ARM64 support when the kernel is
configured to use 63..39 bits for kernel space.(meaning only 38 bits is available to userland)
* Address comments
* Fix 32 bits address space support and address more comments
* Implement Load/Store Local/Shared and Atomic shared using new instructions
* Remove now unused code
* Fix base offset register overwrite
* Fix missing storage buffer set index when generating GLSL for Vulkan
* Shader cache version bump
* Remove more unused code
* Some PR feedback
* ARMeilleure: Do not hardcode 4KiB page size in JitCache
* test: Do not hardcode page size to 4KiB for Ryujinx.Tests.Memory.Tests
Fix running tests on Asahi Linux with 16KiB pages.
* test: Do not hardcode page size to 4KiB for Ryujinx.Tests.Cpu
Fix running tests on Asahi Linux.
Test runner still crash when trying to run all test suite.
* test: Do not hardcode page size to 4KiB for Ryujinx.Tests.Cpu
Fix somecrashes on Asahi Linux.
* test: Ignore Vshl test on ARM64 due to unicorn crashes
* test: Workaround hardcoded size on some tests
Change mapping of code and data in case of non 4KiB configuration.
* test: Make CpuTestT32Flow depends on code address
Fix failure with different page size.
* test: Disable CpuTestThumb.TestRandomTestCases when page size isn't 4KiB
The test data needs to be reevaluated to take different page size into account.
* Address gdkchan's comments
* Correctly set 'shell/open/command; registry key for file associations
* File association fixes
* 'using' statements instead of blocks
* Idempotent unregistration
* Single "hey shell, we changed file associations" notification at the
end instead of 1 for every operation, speeds things up greatly.
* Adapt and fix Linux specific function as well
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
* Use glob patterns to match file paths
* Update ignored paths for releases
* Adjust build.yml as well
* Add names to auto-assign steps
* Fix developer team name
* Allow build workflows to run if workflows changed
This is a bare minimal triage action that handle big categories.
In the future we could also label all services correctly but
I didn't felt this was required for a first iteration.
* ava: Fix OpenGL on Linux again
This shouldn't be working like that, but for some reason it does.
* Apply the correct fix
* gtk: Add warning messages for caught exceptions
* ava: Handle disposing the same way as GTK does
* Address review feedback
* Implement transform feedback emulation for hardware without native support
* Stop doing some useless buffer updates and account for non-zero base instance
* Reduce redundant updates even more
* Update descriptor init logic to account for ResourceLayout
* Fix transform feedback and storage buffers not being updated in some cases
* Shader cache version bump
* PR feedback
* SetInstancedDrawVertexCount must be always called after UpdateState
* Minor typo
* Updater: Ignore files introduced by the user in base directory
* Replicate logic in Avalonia version.
* Address requested changes
* Updater: Ignore files introduced by the user in base directory
* Replicate logic in Avalonia version.
* Address requested changes
* Address requested changes
* Address requested changes
* Comment cleanup
* Address feedback
* Forgot comment, tehe
* Texture: Fix 3D texture size when totalBlocksOfGobsInZ > 0
When there is a remainder when dividing depth by gobs in z, it is used to remove the unused part of the 3D texture's size. This was done to calculate correct sizes for single slice views of 3D textures.
However, this case can also apply to 3D textures with many slices, and more than one total block of gobs in z. In this case it's meant to trim off the end of the level size. Most textures won't encounter this as their size will be aligned, but UE4 games tend to use 3D textures with funny unaligned sizes.
The size offset should have been applied to the level size instead of the slice size, and it should only affect the slice size if it ends up larger.
Hopefully should fix issues with UE4 games without breaking other stuff, I don't have much time to test.
* Whoops
* Texture: Fix layout conversion when gobs in z is used with depth = 1
The size calculator methods deliberately reduce the gob size of textures if they are deemed too small for it. This is required to get correct sizes when iterating mip levels of a texture.
Rendering to a slice of a 3D texture can produce a 3D texture with depth 1, but a gob size matching a much larger texture. We _can't_ "correct" this gob size, as it is intended as a slice of a larger 3D texture. Ignoring it causes layout conversion to break on read and flush.
This caused an issue in Tears of the Kingdom where the compressed 3D texture used for the gloom would always break on OpenGL, and seemingly randomly break on Vulkan. In the first case, the data is forcibly flushed to decompress the BC4 texture on the CPU to upload it as 3D, which was broken due to the incorrect layout. In the second, the data may be randomly flushed if it falls out of the cache, but it will appear correct if it's able to form copy dependencies.
This change only allows gob sizes to be reduced once per mip level. For the purpose of aligned size, it can still be reduced infinitely as our texture cache isn't properly able to handle a view being _misaligned_.
The SizeCalculator has also been changed to reduce the size of rendered depth slices to only include the exact range a single depth slice will cover. (before, the size was way too small with gobs in z reduced to 1, and too large when using the correct value)
Gobs in Y logic remains untouched, we don't support Y slices of textures so it's fine as is.
This is probably worth testing in a few games as it also affects texture size and view logic.
* Improve wording
* Maybe a bit better
* Update SoftwareKeyboard to send KeyboardMode to UI
* Update GTK UI to check text against KeyboardMode
* Update Ava UI to check text against KeyboardMode
* Restructure input validation
* true when text is not empty
* Add English validation text for SoftwareKeyboardMode
* Add Chinese validation text for SoftwareKeyboardMode
* Update base on feedback
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
* Implement storage buffer operations using new Load/Store instruction
* Extend GenerateMultiTargetStorageOp to also match access with constant offset, and log and comments
* Remove now unused code
* Catch more complex cases of global memory usage
* Shader cache version bump
* Extend global access elimination to work with more shared memory cases
* Change alignment requirement from 16 bytes to 8 bytes, handle cases where we need more than 16 storage buffers
* Tweak preferencing to catch more cases
* Enable CB0 elimination even when host storage buffer alignment is > 16 (for Intel)
* Fix storage buffer bindings
* Simplify some code
* Shader cache version bump
* Fix typo
* Extend global memory elimination to handle shared memory with multiple possible offsets and local memory
Currently, the `Open Applet` menu is still enabled when a guest is running, which is wrong. This is not fixed by refreshing the property binding on `IsEnabled`.
* ava: Fix exit dialog while guest is running.
There is currently an issue while a game runs, the content dialog creation method check if `IsGameRunning` is true to show the popup.
But the condition here is wrong (`window` is null) so it throw a NullException silently in `Dispatcher.UIThread`.
This is now fixed by using the right casting.
* improve condition
* Fix spacing
* UI: Fix empty homebrew icon
We currently don't check the icon size when we read it from the homebrew data. That could cause issues at UI side since the buffer isn't null but empty. Extra check have been added UI side too.
(I cleaned up some files during my research too)
Fixes#5188
* Remove additional check
* Remove unused using
* GAL: Dispose Renderer after running deferred actions
Deferred actions from disposing physical memory instances always dispose the resources in their caches. The renderer can't be disposed before these resources get disposed, otherwise the dispose actions will not actually run, and the ThreadedRenderer may get stuck trying to enqueue too many commands when there is nothing consuming them.
This should fix most instances of the emulator freezing on close.
* Wait for main render commands to finish, but keep RenderThread alive til dispose
* Address some feedback.
* No parameterize needed
* Set thread name as part of constructor
* Port to Ava and SDL2
# .NET 8 migration (new warnings are caused by the NET 8 C# compiler and analyzer)
# The following info messages might need to be fixed in the source code instead of hiding the actual message
# Without the following lines, dotnet format would fail
# Disable "Collection initialization can be simplified"
dotnet_diagnostic.IDE0028.severity=none
dotnet_diagnostic.IDE0300.severity=none
dotnet_diagnostic.IDE0301.severity=none
dotnet_diagnostic.IDE0302.severity=none
dotnet_diagnostic.IDE0305.severity=none
# Disable "'new' expression can be simplified"
dotnet_diagnostic.IDE0090.severity=none
# Disable "Use primary constructor"
dotnet_diagnostic.IDE0290.severity=none
# Disable "Member '' does not access instance data and can be marked as static"
dotnet_diagnostic.CA1822.severity=none
# Disable "Change type of field '' from '' to '' for improved performance"
dotnet_diagnostic.CA1859.severity=none
# Disable "Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array"
dotnet_diagnostic.CA1861.severity=none
# Disable "Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'"
dotnet_diagnostic.CA1862.severity=none
[src/Ryujinx/UI/ViewModels/**.cs]
# Disable "mark members as static" rule for ViewModels
dotnet_diagnostic.CA1822.severity=none
[src/Ryujinx.HLE/HOS/Services/**.cs]
# Disable "mark members as static" rule for services
description:A log file will help our developers to better diagnose and fix the issue.
description:A log file will help our developers to better diagnose and fix the issue.
placeholder:Logs files can be found under "Logs" folder in Ryujinx program folder. You can drag and drop the log on to the text area
placeholder:Logs files can be found under "Logs" folder in Ryujinx program folder. They can also be accessed by opening Ryujinx, then going to File > Open Logs Folder. You can drag and drop the log on to the text area (do not copy paste).
description:Shader Instruction is missing in Ryujinx.
title:"[GPU]"
labels:[gpu, not-implemented]
body:
- type:textarea
id:instruction
attributes:
label:Shader instruction
description:What shader instruction is missing?
validations:
required:true
- type:textarea
id:required
attributes:
label:Required by
description:Add links to the [compatibility list page(s)](https://github.com/Ryujinx/Ryujinx-Games-List/issues) of the game(s) that require this instruction.
You can contribute to Ryujinx with PRs, testing of PRs and issues. Contributing code and other implementations is greatly appreciated alongside simply filing issues for problems you encounter.
Please read the entire document before continuing as it can potentially save everyone involved a significant amount of time.
We always welcome bug reports, feature proposals and overall feedback. Here are a few tips on how you can make reporting your issue as effective as possible.
### Identify Where to Report
The Ryujinx codebase is distributed across multiple repositories in the [Ryujinx organization](https://github.com/Ryujinx). Depending on the feedback you might want to file the issue on a different repo. Here are a few common repos:
Before filing a new issue, please search our [open issues](https://github.com/Ryujinx/Ryujinx/issues) to check if it already exists.
If you do find an existing issue, please include your own feedback in the discussion. Do consider upvoting (👍 reaction) the original post, as this helps us prioritize popular issues in our backlog.
### Writing a Good Feature Request
Please review any feature requests already opened to both check it has not already been suggested, and to familiarize yourself with the format. When ready to submit a proposal, please use the [Feature Request issue template](https://github.com/Ryujinx/Ryujinx/issues/new?assignees=&labels=&projects=&template=feature_request.yml&title=%5BFeature+Request%5D).
### Writing a Good Bug Report
Good bug reports make it easier for maintainers to verify and root cause the underlying problem. The better a bug report, the faster the problem will be resolved.
Ideally, a bug report should contain the following information:
* A high-level description of the problem.
* A _minimal reproduction_, i.e. the smallest time commitment/configuration required to reproduce the wrong behavior. This can be in the form of a small homebrew application, or by providing a save file and reproduction steps for a specific game.
* A description of the _expected behavior_, contrasted with the _actual behavior_ observed.
* Information on the environment: OS/distro, CPU, GPU (including driver), RAM etc.
* A Ryujinx log file of the run instance where the issue occurred. Log files can be found in `[Executable Folder]/Logs` and are named chronologically.
* Additional information, e.g. is it a regression from previous versions? Are there any known workarounds?
When ready to submit a bug report, please use the [Bug Report issue template](https://github.com/Ryujinx/Ryujinx/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D).
## Contributing Changes
Project maintainers will merge changes that both improve the project and meet our standards for code quality.
The [Pull Request Guide](docs/workflow/pr-guide.md) and [License](https://github.com/Ryujinx/Ryujinx/blob/master/LICENSE.txt) docs define additional guidance.
* **DO** give priority to the current style of the project or file you're changing even if it diverges from the general guidelines.
* **DO** keep the discussions focused. When a new or related topic comes up
it's often better to create new issue than to side track the discussion.
* **DO** clearly state on an issue that you are going to take on implementing it.
* **DO** blog and tweet (or whatever) about your contributions, frequently!
Please do not:
* **DON'T** make PRs for style changes.
* **DON'T** surprise us with big pull requests. Instead, file an issue and talk with us on Discord to start
a discussion so we can agree on a direction before you invest a large amount
of time.
* **DON'T** commit code that you didn't write. If you find code that you think is a good fit to add to Ryujinx, file an issue or talk to us on Discord to start a discussion before proceeding.
* **DON'T** submit PRs that alter licensing related files or headers. If you believe there's a problem with them, file an issue and we'll be happy to discuss it.
### Suggested Workflow
We use and recommend the following workflow:
1. Create or find an issue for your work.
- You can skip this step for trivial changes.
- Get agreement from the team and the community that your proposed change is a good one if it is of significant size or changes core functionality.
- Clearly state that you are going to take on implementing it, if that's the case. You can request that the issue be assigned to you. Note: The issue filer and the implementer don't have to be the same person.
2. Create a personal fork of the repository on GitHub (if you don't already have one).
3. In your fork, create a branch off of main (`git checkout -b mybranch`).
- Branches are useful since they isolate your changes from incoming changes from upstream. They also enable you to create multiple PRs from the same fork.
4. Make and commit your changes to your branch.
- [Build Instructions](https://github.com/Ryujinx/Ryujinx#building) explains how to build and test.
- Commit messages should be clear statements of action and intent.
6. Build the repository with your changes.
- Make sure that the builds are clean.
- Make sure that `dotnet format` has been run and any corrections tested and committed.
7. Create a pull request (PR) against the Ryujinx/Ryujinx repository's **main** branch.
- State in the description what issue or improvement your change is addressing.
- Check if all the Continuous Integration checks are passing. Refer to [Actions](https://github.com/Ryujinx/Ryujinx/actions) to check for outstanding errors.
8. Wait for feedback or approval of your changes from the [core development team](https://github.com/orgs/Ryujinx/teams/developers)
- Details about the pull request [review procedure](docs/workflow/ci/pr-guide.md).
9. When the team members have signed off, and all checks are green, your PR will be merged.
- The next official build will automatically include your change.
- You can delete the branch you used for making the change.
### Good First Issues
The team marks the most straightforward issues as [good first issues](https://github.com/Ryujinx/Ryujinx/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). This set of issues is the place to start if you are interested in contributing but new to the codebase.
### Commit Messages
Please format commit messages as follows (based on [A Note About Git Commit Messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)):
```
Summarize change in 50 characters or less
Provide more detail after the first line. Leave one blank line below the
summary and wrap all lines at 72 characters or less.
If the change fixes an issue, leave another blank line after the final
paragraph and indicate which issue is fixed in the specific format
below.
Fix #42
```
Also do your best to factor commits appropriately, not too large with unrelated things in the same commit, and not too small with the same small change applied N times in N different commits.
### PR - CI Process
The [Ryujinx continuous integration](https://github.com/Ryujinx/Ryujinx/actions) (CI) system will automatically perform the required builds and run tests (including the ones you are expected to run) for PRs. Builds and test runs must be clean or have bugs properly filed against flaky/unexpected failures that are unrelated to your change.
If the CI build fails for any reason, the PR actions tab should be consulted for further information on the failure. There are a few usual suspects for such a failure:
* `dotnet format` has not been run on the PR and has outstanding stylistic issues.
* There is an error within the PR that fails a test or errors the compiler.
* Random failure of the workflow can occasionally result in a CI failure. In this scenario a maintainer will manually restart the job.
### PR Feedback
Ryujinx team and community members will provide feedback on your change. Community feedback is highly valued. You may see the absence of team feedback if the community has already provided good review feedback.
Two Ryujinx team members must review and approve every PR prior to merge. They will often reply with "LGTM, see nit". That means that the PR will be merged once the feedback is resolved. "LGTM" == "looks good to me".
There are lots of thoughts and [approaches](https://github.com/antlr/antlr4-cpp/blob/master/CONTRIBUTING.md#emoji) for how to efficiently discuss changes. It is best to be clear and explicit with your feedback. Please be patient with people who might not understand the finer details about your approach to feedback.
#### Copying Changes from Other Projects
Ryujinx uses some implementations and frameworks from other projects. The following rules must be followed for PRs that include changes from another project:
- The license of the file is [permissive](https://en.wikipedia.org/wiki/Permissive_free_software_licence).
- The license of the file is left in-tact.
- The contribution is correctly attributed in the [3rd party notices](https://github.com/Ryujinx/Ryujinx/blob/master/distribution/legal/THIRDPARTY.md) file in the repository, as needed.
Ryujinx is an open-source Nintendo Switch emulator, created by gdkchan, written in C#.
Ryujinx is an open-source Nintendo Switch emulator, created by gdkchan, written in C#.
This emulator aims at providing excellent accuracy and performance, a user-friendly interface and consistent builds.
This emulator aims at providing excellent accuracy and performance, a user-friendly interface and consistent builds.
It was written from scratch and development on the project began in September 2017. Ryujinx is available on Github under the <ahref="https://github.com/Ryujinx/Ryujinx/blob/master/LICENSE.txt"target="_blank">MIT license</a>. <br/>
It was written from scratch and development on the project began in September 2017.
Ryujinx is available on Github under the <ahref="https://github.com/Ryujinx/Ryujinx/blob/master/LICENSE.txt"target="_blank">MIT license</a>.
As of April 2023, Ryujinx has been tested on approximately 4,050 titles; over 4,000 boot past menus and into gameplay, with roughly 3,400 of those being considered playable.
As of May 2024, Ryujinx has been tested on approximately 4,300 titles;
You can check out the compatibility list [here](https://github.com/Ryujinx/Ryujinx-Games-List/issues). Anyone is free to submit a new game test or update an existing game test entry; simply follow the new issue template and testing guidelines, or post as a reply to the applicable game issue. Use the search function to see if a game has been tested already!
over 4,100 boot past menus and into gameplay, with roughly 3,550 of those being considered playable.
You can check out the compatibility list [here](https://github.com/Ryujinx/Ryujinx-Games-List/issues).
Anyone is free to submit a new game test or update an existing game test entry;
simply follow the new issue template and testing guidelines, or post as a reply to the applicable game issue.
Use the search function to see if a game has been tested already!
## Usage
## Usage
To run this emulator, your PC must be equipped with at least 8GiB of RAM; failing to meet this requirement may result in a poor gameplay experience or unexpected crashes.
To run this emulator, your PC must be equipped with at least 8GiB of RAM;
failing to meet this requirement may result in a poor gameplay experience or unexpected crashes.
See our [Setup & Configuration Guide](https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide) on how to set up the emulator.
See our [Setup & Configuration Guide](https://github.com/Ryujinx/Ryujinx/wiki/Ryujinx-Setup-&-Configuration-Guide) on how to set up the emulator.
For our Local Wireless and LAN builds, see our [Multiplayer: Local Play/Local Wireless Guide
For our Local Wireless (LDN) builds, see our [Multiplayer: Local Play/Local Wireless Guide
Avalonia UI comes with translations for various languages. See [Crowdin](https://crwd.in/ryujinx) for more information.
Avalonia UI comes with translations for various languages. See [Crowdin](https://crwd.in/ryujinx) for more information.
## Latest build
## Latest build
These builds are compiled automatically for each commit on the master branch. While we strive to ensure optimal stability and performance prior to pushing an update, our automated builds **may be unstable or completely broken.**
These builds are compiled automatically for each commit on the master branch.
While we strive to ensure optimal stability and performance prior to pushing an update, our automated builds **may be unstable or completely broken**.
If you want to see details on updates to the emulator, you can visit our [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog).
If you want to see details on updates to the emulator, you can visit our [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog).
The latest automatic build for Windows, macOS, and Linux can be found on the [Official Website](https://ryujinx.org/download).
The latest automatic build for Windows, macOS, and Linux can be found on the [Official Website](https://ryujinx.org/download).
## Documentation
If you are planning to contribute or just want to learn more about this project please read through our [documentation](docs/README.md).
## Building
## Building
If you wish to build the emulator yourself, follow these steps:
If you wish to build the emulator yourself, follow these steps:
### Step 1
### Step 1
Install the X64 version of [.NET 7.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/7.0).
Install the [.NET 8.0 (or higher) SDK](https://dotnet.microsoft.com/download/dotnet/8.0).
Make sure your SDK version is higher or equal to the required version specified in [global.json](global.json).
### Step 2
### Step 2
Either use `git clone https://github.com/Ryujinx/Ryujinx` on the command line to clone the repository or use Code --> Download zip button to get the files.
Either use `git clone https://github.com/Ryujinx/Ryujinx` on the command line to clone the repository or use Code --> Download zip button to get the files.
### Step 3
### Step 3
To build Ryujinx, open a command prompt inside the project directory. You can quickly access it on Windows by holding shift in File Explorer, then right clicking and selecting `Open command window here`. Then type the following command:
To build Ryujinx, open a command prompt inside the project directory.
`dotnet build -c Release -o build`
You can quickly access it on Windows by holding shift in File Explorer, then right clicking and selecting `Open command window here`.
Then type the following command: `dotnet build -c Release -o build`
the built files will be found in the newly created build directory.
the built files will be found in the newly created build directory.
Ryujinx system files are stored in the `Ryujinx` folder. This folder is located in the user folder, which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
Ryujinx system files are stored in the `Ryujinx` folder.
This folder is located in the user folder, which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
## Features
## Features
- **Audio**
- **Audio**
Audio output is entirely supported, audio input (microphone) isn't supported. We use C# wrappers for [OpenAL](https://openal-soft.org/), and [SDL2](https://www.libsdl.org/) & [libsoundio](http://libsound.io/) as fallbacks.
Audio output is entirely supported, audio input (microphone) isn't supported.
We use C# wrappers for [OpenAL](https://openal-soft.org/), and [SDL2](https://www.libsdl.org/) & [libsoundio](http://libsound.io/) as fallbacks.
- **CPU**
- **CPU**
The CPU emulator, ARMeilleure, emulates an ARMv8 CPU and currently has support for most 64-bit ARMv8 and some of the ARMv7 (and older) instructions, including partial 32-bit support. It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code.
The CPU emulator, ARMeilleure, emulates an ARMv8 CPU and currently has support for most 64-bit ARMv8 and some of the ARMv7 (and older) instructions, including partial 32-bit support.
There are three memory manager options available depending on the user's preference, leveraging both software-based (slower) and host-mapped modes (much faster). The fastest option (host, unchecked) is set by default.
It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code.
Ryujinx also features an optional Profiled Persistent Translation Cache, which essentially caches translated functions so that they do not need to be translated every time the game loads. The net result is a significant reduction in load times (the amount of time between launching a game and arriving at the title screen) for nearly every game. NOTE: this feature is enabled by default in the Options menu > System tab. You must launch the game at least twice to the title screen or beyond before performance improvements are unlocked on the third launch! These improvements are permanent and do not require any extra launches going forward.
There are three memory manager options available depending on the user's preference, leveraging both software-based (slower) and host-mapped modes (much faster).
The fastest option (host, unchecked) is set by default.
Ryujinx also features an optional Profiled Persistent Translation Cache, which essentially caches translated functions so that they do not need to be translated every time the game loads.
The net result is a significant reduction in load times (the amount of time between launching a game and arriving at the title screen) for nearly every game.
NOTE: This feature is enabled by default in the Options menu > System tab.
You must launch the game at least twice to the title screen or beyond before performance improvements are unlocked on the third launch!
These improvements are permanent and do not require any extra launches going forward.
- **GPU**
- **GPU**
The GPU emulator emulates the Switch's Maxwell GPU using either the OpenGL (version 4.5 minimum), Vulkan, or Metal (via MoltenVK) APIs through a custom build of OpenTK or Silk.NET respectively. There are currently six graphics enhancements available to the end user in Ryujinx: Disk Shader Caching, Resolution Scaling, Anti-Aliasing, Scaling Filters (including FSR), Anisotropic Filtering and Aspect Ratio Adjustment. These enhancements can be adjusted or toggled as desired in the GUI.
The GPU emulator emulates the Switch's Maxwell GPU using either the OpenGL (version 4.5 minimum), Vulkan, or Metal (via MoltenVK) APIs through a custom build of OpenTK or Silk.NET respectively.
There are currently six graphics enhancements available to the end user in Ryujinx: Disk Shader Caching, Resolution Scaling, Anti-Aliasing, Scaling Filters (including FSR), Anisotropic Filtering and Aspect Ratio Adjustment.
These enhancements can be adjusted or toggled as desired in the GUI.
- **Input**
- **Input**
We currently have support for keyboard, mouse, touch input, JoyCon input support, and nearly all controllers. Motion controls are natively supported in most cases; for dual-JoyCon motion support, DS4Windows or BetterJoy are currently required.
We currently have support for keyboard, mouse, touch input, JoyCon input support, and nearly all controllers.
In all scenarios, you can set up everything inside the input configuration menu.
Motion controls are natively supported in most cases; for dual-JoyCon motion support, DS4Windows or BetterJoy are currently required.
In all scenarios, you can set up everything inside the input configuration menu.
- **DLC & Modifications**
- **DLC & Modifications**
Ryujinx is able to manage add-on content/downloadable content through the GUI. Mods (romfs, exefs, and runtime mods such as cheats) are also supported; the GUI contains a shortcut to open the respective mods folder for a particular game.
Ryujinx is able to manage add-on content/downloadable content through the GUI.
Mods (romfs, exefs, and runtime mods such as cheats) are also supported;
the GUI contains a shortcut to open the respective mods folder for a particular game.
- **Configuration**
- **Configuration**
The emulator has settings for enabling or disabling some logging, remapping controllers, and more. You can configure all of them through the graphical interface or manually through the config file, `Config.json`, found in the user folder which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
The emulator has settings for enabling or disabling some logging, remapping controllers, and more.
You can configure all of them through the graphical interface or manually through the config file, `Config.json`, found in the user folder which can be accessed by clicking `Open Ryujinx Folder` under the File menu in the GUI.
## Contact
## Contact
If you have contributions, suggestions, need emulator support or just want to get in touch with the team, join our [Discord server](https://discord.com/invite/Ryujinx). You may also review our [FAQ](https://github.com/Ryujinx/Ryujinx/wiki/Frequently-Asked-Questions).
If you have contributions, suggestions, need emulator support or just want to get in touch with the team, join our [Discord server](https://discord.com/invite/Ryujinx).
You may also review our [FAQ](https://github.com/Ryujinx/Ryujinx/wiki/Frequently-Asked-Questions).
## Donations
## Donations
@ -134,10 +158,13 @@ All funds received through Patreon are considered a donation to support the proj
## License
## License
This software is licensed under the terms of the <ahref="https://github.com/Ryujinx/Ryujinx/blob/master/LICENSE.txt"target="_blank">MIT license.</a></i><br/>
This software is licensed under the terms of the [MIT license](LICENSE.txt).
This project makes use of code authored by the libvpx project, licensed under BSD and the ffmpeg project, licensed under LGPLv3.
This project makes use of code authored by the libvpx project, licensed under BSD and the ffmpeg project, licensed under LGPLv3.
See [LICENSE.txt](LICENSE.txt) and [THIRDPARTY.md](distribution/legal/THIRDPARTY.md) for more details.
See [LICENSE.txt](LICENSE.txt) and [THIRDPARTY.md](distribution/legal/THIRDPARTY.md) for more details.
## Credits
## Credits
- [LibHac](https://github.com/Thealexbarney/LibHac) is used for our file-system.
- [LibHac](https://github.com/Thealexbarney/LibHac) is used for our file-system.
- [AmiiboAPI](https://www.amiiboapi.com) is used in our Amiibo emulation.
- [AmiiboAPI](https://www.amiiboapi.com) is used in our Amiibo emulation.
- [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm) is used for one of our available multiplayer modes.
- [ShellLink](https://github.com/securifybv/ShellLink) is used for Windows shortcut generation.
This repo includes several documents that explain both high-level and low-level concepts about Ryujinx and its functions. These are very useful for contributors, to get context that can be very difficult to acquire from just reading code.
Intro to Ryujinx
==================
Ryujinx is an open-source Nintendo Switch emulator, created by gdkchan, written in C#.
* The CPU emulator, ARMeilleure, emulates an ARMv8 CPU and currently has support for most 64-bit ARMv8 and some of the ARMv7 (and older) instructions.
* The GPU emulator emulates the Switch's Maxwell GPU using either the OpenGL (version 4.5 minimum), Vulkan, or Metal (via MoltenVK) APIs through a custom build of OpenTK or Silk.NET respectively.
* Audio output is entirely supported via C# wrappers for SDL2, with OpenAL & libsoundio as fallbacks.
Getting Started
===============
- [Installing the .NET SDK](https://dotnet.microsoft.com/download)
The general rule we follow is "use Visual Studio defaults".
Using an IDE that supports the `.editorconfig` standard will make this much simpler.
1. We use [Allman style](http://en.wikipedia.org/wiki/Indent_style#Allman_style) braces, where each brace begins on a new line. A single line statement block can go without braces but the block must be properly indented on its own line and must not be nested in other statement blocks that use braces (See rule 18 for more details). One exception is that a `using` statement is permitted to be nested within another `using` statement by starting on the following line at the same indentation level, even if the nested `using` contains a controlled block.
2. We use four spaces of indentation (no tabs).
3. We use `_camelCase` for internal and private fields and use `readonly` where possible. Prefix internal and private instance fields with `_`, static fields with `s_` and thread static fields with `t_`. When used on static fields, `readonly` should come after `static` (e.g. `static readonly` not `readonly static`). Public fields should be used sparingly and should use PascalCasing with no prefix when used.
4. We avoid `this.` unless absolutely necessary.
5. We always specify the visibility, even if it's the default (e.g.
`private string _foo` not `string _foo`). Visibility should be the first modifier (e.g.
`public abstract` not `abstract public`).
6. Namespace imports should be specified at the top of the file, *outside* of `namespace` declarations.
7. Avoid more than one empty line at any time. For example, do not have two
blank lines between members of a type.
8. Avoid spurious free spaces.
For example avoid `if (someVar == 0)...`, where the dots mark the spurious free spaces.
Consider enabling "View White Space (Ctrl+R, Ctrl+W)" or "Edit -> Advanced -> View White Space" if using Visual Studio to aid detection.
9. If a file happens to differ in style from these guidelines (e.g. private members are named `m_member`
rather than `_member`), the existing style in that file takes precedence.
10. We only use `var` when the type is explicitly named on the right-hand side, typically due to either `new` or an explicit cast, e.g. `var stream = new FileStream(...)` not `var stream = OpenStandardInput()`.
- Similarly, target-typed `new()` can only be used when the type is explicitly named on the left-hand side, in a variable definition statement or a field definition statement. e.g. `FileStream stream = new(...);`, but not `stream = new(...);` (where the type was specified on a previous line).
11. We use language keywords instead of BCL types (e.g. `int, string, float` instead of `Int32, String, Single`, etc) for both type references as well as method calls (e.g. `int.Parse` instead of `Int32.Parse`). See issue [#13976](https://github.com/dotnet/runtime/issues/13976) for examples.
12. We use PascalCasing to name all our constant local variables and fields. The only exception is for interop code where the constant value should exactly match the name and value of the code you are calling via interop.
13. We use PascalCasing for all method names, including local functions.
14. We use ```nameof(...)``` instead of ```"..."``` whenever possible and relevant.
15. Fields should be specified at the top within type declarations.
16. When including non-ASCII characters in the source code use Unicode escape sequences (\uXXXX) instead of literal characters. Literal non-ASCII characters occasionally get garbled by a tool or editor.
17. When using labels (for goto), indent the label one less than the current indentation.
18. When using a single-statement if, we follow these conventions:
- Never use single-line form (for example: `if (source == null) throw new ArgumentNullException("source");`)
- Using braces is always accepted, and required if any block of an `if`/`else if`/.../`else` compound statement uses braces or if a single statement body spans multiple lines.
- Braces may be omitted only if the body of *every* block associated with an `if`/`else if`/.../`else` compound statement is placed on a single line.
19. Make all internal and private types static or sealed unless derivation from them is required. As with any implementation detail, they can be changed if/when derivation is required in the future.
20. XML docs should be used when writing interfaces or when a class/method is deemed sufficient in scope or complexity.
21. So-called [Magic Numbers](https://en.wikipedia.org/wiki/Magic_number_(programming)) should be defined as named constants before use (for example `for (int i = 56; i < 68; i++)` could read `for (int i = _currentAge; i < _retireAge; i++)`).
This may be ignored for trivial or syntactically common statements.
An [EditorConfig](https://editorconfig.org "EditorConfig homepage") file (`.editorconfig`) has been provided at the root of the runtime repository, enabling C# auto-formatting conforming to the above guidelines.
### Example File:
``ShaderCache.cs:``
```C#
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Gpu.Engine.Threed;
using Ryujinx.Graphics.Gpu.Engine.Types;
using Ryujinx.Graphics.Gpu.Image;
using Ryujinx.Graphics.Gpu.Memory;
using Ryujinx.Graphics.Gpu.Shader.DiskCache;
using Ryujinx.Graphics.Shader;
using Ryujinx.Graphics.Shader.Translation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
namespace Ryujinx.Graphics.Gpu.Shader
{
/// <summary>
/// Memory cache of shader code.
/// </summary>
class ShaderCache : IDisposable
{
/// <summary>
/// Default flags used on the shader translation process.
/// </summary>
public const TranslationFlags DefaultFlags = TranslationFlags.DebugMode;
private readonly struct TranslatedShader
{
public readonly CachedShaderStage Shader;
public readonly ShaderProgram Program;
public TranslatedShader(CachedShaderStage shader, ShaderProgram program)
{
Shader = shader;
Program = program;
}
}
...
/// <summary>
/// Processes the queue of shaders that must save their binaries to the disk cache.
/// </summary>
public void ProcessShaderCacheQueue()
{
// Check to see if the binaries for previously compiled shaders are ready, and save them out.
while (_programsToSaveQueue.TryPeek(out ProgramToSave programToSave))
{
ProgramLinkStatus result = programToSave.HostProgram.CheckProgramLink(false);
For other languages, our current best guidance is consistency. When editing files, keep new code and changes consistent with the style in the files. For new files, it should conform to the style for that component. If there is a completely new component, anything that is reasonably broadly accepted is fine.
All contributions to Ryujinx/Ryujinx repository are made via pull requests (PRs) rather than through direct commits. The pull requests are reviewed and merged by the maintainers after a review and at least two approvals from the core development team.
To merge pull requests, you must have write permissions in the repository.
## Quick Code Review Rules
* Do not mix unrelated changes in one pull request. For example, a code style change should never be mixed with a bug fix.
* All changes should follow the existing code style. You can read more about our code style at [docs/coding-guidelines](../coding-guidelines/coding-style.md).
* Adding external dependencies is to be avoided unless not doing so would introduce _significant_ complexity. Any dependency addition should be justified and discussed before merge.
* Use Draft pull requests for changes you are still working on but want early CI loop feedback. When you think your changes are ready for review, [change the status](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-stage-of-a-pull-request) of your pull request.
* Rebase your changes when required or directly requested. Changes should always be commited on top of the upstream branch, not the other way around.
* If you are asked to make changes during the review process do them as a new commit.
* Only resolve GitHub conversations with reviewers once they have been addressed with a commit, or via a mutual agreement.
## Pull Request Ownership
Every pull request will have automatically have labels and reviewers assigned. The label not only indicates the code segment which the change touches but also the area reviewers to be assigned.
If during the code review process a merge conflict occurs, the PR author is responsible for its resolution. Help will be provided if necessary although GitHub makes this easier by allowing simple conflict resolution using the [conflict-editor](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github).
## Pull Request Builds
When submitting a PR to the `Ryujinx/Ryujinx` repository, various builds will run validating many areas to ensure we keep developer productivity and product quality high. These various workflows can be tracked in the [Actions](https://github.com/Ryujinx/Ryujinx/actions) tab of the repository. If the job continues to completion, the build artifacts will be uploaded and posted as a comment in the PR discussion.
## Review Turnaround Times
Ryujinx is a project that is maintained by volunteers on a completely free-time basis. As such we cannot guarantee any particular timeframe for pull request review and approval. Weeks to months are common for larger (>500 line) PRs but there are some additional best practises to avoid review purgatory.
* Make the reviewers life easier wherever possible. Make use of descriptive commit names, code comments and XML docs where applicable.
* If there is disagreement on feedback then always lean on the side of the development team and community over any personal opinion.
* We're human. We miss things. We forget things. If there has been radio silence on your changes for a substantial period of time then do not hesitate to reach out directly either with something simple like "bump" on GitHub or a directly on Discord.
To re-iterate, make the review as easy for us as possible, respond promptly and be comfortable to interact directly with us for anything else.
## Merging Pull Requests
Anyone with write access can merge a pull request manually when the following conditions have been met:
* The PR has been approved by two reviewers and any other objections are addressed.
* You can request follow up reviews from the original reviewers if they requested changes.
* The PR successfully builds and passes all tests in the Continuous Integration (CI) system. In case of failures, refer to the [Actions](https://github.com/Ryujinx/Ryujinx/actions) tab of your PR.
Typically, PRs are merged as one commit (squash merges). It creates a simpler history than a Merge Commit. "Special circumstances" are rare, and typically mean that there are a series of cleanly separated changes that will be too hard to understand if squashed together, or for some reason we want to preserve the ability to dissect them.
## Blocking Pull Request Merging
If for whatever reason you would like to move your pull request back to an in-progress status to avoid merging it in the current form, you can turn the PR into a draft PR by selecting the option under the reviewers section. Alternatively, you can do that by adding [WIP] prefix to the pull request title.
## Old Pull Request Policy
From time to time we will review older PRs and check them for relevance. If we find the PR is inactive or no longer applies, we will close it. As the PR owner, you can simply reopen it if you feel your closed PR needs our attention.