summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-16 13:43:40 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-05-16 13:43:40 +0200
commitacf22336ecc9b2271f9fbcdb62493221631d7342 (patch)
tree5ead7586aa25c0c8589038851dacb6835d8b1ead
parentMerge pull request #6300 from Morph1984/mbedtls (diff)
downloadyuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.tar
yuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.tar.gz
yuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.tar.bz2
yuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.tar.lz
yuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.tar.xz
yuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.tar.zst
yuzu-acf22336ecc9b2271f9fbcdb62493221631d7342.zip
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 32dcbd693..de971041f 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -690,7 +690,10 @@ void BufferCache<P>::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32
const VAddr cpu_addr = binding.cpu_addr;
const u32 size = binding.size;
Buffer& buffer = slot_buffers[binding.buffer_id];
- if (size <= uniform_buffer_skip_cache_size && !buffer.IsRegionGpuModified(cpu_addr, size)) {
+ const bool use_fast_buffer = binding.buffer_id != NULL_BUFFER_ID &&
+ size <= uniform_buffer_skip_cache_size &&
+ !buffer.IsRegionGpuModified(cpu_addr, size);
+ if (use_fast_buffer) {
if constexpr (IS_OPENGL) {
if (runtime.HasFastBufferSubData()) {
// Fast path for Nvidia