aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
Commit message (Collapse)AuthorAgeFilesLines
...
* [android, tu] Adjusted PoD of Vertex/ Buffers for older turnip drivers (#3621)PavelBARABANOV2026-02-241-37/+84
| | | | | | | | | | | This PR aims to return an older way to bind and host vertex/ buffers (via toggle), which had a bunch of indirection and added unnecessary overhead during the drawing phase; current new approach adds just PoD for this operations, which seems to not be acceptable for older turnip drivers. Meanwhile the performance improvements are gonna be enabled only if the toggle is turned on, it will be required to use newer turnip drivers to make it work (26.0+), default behavior will allow older drivers work as intended. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3621 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: PavelBARABANOV <pavelbarabanov94@gmail.com> Co-committed-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
* [texture_cache, buffer_cache] Added TLS handling + changed command queue for ↵lizzie2026-02-203-34/+104
| | | | | | | | | | | | | | | | | | | | GPU threading. (#3579) (Merge of #3495 + #3108) This PR works around to simplify math operations on hot pointers inside the access and requests to the cache of buffers and texture cache, removing previous logic of indirection and replaced by a PoD approach. This will ensure less CPU times spended on the same request and flow directly into another chain of the render, in the same way, command queue currently uses an internal mutex that constraints the flow of data within the GPU threads, we're moving over a single command, I verified to keep using mutexes instead of internal mutex + mutex per operation, which are resolved by themselves. In simplier words, this aims to improve performance on those games and devices where the waits for next orders on GPU commands were heavier than a single verification. Co-Authored-by: @CamilleLaVey Co-Authored-by: @Lizzie Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3579 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [*] change all std::unordered_map and std::unordered_set into ↵lizzie2026-02-102-4/+4
| | | | | | | | | | | | | | | | | | | 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>
* [video_core/buffer_cache] Simplify word manager logic (#3221)lizzie2026-02-012-449/+203
| | | | | | | | | | | | | | no significant performance gains expected reduces memory (4096 word managers are active at any given time, this reduces total amount of memory used by a tiny margin) also reduces code duplication due to templatery fuckery Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3221 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> 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-3/+50
| | | | | | | | | | 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>
* [vk, qcom] Memory, Samplers, BindingBuffers and UniformBufferAlignment set ↵CamilleLaVey2026-01-112-5/+91
| | | | | | | | | | | | | by hardware capabilities for QCOM. (#3280) This PR adjust resources usage of Eden based on driver specification, improving stability and smarter resources usage, extends the amount of TotalPipelineWorkers on Android. Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3280 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev> Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
* [video_core] nvn descriptor layout fix (#3206)xbzk2025-12-261-7/+12
| | | | | | | | | | | | | | Yxzx presumes this: // The NVN driver buffer (index 0) is known to pack the SSBO address followed by its size. But in MCI i`ve discovered that there are no sizes, both registers are GPU addresses (hence the 2.8gb allocation, it was an address actually) Method could be much simpler but for safety i`ve routed both old and new worlds. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3206 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: xbzk <xbzk@eden-emu.dev> Co-committed-by: xbzk <xbzk@eden-emu.dev>
* Revert "[vk] Correct polygon draw topology mapping for line and point modes ↵crueter2025-12-261-70/+6
| | | | | | | | | | | (#2834)" (#3158) This reverts commit 6ba25b6cc0d738da8f9b9625f24d0af555e46380. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3158 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
* [vk] Correct polygon draw topology mapping for line and point modes (#2834)Ribbit2025-10-261-6/+70
| | | | | | | | | Co-authored-by: Ribbit <ribbit@placeholder.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2834 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Ribbit <ribbit@eden-emu.dev> Co-committed-by: Ribbit <ribbit@eden-emu.dev>
* [compat] Debian stable gcc12/clang14 compilation fixes (#2763)lizzie2025-10-181-1/+2
| | | | | | | | | | | | | Mainly because - while we can just give out an AppImage and call it a day - building natively should be an option for all major distros. And "base" stable debian doesn't provide a new enough g++/clang++ so... we need to make some "fixups". Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2763 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [vk] Fast UBO: fix tracking (#2712)MaranBr2025-10-112-21/+12
| | | | | | | | | | | Fixes or mitigates memory errors in TOTK and possibly other games as well. Credit: Ribbit Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2712 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* revert [vk] Fast UBO: fix tracking, resize heuristics, add debug guard ↵CamilleLaVey2025-10-092-25/+22
| | | | | | | | | | | | | | | | | | (#2695) (#2706) revert [vk] Fast UBO: fix tracking, resize heuristics, add debug guard (#2695) Well, stuff showed up after testing phase, that showed us this change break SMO and some mods after being merged directly into master, we will keep stuying why happens this and add a better handling later. Co-authored-by: Ribbit <ribbit@placeholder.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2695 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: Ribbit <ribbit@eden-emu.dev> Co-committed-by: Ribbit <ribbit@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2706 Co-authored-by: CamilleLaVey <camillelavey99@gmail.com> Co-committed-by: CamilleLaVey <camillelavey99@gmail.com>
* [vk] Fast UBO: fix tracking, resize heuristics, add debug guard (#2695)Ribbit2025-10-082-22/+25
| | | | | | | | Co-authored-by: Ribbit <ribbit@placeholder.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2695 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: Ribbit <ribbit@eden-emu.dev> Co-committed-by: Ribbit <ribbit@eden-emu.dev>
* [android] Legacy build flavor (#51)Bix2025-10-052-4/+32
| | | | | | | | | | | | | | This adds a "legacy" build flavor, similar to the genshinSpoof flavor. The legacy flavor uses a white icon bg, alongside building with `YUZU_LEGACY=ON`, which applies the previously-made SD865 patches iff that value is truthy. Co-authored-by: Bixthefin <114880614+Bixthefin@users.noreply.github.com> Co-authored-by: Calchan <denis.dupeyron@gmail.com> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/51 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Bix <bix@bixed.xyz> Co-committed-by: Bix <bix@bixed.xyz>
* [video_core] Fix fast buffers without performance loss (#2605)MaranBr2025-09-281-8/+6
| | | | | | | | | | Fixes games that have some elements flickering on the screen, such as Kirby Star Allies and others, without impacting performance. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2605 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [video_core] Fix a bug in buffer cache that caused flickering in some games ↵MaranBr2025-09-261-6/+5
| | | | | | | | | | | when using fast buffering (#2584) This fixes a bug in the buffer cache that caused flickering in some games when using fast buffering. This fixes Kirby Star Allies, Yoshi's Crafted World, and possibly many others. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2584 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
* [meta] fix license headers (#2547)lizzie2025-09-212-0/+6
| | | | | | | 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-093-23/+23
| | | | | | | | | | | | | | 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>
* [meta] remove MicroProfile (#185)crueter2025-08-063-18/+3
| | | | | | Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/185 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* [vk, hle] fix storage buffer cache, unstubbed TryPopFriendInvitation (#129)Maufeat2025-07-271-1/+10
| | | | | | | | | | | | This fixes Jamboree + unstubes friend invitation channel which spammed a lot while testing jamboree. Culprit was: #2 Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/129 Co-authored-by: Maufeat <maufeat@eden-emu.dev> Co-committed-by: Maufeat <maufeat@eden-emu.dev>
* [vk, opengl] Prevent GPU draw call if CBUF binding fails (cbuf0 error ↵Ghost2025-07-132-2/+3
| | | | | | | | | | | | | | | | | | | | | | handling) (#2) Add defensive checks to cancel draw calls early if any graphics storage buffer (CBUF) fails to bind properly. - Modified BindGraphicsStorageBuffer to return false on invalid buffer ID., - ConfigureImpl (both OpenGL and Vulkan) now propagates binding failure., - Pipeline::Configure returns false if CBUF binding fails., - PrepareDraw cancels rendering if pipeline configuration fails., This avoids undefined GPU behavior, draw corruption, or crashes caused by uninitialized or invalid constant buffer (CBUF0) access, particularly in games with faulty or missing shader bindings. Eden Collaborator: <edencollaborator@eden-emu.org> Authored-by: CamilleLaVey <camillelavey@eden-emu.org> Signed-off-by: Bix <bix@bixed.xyz> Co-authored-by: Bix <114880614+Bixbr@users.noreply.github.com> Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2 Co-authored-by: Ghost <> Co-committed-by: Ghost <>
* revert [android] Snapdragon 865 patches (#23)CamilleLaVey2025-07-122-25/+3
| | | | | | | | | revert [android] Snapdragon 865 patches (#23) Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Reviewed-on: https://git.bixed.xyz/Bix/eden/pulls/23 Reverted due to heavy performance hits on Android with higher specifications, will be adjusted to be included in a specific build for older A6XX devices, as 855, 860, 865, 870, meanwhile it does fix critical issues with certain games crashing due to memory and VRAM usage, hits performance on SoC that can do it without this special flags.
* [android] Snapdragon 865 patches (#23)crueter2025-07-062-3/+25
| | | | | Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Reviewed-on: https://git.bixed.xyz/Bix/eden/pulls/23
* [VK] Rework SPIRV Shader Optimization (#238)Gamer642025-07-032-0/+6
| | | | | | | | The actual SPIRV Shader Optimization option doesn't seem to do anything as long as it isn't vinculed, so let's rework it to make it work Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com> Co-authored-by: echosys <echosys@noreply.localhost> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/238
* revert 91a662431cfe419bd46b6ca4ed298a4ba70d7820 (#240)CamilleLaVey2025-06-302-25/+2
| | | | | | | | | | | | | | | | | | revert [Texture_cache] Better memory handling for devices with lower memory allocations (#233) Means games like Minecraft Dungeons, Sea of Stars, Luigi Mansion 2, Astroneer, Alan Wake, etc are now playable. It also cleans up the recent abi.cpp and bindless texture commits a bit. Everything is in #ifdef ANDROID - The biggest change is CACHING_PAGEBITS = 12. Without that the way the buffercache grows and joins buffers can cause Android to run out of memory (as you end up with just one big buffer that needs to be copied every time it grows) Also patches up ffmpeg issues. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/233 Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Co-committed-by: JPikachu <jpikachu.eden@gmail.com> Had showed some regressions on devices with higher specifications, will be refined to return as a toggle in a later commit. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/240
* [Texture_cache] Better memory handling for devices with lower memory ↵JPikachu2025-06-292-2/+25
| | | | | | | | | | | | | | allocations (#233) Means games like Minecraft Dungeons, Sea of Stars, Luigi Mansion 2, Astroneer, Alan Wake, etc are now playable. It also cleans up the recent abi.cpp and bindless texture commits a bit. Everything is in #ifdef ANDROID - The biggest change is CACHING_PAGEBITS = 12. Without that the way the buffercache grows and joins buffers can cause Android to run out of memory (as you end up with just one big buffer that needs to be copied every time it grows) Also patches up ffmpeg issues. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/233 Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Co-committed-by: JPikachu <jpikachu.eden@gmail.com>
* general: workarounds for SMMU syncing issues (#12749)liamwhite2024-02-271-1/+4
|
* buffer_cache: avoid overflow in usage tracker (#13166)liamwhite2024-02-271-0/+6
|
* Merge pull request #10529 from liamwhite/critical-spacingMatías Locatti2024-02-201-1/+1
|\ | | | | caches: make critical reclamation less eager and possible in more cases
| * caches: make critical reclamation less eager and possible in more casesLiam2024-02-111-1/+1
| |
* | buffer_cache: use mapped range with large vertex buffer sizeLiam2024-02-131-1/+1
|/
* Common: Rename SplitRangeSet to OverlapRangeSetFernando Sahmkow2024-02-051-1/+1
|
* Buffer Cache: Refactor to use Range sets insteadFernando Sahmkow2024-02-052-278/+103
|
* VideoCore: Move Slot Vector to CommonFernando Sahmkow2024-02-041-3/+3
|
* Core: Eliminate core/memory dependancies.Fernando Sahmkow2024-01-183-15/+14
|
* Core: Clang format and other small issues.Fernando Sahmkow2024-01-182-6/+6
|
* SMMU: Initial adaptation to video_core.Fernando Sahmkow2024-01-185-289/+304
|
* Fix typos in video_coreViktor Szépe2024-01-071-2/+2
|
* Revert "video_core: use interval map for page count tracking"liamwhite2023-12-171-1/+1
|
* video_core: use interval map for page count trackingLiam2023-12-141-1/+1
|
* Merge pull request #12194 from liamwhite/fruit-companyliamwhite2023-11-291-2/+2
|\ | | | | video_core: fix mac compile
| * video_core: fix mac compileLiam2023-11-261-2/+2
| |
* | Merge branch 'master' into ssbo-alignAmeer J2023-11-263-71/+114
|\|
| * Merge pull request #11535 from GPUCode/upload_cmdbufFernando S2023-11-263-66/+114
| |\ | | | | | | renderer_vulkan: Introduce separate cmd buffer for uploads
| | * renderer_vulkan: Introduce separate cmd buffer for uploadsGPUCode2023-11-123-66/+114
| | |
| * | Buffer Cache: Eliminate clears on Indirect buffersFernando Sahmkow2023-11-181-5/+0
| |/
* | shader_recompiler: Align SSBO offsets in GlobalMemory functionsAmeer J2023-10-311-1/+2
| |
* | buffer_cache: Apply storage buffer alignment only to the offsetAmeer J2023-10-311-8/+12
| |
* | shader_recompiler: Align SSBO offsets to meet host requirementsAmeer J2023-10-311-3/+8
|/ | | | Co-Authored-By: Billy Laws <blaws05@gmail.com>
* Add missing dowhile loops around FindBuffer callsKelebek12023-10-231-6/+7
|