Commit Graph
177 Commits
Author SHA1 Message Date
KeatonTheBot a8a23b6b2c Revert fix buffer destroy before submit changes (VertexBufferState.cs & VertexBufferUpdater.cs) from 'Fix Vulkan validation errors' 2026-05-17 00:30:34 -05:00
AsperTheDogandAsperTheDog e0f6e207e8 Fix Vulkan validation errors
This PR fixes several validation errors caused by invalid Vulkan usage. These validation errors often end up invoking Undefined Behavior on the driver side, which can lead to artifacts or crashes which are driver specific and otherwise incredibly hard to track. I don't think it should have any impact on performance, but it would be good to test it with as many games as possible (maybe a bug in a game was fixed?).

Each commit fixes an error. I added to each a description with the validation error that was fixed and a small explanation on what was causing it and how I fixed it.

Co-authored-by: AsperTheDog <guillerman0000@gmail.com>
2026-05-16 23:37:11 -05:00
AsperTheDogandAsperTheDog 83c65c2c06 Add shader non-uniform indexing support
This PR marks ALL texture indexes as nonuniform to fix an issue with the paths in Tomodachi Life: Living the Dream on AMD cards. It should have a negligible impact on performance (and it should not have an impact at all on NVIDIA cards!)

It's caused by what is called 'implicit non-uniform sampler array indexing'. The idea is basically that some GPUs optimize texture lookups from indexed texture arrays, by assuming that you are never going to index different textures within a single workgroup. What this causes is that visual glitch where a subgroup is tasked with rendering a block of the screen, and in the boundaries some cores are indexing the wrong texture.

Co-authored-by: AsperTheDog <guillerman0000@gmail.com>
2026-05-16 23:11:55 -05:00
Max 94cfe6930c Check if the Device is rendering before waiting on it
Fixes an issue where there were missed references and an ``OperationCancelled`` exception when exiting an application.
2026-05-16 23:11:55 -05:00
Max 93d1eea58d UI: LoadGuestApplication asynchronous cancellation
Fixed LoadGuestApplication hanging when cancelled.
Since startup procedure has technically changed, we should consider testing this with a variety of game formats to ensure regressions do not occur.
2026-05-16 19:45:45 -05:00
KeatonTheBot 0d8bd2653b Vulkan: Enable VK_EXT_memory_priority for Pageable Memory to work properly 2026-04-01 09:10:46 -05:00
KeatonTheBot 7781911baa Vulkan: Fix Adreno compatibility 2026-03-27 13:06:59 -05:00
KeatonTheBot 63c7d2a0ee Tweak feedback loop restriction logic 2026-03-19 10:49:39 -05:00
KeatonTheBotandStossy11 b4d0f10568 Vulkan: Add A8B8G8R8 texture format
Co-authored-by: Stossy11 <stossy11@stossy11.com>
2026-03-04 16:44:53 -06:00
KeatonTheBot c2dfc93fa6 Vulkan: Adjust feedback loop restriction to Adreno 6xx/7xx GPUs and not broadly use Qualcomm vendor 2026-03-02 12:24:58 -06:00
sunshineinabox 59c277bc6c Vulkan: Buffer alignment 2026-02-28 15:51:04 -06:00
sunshineinabox 491fb3ccfb Vulkan: Enable pageable device-local memory 2026-02-28 15:50:47 -06:00
sunshineinabox e96823c9a0 Vulkan: StorageImageExtendedFormats support
(cherry picked from commit caed40d99a)
2026-02-28 14:22:22 -06:00
BeZide 6840ae0c5c Snapdragon 8 Elite (& Adreno 8xx) Fixes
See merge request kenji-nx/ryujinx!20
2026-01-22 03:33:26 -06:00
BeZide 6d36f471dd Revert .NET 10 to .NET 9
See merge request kenji-nx/ryujinx!19
2026-01-21 10:03:25 -06:00
BeZide 2c1b7bc667 single MR with all patches i did, compared to the 2.0.5 release:
See merge request kenji-nx/ryujinx!18
2026-01-20 00:10:38 -06:00
KeatonTheBot ea7d680d11 Vulkan: Add ROG Xbox Ally device ID to feedback loop restriction 2026-01-04 18:34:34 -06:00
V380-Ori 99435c8708 Replace shaderc.net with Silk.NET.Shaderc 2025-12-27 23:32:55 -06:00
LotP c6deb3800f Memory Changes 3.2
Fixes a few crashes:
- fixes a crash related to waking threads (priorities were wrong).
- fixes a crash from reusing the SetRenderTargets texture array (left-over data causing issues).
- fixes a mistake and an oversight in the buffer system.
  - buffers were getting updated wrong causing bad data to be stored or some times cut.
  - modified ranges would extend past their old buffers, crashing on syncs. Old buffers are now skipped as the new buffers already sync instead.

Introduces pooling in a few more places to increase memory efficiency.

simplified RangeList item logic.
- removed RangeItem by making all the range objects use the I(NonOverlapping)Range interface.
- BufferCache class no longer locks its RangeList, as the list is only ever accessed synchronously.

Small change to how keyboard snapshots are stored.

Increase ThreadedRenderer SpanPool size to fit slightly more data (4MB -> 8MB).
2025-12-08 20:26:36 -06:00
KeatonTheBot 85e05bc7b2 misc: chore: Remove unnecessary usings 2025-11-23 14:13:25 -06:00
KeatonTheBot 377805579b misc: Tweak NullReferenceException fixes 2025-11-23 13:43:15 -06:00
LotP 35bced8527 Memory changes 3
General memory improvements to decrease GC pressure and frequency.

Pool big arrays and objects that are created and deleted often.

Skip data copies when they aren't needed.

Inline flag checks to skip unneeded allocations.

From my testing the performance is about the same, but the GC frequency is much lower and collection is faster causing less and smaller spikes.
2025-11-23 13:43:14 -06:00
KeatonTheBot c1e24961f9 misc: Use nint/nuint instead of IntPtr/UIntPtr 2025-11-23 13:42:38 -06:00
KeatonTheBot ebeb6e146c Fix Ori 2 not launching (revert Possible NullReferenceException change) 2025-10-27 09:16:23 -05:00
KeatonTheBot 7a5b5dee6a misc: chore: Fix possible NullReferenceExceptions, InvalidOperationExceptions 2025-10-06 11:48:21 -05:00
KeatonTheBot 48ba1cc9ed misc: chore: Merge into pattern 2025-09-25 17:04:08 -05:00
KeatonTheBot a6f3f0718d misc: chore: Remove unnecessary usings 2025-09-25 17:04:07 -05:00
KeatonTheBot 9cdd9f6dbf misc: chore: Fix object creation 2025-09-25 17:04:07 -05:00
KeatonTheBot 0928851966 misc: chore: Discard unused parameters 2025-09-25 17:04:06 -05:00
LotP 3deddbd491 Memory Changes part 2
* Slightly refactors RangeLists from the last Memory Changes MR, which fixes issue 61.

* Convert as many const size array iterators to span iterators as possible. When iterating over a const size array, every iteration created a Span, now only the first iteration does in most places.

* Now using object pooling for a few object types that were rapidly deleted and recreated.

* Converted a few flag checks to binary operations to save memory allocations.
2025-09-12 21:24:19 -05:00
KeatonTheBot b4eaa5f262 misc: chore: Android: Remove redundant qualifiers 2025-06-28 17:45:49 -05:00
KeatonTheBot d0abbc6da3 misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions 2025-06-20 16:33:20 -05:00
KeatonTheBot fda90239bc Android fixes and features
* Jit cache eviction (fixes out of memory errors in some games)

* Low power PPTC

* Fix 'unknown' games displayed when using game folder with subfolders

* Turn off NCE and PPTC by default
2025-06-02 21:47:55 -05:00
KeatonTheBot 3af88ad2e6 infra: Remove Ryujinx.Common references from project files that indirectly reference the same file 2025-05-31 02:59:10 -05:00
KeatonTheBot e8e4c5aa61 Android changes 2025-05-16 23:42:48 -05:00
KeatonTheBot e02463d779 Vulkan: Revise feedback loop restriction to RDNA 3 GPUs
* Use RegEx to define RDNA 3 GPU name pattern

* Add device IDs for ROG Ally (X), since these are RDNA 3 devices
2025-05-01 21:40:51 -05:00
KeatonTheBot 038f8352e0 Vulkan: Minimize errors with feedback loop detection for AMD Radeon RX GPUs + Qualcomm SoCs 2025-04-27 00:37:22 -05:00
KeatonTheBot d46a6bfed5 Vulkan: Restrict feedback loop detection to AMD Radeon RX GPUs + Qualcomm SoCs 2025-04-21 22:18:59 -05:00
KeatonTheBot 0e810e1e96 Re-merge "Vulkan: Feedback loop detection and barriers (#7226)"
This re-merges commit ca59c3f499.
2025-04-21 22:18:59 -05:00
KeatonTheBot 5da6c490b3 Revert "Support VK_EXT_extended_dynamic_state and VK_EXT_extended_dynamic_state2"
This reverts commit 0cef9647
2025-04-21 22:18:58 -05:00
KeatonTheBot 19013d360a misc: chore: Remove redundant qualifiers 2025-04-11 22:08:30 -05:00
KeatonTheBot 06ea0c32d3 misc: chore: Remove unnecessary usings 2025-04-11 21:56:23 -05:00
Isaac Marovitz 8f55589124 Use compute shader for non-indirect index buffer conversion
* Fix >16 primitives
2025-03-24 22:01:28 -05:00
sunshineinabox 0cef96477f Support VK_EXT_extended_dynamic_state and VK_EXT_extended_dynamic_state2 2025-03-24 11:15:33 -05:00
KeatonTheBot efd5a104b6 Revert "misc: chore: Remove redundant code"
This reverts commit 05a88ccc94.
2025-03-15 20:00:22 -05:00
KeatonTheBot 05a88ccc94 misc: chore: Remove redundant code 2025-03-11 16:45:41 -05:00
KeatonTheBot 340ec79e9f misc: chore: Use collection expressions (part 2) 2025-03-10 21:32:01 -05:00
KeatonTheBot e2973a875a misc: chore: Use collection expressions 2025-03-06 20:46:29 -06:00
Evan Husted e9dea85064 2 unmerged PRs from original Ryujinx:
Implement shader compile counter (currently not translated, will change, need to pull changes.)
Remove event logic in favor of a single init function.
Thanks @MutantAura
2025-01-01 00:42:48 -06:00
sunshineinabox e7a3400b9a Resolve Image Usage Validation Error
This was a missed change that would resolve Image Usage validation error
that is created fairly frequently.

``VUID-VkImageViewCreateInfo-pNext-02662(ERROR / SPEC): msgNum:
-55646969 - Validation Error: [ VUID-VkImageViewCreateInfo-pNext-02662 ]
Object 0: handle = 0x260b9d1f6b8, type = VK_OBJECT_TYPE_IMAGE; |
MessageID = 0xfcaee507 | vkCreateImageView():
pCreateInfo->pNext<VkImageViewUsageCreateInfo>.usage
(VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_STORAGE_BIT) must not include
any bits that were not set in VkImageCreateInfo::usage
(VK_IMAGE_USAGE_TRANSFER_SRC_BIT|VK_IMAGE_USAGE_TRANSFER_DST_BIT|VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
of the image. The Vulkan spec states: If the pNext chain includes a
VkImageViewUsageCreateInfo structure, and image was not created with a
VkImageStencilUsageCreateInfo structure included in the pNext chain of
VkImageCreateInfo, its usage member must not include any bits that were
not set in the usage member of the VkImageCreateInfo structure used to
create image
(https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-VkImageViewCreateInfo-pNext-02662)
    Objects: 1
        [0] 0x260b9d1f6b8, type: 10, name: NULL
``
2024-12-25 21:06:08 -06:00