aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-08Move texture anisotropy check to SetInfo (#2843)riperiperi
Rather than calculating this for every sampler, this PR calculates if a texture can force anisotropy when its info is set, and exposes the value via a public boolean. This should help texture/sampler heavy games when anisotropic filtering is not Auto, like UE4 ones (or so i hear?). There is another cost where samplers are created twice when anisotropic filtering is enabled, but I'm not sure how relevant this one is.
2021-12-08Implement remaining shader double-precision instructions (#2845)gdkchan
* Implement remaining shader double-precision instructions * Shader cache version bump
2021-12-08misc: Fix alsoft.ini being present on Linux releases (#2902)Mary
2021-12-08Implement UHADD8 instruction (#2908)Piyachet Kanda
* Implement UHADD8 instruction along with a test unit * Update PTC revision number
2021-12-05Fix FLO.SH shader instruction with a input of 0 (#2876)gdkchan
* Fix FLO.SH shader instruction with a input of 0 * Shader cache version bump
2021-12-04kernel: Improve GetInfo readability and update to 13.0.0 (#2900)Mary
* kernel: Define InfoTYpe and make it less obscure when reading GetInfo Also map ThreadTickCount to 25 instead of 0xF0000002 like 13.x kernel. * kernel: Implement GetInfo IsApplication * kernel: Implement GetInfo FreeThreadCount
2021-12-04misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)Mary
Very basic migration across the codebase.
2021-11-30Fix Amiibo hanging since .NET 6 changes (#2890)Mary
The .NET 6 changes ended up causing a difference in the way we deserialise and would end up deserializing wrongly. This commit fixes it by resoring previous behaviour while still fixing the illink warning that caused that change in the first place
2021-11-29Don't blow up everything if a DLC file is moved or renamed. (#2867)Logan Stromberg
* Don't blow up everything if a DLC file is missing * change comment * More correctly setting the "enabled" check box on dlc dialog for the add-on NSP based on the enabled state of all NCAs in the package. * Update Ryujinx.HLE/HOS/ApplicationLoader.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> Co-authored-by: Logan Stromberg <lostromb@microsoft.com> Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-11-28infra: Migrate to .NET 6 (#2829)Mary
* infra: Migrate to .NET 6 * Rollback version naming change * Workaround .NET 6 ZipArchive API issues * ci: Switch to VS 2022 for AppVeyor CI is now ready for .NET 6 * Suppress WebClient warning in DoUpdateWithMultipleThreads * Attempt to workaround System.Drawing.Common changes on 6.0.0 * Change keyboard rendering from System.Drawing to ImageSharp * Make the software keyboard renderer multithreaded * Bump ImageSharp version to 1.0.4 to fix a bug in Image.Load * Add fallback fonts to the keyboard renderer * Fix warnings * Address caian's comment * Clean up linux workaround as it's uneeded now * Update readme Co-authored-by: Caian Benedicto <caianbene@gmail.com>
2021-11-28kernel: Fix sleep timing accuracy (#2828)Mary
* kernel: Fix sleep timing accuracy This commit corrects some mistake while comparing reversing of kernel 13.x with our own. WaitAndCheckScheduledObjects timing accuracy was also improved. * Make KTimeManager.WaitAndCheckScheduledObjects spin wait for sub milliseconds Fix performance regression on Pokemon Let's Go games and possibly others. * Address rip's comment * kernel: Fix issues with timeout of -1 (0xFFFFFFFF) Fixes possible hang on Pokemon DP and possibly others
2021-11-28kernel: Add support for CFI (#2839)Mary
Add basic support for the CFI value being passed in X18 since 11.0.0 by the official kernel. We do not implement any random generator atm in the kernel and as such the KSystemControl.GenerateRandom function is stubbed
2021-11-24account/ns: Implement 13.0.0+ service calls (#2820)Ac_K
This PR implements/stubs some missing calls introduced in recent firmware (13.0.0). - `acc:u0 InitializeApplicationInfoV2` needed by ACNH. - `aoc:u NotifyMountAddOnContent/NotifyUnmountAddOnContent/CheckAddOnContentMountStatus` checked by RE. Needed by ACNH. - `IPurchaseEventManager PopPurchasedProductInfo` needed by Dying Light. Now ACNH 2.0 update is fully playable, and Dying Light can boot further:
2021-11-21Better depth range detection (#2754)gdkchan
* Better depth range detection * PR feedback * Move depth mode set out of the loop and to a separate method
2021-11-15Nickname! - Init Amiibos with Profile's name! (#2804)VocalFan
* Remove comment from code. * Added needed RegisterInfo for TODO. * Forgot to add two words... * Stop being tired and fixed the one issue. * Removing suggested line from GDKchan. * GDK seems to have been incorrect? * Update Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
2021-11-14Fix shader integer from/to double conversion (#2831)gdkchan
2021-11-13Limit Custom Anisotropic Filtering to mipmapped textures with many levels ↵riperiperi
(#2832) * Limit Custom Anisotropic Filtering to only fully mipmapped textures There's a major flaw with the anisotropic filtering setting that causes @GamerzHell9137 to report graphical bugs that otherwise wouldn't be there, because he just won't set it to Auto. This should fix those issues, hopefully. These bugs are generally because anisotropic filtering is enabled on something that it shouldn't be, such as a post process filter or some data texture. This PR maintains two host samplers when custom AF is enabled, and only uses the forced AF one when the texture is 2d and fully mipmapped (goes down to 1x1). This is because game textures are the ideal target for this filtering, and they are typically fully mipmapped, unlike things like screen render targets which usually have 1 or just a few levels. This also only enables AF on mipmapped samplers where the filtering is bilinear or trilinear. This should be self explanatory. This PR also allows the changing of Anisotropic Filtering at runtime, and you can immediately see the changes. All samplers are flushed from the cache if the setting changes, causing them to be recreated with the new custom AF value. This brings it in line with our resolution scale. :relieved: * Expected minimum mip count for large textures rather than all, address feedback * Use Target rather than Info.Target * Retrigger build? * Fix rebase
2021-11-10Implement DrawTexture functionality (#2747)gdkchan
* Implement DrawTexture functionality * Non-NVIDIA support * Disable some features that should not affect draw texture (slow path) * Remove space from shader source * Match 2D engine names * Fix resolution scale and add missing XML docs * Disable transform feedback for draw texture fallback
2021-11-10Fix direct mouse access checkbox label (#2827)Adryzz (OLED Edition)
* Fix direct mouse access checkbox label * Change UI label so that the mouse is a pointing device
2021-11-08Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins (#2817)gdkchan
* Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins * Shader cache version bump * Fix back color value on fragment shader * Disable IPA multiplication for fixed function attributes and back color selection
2021-11-08Fix bindless/global memory elimination with inverted predicates (#2826)gdkchan
* Fix bindless/global memory elimination with inverted predicates * Shader cache version bump
2021-11-08Fix InvocationInfo on geometry shader and bindless default integer const (#2822)gdkchan
* Fix InvocationInfo on geometry shader and bindless default integer const * Shader cache version bump * Consistency for the default value
2021-11-04Ensure syncpoints are released and event handles closed on channel close (#2812)gdkchan
2021-11-03Clamp number of mipmap levels to avoid API errors due to invalid textures ↵gdkchan
(#2808)
2021-11-01hle: Make Ryujinx.HLE project entirely safe (#2789)Mary
* Remove a bit of unsafety around * Regenerate StructArrayHelpers with a max element value of 256 * hle: remove unsafe marker from all struct that had it * hle: make SoftwareKeyboardRenderer.TryCopyTo safe * hle: remove unsafety in NpadDevice and remove AllowUnsafeBlocks from csproj * Revert "Regenerate StructArrayHelpers with a max element value of 256" This reverts commit f32a6e5be094f50571970eb1116b65c080781d05. * Introduce ByteArray of various size and use that instead of ArrayXXX to avoid stackoverflow in .NET runtime type resolution * Use ByteArray more * Add some missing spaces on Pack = 1 for various structs * Fix broken logic for TryCopyTo * Address gdkchan's comment * Address gdkchan's comment
2021-11-01When waiting on CPU, do not return a time out error from EventWait (#2780)gdkchan
* When waiting on CPU, do not return a time out error from EventWait * And while I'm at it...
2021-10-29ci: Disable macOS x64 build on AppVeyor (#2795)Mary
This commit disable Appveyor build of macOS x64. Reason behind is that it's currently entirely out of scope of supported platform, increases build time by a fair amount and doesn't need a release on website as it got disabled 6 months ago.
2021-10-28Add support for fragment shader interlock (#2768)gdkchan
* Support coherent images * Add support for fragment shader interlock * Change to tree based match approach * Refactor + check for branch targets and external registers * Make detection more robust * Use Intel fragment shader ordering if interlock is not available, use nothing if both are not available * Remove unused field
2021-10-28Add support for the brazilian portuguese language code (#2792)gdkchan
* Add support for the brazilian portuguese language code * Fix error applet message
2021-10-24kernel: Fix inverted condition on permission check of SetMemoryPermission ↵Mary
syscall (#2777) * kernel: Fix inverted condition on permission check of SetMemoryPermission syscall * Fix condition for real..
2021-10-24Preserve image types for shader bindless surface instructions (.D variants) ↵gdkchan
(#2779) * Preserve image types for SULD/SUST .D variants * Make format unknown for surface atomic if bindless and not sized
2021-10-24hle: Improve safety (#2778)Mary
* timezone: Make timezone implementation safe * hle: Do not use TrimEnd to parse ASCII strings This adds an util that handle reading an ASCII string in a safe way. Previously it was possible to read malformed data that could cause various undefined behaviours in multiple services. * hid: Remove an useless unsafe modifier on keyboard update * Address gdkchan's comment * Address gdkchan's comment
2021-10-24kernel: Clear pages allocated with SetHeapSize (#2776)Mary
* kernel: Clear pages allocated with SetHeapSize Before this commit, all new pages allocated by SetHeapSize were not cleared by the kernel. This would cause undefined data to be pass to the userland and possibly resulting in weird memory corruption. This commit also add support for custom fill heap and ipc value (that is also supported by the official kernel) * Remove dots at the end of KPageTableBase.MapPages new documentation * Remove unused _stackFillValue
2021-10-24Fixup channel submit IOCTL syncpoint parameters (#2774)Billy Laws
* Fixup channel submit IOCTL syncpoint parameters The current arguments worked by happenstance as games only ever submit one syncpoint and request one fence back, if a game were to do something other than this then the arguments would've been parsed entirely wrong. * Address feedback
2021-10-24misc: Fix IVirtualMemoryManager.Fill ignoring value (#2775)Mary
This fix IVirtualMemoryManager.Fill to actually use the provided fill value instead of 0. This have no implication at the moment as everything that use it pass 0 but it is needed for some upcoming kernel fixes.
2021-10-24kernel: Add resource limit related syscalls (#2773)Mary
* kernel: Add resource limit related syscalls This commit implements all resource limit related syscalls. * Fix register mapping being wrong for SetResourceLimitLimitValue * Address gdkchan's comment
2021-10-24kernel: Implement SetMemoryPermission syscall (#2772)Mary
* kernel: Implement SetMemoryPermission syscall This commit implement the SetMemoryPermission syscall accurately. This also fix KMemoryPermission not being an unsigned 32 bits type and add the "DontCare" bit (used by shared memory, currently unused in Ryujinx) * Update MemoryPermission mask * Address gdkchan's comments * Fix a nit * Address gdkchan's comment
2021-10-24kernel: Add missing address space check in SetMemoryAttribute syscall (#2771)Mary
2021-10-19EventWait should not signal the event when it returns Success (#2739)gdkchan
* Fix race when EventWait is called and a wait is done on the CPU * This is useless now * Fix EventSignal * Ensure the signal belongs to the current fence, to avoid stale signals
2021-10-18Fix shader 8-bit and 16-bit STS/STG (#2741)gdkchan
* Fix 8 and 16-bit STG * Fix 8 and 16-bit STS * Shader cache version bump
2021-10-18Another workaround for NVIDIA driver 496.13 shader bug (#2750)riperiperi
* Another workaround for NVIDIA driver 496.13 shader bug This might work better than the other one. Give this a test to see if it fixes/doesn't fix issues with the other one. The problem seems to be when any variable assignment happens with a negation. `temp_1 = -temp_0;` seems to trigger weird behaviour, but `temp_1 = 0.0 - temp_0;` does not. This also might to extend towards integer types? * Update cache version * Add disclaimer comment * Wording
2021-10-18Add an early `TailMerge` pass (#2721)FICTURE7
* Add an early `TailMerge` pass Some translations can have a lot of guest calls and since for each guest call there is a call guard which may return. This can produce a lot of epilogue code for returns. This pass merges the epilogue into a single block. ``` Using filter 'hcq'. Using metric 'code size'. Total diff: -1648111 (-7.19 %) (bytes): Base: 22913847 Diff: 21265736 Improved: 4567, regressed: 14, unchanged: 144 ``` * Set PTC version * Address feedback * Handle `void` returning functions * Actually handle `void` returning functions * Fix `RegisterToLocal` logging
2021-10-18Initial tessellation shader support (#2534)gdkchan
* Initial tessellation shader support * Nits * Re-arrange built-in table * This is not needed anymore * PR feedback
2021-10-17Add missing U8/S8 types from shader I2I instruction (#2740)gdkchan
* Add missing U8/S8 types from shader I2I instruction * Better names * Fix dstIsSignedInt
2021-10-17Extend bindless elimination to work with masked and shifted handles (#2727)gdkchan
* Extent bindless elimination to work with masked handles * Extend bindless elimination to catch shifted pattern, refactor handle packing/unpacking
2021-10-17Implement SHF (funnel shift) shader instruction (#2702)gdkchan
* Implement SHF shader instruction * Shader cache version bump * Better name
2021-10-13Fix regression with foreground software keyboard (#2732)Caian Benedicto
2021-10-12Force index buffer update for games using Vulkan (#2726)gdkchan
2021-10-12Enqueue frame before signalling the frame is ready. (#2722)riperiperi
It seems that certain games (Link's Awakening, Xenoblade DE) had their fences reached already when posting framebuffers, so the signal that a frame was ready would go out _before_ the frame was enqueued, and the render loop would fail to dequeue anything and "skip" a frame. This was resulting in their performance lowering dramatically after some loading transitions, as a frame signal would be consumed and presentation would be one frame behind. It's possible this might have eventually caused deadlocks in these games or others, if it happened twice.
2021-10-12Don't force scaling on 2D copy sources (#2701)riperiperi
Some games (GameMaker Studio) build texture atlases out of sprites during initialization, using the 2D copy method. These copies are done from textures loaded into memory, not rendered, so they are not scaled to begin with. I had set srcTexture in these copies to force scaling, but really it only needs to scale if the texture already exists and was scaled by rendering or something else. I just set that to false, so it doesn't change if the texture is scaled or not. This will also avoid the destination being scaled if the source wasn't. The copy can handle mismatching scales just fine. This prevents scaling artifacts in GMS games, and maybe others (not Super Mario Maker 2, that has another issue).