aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-03Update the artifact build's version number (#3297)voldemort2826
2022-05-03Implement PM GetProcessInfo atmosphere extension (partially) (#2966)gdkchan
2022-05-03Implement code memory syscalls (#2958)gdkchan
* Implement code memory syscalls * Remove owner process validation * Add 32-bit code memory syscalls * Remove unused field
2022-05-02Support memory aliasing (#2954)gdkchan
* Back to the origins: Make memory manager take guest PA rather than host address once again * Direct mapping with alias support on Windows * Fixes and remove more of the emulated shared memory * Linux support * Make shared and transfer memory not depend on SharedMemoryStorage * More efficient view mapping on Windows (no more restricted to 4KB pages at a time) * Handle potential access violations caused by partial unmap * Implement host mapping using shared memory on Linux * Add new GetPhysicalAddressChecked method, used to ensure the virtual address is mapped before address translation Also align GetRef behaviour with software memory manager * We don't need a mirrorable memory block for software memory manager mode * Disable memory aliasing tests while we don't have shared memory support on Mac * Shared memory & SIGBUS handler for macOS * Fix typo + nits + re-enable memory tests * Set MAP_JIT_DARWIN on x86 Mac too * Add back the address space mirror * Only set MAP_JIT_DARWIN if we are mapping as executable * Disable aliasing tests again (still fails on Mac) * Fix UnmapView4KB (by not casting size to int) * Use ref counting on memory blocks to delay closing the shared memory handle until all blocks using it are disposed * Address PR feedback * Make RO hold a reference to the guest process memory manager to avoid early disposal Co-authored-by: nastys <nastys@users.noreply.github.com>
2022-05-02Fix flush action from multiple threads regression (#3311)riperiperi
If two or more threads encounter a region of memory where a read action has been registered, then they must _both_ wait on the data. Clearing the action before it completed was causing the null check above to fail, so the action would only be run on the first thread, and the second would end up continuing without waiting. Depending on what the game does, this could be disasterous. This fixes a regression introduced by #3302 with Pokemon Legends Arceus, and possibly Catherine. There are likely other affected games. What is fixed in that PR should still be fixed.
2022-05-01Restrict cases where vertex buffer size from index buffer type is used (#3304)gdkchan
2022-04-29Fix various issues with texture sync (#3302)riperiperi
* Fix various issues with texture sync A variable called _actionRegistered is used to keep track of whether a tracking action has been registered for a given texture group handle. This variable is set when the action is registered, and should be unset when it is consumed. This is used to skip registering the tracking action if it's already registered, saving some time for render targets that are modified very often. There were two issues with this. The worst issue was that the tracking action handler exits early if the handle's modified flag is false... which means that it never reset _actionRegistered, as that was done within the Sync() method called later. The second issue was that this variable was set true after the sync action was registered, so it was technically possible for the action to run immediately, set the flag to false, then set it to true. Both situations would lead to the action never being registered again, as the texture group handle would be sure the action is already registered. This breaks the texture for the remaining runtime, or until it is disposed. It was also possible for a texture to register sync once, then on future frames the last modified sync number did not update. This may have caused some more minor issues. Seems to fix the Xenoblade flashing bug. Obviously this needs a lot of testing, since it was random chance. I typically had the most luck getting it to happen by switching time of day on the event theatre screen for a while, then entering the equipment screen by pressing X on an event. May also fix weird things like random chance air swimming in BOTW, maybe a few texture streaming bugs. * Exchange rather than CompareExchange
2022-04-21T32: Implement load/store single (immediate) (#3186)merry
* T32: Implement load/store single (immediate) * tests * tidy formatting * address comments
2022-04-20Update NpadController.cs (#3284)Harone
2022-04-15Implement HwOpus multistream functions (#3275)gdkchan
* Implement HwOpus multistream functions * Avoid one copy
2022-04-15ReactiveObject: Handle case when oldValue is null (#3268)merry
2022-04-10ForceDpiAware: X11 implementation (#3269)merry
* ForceDpiAware: X11 implementation * address comments
2022-04-10New shader cache implementation (#3194)gdkchan
* New shader cache implementation * Remove some debug code * Take transform feedback varying count into account * Create shader cache directory if it does not exist + fragment output map related fixes * Remove debug code * Only check texture descriptors if the constant buffer is bound * Also check CPU VA on GetSpanMapped * Remove more unused code and move cache related code * XML docs + remove more unused methods * Better codegen for TransformFeedbackDescriptor.AsSpan * Support migration from old cache format, remove more unused code Shader cache rebuild now also rewrites the shared toc and data files * Fix migration error with BRX shaders * Add a limit to the async translation queue Avoid async translation threads not being able to keep up and the queue growing very large * Re-create specialization state on recompile This might be required if a new version of the shader translator requires more or less state, or if there is a bug related to the GPU state access * Make shader cache more error resilient * Add some missing XML docs and move GpuAccessor docs to the interface/use inheritdoc * Address early PR feedback * Fix rebase * Remove IRenderer.CompileShader and IShader interface, replace with new ShaderSource struct passed to CreateProgram directly * Handle some missing exceptions * Make shader cache purge delete both old and new shader caches * Register textures on new specialization state * Translate and compile shaders in forward order (eliminates diffs due to different binding numbers) * Limit in-flight shader compilation to the maximum number of compilation threads * Replace ParallelDiskCacheLoader state changed event with a callback function * Better handling for invalid constant buffer 1 data length * Do not create the old cache directory structure if the old cache does not exist * Constant buffer use should be per-stage. This change will invalidate existing new caches (file format version was incremented) * Replace rectangle texture with just coordinate normalization * Skip incompatible shaders that are missing texture information, instead of crashing This is required if we, for example, support new texture instruction to the shader translator, and then they allow access to textures that were not accessed before. In this scenario, the old cache entry is no longer usable * Fix coordinates normalization on cubemap textures * Check if title ID is null before combining shader cache path * More robust constant buffer address validation on spec state * More robust constant buffer address validation on spec state (2) * Regenerate shader cache with one stream, rather than one per shader. * Only create shader cache directory during initialization * Logging improvements * Proper shader program disposal * PR feedback, and add a comment on serialized structs * XML docs for RegisterTexture Co-authored-by: riperiperi <rhy3756547@hotmail.com>
2022-04-09Fix tail merge from block with conditional jump to multiple returns (#3267)gdkchan
* Fix tail merge from block with conditional jump to multiple returns * PPTC version bump
2022-04-08Implement VMAD shader instruction and improve InvocationInfo and ISBERD ↵gdkchan
handling (#3251) * Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling * Shader cache version bump * Fix typo
2022-04-08Allow copy texture views to have mismatching multisample state (#3152)gdkchan
2022-04-08Lop3Expression: Optimize expressions (#3184)merry
* lut3 * bugfixes * TruthTable * false/true -> 0/-1 * add or to expressions * fix inversions * increment cache version
2022-04-08Remove save data creation prompt (#3252)MutantAura
* begone * review * mods directory update
2022-04-08Calculate vertex buffer size from index buffer type (#3253)gdkchan
* Calculate vertex buffer size from index buffer type * We also need to update the size if first vertex changes
2022-04-08amadeus: Improve and fix delay effect processing (#3205)Mary
* amadeus: Improve and fix delay effect processing This rework the delay effect processing by representing calculation with the appropriate matrix and by unrolling some loop in the code. This allows better optimization by the JIT while making it more readeable. Also fix a bug in the Surround code path found while looking back at my notes. * Remove useless GetHashCode * Address gdkchan's comments
2022-04-07service: hid: Signal event on AcquireNpadStyleSetUpdateEventHandle (#3247)Narr the Reg
2022-04-07Update to LibHac 0.16.1 (#3263)Alex Barney
2022-04-06amadeus: Update to REV11 (#3230)Mary
This should implement all ABI changes from REV11 on 14.0.0 As Nintendo changed the channel disposition for "legacy" effects (Delay, Reverb and Reverb 3D) to match the standard channel mapping, I took the liberty to just remap to the old disposition for now. The proper changes will be handled at a later date with a complete rewriting of those 3 effects to be more readable (see https://github.com/Ryujinx/Ryujinx/pull/3205 for the first iteration of it).
2022-04-05Do not clamp SNorm outputs to the [0, 1] range on OpenGL (#3260)gdkchan
2022-04-04Implement primitive restart draw arrays properly on OpenGL (#3256)gdkchan
2022-04-04Do not force scissor on clear if scissor is disabled (#3258)gdkchan
2022-04-04Small graphics abstraction layer cleanup (#3257)gdkchan
2022-04-04Fix shader textureSize with multisample and buffer textures (#3240)gdkchan
* Fix shader textureSize with multisample and buffer textures * Replace out param with tuple return value
2022-03-26infra: Put SDL2 headless release inside a GUI-less block in PR (#3218)Mary
As title say.
2022-03-23Support NVDEC H264 interlaced video decoding and VIC deinterlacing (#3225)gdkchan
* Support NVDEC H264 interlaced video decoding and VIC deinterlacing * Remove unused code
2022-03-22hle: Some cleanup (#3210)Ac_K
* hle: Some cleanup This PR cleaned up a bit the HLE folder and the VirtualFileSystem one, since we use LibHac, we can use some class of it directly instead of duplicate things. The "Content" of VFS folder is removed since it should be handled in the NCM service directly. A larger cleanup should be done later since there is still be duplicated code here and there. * Fix Headless.SDL2 * Addresses gdkchan feedback
2022-03-21Memory.Tests: Make Multithreading test explicit (#3220)merry
2022-03-20Don't restore Viewport 0 if it hasn't been set yet. (#3219)riperiperi
Fixes a driver crash when starting some games caused by #3217
2022-03-20De-tile GOB when DMA copying from block linear to pitch kind memory regions ↵gdkchan
(#3207) * De-tile GOB when DMA copying from block linear to pitch kind memory regions * XML docs + nits * Remove using * No flush for regular buffer copies * Add back ulong casts, fix regression due to oversight
2022-03-20Fix OpenGL issues with RTSS overlays and OBS Game Capture (#3217)riperiperi
OpenGL game overlays and hooks tend to make a lot of assumptions about how games present frames to the screen, since presentation in OpenGL kind of sucks and they would like to have info such as the size of the screen, or if the contents are SRGB rather than linear. There are two ways of getting this. OBS hooks swap buffers to get a frame for video capture, but it actually checks the bound framebuffer at the time. I made sure that this matches the output framebuffer (the window) so that the output matches the size. RTSS checks the viewport size by default, but this was actually set to the last used viewport by the game, causing the OSD to fly all across the screen depending on how it was used (or res scale). The viewport is now manually set to match the output framebuffer size. In the case of RTSS, it also loads its resources by destructively setting a pixel pack parameter without regard to what it was set to by the guest application. OpenGL state can be set for a long period of time and is not expected to be set before each call to a method, so randomly changing it isn't great practice. To fix this, I've added a line to set the pixel unpack alignment back to 4 after presentation, which should cover RTSS loading its incredibly ugly font. - RTSS and overlays that use it should no longer cause certain textures to load incorrectly. (mario kart 8, pokemon legends arceus) - OBS Game Capture should no longer crop the game output incorrectly, flicker randomly, or capture with incorrect gamma. This doesn't fix issues with how RTSS reports our frame timings.
2022-03-20oslc: Fix condition in GetSaveDataBackupSetting (#3208)Ac_K
* oslc: Fix condition in GetSaveDataBackupSetting This PR fixes a condition previously implemented in #3190 where ACNH can't be booted without an existing savedata. Closes #3206 * Addresses gdkchan feedback
2022-03-19InstEmitMemoryEx: Barrier after write on ordered store (#3193)merry
* InstEmitMemoryEx: Barrier after write on ordered store * increment ptc version * 32
2022-03-15ntc: Implement IEnsureNetworkClockAvailabilityService (#3192)Ac_K
* ntc: Implement IEnsureNetworkClockAvailabilityService This PR implement a basic `IEnsureNetworkClockAvailabilityService` checked by RE. It's needed by Splatoon 2 with Guest Internet Access enabled. Game is now playable with this setting. * Update Ryujinx.HLE/HOS/Services/Nim/Ntc/StaticService/IEnsureNetworkClockAvailabilityService.cs Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2022-03-15Caching local network info and using an event handler to invalidate as ↵Jumpman
needed (improves menu slow down issue in FE3H) (#2761) * Update IGeneralService.cs Fix IPV4 local ip related frame drop in fire emblem by rewriting [CommandHipc(12)] * Fix IPV4 Local IP Slowdown & Style Fixes fix a missing space * Remove unnecessary line * Fix for hardcoding which index to use * Replace argument with empty string. By sending an empty string to Dns.GetHostAddresses("") you get back localhost info only. * Add caching, undo change in GetCurrentIpAddress Implement caching and revert the GetCurrentIP() function, speed improvements still present. * Remove unnecessary using * Syntax fixes and removing extra lines Requested changes by AcK77 * Properly unsubscribe from event handler Adds an unsubscribe in the dispose section of IGeneralService
2022-03-15Implement S8D24 texture format and tweak depth range detection (#2458)gdkchan
2022-03-15Dynamically increase buffer size when resizing (#2861)gdkchan
* Grow buffers by 1.5x of its size when resizing * Further restrict the cases where the dynamic expansion is done
2022-03-15Ui: Add option to show/hide console window (Windows-only) (#3170)merry
* Ui: Add option to show/hide console window (Windows-only) * Ui: Only display Show Console menu item on Windows * ConsoleHelper: Handle NULL case This will never happen * Address nits * Address comments * Address comments 2
2022-03-14Initialize indexed inputs used on next shader stage (#3198)gdkchan
2022-03-14Do not initialize geometry shader passthrough attributes (#3196)gdkchan
2022-03-12olsc: Implement GetSaveDataBackupSetting (#3190)Ac_K
* olsc: Implement GetSaveDataBackupSetting This PR implement GetSaveDataBackupSetting of OLSC service which is now needed by ACNH 2.0.5. The game is playable as usual if you use the same user profile as the original save file (I don't know if it was the case before), everything is checked by RE. * addresses gdkchan feedback
2022-03-12Implement rotate stick 90 degrees clockwise (#3084)darko1979
* Implement swapping sticks * Rotate 90 degrees clockwise Co-authored-by: matesic.darko@gmail.com <Darkman1979>
2022-03-12Fix GetUserDisableCount NRE (#3187)gdkchan
2022-03-12Limit number of events that can be retrieved from GetDisplayVSyncEvent (#3188)gdkchan
* Limit number of events that can be retrieved from GetDisplayVSyncEvent * Cleaning * Rename openDisplayInfos -> openDisplays
2022-03-11KThread: Fix GetPsr mask (#3180)merry
* ExecutionContext: GetPstate / SetPstate * Put it in NativeContext * KThread: Fix GetPsr mask * ExecutionContext: Turn methods into Pstate property * Address nit
2022-03-07amadeus: Fix wrong Span usage in CopyHistories (#3181)Mary
Fix a copypasta from the original Amadeus PR causing invalid CopyHistories output. Also added a missing size check. This fix a crash in Mononoke Slashdown