summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_cache.h
AgeCommit message (Collapse)Author
2025-05-12video_core: Add fallback handling for failed storage buffer lookupsZephyron
Implements a more robust error handling approach when storage buffer lookups fail in the buffer cache. Instead of returning a null binding, the code now: - Provides a fallback buffer with safe default values - Implements warning rate limiting to prevent log spam - Tracks warning counts per cbuf_index - Logs detailed debug information periodically This change helps prevent potential crashes when storage buffer lookups fail while still maintaining visibility into the issue through strategic logging. The fallback mechanism uses a safe static address and a reasonable buffer size (16KB) to handle cases where the normal GPU to CPU address translation fails. Also updates copyright headers to include citron Emulator Project. Signed-off-by: Zephyron <zephyron@citron-emu.org>
2025-05-11buffer_cache: Simplify storage buffer binding logicZephyron
Reverts overly restrictive storage buffer validation and size calculation that was causing rendering issues in The Legend of Zelda: Tears of the Kingdom, particularly in underground/depth areas. The simplified approach: - Uses GetMemoryLayoutSize() instead of manual page probing - Removes unnecessary 4GB memory bounds validation - Streamlines address translation and alignment handling This fixes numerous reported cases of missing or corrupted rendering in TOTK's underground areas where storage buffer operations are heavily used for depth-related effects.
2025-05-11buffer_cache: Fix storage buffer memory validation and size detectionZephyron
Fixes the StorageBufferBinding function to properly handle memory validation and size detection. Key changes include: - Fix ReadBlock usage to properly handle void return values - Implement safer memory validation using byte-level reads - Improve size detection logic for storage buffers - Fix NVN buffer size reading - Add proper bounds checking for device memory addresses - Add better error logging for invalid conditions This addresses the "Failed to find storage buffer for cbuf index 0" errors by implementing more robust memory validation and size detection. The changes ensure proper handling of invalid memory addresses and prevent crashes from accessing out-of-bounds memory.
2024-02-27general: workarounds for SMMU syncing issues (#12749)liamwhite
2024-02-20Merge pull request #10529 from liamwhite/critical-spacingMatías Locatti
caches: make critical reclamation less eager and possible in more cases
2024-02-13buffer_cache: use mapped range with large vertex buffer sizeLiam
2024-02-11caches: make critical reclamation less eager and possible in more casesLiam
2024-02-05Buffer Cache: Refactor to use Range sets insteadFernando Sahmkow
2024-01-18Core: Eliminate core/memory dependancies.Fernando Sahmkow
2024-01-18Core: Clang format and other small issues.Fernando Sahmkow
2024-01-18SMMU: Initial adaptation to video_core.Fernando Sahmkow
2023-11-26Merge branch 'master' into ssbo-alignAmeer J
2023-11-26Merge pull request #11535 from GPUCode/upload_cmdbufFernando S
renderer_vulkan: Introduce separate cmd buffer for uploads
2023-11-18Buffer Cache: Eliminate clears on Indirect buffersFernando Sahmkow
2023-11-12renderer_vulkan: Introduce separate cmd buffer for uploadsGPUCode
2023-10-31shader_recompiler: Align SSBO offsets in GlobalMemory functionsAmeer J
2023-10-31buffer_cache: Apply storage buffer alignment only to the offsetAmeer J
2023-10-31shader_recompiler: Align SSBO offsets to meet host requirementsAmeer J
Co-Authored-By: Billy Laws <blaws05@gmail.com>
2023-10-23Add missing dowhile loops around FindBuffer callsKelebek1
2023-10-05Mark a buffer GPU modified after the buffers are confirmed, do not double ↵Kelebek1
synch them
2023-09-23Query Cache: address issuesFernando Sahmkow
2023-09-23Query Cachge: Fully rework Vulkan's query cacheFernando Sahmkow
2023-08-27Buffer Cache: fix discard writes.Fernando Sahmkow
2023-07-15buffer_cache: Increase number of texture buffersGPUCode
2023-07-02Use spans over guest memory where possible instead of copying data.Kelebek1
2023-06-28Memory Tracking: Optimize tracking to only use atomic writes when contested ↵Fernando Sahmkow
with the host GPU
2023-06-28MemoryTracking: Initial setup of atomic writes.Fernando Sahmkow
2023-06-22Remove memory allocations in some hot pathsKelebek1
2023-06-17Synchronize vertex buffer even when it doesn't require bindingKelebek1
2023-06-13buffer_cache_base: Specify buffer type in HostBindingsMorph
Avoid reinterpret-casting from void pointer since the type is already known at compile time.
2023-06-08Combine vertex/transform feedback buffer binding into a single callKelebek1
2023-06-07Merge pull request #10476 from ameerj/gl-memory-mapsliamwhite
OpenGL: Make use of persistent buffer maps in buffer cache
2023-06-01Merge pull request #10091 from Kelebek1/bc_buggggggliamwhite
Fix buffer overlap checking skipping a page for stream score right expand
2023-05-30Skip BufferCache tickframe with no channel state setKelebek1
2023-05-28OpenGL: Make use of persistent buffer maps in buffer cache downloadsameerj
Persistent buffer maps were already used by the texture cache, this extends their usage for the buffer cache. In my testing, using the memory maps for uploads was slower than the existing "ImmediateUpload" path, so the memory map usage is limited to downloads for the time being.
2023-05-27Move buffer bindings to per-channel stateKelebek1
2023-05-26Fix buffer overlap checking skipping a page for stream score right expandKelebek1
2023-05-24Merge pull request #10422 from liamwhite/gcFernando S
video_core: tune garbage collection aggressiveness
2023-05-23video_core: tune garbage collection aggressivenessLiam
2023-05-23textures: add BC1 and BC3 compressors and recompression settingLiam
2023-05-15Buffer Cache: Clear sync code.Fernando Sahmkow
2023-05-09Swap order of checking/setting region modifications in the buffer_cacheKelebek1
2023-05-07Buffer Cache: disable reactive flushing in it.Fernando Sahmkow
2023-05-07Buffer cache: always use async buffer downloads and fix regression.Fernando Sahmkow
2023-05-07Settings: add option to enable / disable reactive flushingFernando Sahmkow
2023-05-07GPU: Add Reactive flushingFernando Sahmkow
2023-05-02video_core: fix build on Apple ClangLiam
2023-05-01BufferCache: Fixes and address feedbackFernando Sahmkow
2023-04-29Buffer Cache: Release stagging buffers on tick frameFernando Sahmkow
2023-04-29Clang: format and ficx compile errors.Fernando Sahmkow