From ea20a8f784a9c2d9f3bd2074d1de9c0de4d45aca Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 14 Sep 2021 02:08:43 +0200 Subject: [PATCH] early-access version 2059 --- README.md | 2 +- src/common/common_funcs.h | 16 ++++++++++++++++ .../renderer_vulkan/vk_descriptor_pool.cpp | 1 - .../vulkan_common/vulkan_device.cpp | 19 ++----------------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 11e6de96c..6587093c9 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2056. +This is the source code for early-access 2059. ## Legal Notice diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 1e74d6930..4c1e29de6 100755 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -61,6 +61,14 @@ __declspec(dllimport) void __stdcall DebugBreak(void); using T = std::underlying_type_t; \ return static_cast(static_cast(a) ^ static_cast(b)); \ } \ + [[nodiscard]] constexpr type operator<<(type a, type b) noexcept { \ + using T = std::underlying_type_t; \ + return static_cast(static_cast(a) << static_cast(b)); \ + } \ + [[nodiscard]] constexpr type operator>>(type a, type b) noexcept { \ + using T = std::underlying_type_t; \ + return static_cast(static_cast(a) >> static_cast(b)); \ + } \ constexpr type& operator|=(type& a, type b) noexcept { \ a = a | b; \ return a; \ @@ -73,6 +81,14 @@ __declspec(dllimport) void __stdcall DebugBreak(void); a = a ^ b; \ return a; \ } \ + constexpr type& operator<<=(type& a, type b) noexcept { \ + a = a << b; \ + return a; \ + } \ + constexpr type& operator>>=(type& a, type b) noexcept { \ + a = a >> b; \ + return a; \ + } \ [[nodiscard]] constexpr type operator~(type key) noexcept { \ using T = std::underlying_type_t; \ return static_cast(~static_cast(key)); \ diff --git a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp index 9e8906627..d87da2a34 100755 --- a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp @@ -19,7 +19,6 @@ namespace Vulkan { // Prefer small grow rates to avoid saturating the descriptor pool with barely used pipelines constexpr size_t SETS_GROW_RATE = 16; constexpr s32 SCORE_THRESHOLD = 3; -constexpr u32 SETS_PER_POOL = 64; struct DescriptorBank { DescriptorBankInfo info; diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index a0a1cc1d5..40b7ea90f 100755 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -243,7 +243,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR SetupFamilies(surface); SetupFeatures(); SetupProperties(); - CollectTelemetryParameters(); const auto queue_cis = GetDeviceQueueCreateInfos(); const std::vector extensions = LoadExtensions(surface != nullptr); @@ -369,15 +368,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; SetNext(next, demote); - if (driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE) { - const u32 version = (properties.driverVersion << 3) >> 3; - // Broken in this driver - if (version >= 0x008000c6) { - is_int8_supported = false; - is_float16_supported = false; - } - } - if (is_int8_supported || is_float16_supported) { VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, @@ -570,6 +560,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld); CollectPhysicalMemoryInfo(); + CollectTelemetryParameters(); CollectToolingInfo(); if (driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR) { @@ -596,13 +587,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR ext_extended_dynamic_state = false; } } - if (ext_sampler_filter_minmax) { - if (driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || - driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE || driver_id == VK_DRIVER_ID_MESA_RADV) { - // Disable ext_sampler_filter_minmax in GCN as it is broken. - ext_sampler_filter_minmax = is_float16_supported; - } - } if (ext_vertex_input_dynamic_state && driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { LOG_WARNING(Render_Vulkan, "Blacklisting Intel for VK_EXT_vertex_input_dynamic_state"); ext_vertex_input_dynamic_state = false; @@ -618,6 +602,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR sets_per_pool = 64; if (driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE) { + // AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2. sets_per_pool = 96; } }