From 77a8f7b6a75ed8711465c7f9409f1bce466a9f34 Mon Sep 17 00:00:00 2001 From: Maufeat Date: Sun, 27 Jul 2025 02:37:29 +0200 Subject: [vk, hle] fix storage buffer cache, unstubbed TryPopFriendInvitation (#129) This fixes Jamboree + unstubes friend invitation channel which spammed a lot while testing jamboree. Culprit was: #2 Co-authored-by: Maufeat Co-authored-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/129 Co-authored-by: Maufeat Co-committed-by: Maufeat --- src/video_core/buffer_cache/buffer_cache.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/video_core/buffer_cache/buffer_cache.h') diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index a6e87a3583..66db162c5d 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -467,6 +467,10 @@ void BufferCache

::BindComputeStorageBuffer(size_t ssbo_index, u32 cbuf_index, channel_state->written_compute_storage_buffers |= (is_written ? 1U : 0U) << ssbo_index; const auto& launch_desc = kepler_compute->launch_description; + if (((launch_desc.const_buffer_enable_mask >> cbuf_index) & 1) == 0) { + LOG_WARNING(HW_GPU, "Skipped binding SSBO: cbuf index {} is not enabled", cbuf_index); + return; + } ASSERT(((launch_desc.const_buffer_enable_mask >> cbuf_index) & 1) != 0); const auto& cbufs = launch_desc.const_buffer_config; @@ -1701,6 +1705,11 @@ template Binding BufferCache

::StorageBufferBinding(GPUVAddr ssbo_addr, u32 cbuf_index, bool is_written) const { const GPUVAddr gpu_addr = gpu_memory->Read(ssbo_addr); + + if (gpu_addr == 0) { + return NULL_BINDING; + } + const auto size = [&]() { const bool is_nvn_cbuf = cbuf_index == 0; // The NVN driver buffer (index 0) is known to pack the SSBO address followed by its size. @@ -1723,7 +1732,7 @@ Binding BufferCache

::StorageBufferBinding(GPUVAddr ssbo_addr, u32 cbuf_index, const std::optional aligned_device_addr = gpu_memory->GpuToCpuAddress(aligned_gpu_addr); if (!aligned_device_addr || size == 0) { - LOG_WARNING(HW_GPU, "Failed to find storage buffer for cbuf index {}", cbuf_index); + LOG_DEBUG(HW_GPU, "Failed to find storage buffer for cbuf index {}", cbuf_index); return NULL_BINDING; } const std::optional device_addr = gpu_memory->GpuToCpuAddress(gpu_addr); -- cgit v1.2.3