aboutsummaryrefslogtreecommitdiff
path: root/src/tests/video_core
Commit message (Collapse)AuthorAgeFilesLines
* tests: give the descriptor table mocks a GetPointer hookkraibse15 hours1-0/+10
| | | | | | | | | | | DescriptorTable::Read calls MemoryManager::GetPointer for entries that fall inside a single page, which neither mock in this test implemented, so the template failed to instantiate and the tests target stopped building. Return nullptr from both mocks so the tests keep exercising the generic ReadBlockUnsafe path they are written for. Assisted-by: DeepSeek V4.1 Flash (diagnosis and patch)
* Merge pull request #334 from snowstormxd/codex/upstream-mkw-testJonas30 hours5-8/+510
|\ | | | | MKW performance improvements
| * tests: restore batched page accounting and isolate timer fixturessnowstormxd33 hours1-8/+30
| | | | | | | | | | | | | | Apply batch updates in the rasterizer mock, check cached writes do not untrack twice, and reset callback state between timer cases. Assisted-by: Codex (implementation, review and automated validation) (cherry picked from commit 225ad4e5d1da4ec9883b17aea7273b6c8f76fe17)
| * core: skip empty bitmap ranges during cache and scheduler traversalsnowstormxd34 hours1-0/+116
| | | | | | | | | | | | Adapted bitmap scans from sylvieistaken/selevet-eglantine performance build 4. Keep the wide-priority fallback and fix the first live slot after empty bitmap words. Include randomized lifecycle and ordering checks. Assisted by Codex.
| * texture_cache: clear only exposed descriptor bitmap wordssnowstormxd34 hours1-0/+36
| | | | | | | | | | | | | | Avoid zeroing unused preallocation during invalidation and pool refresh. Clear newly exposed words whenever limits grow, bound clearing to allocated storage, and test word/allocation boundaries, shrink/regrowth and malformed large limits. Assisted-by: Codex (implementation, review, commit text and automated validation) (cherry picked from commit 4bc1ae01f79cef43be016504c850ca8a6998457a)
| * tests: verify deferred descriptors against eager invalidationsnowstormxd34 hours1-0/+134
| | | | | | | | | | | | | | Exercise 40,000 mutations and table switches plus repeated deletion across five channels. Make the existing descriptor read work with a memory reader fixture and add an explicit CPU benchmark with opaque invalidation calls. Assisted-by: Codex (implementation, review, commit text and automated validation) (cherry picked from commit 3b62a551da8ec0b4edf19a1c4e14fa2519dd20e2)
| * shader_cache: batch memory-write invalidations without skipping rangessnowstormxd34 hours1-0/+120
| | | | | | | | | | | | | | Adapt the batching from ymatrix1/Eglantine PR #237, retaining all CPU invalidations. Acquire the lock once and remove pending shaders once per write batch. Compare real cache contents with sequential invalidation across randomized overlapping writes and pending removals. Assisted-by: Codex (implementation, review, commit text and automated validation) (cherry picked from commit b65f818d7789ffadfb58fe4543b18060fd88ce53)
| * macro: execute native parameters without a second FIFO copysnowstormxd34 hours1-0/+74
| | | | | | | | | | | | | | | | Use the owned parameter vector for DMA FIFO appends. Add a native JIT regression covering reallocation and repeated invocations against the copied-input path. Assisted by Codex. (cherry picked from commit 5b6803aaab18e332493903ee49cab026c041d5dc)
* | vulkan: repack 69-byte vertices without dynamic vertex input on MoltenVKSssnowyyy33 hours1-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | e38b738b84 repacks the 69-byte vertex stride to 72 only with dynamic vertex input, unless EGLANTINE_EXPERIMENTAL_STATIC_VERTEX_REPACK=1. MoltenVK has no VK_EXT_vertex_input_dynamic_state and Metal needs strides that are a multiple of 4, so the stride was never fixed on Macs. Enable the static path automatically when the device's minimum vertex binding stride alignment does not divide 69. The device reports 4 for MoltenVK, matching its portability subset limit. The environment variable still overrides it: 1 forces the repack on, 0 forces it off. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
* | vulkan: repack 69-byte vertices only when neededSssnowyyy33 hours1-8/+18
|/ | | | | | | | | | | | | | | | | | | | | | | SetVertexRepackLayout returned old_mask | new_mask, which stays non-zero on every draw that uses a 69-byte binding. PrepareDraw then re-dirtied the vertex buffers and vertex input each time, so the repack compute pass ran and the render pass ended once per draw, which is costly on tiled GPUs. Return old_mask ^ new_mask so only a layout change re-dirties the bindings. The repacked copy only stays valid while the source data is unchanged, so the buffer cache now flags the vertex buffers overlapping a CPU write, inline or DMA write, or GPU write, and re-dirties the repacked ones before binding. Command buffer submission already invalidates all vertex buffer state, which keeps the staging copy within its tick. Also pass the source buffer size to the repack pass and clamp the word-rounded storage descriptor range to it; it could run up to three bytes past the end of the buffer. A binding that does not fit is skipped like one over the device limits. Follow-up to e38b738b84. Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
* vulkan: repack 69-byte vertices to 72 bytes (#281)Mako45 hours1-0/+111
| | | | | | | | | | | | | | | | Splatoon Raiders draws with a 69-byte vertex stride and a packed 4-byte attribute at byte 65. Those fetches are unaligned, which Vulkan leaves undefined: NVIDIA reads them as meant, the AMD Windows driver does not, and the outdoor scenes turn into a white haze with horizontal streaks. When a binding uses that layout, a compute pass copies it to a 72-byte stride with the tail moved to byte 68, and the vertex input offsets and stride follow. EGLANTINE_TEST_VERTEX_REPACK=0 turns it off; EGLANTINE_EXPERIMENTAL_STATIC_VERTEX_REPACK=1 also covers pipelines without dynamic vertex input. Based on an outside patch (02-portable-vertex-repacking). Changes from it: a range over the device limits skips the repack instead of throwing, and the pipeline cache version stays, so caches are kept.
* shader: count only register writes in the callee link checkDuck9122 days1-0/+27
| | | | | | | | | | | The check that a native callee keeps its link register read bits 16-23 of every instruction as a destination. RET was exempt, but BRA, NOP and ISETP/FSETP (which write predicates) also have zero there, so callees with an R0 link that compare or branch were rejected. IMAD.WIDE writes a register pair, so its second register now counts as well. Assisted-by: Claude Opus 5.5 (debugging, implementation and drafting) Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
* fix: restore Mario Kart World text by accepting R0 shader returnsxtam4 days1-0/+51
| | | | | | | | Do not treat the reserved destination field of Ampere RET as a write to the return-link register. Keep return linkage validation and rejection of actual link-register writes. Add three regression tests covering R0 and R55 links, copied links, and overwritten links. Validation: 10 assertions pass; user confirmed the compiled patch restores text in Mario Kart World. AI-assisted implementation and commit message using OpenAI Codex.
* Revert "Import experimental NS2 support and accumulated GPU fixes"Takoroka6 days5-3176/+0
| | | | | This reverts commit 535b676970. The Switch 2 support comes from the nx2 work instead, merged next.
* Import experimental NS2 support and accumulated GPU fixesyumekiru6 days5-0/+3176
| | | | | | | | | | | Bring the NS2 patch and local follow-up fixes onto Eglantine master. Includes native graphics services, instruction translation, syncpoint cancellation acknowledgement, texture handling and diagnostics. Experimental checkpoint; not ready to merge. The original Eden build passed, but this rebased branch has not been built or tested. Assisted-by: OpenAI Codex (implementation, debugging, tests and PR preparation)
* [common] Switch to boost::unordered_flat containers (#4326)crueter2026-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces all instances of ankerl's unordered map/set with boost's `unordered_flat_*` classes. This uses std::hash since boost::hash is actually a lot slower. Also adds an abstraction layer in `Common` so future changes are quicker and easier. Other implementation details: - ankerl provided hash specializations for tuple and pair, so those were ported here - std::erase_if doesn't work on boost, so just used the ADL'd erase_if This should be about equal or superior performance as unordered_dense for everything except iteration. Signed-off-by: crueter <crueter@eden-emu.dev> - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4326 Reviewed-by: Lizzie and Samuel <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [*] change all std::unordered_map and std::unordered_set into ↵lizzie2026-02-101-2/+2
| | | | | | | | | | | | | | | | | | | ankerl::unordered_dense::map/set variants (#3442) mainly doing this to reduce memory footprint; we all know how nice ankerl::unordered_dense is in theory 4x faster - in practice these maps arent that "hot" anyways so not likely to have much perf gained i just want to reduce mem fragmentation to ease my porting process, plus it helps other platforms as well (ahem weak Mediatek devices) :) Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3442 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [tests] fix compile+linking issues with PlayTime (#3345)lizzie2026-01-191-51/+51
| | | | | | | | | | | | | fixes linking + comp issues but not the test themselves, who have now became invalid Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: DraVee <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3345 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [buffer_cache] Add batching support for memory tracker updates (#3288)CamilleLaVey2026-01-181-0/+43
| | | | | | | | | | I added a batching/ coalescing of ranges in WordManager to reduce calls per pages in UpdatePagesCachedCount, also a test to verify if FlushCachedWrites coalesced (reduces callings to UpdatePagesCachedCount) callings and register each of them to inspect them. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3288 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: DraVee <dravee@eden-emu.dev> Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
* [dynarmic] jit fix branch v2 (#203)crueter2025-08-271-3/+2
| | | | | | Co-authored-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/203 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
* feature/landscape-carousel (#196)xbzk2025-06-261-1/+1
| | | | | | | | | | | second try. all known visual resizing bugs fixed. Co-authored-by: Allison Cunha <allisonbzk@gmail.com> Co-authored-by: crueter <swurl@swurl.xyz> Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/196 Co-authored-by: xbzk <xbzk@noreply.localhost> Co-committed-by: xbzk <xbzk@noreply.localhost>
* [vk] Add some dynamic handling in the pipeline (#142)Aleksandr Popovich2025-06-161-1/+0
| | | | | | | Co-authored-by: crueter <swurl@swurl.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/142 Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Co-committed-by: Aleksandr Popovich <alekpopo@pm.me>
* Merge pull request #12499 from Kelebek1/timeliamwhite2024-01-251-1/+1
|\ | | | | Rework time services
| * Rework time service to fix time passing offline.Kelebek12024-01-241-1/+1
| |
* | Core: Eliminate core/memory dependancies.Fernando Sahmkow2024-01-181-4/+3
|/
* Revert "video_core: use interval map for page count tracking"liamwhite2023-12-171-3/+3
|
* video_core: use interval map for page count trackingLiam2023-12-141-3/+3
|
* Buffer cache: always use async buffer downloads and fix regression.Fernando Sahmkow2023-05-071-2/+2
|
* BufferCache: Fixes and address feedbackFernando Sahmkow2023-05-011-1/+3
|
* Tests: Add memory tracker tests.Fernando Sahmkow2023-04-292-549/+547
|
* buffer_base: Partially revert changes from #9559ameerj2023-02-081-1/+1
| | | | This fixes a regression where Yoshi's Crafted World (and potentially other titles) would enter an infinite loop when GPU Accuracy was set to "Normal"
* Merge pull request #9555 from abouvier/catch2-updateliamwhite2023-01-221-1/+1
|\ | | | | tests: update catch2 to 3.0.1
| * tests: update catch2 to 3.0.1Alexandre Bouvier2023-01-051-1/+1
| |
* | BufferBase: Don't ignore GPU pages.Fernando Sahmkow2023-01-051-1/+1
|/
* tests: fix for -WallAlexandre Bouvier2022-10-251-1/+1
| | | Fix #9123
* code: dodge PAGE_SIZE #defineKyle Kienapfel2022-08-191-3/+4
| | | | | | | | | | | | | | | | | | | | | Some header files, specifically for OSX and Musl libc define PAGE_SIZE to be a number This is great except in yuzu we're using PAGE_SIZE as a variable Specific example `static constexpr u64 PAGE_SIZE = u64(1) << PAGE_BITS;` PAGE_SIZE PAGE_BITS PAGE_MASK are all similar variables. Simply deleted the underscores, and then added YUZU_ prefix Might be worth noting that there are multiple uses in different classes/namespaces This list may not be exhaustive Core::Memory 12 bits (4096) QueryCacheBase 12 bits ShaderCache 14 bits (16384) TextureCache 20 bits (1048576, or 1MB) Fixes #8779
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* Buffer Cache: Address Feedback.Fernando Sahmkow2021-07-101-1/+1
|
* Buffer Cache: Fix High Downloads and don't predownload on Extreme.Fernando Sahmkow2021-07-091-1/+1
|
* tests/buffer_base: Add cached CPU writes testsReinUsesLisp2021-02-131-0/+76
| | | | Ensure the behavior of the previous commit in tests.
* tests: Add unit tests for the GPU range tracking buffer containerReinUsesLisp2021-01-131-0/+473
Due to how error prone the container design is, this commit adds unit tests for it. Some tests taken from here are based on bugs from using this buffer container in games, so if we ever break it in the future in a way that might harm games, the tests should fail.