diff options
author | Lioncash <mathew1800@gmail.com> | 2021-04-12 12:04:55 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-04-12 15:17:36 +0200 |
commit | 4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c (patch) | |
tree | 325069d16f10b1e913470c4efef29a534ca63703 | |
parent | Merge pull request #6135 from Morph1984/borderless-windowed-fullscreen (diff) | |
download | yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.tar yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.tar.gz yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.tar.bz2 yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.tar.lz yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.tar.xz yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.tar.zst yuzu-4198c92ed0da9dcd70e6c0830b8b44264fb2aa0c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 18155e449..bc2a53841 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -7,6 +7,8 @@ #include <span> #include <vector> +#include "common/bit_cast.h" + #include "video_core/engines/fermi_2d.h" #include "video_core/renderer_vulkan/blit_image.h" #include "video_core/renderer_vulkan/maxwell_to_vk.h" @@ -1062,14 +1064,13 @@ vk::ImageView ImageView::MakeDepthStencilView(VkImageAspectFlags aspect_mask) { Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& tsc) { const auto& device = runtime.device; const bool arbitrary_borders = runtime.device.IsExtCustomBorderColorSupported(); - const std::array<float, 4> color = tsc.BorderColor(); - // C++20 bit_cast - VkClearColorValue border_color; - std::memcpy(&border_color, &color, sizeof(color)); + const auto color = tsc.BorderColor(); + const VkSamplerCustomBorderColorCreateInfoEXT border_ci{ .sType = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT, .pNext = nullptr, - .customBorderColor = border_color, + // TODO: Make use of std::bit_cast once libc++ supports it. + .customBorderColor = Common::BitCast<VkClearColorValue>(color), .format = VK_FORMAT_UNDEFINED, }; const void* pnext = nullptr; |