aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/memory_manager.h
Commit message (Collapse)AuthorAgeFilesLines
* vulkan: defer the caches' invalidation for inline writes outside GPU-written ↵Takoroka5 days1-0/+6
| | | | | | | | | | | | | data Title 1 makes thousands of small inline-to-memory writes between draws, and each one invalidated the buffer, texture, shader and query caches on its own (~7.5% of the GPU thread after 0fe581f). Guest memory is still written at once, query results pending there are still dropped at once, and writes into GPU-written buffer data are still uploaded in place; the buffer, texture and shader caches now get the merged ranges at the next FlushCaching, which runs before every draw, dispatch, clear, copy and 2D blit. Inline writes: 4.4% of the GPU thread (deferred invalidation included in FlushCaching, 3.9% -> 3.1%). EDEN_NX2_INLINE_DEFER=0 invalidates at once.
* Switch 2: Turing macros, native compute, Ampere shader lowering, native tilingTakoroka7 days1-0/+10
| | | | | | | | | | | | | | | | | From changes.patch: the TU104/GA10x MME interpreter (shared macro context for the process's channels, also on the compute class), native compute with QMD 3.0 dependency scheduling, the Ampere-to-Maxwell shader lowering, native vertex stream sizes, and the console's GOB swizzle for textures, DMA copies and the host unswizzle shaders. Switch 2 channels turn all of it on at init. The lowering is widened for title 4 (all 32 of its programs lower): general TEX (any dimension/LOD/mask, operand split 1+1/2+1/2+2/4+n, any but consistent descriptor buffer), cube/array, SULD channel masks, 128-bit STG, indexed IPA, VOTE, SHFL with any immediate or predicate output, R2P/P2R byte select, uniform ULOP3/ULEA/UBREV/UFLO.SH/UISETP signed/UMOV URZ, IMNMX cbuf, IADD3 and FFMA uniform operands, FMUL /4 /8 x8, and BSSY/BSYNC/BREAK/WARPSYNC as no-ops. The capture stops at unmapped memory. EDEN_NX2_SHADER_DUMP dumps every native program; tools in C:\dev\nx2work test the lowering offline.
* Switch 2: native memory/images, GPU-accessible attribute, TSG subcontexts, ↵Takoroka7 days1-0/+5
| | | | | | | | | | | | | syncpoint shim - gsv 111/112/114/423/429/430/314/315/435 track native memory and images with real ids (meanings from changes.patch); 1510/435 use its block-linear layout. - svc 0x80 sets a real GpuAccessible (0x20) memory attribute (from changes.patch). - Characteristics report TSG subcontexts (flag 22, 64 per TSG at 0xb4); NvRm otherwise allows one subcontext and a second NVN queue fails its setup. - Syncpoint shim: flag 26, address-space ioctl 0xB, and GPU reads of the shim page return guest syncpoint values (scheme from changes.patch). - EDEN_NX2_IPC_TRACE also logs TIPC commands; gdbrsp.py watch/mem improvements.
* [common/core/dynarmic] Optimize page table allocations (#4219)Exverge2026-09-091-2/+2
| | | | | | | | | | | | | | Reduces the page entries from 32 bytes to 8 and rewrites `VirtualBuffer` to be more efficient in memory usage and specifically for large zero regions. The page table will now only reserve 1GiB instead of 4GiB and of this memory it should only use at most ~8MiB. This PR has the side effect of using Eden on Windows on low memory systems much more plausible since it would previously require ~10GiB of committable memory at front (despite using ~5-6 at most, inadvertently stalling other processes) where as now it should only require around the amount that it'll actually use. Co-authored-by: Lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4219 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [video_core] use bool params for read/writes and cascade them thru the ↵lizzie2026-07-181-40/+19
| | | | | | | | | | | | | calltree (#4001) should make codegen a tad bit better and reduce icache pressure for what is otherwise a glorified memcpy Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4001 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [video_core] simplify InvalidationAccumulator (#3890)lizzie2026-04-281-6/+3
| | | | | | | | | | various redundant fields aren't required, so just redo it for good measure Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3890 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [meta] fix license headers (#2547)lizzie2025-09-211-0/+3
| | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2547 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] enable clang-cl and WoA builds (#348)lizzie2025-09-091-1/+1
| | | | | | | | | | | | | | Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* Port changes from Early Accessdarktux2025-04-041-0/+2
|
* MemoryManager: Reduce the page table size based on last big page address.Fernando Sahmkow2024-02-011-3/+5
|
* Core: Eliminate core/memory dependancies.Fernando Sahmkow2024-01-181-1/+0
|
* Core: Clang format and other small issues.Fernando Sahmkow2024-01-181-2/+3
|
* SMMU: Add Android compatibilityFernando Sahmkow2024-01-181-1/+1
|
* GPU SMMU: Expand to 34 bitsFernando Sahmkow2024-01-181-0/+2
|
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-181-17/+13
|
* Use spans over guest memory where possible instead of copying data.Kelebek12023-07-021-0/+18
|
* Remove memory allocations in some hot pathsKelebek12023-06-221-5/+10
|
* MemoryManager: Fix race conditions.Fernando Sahmkow2023-04-281-0/+4
|
* Fixes 'Continous' typoMax Dunbar2023-03-291-6/+6
|
* general: fix spelling mistakesLiam2023-03-121-2/+2
|
* remove static from pointer sized or smaller types for aesthetics, change ↵arades792023-02-141-1/+1
| | | | | | constexpr static to static constexpr for consistency Signed-off-by: arades79 <scravers@protonmail.com>
* Revert "MemoryManager: use fastmem directly."Merry2023-01-251-2/+1
| | | | This reverts commit 7f18e3bb898911343e3909f676dc96f3a34b1e95.
* BufferBase: Don't ignore GPU pages.Fernando Sahmkow2023-01-051-1/+1
|
* MemoryManager: use fastmem directly.Fernando Sahmkow2023-01-051-1/+2
|
* video_core: Cache GPU internal writes.Fernando Sahmkow2023-01-051-1/+16
|
* RasterizerMemory: Add filtering for flushing/invalidation operations.Fernando Sahmkow2023-01-011-8/+17
|
* MacroHLE: Reduce massive calculations on sizing estimation.Fernando Sahmkow2023-01-011-9/+2
|
* MacroHLE: Add HLE replacement for base vertex and base instance.Fernando Sahmkow2023-01-011-1/+2
|
* MacroHLE: Add Index Buffer size estimation.Fernando Sahmkow2023-01-011-0/+2
|
* video_core: Implement memory manager page kindFengChen2022-10-171-3/+18
|
* General: address feedbackFernando Sahmkow2022-10-061-1/+1
|
* Buffer Cache: Deduce vertex array limit from memory layout when limit is the ↵Fernando Sahmkow2022-10-061-0/+4
| | | | highest possible.
* DMA & InlineToMemory Engines Rework.bunnei2022-10-061-0/+6
|
* MemoryManager: Finish up the initial implementation.Fernando Sahmkow2022-10-061-4/+7
|
* MemoryManager: initial multi paging system implementation.Fernando Sahmkow2022-10-061-16/+41
|
* Refactor VideoCore to use AS sepparate from Channel.Fernando Sahmkow2022-10-061-0/+9
|
* NVDRV: Remake ASGPUFernando Sahmkow2022-10-061-1/+2
|
* VideoCore: Update MemoryManagerFernando Sahmkow2022-10-061-71/+27
|
* 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.
* Inline2Memory: Flush before writting buffer.Fernando Sahmkow2022-01-291-2/+2
|
* video_core/memory_manager: Deduplicate Read/WriteBlockameerj2021-12-311-0/+5
|
* Texture Cache: Address feedback.Fernando Sahmkow2021-07-041-4/+4
|
* Texture Cache: Improve accuracy of sparse texture detection.Fernando Sahmkow2021-07-041-0/+20
|
* Merge branch 'bytes-to-map-end' into new-bufcache-wipReinUsesLisp2021-02-131-0/+2
|
* gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-131-1/+1
| | | | | | Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
* Merge pull request #5795 from ReinUsesLisp/bytes-to-map-endbunnei2021-01-291-0/+6
|\ | | | | video_core/memory_manager: Add BytesToMapEnd
| * video_core/memory_manager: Add BytesToMapEndReinUsesLisp2021-01-221-0/+6
| | | | | | | | | | Track map address sizes in a flat ordered map and add a method to query the number of bytes until the end of a map in a given address.
* | video_core/memory_manager: Remove unused CopyBlockUnsafeReinUsesLisp2021-01-211-1/+0
| | | | | | | | This function was not being used.
* | video_core/memory_manager: Add GPU address based flush methodReinUsesLisp2021-01-211-0/+2
|/ | | | Allow flushing rasterizer contents based on a GPU address.
* video_core: Resolve more variable shadowing scenariosLioncash2020-12-041-2/+2
| | | | | | Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.