diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-13 03:09:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 03:09:49 +0100 |
commit | f159a128206c7ff89739af01dad19bcd54f59781 (patch) | |
tree | d673e6d8095625595d3d5c66211486275601b250 /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | Merge pull request #3497 from FernandoS27/microprogfile-extend (diff) | |
parent | vk_rasterizer: Support disabled uniform buffers (diff) | |
download | yuzu-f159a128206c7ff89739af01dad19bcd54f59781.tar yuzu-f159a128206c7ff89739af01dad19bcd54f59781.tar.gz yuzu-f159a128206c7ff89739af01dad19bcd54f59781.tar.bz2 yuzu-f159a128206c7ff89739af01dad19bcd54f59781.tar.lz yuzu-f159a128206c7ff89739af01dad19bcd54f59781.tar.xz yuzu-f159a128206c7ff89739af01dad19bcd54f59781.tar.zst yuzu-f159a128206c7ff89739af01dad19bcd54f59781.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index b402fb268..a2f508f86 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -915,6 +915,13 @@ void RasterizerVulkan::SetupComputeImages(const ShaderEntries& entries) { void RasterizerVulkan::SetupConstBuffer(const ConstBufferEntry& entry, const Tegra::Engines::ConstBufferInfo& buffer) { + if (!buffer.enabled) { + // Set values to zero to unbind buffers + update_descriptor_queue.AddBuffer(buffer_cache.GetEmptyBuffer(sizeof(float)), 0, + sizeof(float)); + return; + } + // Align the size to avoid bad std140 interactions const std::size_t size = Common::AlignUp(CalculateConstBufferSize(entry, buffer), 4 * sizeof(float)); |