From 1f28f0e7051ae88773a058abe8ed12c1b65261f4 Mon Sep 17 00:00:00 2001 From: Forrest Mark X Date: Wed, 29 Jul 2026 22:34:07 -0500 Subject: [PATCH] Fixed errors again --- .../renderer_vulkan/vk_texture_cache.cpp | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 057959d058..58b20e5dec 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -933,6 +933,33 @@ void BlitScale(Scheduler& scheduler, VkImage src_image, VkImage dst_image, const 0, nullptr, nullptr, write_barriers); }); } + +[[nodiscard]] bool ByteWidthSupported(u32 bpp, const Device& device) { + switch (bpp) { + case 1: + return device.IsStorageBuffer8BitAccessSupported(); + case 2: + return device.IsStorageBuffer16BitAccessSupported(); + case 4: + case 8: + case 16: + return true; + default: + return false; + } +} + +[[nodiscard]] boost::container::small_vector BuildViewFormats( + const ImageInfo& info, std::span base_view_formats) { + boost::container::small_vector formats(base_view_formats.begin(), + base_view_formats.end()); + if (Settings::values.gpu_unswizzle_enabled.GetValue()) { + if (const auto block_view_format = BlockTexelViewFormat(info.format)) { + formats.push_back(*block_view_format); + } + } + return formats; +} } // Anonymous namespace TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& scheduler_, @@ -986,21 +1013,6 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched } } -[[nodiscard]] bool ByteWidthSupported(u32 bpp, const Device& device) { - switch (bpp) { - case 1: - return device.IsStorageBuffer8BitAccessSupported(); - case 2: - return device.IsStorageBuffer16BitAccessSupported(); - case 4: - case 8: - case 16: - return true; - default: - return false; - } -} - bool TextureCacheRuntime::IsUnswizzleStorageFormatSupported(PixelFormat format) const { const u32 bytes_per_block = VideoCore::Surface::BytesPerBlock(format); if (!ByteWidthSupported(bytes_per_block, device)) { @@ -1880,18 +1892,6 @@ void TextureCacheRuntime::ReleaseSparseUnswizzleBuffer(Image& image) { }); } -[[nodiscard]] boost::container::small_vector BuildViewFormats( - const ImageInfo& info, std::span base_view_formats) { - boost::container::small_vector formats(base_view_formats.begin(), - base_view_formats.end()); - if (Settings::values.gpu_unswizzle_enabled.GetValue()) { - if (const auto block_view_format = BlockTexelViewFormat(info.format)) { - formats.push_back(*block_view_format); - } - } - return formats; -} - Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu_addr_, VAddr cpu_addr_) : VideoCommon::ImageBase(info_, gpu_addr_, cpu_addr_), scheduler{&runtime_.scheduler},