diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/wall_clock.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/time/time_zone_content_manager.cpp | 17 | ||||
| -rw-r--r-- | src/core/hle/service/time/time_zone_content_manager.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_descriptor_pool.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_fsr.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_turbo_mode.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 8 |
8 files changed, 26 insertions, 15 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp index dc0dcbd68..71e15ab4c 100644 --- a/src/common/wall_clock.cpp +++ b/src/common/wall_clock.cpp | |||
| @@ -56,12 +56,12 @@ std::unique_ptr<WallClock> CreateOptimalClock() { | |||
| 56 | #ifdef ARCHITECTURE_x86_64 | 56 | #ifdef ARCHITECTURE_x86_64 |
| 57 | const auto& caps = GetCPUCaps(); | 57 | const auto& caps = GetCPUCaps(); |
| 58 | 58 | ||
| 59 | if (caps.invariant_tsc && caps.tsc_frequency >= WallClock::GPUTickFreq) { | 59 | if (caps.invariant_tsc && caps.tsc_frequency >= std::nano::den) { |
| 60 | return std::make_unique<X64::NativeClock>(caps.tsc_frequency); | 60 | return std::make_unique<X64::NativeClock>(caps.tsc_frequency); |
| 61 | } else { | 61 | } else { |
| 62 | // Fallback to StandardWallClock if the hardware TSC | 62 | // Fallback to StandardWallClock if the hardware TSC |
| 63 | // - Is not invariant | 63 | // - Is not invariant |
| 64 | // - Is not more precise than GPUTickFreq | 64 | // - Is not more precise than 1 GHz (1ns resolution) |
| 65 | return std::make_unique<StandardWallClock>(); | 65 | return std::make_unique<StandardWallClock>(); |
| 66 | } | 66 | } |
| 67 | #else | 67 | #else |
diff --git a/src/core/hle/service/time/time_zone_content_manager.cpp b/src/core/hle/service/time/time_zone_content_manager.cpp index 5d60be67a..3b6047ad0 100644 --- a/src/core/hle/service/time/time_zone_content_manager.cpp +++ b/src/core/hle/service/time/time_zone_content_manager.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <chrono> | 4 | #include <chrono> |
| 5 | #include <sstream> | 5 | #include <sstream> |
| 6 | #include <utility> | ||
| 6 | 7 | ||
| 7 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | 9 | #include "common/settings.h" |
| @@ -46,14 +47,14 @@ static FileSys::VirtualDir GetTimeZoneBinary(Core::System& system) { | |||
| 46 | return FileSys::ExtractRomFS(romfs); | 47 | return FileSys::ExtractRomFS(romfs); |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | static std::vector<std::string> BuildLocationNameCache(Core::System& system) { | 50 | static std::vector<std::string> BuildLocationNameCache( |
| 50 | const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)}; | 51 | const FileSys::VirtualDir& time_zone_binary) { |
| 51 | if (!extracted_romfs) { | 52 | if (!time_zone_binary) { |
| 52 | LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); | 53 | LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); |
| 53 | return {}; | 54 | return {}; |
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | const FileSys::VirtualFile binary_list{extracted_romfs->GetFile("binaryList.txt")}; | 57 | const FileSys::VirtualFile binary_list{time_zone_binary->GetFile("binaryList.txt")}; |
| 57 | if (!binary_list) { | 58 | if (!binary_list) { |
| 58 | LOG_ERROR(Service_Time, "{:016X} has no file binaryList.txt!", time_zone_binary_titleid); | 59 | LOG_ERROR(Service_Time, "{:016X} has no file binaryList.txt!", time_zone_binary_titleid); |
| 59 | return {}; | 60 | return {}; |
| @@ -73,7 +74,8 @@ static std::vector<std::string> BuildLocationNameCache(Core::System& system) { | |||
| 73 | } | 74 | } |
| 74 | 75 | ||
| 75 | TimeZoneContentManager::TimeZoneContentManager(Core::System& system_) | 76 | TimeZoneContentManager::TimeZoneContentManager(Core::System& system_) |
| 76 | : system{system_}, location_name_cache{BuildLocationNameCache(system)} {} | 77 | : system{system_}, time_zone_binary{GetTimeZoneBinary(system)}, |
| 78 | location_name_cache{BuildLocationNameCache(time_zone_binary)} {} | ||
| 77 | 79 | ||
| 78 | void TimeZoneContentManager::Initialize(TimeManager& time_manager) { | 80 | void TimeZoneContentManager::Initialize(TimeManager& time_manager) { |
| 79 | const auto timezone_setting = Settings::GetTimeZoneString(); | 81 | const auto timezone_setting = Settings::GetTimeZoneString(); |
| @@ -111,13 +113,12 @@ Result TimeZoneContentManager::GetTimeZoneInfoFile(const std::string& location_n | |||
| 111 | return ERROR_TIME_NOT_FOUND; | 113 | return ERROR_TIME_NOT_FOUND; |
| 112 | } | 114 | } |
| 113 | 115 | ||
| 114 | const FileSys::VirtualDir extracted_romfs{GetTimeZoneBinary(system)}; | 116 | if (!time_zone_binary) { |
| 115 | if (!extracted_romfs) { | ||
| 116 | LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); | 117 | LOG_ERROR(Service_Time, "Failed to extract RomFS for {:016X}!", time_zone_binary_titleid); |
| 117 | return ERROR_TIME_NOT_FOUND; | 118 | return ERROR_TIME_NOT_FOUND; |
| 118 | } | 119 | } |
| 119 | 120 | ||
| 120 | const FileSys::VirtualDir zoneinfo_dir{extracted_romfs->GetSubdirectory("zoneinfo")}; | 121 | const FileSys::VirtualDir zoneinfo_dir{time_zone_binary->GetSubdirectory("zoneinfo")}; |
| 121 | if (!zoneinfo_dir) { | 122 | if (!zoneinfo_dir) { |
| 122 | LOG_ERROR(Service_Time, "{:016X} has no directory zoneinfo!", time_zone_binary_titleid); | 123 | LOG_ERROR(Service_Time, "{:016X} has no directory zoneinfo!", time_zone_binary_titleid); |
| 123 | return ERROR_TIME_NOT_FOUND; | 124 | return ERROR_TIME_NOT_FOUND; |
diff --git a/src/core/hle/service/time/time_zone_content_manager.h b/src/core/hle/service/time/time_zone_content_manager.h index 3d94b6428..a6f9698bc 100644 --- a/src/core/hle/service/time/time_zone_content_manager.h +++ b/src/core/hle/service/time/time_zone_content_manager.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <string> | 6 | #include <string> |
| 7 | #include <vector> | 7 | #include <vector> |
| 8 | 8 | ||
| 9 | #include "core/file_sys/vfs_types.h" | ||
| 9 | #include "core/hle/service/time/time_zone_manager.h" | 10 | #include "core/hle/service/time/time_zone_manager.h" |
| 10 | 11 | ||
| 11 | namespace Core { | 12 | namespace Core { |
| @@ -41,6 +42,7 @@ private: | |||
| 41 | 42 | ||
| 42 | Core::System& system; | 43 | Core::System& system; |
| 43 | TimeZoneManager time_zone_manager; | 44 | TimeZoneManager time_zone_manager; |
| 45 | const FileSys::VirtualDir time_zone_binary; | ||
| 44 | const std::vector<std::string> location_name_cache; | 46 | const std::vector<std::string> location_name_cache; |
| 45 | }; | 47 | }; |
| 46 | 48 | ||
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index ad3b29f0e..31928bb94 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp | |||
| @@ -566,7 +566,7 @@ void BlitScreen::CreateDescriptorPool() { | |||
| 566 | const VkDescriptorPoolCreateInfo ci{ | 566 | const VkDescriptorPoolCreateInfo ci{ |
| 567 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | 567 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, |
| 568 | .pNext = nullptr, | 568 | .pNext = nullptr, |
| 569 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, | 569 | .flags = 0, |
| 570 | .maxSets = static_cast<u32>(image_count), | 570 | .maxSets = static_cast<u32>(image_count), |
| 571 | .poolSizeCount = static_cast<u32>(pool_sizes.size()), | 571 | .poolSizeCount = static_cast<u32>(pool_sizes.size()), |
| 572 | .pPoolSizes = pool_sizes.data(), | 572 | .pPoolSizes = pool_sizes.data(), |
| @@ -576,7 +576,7 @@ void BlitScreen::CreateDescriptorPool() { | |||
| 576 | const VkDescriptorPoolCreateInfo ci_aa{ | 576 | const VkDescriptorPoolCreateInfo ci_aa{ |
| 577 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | 577 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, |
| 578 | .pNext = nullptr, | 578 | .pNext = nullptr, |
| 579 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, | 579 | .flags = 0, |
| 580 | .maxSets = static_cast<u32>(image_count), | 580 | .maxSets = static_cast<u32>(image_count), |
| 581 | .poolSizeCount = static_cast<u32>(pool_sizes_aa.size()), | 581 | .poolSizeCount = static_cast<u32>(pool_sizes_aa.size()), |
| 582 | .pPoolSizes = pool_sizes_aa.data(), | 582 | .pPoolSizes = pool_sizes_aa.data(), |
diff --git a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp index b5ae6443c..6048a301f 100644 --- a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp | |||
| @@ -77,7 +77,7 @@ static void AllocatePool(const Device& device, DescriptorBank& bank) { | |||
| 77 | bank.pools.push_back(device.GetLogical().CreateDescriptorPool({ | 77 | bank.pools.push_back(device.GetLogical().CreateDescriptorPool({ |
| 78 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | 78 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, |
| 79 | .pNext = nullptr, | 79 | .pNext = nullptr, |
| 80 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, | 80 | .flags = 0, |
| 81 | .maxSets = sets_per_pool, | 81 | .maxSets = sets_per_pool, |
| 82 | .poolSizeCount = static_cast<u32>(pool_cursor), | 82 | .poolSizeCount = static_cast<u32>(pool_cursor), |
| 83 | .pPoolSizes = std::data(pool_sizes), | 83 | .pPoolSizes = std::data(pool_sizes), |
diff --git a/src/video_core/renderer_vulkan/vk_fsr.cpp b/src/video_core/renderer_vulkan/vk_fsr.cpp index 9bcdca2fb..ce8f3f3c2 100644 --- a/src/video_core/renderer_vulkan/vk_fsr.cpp +++ b/src/video_core/renderer_vulkan/vk_fsr.cpp | |||
| @@ -150,7 +150,7 @@ void FSR::CreateDescriptorPool() { | |||
| 150 | const VkDescriptorPoolCreateInfo ci{ | 150 | const VkDescriptorPoolCreateInfo ci{ |
| 151 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | 151 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, |
| 152 | .pNext = nullptr, | 152 | .pNext = nullptr, |
| 153 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, | 153 | .flags = 0, |
| 154 | .maxSets = static_cast<u32>(image_count * 2), | 154 | .maxSets = static_cast<u32>(image_count * 2), |
| 155 | .poolSizeCount = static_cast<u32>(pool_sizes.size()), | 155 | .poolSizeCount = static_cast<u32>(pool_sizes.size()), |
| 156 | .pPoolSizes = pool_sizes.data(), | 156 | .pPoolSizes = pool_sizes.data(), |
diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp index 460d8d59d..04a51f2d1 100644 --- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp +++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp | |||
| @@ -62,7 +62,7 @@ void TurboMode::Run(std::stop_token stop_token) { | |||
| 62 | auto descriptor_pool = dld.CreateDescriptorPool(VkDescriptorPoolCreateInfo{ | 62 | auto descriptor_pool = dld.CreateDescriptorPool(VkDescriptorPoolCreateInfo{ |
| 63 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, | 63 | .sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, |
| 64 | .pNext = nullptr, | 64 | .pNext = nullptr, |
| 65 | .flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, | 65 | .flags = 0, |
| 66 | .maxSets = 1, | 66 | .maxSets = 1, |
| 67 | .poolSizeCount = 1, | 67 | .poolSizeCount = 1, |
| 68 | .pPoolSizes = &pool_size, | 68 | .pPoolSizes = &pool_size, |
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 9c6fbb918..78918f996 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -554,6 +554,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 554 | } | 554 | } |
| 555 | 555 | ||
| 556 | sets_per_pool = 64; | 556 | sets_per_pool = 64; |
| 557 | if (extensions.extended_dynamic_state3 && is_amd_driver && | ||
| 558 | !features.shader_float16_int8.shaderFloat16 && | ||
| 559 | properties.properties.driverVersion >= VK_MAKE_API_VERSION(0, 2, 0, 258)) { | ||
| 560 | LOG_WARNING(Render_Vulkan, "AMD GCN4 has broken extendedDynamicState3ColorBlendEquation"); | ||
| 561 | features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; | ||
| 562 | features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; | ||
| 563 | dynamic_state3_blending = false; | ||
| 564 | } | ||
| 557 | if (is_amd_driver) { | 565 | if (is_amd_driver) { |
| 558 | // AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2. | 566 | // AMD drivers need a higher amount of Sets per Pool in certain circumstances like in XC2. |
| 559 | sets_per_pool = 96; | 567 | sets_per_pool = 96; |