diff options
author | bunnei <bunneidev@gmail.com> | 2021-06-07 00:42:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 00:42:20 +0200 |
commit | afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f (patch) | |
tree | ab65f4ba2c2dfb81b737d65b612467458ea12dbd /src/video_core/buffer_cache/buffer_cache.h | |
parent | Merge pull request #6415 from lioncash/res-nodisc (diff) | |
parent | buffer_cache: Simplify uniform disabling logic (diff) | |
download | yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.gz yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.bz2 yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.lz yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.xz yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.tar.zst yuzu-afd0e2eb0b1c4a998cf1d28ad864ee70ac31147f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/buffer_cache/buffer_cache.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 9e6b87960..d371b842f 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -110,6 +110,8 @@ public: void BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size); + void DisableGraphicsUniformBuffer(size_t stage, u32 index); + void UpdateGraphicsBuffers(bool is_indexed); void UpdateComputeBuffers(); @@ -419,10 +421,6 @@ template <class P> void BufferCache<P>::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr gpu_addr, u32 size) { const std::optional<VAddr> cpu_addr = gpu_memory.GpuToCpuAddress(gpu_addr); - if (!cpu_addr) { - uniform_buffers[stage][index] = NULL_BINDING; - return; - } const Binding binding{ .cpu_addr = *cpu_addr, .size = size, @@ -432,6 +430,11 @@ void BufferCache<P>::BindGraphicsUniformBuffer(size_t stage, u32 index, GPUVAddr } template <class P> +void BufferCache<P>::DisableGraphicsUniformBuffer(size_t stage, u32 index) { + uniform_buffers[stage][index] = NULL_BINDING; +} + +template <class P> void BufferCache<P>::UpdateGraphicsBuffers(bool is_indexed) { MICROPROFILE_SCOPE(GPU_PrepareBuffers); do { |