diff options
| author | Yuri Olive <yuriso1994@gmail.com> | 2026-10-31 13:54:17 -0300 |
|---|---|---|
| committer | Yuri Olive <yuriso1994@gmail.com> | 2026-11-02 12:03:06 -0300 |
| commit | 15dd9807110a1b120493962427413a82f4147d1c (patch) | |
| tree | ea40fe0e27d468ab9e0a45c04f6f2976a89c9838 /src/video_core/buffer_cache | |
| parent | a407703f6d29a5ab73328b4ededb12cf29b2758d (diff) | |
buffer_cache: allow 32 storage buffers per stage
Native Switch 2 compute shaders (such as Donkey Kong Bananza) bind up to 18 global memory ranges, causing out-of-bounds binding errors:
HW.GPU <Error> buffer_cache.h:BindComputeStorageBuffer: Storage buffer index 16 exceeds maximum storage buffer count
HW.GPU <Error> buffer_cache.h:BindComputeStorageBuffer: Storage buffer index 17 exceeds maximum storage buffer count
followed by GPU driver access violations (0xc0000005).
The enabled and written storage buffer bitmasks (enabled_compute_storage_buffers and written_compute_storage_buffers) are already u32, so widening NUM_STORAGE_BUFFERS from 16 to 32 fits naturally within the existing 32-bit masks.
Diffstat (limited to 'src/video_core/buffer_cache')
| -rw-r--r-- | src/video_core/buffer_cache/buffer_cache_base.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache_base.h b/src/video_core/buffer_cache/buffer_cache_base.h index d8a61b7913..24dd46bd17 100644 --- a/src/video_core/buffer_cache/buffer_cache_base.h +++ b/src/video_core/buffer_cache/buffer_cache_base.h @@ -57,7 +57,8 @@ constexpr u32 NUM_VERTEX_BUFFERS = 32; constexpr u32 NUM_TRANSFORM_FEEDBACK_BUFFERS = 4; constexpr u32 NUM_GRAPHICS_UNIFORM_BUFFERS = 18; constexpr u32 NUM_COMPUTE_UNIFORM_BUFFERS = 8; -constexpr u32 NUM_STORAGE_BUFFERS = 16; +// Native compute shaders bind up to 18 global memory ranges; the enable masks are 32 bits wide. +constexpr u32 NUM_STORAGE_BUFFERS = 32; constexpr u32 NUM_TEXTURE_BUFFERS = 32; constexpr u32 NUM_STAGES = 5; |
