diff options
author | Liam <byteslice@airmail.cc> | 2024-01-20 01:14:34 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-09 15:20:53 +0100 |
commit | 0cbb555e9aab4ec18491a400176caa0dce9a9ad1 (patch) | |
tree | 351f2330cf6dd37f231b444e5e25e6e5132a8853 /src/video_core/renderer_vulkan/present/layer.cpp | |
parent | core: fix multiprocess with nce (diff) | |
download | yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.tar yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.tar.gz yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.tar.bz2 yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.tar.lz yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.tar.xz yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.tar.zst yuzu-0cbb555e9aab4ec18491a400176caa0dce9a9ad1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/present/layer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/present/layer.cpp b/src/video_core/renderer_vulkan/present/layer.cpp index cfc04be44..550955d4d 100644 --- a/src/video_core/renderer_vulkan/present/layer.cpp +++ b/src/video_core/renderer_vulkan/present/layer.cpp @@ -270,9 +270,11 @@ void Layer::UpdateRawImage(const Tegra::FramebufferConfig& framebuffer, size_t i const u64 linear_size{GetSizeInBytes(framebuffer)}; const u64 tiled_size{Tegra::Texture::CalculateSize( true, bytes_per_pixel, framebuffer.stride, framebuffer.height, 1, block_height_log2, 0)}; - Tegra::Texture::UnswizzleTexture( - mapped_span.subspan(image_offset, linear_size), std::span(host_ptr, tiled_size), - bytes_per_pixel, framebuffer.width, framebuffer.height, 1, block_height_log2, 0); + if (host_ptr) { + Tegra::Texture::UnswizzleTexture( + mapped_span.subspan(image_offset, linear_size), std::span(host_ptr, tiled_size), + bytes_per_pixel, framebuffer.width, framebuffer.height, 1, block_height_log2, 0); + } const VkBufferImageCopy copy{ .bufferOffset = image_offset, |