From db631a2b65139acc71c077aafd9f0a41ab5dc7a4 Mon Sep 17 00:00:00 2001 From: Ribbit Date: Sat, 11 Oct 2025 23:30:33 -0700 Subject: [PATCH] maybe supporting qualcomm stock is a stupid idea --- src/video_core/buffer_cache/buffer_cache.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index f31ee7ac9e..2a2fbd729d 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -11,6 +11,7 @@ #include #include +#include "common/logging/log.h" #include "common/range_sets.inc" #include "video_core/buffer_cache/buffer_cache_base.h" #include "video_core/guest_memory.h" @@ -36,6 +37,12 @@ BufferCache

::BufferCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, R return; } + if constexpr (!IS_OPENGL) { + if (ForceOldUBOMethod()) { + LOG_INFO(Render_Vulkan, "Vulkan BufferCache using legacy uniform binding path"); + } + } + const s64 device_local_memory = static_cast(runtime.GetDeviceLocalMemory()); const s64 min_spacing_expected = device_local_memory - 1_GiB; const s64 min_spacing_critical = device_local_memory - 512_MiB; @@ -797,7 +804,7 @@ void BufferCache

::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 if constexpr (!IS_OPENGL) { if constexpr (requires(const Runtime& r) { r.GetMaxUniformBufferRange(); }) { max_range = runtime.GetMaxUniformBufferRange(); - if (max_range != 0) { + if (!force_old_ubo && max_range != 0) { size_for_bind = (std::min)(size_for_bind, max_range); } } @@ -983,7 +990,7 @@ void BufferCache

::BindHostComputeUniformBuffers() { if constexpr (!IS_OPENGL) { if constexpr (requires(const Runtime& r) { r.GetMaxUniformBufferRange(); }) { max_range = runtime.GetMaxUniformBufferRange(); - if (max_range != 0) { + if (!force_old_ubo && max_range != 0) { size_for_bind = (std::min)(size_for_bind, max_range); } }