diff options
author | bunnei <bunneidev@gmail.com> | 2022-08-06 22:11:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-06 22:11:34 +0200 |
commit | 0f2fc6335e09667a4c7635863709516b79aec1e8 (patch) | |
tree | 7338e378dea01b2c3d7e45dab50ce62114ff068c /src/video_core | |
parent | Merge pull request #8667 from Kelebek1/xc3 (diff) | |
parent | vk_texture_cache: return VK_NULL_HANDLE for views of null images (diff) | |
download | yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.tar yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.tar.gz yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.tar.bz2 yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.tar.lz yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.tar.xz yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.tar.zst yuzu-0f2fc6335e09667a4c7635863709516b79aec1e8.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index ba6d81420..16463a892 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -1618,6 +1618,9 @@ ImageView::ImageView(TextureCacheRuntime&, const VideoCommon::NullImageViewParam ImageView::~ImageView() = default; VkImageView ImageView::DepthView() { + if (!image_handle) { + return VK_NULL_HANDLE; + } if (depth_view) { return *depth_view; } @@ -1627,6 +1630,9 @@ VkImageView ImageView::DepthView() { } VkImageView ImageView::StencilView() { + if (!image_handle) { + return VK_NULL_HANDLE; + } if (stencil_view) { return *stencil_view; } @@ -1636,6 +1642,9 @@ VkImageView ImageView::StencilView() { } VkImageView ImageView::ColorView() { + if (!image_handle) { + return VK_NULL_HANDLE; + } if (color_view) { return *color_view; } @@ -1645,6 +1654,9 @@ VkImageView ImageView::ColorView() { VkImageView ImageView::StorageView(Shader::TextureType texture_type, Shader::ImageFormat image_format) { + if (!image_handle) { + return VK_NULL_HANDLE; + } if (image_format == Shader::ImageFormat::Typeless) { return Handle(texture_type); } |