diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-02 23:50:01 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:34 +0200 |
commit | b02c78b276f449318bdc787a35d123df01c0bc6d (patch) | |
tree | ef3eb259f27e24cdac8565d8f8bfe08565756e8a /src/video_core/renderer_vulkan/vk_buffer_cache.cpp | |
parent | nsight_aftermath_tracker: Fix SPIR-V module writes (diff) | |
download | yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.tar yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.tar.gz yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.tar.bz2 yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.tar.lz yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.tar.xz yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.tar.zst yuzu-b02c78b276f449318bdc787a35d123df01c0bc6d.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_buffer_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index 2da3de6de..f4b3ee95c 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -97,6 +97,10 @@ Buffer::Buffer(BufferCacheRuntime& runtime, VideoCore::RasterizerInterface& rast } VkBufferView Buffer::View(u32 offset, u32 size, VideoCore::Surface::PixelFormat format) { + if (!device) { + // Null buffer, return a null descriptor + return VK_NULL_HANDLE; + } const auto it{std::ranges::find_if(views, [offset, size, format](const BufferView& view) { return offset == view.offset && size == view.size && format == view.format; })}; |