From 39ae6f96a6f16ea7e20c4d78fee919adad5bf404 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 1 Jul 2023 23:09:47 +0200 Subject: [PATCH] early-access version 3731 --- README.md | 2 +- src/core/hle/kernel/k_thread.h | 3 ++- src/video_core/compatible_formats.cpp | 6 ++++++ src/video_core/renderer_vulkan/vk_texture_cache.cpp | 5 ++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c7cf413fe..f3496f329 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3730. +This is the source code for early-access 3731. ## Legal Notice diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index daeb316c9..d42f834d6 100755 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -343,7 +343,8 @@ public: } std::span GetHandleBuffer() { - return m_sync_object_buffer.handles; + return {m_sync_object_buffer.handles.data() + Svc::ArgumentHandleCountMax, + Svc::ArgumentHandleCountMax}; } u16 GetUserDisableCount() const; diff --git a/src/video_core/compatible_formats.cpp b/src/video_core/compatible_formats.cpp index a9a484e99..0f270aeeb 100755 --- a/src/video_core/compatible_formats.cpp +++ b/src/video_core/compatible_formats.cpp @@ -272,6 +272,9 @@ constexpr Table MakeNonNativeBgrCopyTable() { bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b, bool broken_views, bool native_bgr) { + if (format_a == format_b) { + return true; + } if (broken_views) { // If format views are broken, only accept formats that are identical. return format_a == format_b; @@ -282,6 +285,9 @@ bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b, bool broken_vi } bool IsCopyCompatible(PixelFormat format_a, PixelFormat format_b, bool native_bgr) { + if (format_a == format_b) { + return true; + } static constexpr Table BGR_TABLE = MakeNativeBgrCopyTable(); static constexpr Table NO_BGR_TABLE = MakeNonNativeBgrCopyTable(); return IsSupported(native_bgr ? BGR_TABLE : NO_BGR_TABLE, format_a, format_b); diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 2476a6ef0..8511367f9 100755 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -826,9 +826,8 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched } for (size_t index_a = 0; index_a < VideoCore::Surface::MaxPixelFormat; index_a++) { const auto image_format = static_cast(index_a); - const auto type_a = VideoCore::Surface::GetFormatType(image_format); - if (type_a != SurfaceType::ColorTexture) { - continue; + if (IsPixelFormatASTC(image_format) && !device.IsOptimalAstcSupported()) { + view_formats[index_a].push_back(VK_FORMAT_A8B8G8R8_UNORM_PACK32); } for (size_t index_b = 0; index_b < VideoCore::Surface::MaxPixelFormat; index_b++) { const auto view_format = static_cast(index_b);