diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-06 09:08:16 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-06 22:47:51 +0100 |
commit | e4f9ce0379aed68efa73669b836b1d5818883419 (patch) | |
tree | 74e0714699c78d5178de289b0f7af1ba1cf9f5ce /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | Merge pull request #3479 from jroweboy/dont-log-on-no-input (diff) | |
download | yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.tar yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.tar.gz yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.tar.bz2 yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.tar.lz yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.tar.xz yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.tar.zst yuzu-e4f9ce0379aed68efa73669b836b1d5818883419.zip |
Diffstat (limited to '')
-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 3fe28c204..9d7f5831b 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -909,6 +909,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)); |