diff options
27 files changed, 509 insertions, 157 deletions
diff --git a/src/common/telemetry.cpp b/src/common/telemetry.cpp index 200c6489a..16d42facd 100644 --- a/src/common/telemetry.cpp +++ b/src/common/telemetry.cpp | |||
| @@ -60,6 +60,7 @@ void AppendCPUInfo(FieldCollection& fc) { | |||
| 60 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AES", Common::GetCPUCaps().aes); | 60 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AES", Common::GetCPUCaps().aes); |
| 61 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AVX", Common::GetCPUCaps().avx); | 61 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AVX", Common::GetCPUCaps().avx); |
| 62 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AVX2", Common::GetCPUCaps().avx2); | 62 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AVX2", Common::GetCPUCaps().avx2); |
| 63 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_AVX512", Common::GetCPUCaps().avx512); | ||
| 63 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_BMI1", Common::GetCPUCaps().bmi1); | 64 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_BMI1", Common::GetCPUCaps().bmi1); |
| 64 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_BMI2", Common::GetCPUCaps().bmi2); | 65 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_BMI2", Common::GetCPUCaps().bmi2); |
| 65 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_FMA", Common::GetCPUCaps().fma); | 66 | fc.AddField(FieldType::UserSystem, "CPU_Extension_x64_FMA", Common::GetCPUCaps().fma); |
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index c9349a6b4..f35dcb498 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp | |||
| @@ -110,6 +110,11 @@ static CPUCaps Detect() { | |||
| 110 | caps.bmi1 = true; | 110 | caps.bmi1 = true; |
| 111 | if ((cpu_id[1] >> 8) & 1) | 111 | if ((cpu_id[1] >> 8) & 1) |
| 112 | caps.bmi2 = true; | 112 | caps.bmi2 = true; |
| 113 | // Checks for AVX512F, AVX512CD, AVX512VL, AVX512DQ, AVX512BW (Intel Skylake-X/SP) | ||
| 114 | if ((cpu_id[1] >> 16) & 1 && (cpu_id[1] >> 28) & 1 && (cpu_id[1] >> 31) & 1 && | ||
| 115 | (cpu_id[1] >> 17) & 1 && (cpu_id[1] >> 30) & 1) { | ||
| 116 | caps.avx512 = caps.avx2; | ||
| 117 | } | ||
| 113 | } | 118 | } |
| 114 | } | 119 | } |
| 115 | 120 | ||
diff --git a/src/common/x64/cpu_detect.h b/src/common/x64/cpu_detect.h index 20f2ba234..7606c3f7b 100644 --- a/src/common/x64/cpu_detect.h +++ b/src/common/x64/cpu_detect.h | |||
| @@ -19,6 +19,7 @@ struct CPUCaps { | |||
| 19 | bool lzcnt; | 19 | bool lzcnt; |
| 20 | bool avx; | 20 | bool avx; |
| 21 | bool avx2; | 21 | bool avx2; |
| 22 | bool avx512; | ||
| 22 | bool bmi1; | 23 | bool bmi1; |
| 23 | bool bmi2; | 24 | bool bmi2; |
| 24 | bool fma; | 25 | bool fma; |
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index 19d798dc7..4c8663d03 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp | |||
| @@ -62,7 +62,7 @@ public: | |||
| 62 | case Dynarmic::A32::Exception::Breakpoint: | 62 | case Dynarmic::A32::Exception::Breakpoint: |
| 63 | break; | 63 | break; |
| 64 | } | 64 | } |
| 65 | LOG_CRITICAL(HW_GPU, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})", | 65 | LOG_CRITICAL(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})", |
| 66 | static_cast<std::size_t>(exception), pc, MemoryReadCode(pc)); | 66 | static_cast<std::size_t>(exception), pc, MemoryReadCode(pc)); |
| 67 | UNIMPLEMENTED(); | 67 | UNIMPLEMENTED(); |
| 68 | } | 68 | } |
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index 337b97be9..5f5e36d94 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp | |||
| @@ -98,8 +98,8 @@ public: | |||
| 98 | } | 98 | } |
| 99 | [[fallthrough]]; | 99 | [[fallthrough]]; |
| 100 | default: | 100 | default: |
| 101 | ASSERT_MSG(false, "ExceptionRaised(exception = {}, pc = {:X})", | 101 | ASSERT_MSG(false, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})", |
| 102 | static_cast<std::size_t>(exception), pc); | 102 | static_cast<std::size_t>(exception), pc, MemoryReadCode(pc)); |
| 103 | } | 103 | } |
| 104 | } | 104 | } |
| 105 | 105 | ||
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 630a8b048..94d8c1fc6 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp | |||
| @@ -44,6 +44,218 @@ static constexpr u32 SanitizeJPEGSize(std::size_t size) { | |||
| 44 | return static_cast<u32>(std::min(size, max_jpeg_image_size)); | 44 | return static_cast<u32>(std::min(size, max_jpeg_image_size)); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | class IManagerForSystemService final : public ServiceFramework<IManagerForSystemService> { | ||
| 48 | public: | ||
| 49 | explicit IManagerForSystemService(Common::UUID user_id) | ||
| 50 | : ServiceFramework("IManagerForSystemService") { | ||
| 51 | // clang-format off | ||
| 52 | static const FunctionInfo functions[] = { | ||
| 53 | {0, nullptr, "CheckAvailability"}, | ||
| 54 | {1, nullptr, "GetAccountId"}, | ||
| 55 | {2, nullptr, "EnsureIdTokenCacheAsync"}, | ||
| 56 | {3, nullptr, "LoadIdTokenCache"}, | ||
| 57 | {100, nullptr, "SetSystemProgramIdentification"}, | ||
| 58 | {101, nullptr, "RefreshNotificationTokenAsync"}, // 7.0.0+ | ||
| 59 | {110, nullptr, "GetServiceEntryRequirementCache"}, // 4.0.0+ | ||
| 60 | {111, nullptr, "InvalidateServiceEntryRequirementCache"}, // 4.0.0+ | ||
| 61 | {112, nullptr, "InvalidateTokenCache"}, // 4.0.0 - 6.2.0 | ||
| 62 | {113, nullptr, "GetServiceEntryRequirementCacheForOnlinePlay"}, // 6.1.0+ | ||
| 63 | {120, nullptr, "GetNintendoAccountId"}, | ||
| 64 | {121, nullptr, "CalculateNintendoAccountAuthenticationFingerprint"}, // 9.0.0+ | ||
| 65 | {130, nullptr, "GetNintendoAccountUserResourceCache"}, | ||
| 66 | {131, nullptr, "RefreshNintendoAccountUserResourceCacheAsync"}, | ||
| 67 | {132, nullptr, "RefreshNintendoAccountUserResourceCacheAsyncIfSecondsElapsed"}, | ||
| 68 | {133, nullptr, "GetNintendoAccountVerificationUrlCache"}, // 9.0.0+ | ||
| 69 | {134, nullptr, "RefreshNintendoAccountVerificationUrlCache"}, // 9.0.0+ | ||
| 70 | {135, nullptr, "RefreshNintendoAccountVerificationUrlCacheAsyncIfSecondsElapsed"}, // 9.0.0+ | ||
| 71 | {140, nullptr, "GetNetworkServiceLicenseCache"}, // 5.0.0+ | ||
| 72 | {141, nullptr, "RefreshNetworkServiceLicenseCacheAsync"}, // 5.0.0+ | ||
| 73 | {142, nullptr, "RefreshNetworkServiceLicenseCacheAsyncIfSecondsElapsed"}, // 5.0.0+ | ||
| 74 | {150, nullptr, "CreateAuthorizationRequest"}, | ||
| 75 | }; | ||
| 76 | // clang-format on | ||
| 77 | |||
| 78 | RegisterHandlers(functions); | ||
| 79 | } | ||
| 80 | }; | ||
| 81 | |||
| 82 | // 3.0.0+ | ||
| 83 | class IFloatingRegistrationRequest final : public ServiceFramework<IFloatingRegistrationRequest> { | ||
| 84 | public: | ||
| 85 | explicit IFloatingRegistrationRequest(Common::UUID user_id) | ||
| 86 | : ServiceFramework("IFloatingRegistrationRequest") { | ||
| 87 | // clang-format off | ||
| 88 | static const FunctionInfo functions[] = { | ||
| 89 | {0, nullptr, "GetSessionId"}, | ||
| 90 | {12, nullptr, "GetAccountId"}, | ||
| 91 | {13, nullptr, "GetLinkedNintendoAccountId"}, | ||
| 92 | {14, nullptr, "GetNickname"}, | ||
| 93 | {15, nullptr, "GetProfileImage"}, | ||
| 94 | {21, nullptr, "LoadIdTokenCache"}, | ||
| 95 | {100, nullptr, "RegisterUser"}, // [1.0.0-3.0.2] RegisterAsync | ||
| 96 | {101, nullptr, "RegisterUserWithUid"}, // [1.0.0-3.0.2] RegisterWithUidAsync | ||
| 97 | {102, nullptr, "RegisterNetworkServiceAccountAsync"}, // 4.0.0+ | ||
| 98 | {103, nullptr, "RegisterNetworkServiceAccountWithUidAsync"}, // 4.0.0+ | ||
| 99 | {110, nullptr, "SetSystemProgramIdentification"}, | ||
| 100 | {111, nullptr, "EnsureIdTokenCacheAsync"}, | ||
| 101 | }; | ||
| 102 | // clang-format on | ||
| 103 | |||
| 104 | RegisterHandlers(functions); | ||
| 105 | } | ||
| 106 | }; | ||
| 107 | |||
| 108 | class IAdministrator final : public ServiceFramework<IAdministrator> { | ||
| 109 | public: | ||
| 110 | explicit IAdministrator(Common::UUID user_id) : ServiceFramework("IAdministrator") { | ||
| 111 | // clang-format off | ||
| 112 | static const FunctionInfo functions[] = { | ||
| 113 | {0, nullptr, "CheckAvailability"}, | ||
| 114 | {1, nullptr, "GetAccountId"}, | ||
| 115 | {2, nullptr, "EnsureIdTokenCacheAsync"}, | ||
| 116 | {3, nullptr, "LoadIdTokenCache"}, | ||
| 117 | {100, nullptr, "SetSystemProgramIdentification"}, | ||
| 118 | {101, nullptr, "RefreshNotificationTokenAsync"}, // 7.0.0+ | ||
| 119 | {110, nullptr, "GetServiceEntryRequirementCache"}, // 4.0.0+ | ||
| 120 | {111, nullptr, "InvalidateServiceEntryRequirementCache"}, // 4.0.0+ | ||
| 121 | {112, nullptr, "InvalidateTokenCache"}, // 4.0.0 - 6.2.0 | ||
| 122 | {113, nullptr, "GetServiceEntryRequirementCacheForOnlinePlay"}, // 6.1.0+ | ||
| 123 | {120, nullptr, "GetNintendoAccountId"}, | ||
| 124 | {121, nullptr, "CalculateNintendoAccountAuthenticationFingerprint"}, // 9.0.0+ | ||
| 125 | {130, nullptr, "GetNintendoAccountUserResourceCache"}, | ||
| 126 | {131, nullptr, "RefreshNintendoAccountUserResourceCacheAsync"}, | ||
| 127 | {132, nullptr, "RefreshNintendoAccountUserResourceCacheAsyncIfSecondsElapsed"}, | ||
| 128 | {133, nullptr, "GetNintendoAccountVerificationUrlCache"}, // 9.0.0+ | ||
| 129 | {134, nullptr, "RefreshNintendoAccountVerificationUrlCacheAsync"}, // 9.0.0+ | ||
| 130 | {135, nullptr, "RefreshNintendoAccountVerificationUrlCacheAsyncIfSecondsElapsed"}, // 9.0.0+ | ||
| 131 | {140, nullptr, "GetNetworkServiceLicenseCache"}, // 5.0.0+ | ||
| 132 | {141, nullptr, "RefreshNetworkServiceLicenseCacheAsync"}, // 5.0.0+ | ||
| 133 | {142, nullptr, "RefreshNetworkServiceLicenseCacheAsyncIfSecondsElapsed"}, // 5.0.0+ | ||
| 134 | {150, nullptr, "CreateAuthorizationRequest"}, | ||
| 135 | {200, nullptr, "IsRegistered"}, | ||
| 136 | {201, nullptr, "RegisterAsync"}, | ||
| 137 | {202, nullptr, "UnregisterAsync"}, | ||
| 138 | {203, nullptr, "DeleteRegistrationInfoLocally"}, | ||
| 139 | {220, nullptr, "SynchronizeProfileAsync"}, | ||
| 140 | {221, nullptr, "UploadProfileAsync"}, | ||
| 141 | {222, nullptr, "SynchronizaProfileAsyncIfSecondsElapsed"}, | ||
| 142 | {250, nullptr, "IsLinkedWithNintendoAccount"}, | ||
| 143 | {251, nullptr, "CreateProcedureToLinkWithNintendoAccount"}, | ||
| 144 | {252, nullptr, "ResumeProcedureToLinkWithNintendoAccount"}, | ||
| 145 | {255, nullptr, "CreateProcedureToUpdateLinkageStateOfNintendoAccount"}, | ||
| 146 | {256, nullptr, "ResumeProcedureToUpdateLinkageStateOfNintendoAccount"}, | ||
| 147 | {260, nullptr, "CreateProcedureToLinkNnidWithNintendoAccount"}, // 3.0.0+ | ||
| 148 | {261, nullptr, "ResumeProcedureToLinkNnidWithNintendoAccount"}, // 3.0.0+ | ||
| 149 | {280, nullptr, "ProxyProcedureToAcquireApplicationAuthorizationForNintendoAccount"}, | ||
| 150 | {290, nullptr, "GetRequestForNintendoAccountUserResourceView"}, // 8.0.0+ | ||
| 151 | {300, nullptr, "TryRecoverNintendoAccountUserStateAsync"}, // 6.0.0+ | ||
| 152 | {400, nullptr, "IsServiceEntryRequirementCacheRefreshRequiredForOnlinePlay"}, // 6.1.0+ | ||
| 153 | {401, nullptr, "RefreshServiceEntryRequirementCacheForOnlinePlayAsync"}, // 6.1.0+ | ||
| 154 | {900, nullptr, "GetAuthenticationInfoForWin"}, // 9.0.0+ | ||
| 155 | {901, nullptr, "ImportAsyncForWin"}, // 9.0.0+ | ||
| 156 | {997, nullptr, "DebugUnlinkNintendoAccountAsync"}, | ||
| 157 | {998, nullptr, "DebugSetAvailabilityErrorDetail"}, | ||
| 158 | }; | ||
| 159 | // clang-format on | ||
| 160 | |||
| 161 | RegisterHandlers(functions); | ||
| 162 | } | ||
| 163 | }; | ||
| 164 | |||
| 165 | class IAuthorizationRequest final : public ServiceFramework<IAuthorizationRequest> { | ||
| 166 | public: | ||
| 167 | explicit IAuthorizationRequest(Common::UUID user_id) | ||
| 168 | : ServiceFramework("IAuthorizationRequest") { | ||
| 169 | // clang-format off | ||
| 170 | static const FunctionInfo functions[] = { | ||
| 171 | {0, nullptr, "GetSessionId"}, | ||
| 172 | {10, nullptr, "InvokeWithoutInteractionAsync"}, | ||
| 173 | {19, nullptr, "IsAuthorized"}, | ||
| 174 | {20, nullptr, "GetAuthorizationCode"}, | ||
| 175 | {21, nullptr, "GetIdToken"}, | ||
| 176 | {22, nullptr, "GetState"}, | ||
| 177 | }; | ||
| 178 | // clang-format on | ||
| 179 | |||
| 180 | RegisterHandlers(functions); | ||
| 181 | } | ||
| 182 | }; | ||
| 183 | |||
| 184 | class IOAuthProcedure final : public ServiceFramework<IOAuthProcedure> { | ||
| 185 | public: | ||
| 186 | explicit IOAuthProcedure(Common::UUID user_id) : ServiceFramework("IOAuthProcedure") { | ||
| 187 | // clang-format off | ||
| 188 | static const FunctionInfo functions[] = { | ||
| 189 | {0, nullptr, "PrepareAsync"}, | ||
| 190 | {1, nullptr, "GetRequest"}, | ||
| 191 | {2, nullptr, "ApplyResponse"}, | ||
| 192 | {3, nullptr, "ApplyResponseAsync"}, | ||
| 193 | {10, nullptr, "Suspend"}, | ||
| 194 | }; | ||
| 195 | // clang-format on | ||
| 196 | |||
| 197 | RegisterHandlers(functions); | ||
| 198 | } | ||
| 199 | }; | ||
| 200 | |||
| 201 | // 3.0.0+ | ||
| 202 | class IOAuthProcedureForExternalNsa final : public ServiceFramework<IOAuthProcedureForExternalNsa> { | ||
| 203 | public: | ||
| 204 | explicit IOAuthProcedureForExternalNsa(Common::UUID user_id) | ||
| 205 | : ServiceFramework("IOAuthProcedureForExternalNsa") { | ||
| 206 | // clang-format off | ||
| 207 | static const FunctionInfo functions[] = { | ||
| 208 | {0, nullptr, "PrepareAsync"}, | ||
| 209 | {1, nullptr, "GetRequest"}, | ||
| 210 | {2, nullptr, "ApplyResponse"}, | ||
| 211 | {3, nullptr, "ApplyResponseAsync"}, | ||
| 212 | {10, nullptr, "Suspend"}, | ||
| 213 | {100, nullptr, "GetAccountId"}, | ||
| 214 | {101, nullptr, "GetLinkedNintendoAccountId"}, | ||
| 215 | {102, nullptr, "GetNickname"}, | ||
| 216 | {103, nullptr, "GetProfileImage"}, | ||
| 217 | }; | ||
| 218 | // clang-format on | ||
| 219 | |||
| 220 | RegisterHandlers(functions); | ||
| 221 | } | ||
| 222 | }; | ||
| 223 | |||
| 224 | class IOAuthProcedureForNintendoAccountLinkage final | ||
| 225 | : public ServiceFramework<IOAuthProcedureForNintendoAccountLinkage> { | ||
| 226 | public: | ||
| 227 | explicit IOAuthProcedureForNintendoAccountLinkage(Common::UUID user_id) | ||
| 228 | : ServiceFramework("IOAuthProcedureForNintendoAccountLinkage") { | ||
| 229 | // clang-format off | ||
| 230 | static const FunctionInfo functions[] = { | ||
| 231 | {0, nullptr, "PrepareAsync"}, | ||
| 232 | {1, nullptr, "GetRequest"}, | ||
| 233 | {2, nullptr, "ApplyResponse"}, | ||
| 234 | {3, nullptr, "ApplyResponseAsync"}, | ||
| 235 | {10, nullptr, "Suspend"}, | ||
| 236 | {100, nullptr, "GetRequestWithTheme"}, | ||
| 237 | {101, nullptr, "IsNetworkServiceAccountReplaced"}, | ||
| 238 | {199, nullptr, "GetUrlForIntroductionOfExtraMembership"}, // 2.0.0 - 5.1.0 | ||
| 239 | }; | ||
| 240 | // clang-format on | ||
| 241 | |||
| 242 | RegisterHandlers(functions); | ||
| 243 | } | ||
| 244 | }; | ||
| 245 | |||
| 246 | class INotifier final : public ServiceFramework<INotifier> { | ||
| 247 | public: | ||
| 248 | explicit INotifier(Common::UUID user_id) : ServiceFramework("INotifier") { | ||
| 249 | // clang-format off | ||
| 250 | static const FunctionInfo functions[] = { | ||
| 251 | {0, nullptr, "GetSystemEvent"}, | ||
| 252 | }; | ||
| 253 | // clang-format on | ||
| 254 | |||
| 255 | RegisterHandlers(functions); | ||
| 256 | } | ||
| 257 | }; | ||
| 258 | |||
| 47 | class IProfileCommon : public ServiceFramework<IProfileCommon> { | 259 | class IProfileCommon : public ServiceFramework<IProfileCommon> { |
| 48 | public: | 260 | public: |
| 49 | explicit IProfileCommon(const char* name, bool editor_commands, Common::UUID user_id, | 261 | explicit IProfileCommon(const char* name, bool editor_commands, Common::UUID user_id, |
| @@ -226,6 +438,54 @@ public: | |||
| 226 | : IProfileCommon("IProfileEditor", true, user_id, profile_manager) {} | 438 | : IProfileCommon("IProfileEditor", true, user_id, profile_manager) {} |
| 227 | }; | 439 | }; |
| 228 | 440 | ||
| 441 | class IAsyncContext final : public ServiceFramework<IAsyncContext> { | ||
| 442 | public: | ||
| 443 | explicit IAsyncContext(Common::UUID user_id) : ServiceFramework("IAsyncContext") { | ||
| 444 | // clang-format off | ||
| 445 | static const FunctionInfo functions[] = { | ||
| 446 | {0, nullptr, "GetSystemEvent"}, | ||
| 447 | {1, nullptr, "Cancel"}, | ||
| 448 | {2, nullptr, "HasDone"}, | ||
| 449 | {3, nullptr, "GetResult"}, | ||
| 450 | }; | ||
| 451 | // clang-format on | ||
| 452 | |||
| 453 | RegisterHandlers(functions); | ||
| 454 | } | ||
| 455 | }; | ||
| 456 | |||
| 457 | class ISessionObject final : public ServiceFramework<ISessionObject> { | ||
| 458 | public: | ||
| 459 | explicit ISessionObject(Common::UUID user_id) : ServiceFramework("ISessionObject") { | ||
| 460 | // clang-format off | ||
| 461 | static const FunctionInfo functions[] = { | ||
| 462 | {999, nullptr, "Dummy"}, | ||
| 463 | }; | ||
| 464 | // clang-format on | ||
| 465 | |||
| 466 | RegisterHandlers(functions); | ||
| 467 | } | ||
| 468 | }; | ||
| 469 | |||
| 470 | class IGuestLoginRequest final : public ServiceFramework<IGuestLoginRequest> { | ||
| 471 | public: | ||
| 472 | explicit IGuestLoginRequest(Common::UUID) : ServiceFramework("IGuestLoginRequest") { | ||
| 473 | // clang-format off | ||
| 474 | static const FunctionInfo functions[] = { | ||
| 475 | {0, nullptr, "GetSessionId"}, | ||
| 476 | {11, nullptr, "Unknown"}, // 1.0.0 - 2.3.0 (the name is blank on Switchbrew) | ||
| 477 | {12, nullptr, "GetAccountId"}, | ||
| 478 | {13, nullptr, "GetLinkedNintendoAccountId"}, | ||
| 479 | {14, nullptr, "GetNickname"}, | ||
| 480 | {15, nullptr, "GetProfileImage"}, | ||
| 481 | {21, nullptr, "LoadIdTokenCache"}, // 3.0.0+ | ||
| 482 | }; | ||
| 483 | // clang-format on | ||
| 484 | |||
| 485 | RegisterHandlers(functions); | ||
| 486 | } | ||
| 487 | }; | ||
| 488 | |||
| 229 | class IManagerForApplication final : public ServiceFramework<IManagerForApplication> { | 489 | class IManagerForApplication final : public ServiceFramework<IManagerForApplication> { |
| 230 | public: | 490 | public: |
| 231 | explicit IManagerForApplication(Common::UUID user_id) | 491 | explicit IManagerForApplication(Common::UUID user_id) |
| @@ -265,6 +525,87 @@ private: | |||
| 265 | Common::UUID user_id; | 525 | Common::UUID user_id; |
| 266 | }; | 526 | }; |
| 267 | 527 | ||
| 528 | // 6.0.0+ | ||
| 529 | class IAsyncNetworkServiceLicenseKindContext final | ||
| 530 | : public ServiceFramework<IAsyncNetworkServiceLicenseKindContext> { | ||
| 531 | public: | ||
| 532 | explicit IAsyncNetworkServiceLicenseKindContext(Common::UUID user_id) | ||
| 533 | : ServiceFramework("IAsyncNetworkServiceLicenseKindContext") { | ||
| 534 | // clang-format off | ||
| 535 | static const FunctionInfo functions[] = { | ||
| 536 | {0, nullptr, "GetSystemEvent"}, | ||
| 537 | {1, nullptr, "Cancel"}, | ||
| 538 | {2, nullptr, "HasDone"}, | ||
| 539 | {3, nullptr, "GetResult"}, | ||
| 540 | {4, nullptr, "GetNetworkServiceLicenseKind"}, | ||
| 541 | }; | ||
| 542 | // clang-format on | ||
| 543 | |||
| 544 | RegisterHandlers(functions); | ||
| 545 | } | ||
| 546 | }; | ||
| 547 | |||
| 548 | // 8.0.0+ | ||
| 549 | class IOAuthProcedureForUserRegistration final | ||
| 550 | : public ServiceFramework<IOAuthProcedureForUserRegistration> { | ||
| 551 | public: | ||
| 552 | explicit IOAuthProcedureForUserRegistration(Common::UUID user_id) | ||
| 553 | : ServiceFramework("IOAuthProcedureForUserRegistration") { | ||
| 554 | // clang-format off | ||
| 555 | static const FunctionInfo functions[] = { | ||
| 556 | {0, nullptr, "PrepareAsync"}, | ||
| 557 | {1, nullptr, "GetRequest"}, | ||
| 558 | {2, nullptr, "ApplyResponse"}, | ||
| 559 | {3, nullptr, "ApplyResponseAsync"}, | ||
| 560 | {10, nullptr, "Suspend"}, | ||
| 561 | {100, nullptr, "GetAccountId"}, | ||
| 562 | {101, nullptr, "GetLinkedNintendoAccountId"}, | ||
| 563 | {102, nullptr, "GetNickname"}, | ||
| 564 | {103, nullptr, "GetProfileImage"}, | ||
| 565 | {110, nullptr, "RegisterUserAsync"}, | ||
| 566 | {111, nullptr, "GetUid"}, | ||
| 567 | }; | ||
| 568 | // clang-format on | ||
| 569 | |||
| 570 | RegisterHandlers(functions); | ||
| 571 | } | ||
| 572 | }; | ||
| 573 | |||
| 574 | class DAUTH_O final : public ServiceFramework<DAUTH_O> { | ||
| 575 | public: | ||
| 576 | explicit DAUTH_O(Common::UUID) : ServiceFramework("dauth:o") { | ||
| 577 | // clang-format off | ||
| 578 | static const FunctionInfo functions[] = { | ||
| 579 | {0, nullptr, "EnsureAuthenticationTokenCacheAsync"}, // [5.0.0-5.1.0] GeneratePostData | ||
| 580 | {1, nullptr, "LoadAuthenticationTokenCache"}, // 6.0.0+ | ||
| 581 | {2, nullptr, "InvalidateAuthenticationTokenCache"}, // 6.0.0+ | ||
| 582 | {10, nullptr, "EnsureEdgeTokenCacheAsync"}, // 6.0.0+ | ||
| 583 | {11, nullptr, "LoadEdgeTokenCache"}, // 6.0.0+ | ||
| 584 | {12, nullptr, "InvalidateEdgeTokenCache"}, // 6.0.0+ | ||
| 585 | }; | ||
| 586 | // clang-format on | ||
| 587 | |||
| 588 | RegisterHandlers(functions); | ||
| 589 | } | ||
| 590 | }; | ||
| 591 | |||
| 592 | // 6.0.0+ | ||
| 593 | class IAsyncResult final : public ServiceFramework<IAsyncResult> { | ||
| 594 | public: | ||
| 595 | explicit IAsyncResult(Common::UUID user_id) : ServiceFramework("IAsyncResult") { | ||
| 596 | // clang-format off | ||
| 597 | static const FunctionInfo functions[] = { | ||
| 598 | {0, nullptr, "GetResult"}, | ||
| 599 | {1, nullptr, "Cancel"}, | ||
| 600 | {2, nullptr, "IsAvailable"}, | ||
| 601 | {3, nullptr, "GetSystemEvent"}, | ||
| 602 | }; | ||
| 603 | // clang-format on | ||
| 604 | |||
| 605 | RegisterHandlers(functions); | ||
| 606 | } | ||
| 607 | }; | ||
| 608 | |||
| 268 | void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) { | 609 | void Module::Interface::GetUserCount(Kernel::HLERequestContext& ctx) { |
| 269 | LOG_DEBUG(Service_ACC, "called"); | 610 | LOG_DEBUG(Service_ACC, "called"); |
| 270 | IPC::ResponseBuilder rb{ctx, 3}; | 611 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/acc/acc_aa.cpp b/src/core/hle/service/acc/acc_aa.cpp index 3bac6bcd1..51f119b12 100644 --- a/src/core/hle/service/acc/acc_aa.cpp +++ b/src/core/hle/service/acc/acc_aa.cpp | |||
| @@ -13,8 +13,8 @@ ACC_AA::ACC_AA(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 13 | {0, nullptr, "EnsureCacheAsync"}, | 13 | {0, nullptr, "EnsureCacheAsync"}, |
| 14 | {1, nullptr, "LoadCache"}, | 14 | {1, nullptr, "LoadCache"}, |
| 15 | {2, nullptr, "GetDeviceAccountId"}, | 15 | {2, nullptr, "GetDeviceAccountId"}, |
| 16 | {50, nullptr, "RegisterNotificationTokenAsync"}, | 16 | {50, nullptr, "RegisterNotificationTokenAsync"}, // 1.0.0 - 6.2.0 |
| 17 | {51, nullptr, "UnregisterNotificationTokenAsync"}, | 17 | {51, nullptr, "UnregisterNotificationTokenAsync"}, // 1.0.0 - 6.2.0 |
| 18 | }; | 18 | }; |
| 19 | RegisterHandlers(functions); | 19 | RegisterHandlers(functions); |
| 20 | } | 20 | } |
diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index 2eefc6df5..85620bde3 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp | |||
| @@ -17,28 +17,28 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 17 | {3, &ACC_SU::ListOpenUsers, "ListOpenUsers"}, | 17 | {3, &ACC_SU::ListOpenUsers, "ListOpenUsers"}, |
| 18 | {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, | 18 | {4, &ACC_SU::GetLastOpenedUser, "GetLastOpenedUser"}, |
| 19 | {5, &ACC_SU::GetProfile, "GetProfile"}, | 19 | {5, &ACC_SU::GetProfile, "GetProfile"}, |
| 20 | {6, nullptr, "GetProfileDigest"}, | 20 | {6, nullptr, "GetProfileDigest"}, // 3.0.0+ |
| 21 | {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, | 21 | {50, &ACC_SU::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, |
| 22 | {51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, | 22 | {51, &ACC_SU::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, |
| 23 | {60, nullptr, "ListOpenContextStoredUsers"}, | 23 | {60, nullptr, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0 |
| 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, | 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+ |
| 25 | {100, nullptr, "GetUserRegistrationNotifier"}, | 25 | {100, nullptr, "GetUserRegistrationNotifier"}, |
| 26 | {101, nullptr, "GetUserStateChangeNotifier"}, | 26 | {101, nullptr, "GetUserStateChangeNotifier"}, |
| 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, | 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, |
| 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, | 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, |
| 29 | {104, nullptr, "GetProfileUpdateNotifier"}, | 29 | {104, nullptr, "GetProfileUpdateNotifier"}, |
| 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, | 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ |
| 31 | {106, nullptr, "GetProfileSyncNotifier"}, | 31 | {106, nullptr, "GetProfileSyncNotifier"}, // 9.0.0+ |
| 32 | {110, nullptr, "StoreSaveDataThumbnail"}, | 32 | {110, nullptr, "StoreSaveDataThumbnail"}, |
| 33 | {111, nullptr, "ClearSaveDataThumbnail"}, | 33 | {111, nullptr, "ClearSaveDataThumbnail"}, |
| 34 | {112, nullptr, "LoadSaveDataThumbnail"}, | 34 | {112, nullptr, "LoadSaveDataThumbnail"}, |
| 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, | 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, // 5.0.0+ |
| 36 | {120, nullptr, "ListOpenUsersInApplication"}, | 36 | {120, nullptr, "ListOpenUsersInApplication"}, // 10.0.0+ |
| 37 | {130, nullptr, "ActivateOpenContextRetention"}, | 37 | {130, nullptr, "ActivateOpenContextRetention"}, // 6.0.0+ |
| 38 | {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, | 38 | {140, &ACC_SU::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+ |
| 39 | {150, nullptr, "AuthenticateApplicationAsync"}, | 39 | {150, nullptr, "AuthenticateApplicationAsync"}, // 10.0.0+ |
| 40 | {190, nullptr, "GetUserLastOpenedApplication"}, | 40 | {190, nullptr, "GetUserLastOpenedApplication"}, // 1.0.0 - 9.2.0 |
| 41 | {191, nullptr, "ActivateOpenContextHolder"}, | 41 | {191, nullptr, "ActivateOpenContextHolder"}, // 7.0.0+ |
| 42 | {200, nullptr, "BeginUserRegistration"}, | 42 | {200, nullptr, "BeginUserRegistration"}, |
| 43 | {201, nullptr, "CompleteUserRegistration"}, | 43 | {201, nullptr, "CompleteUserRegistration"}, |
| 44 | {202, nullptr, "CancelUserRegistration"}, | 44 | {202, nullptr, "CancelUserRegistration"}, |
| @@ -46,15 +46,15 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 46 | {204, nullptr, "SetUserPosition"}, | 46 | {204, nullptr, "SetUserPosition"}, |
| 47 | {205, &ACC_SU::GetProfileEditor, "GetProfileEditor"}, | 47 | {205, &ACC_SU::GetProfileEditor, "GetProfileEditor"}, |
| 48 | {206, nullptr, "CompleteUserRegistrationForcibly"}, | 48 | {206, nullptr, "CompleteUserRegistrationForcibly"}, |
| 49 | {210, nullptr, "CreateFloatingRegistrationRequest"}, | 49 | {210, nullptr, "CreateFloatingRegistrationRequest"}, // 3.0.0+ |
| 50 | {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, | 50 | {211, nullptr, "CreateProcedureToRegisterUserWithNintendoAccount"}, // 8.0.0+ |
| 51 | {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, | 51 | {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, // 8.0.0+ |
| 52 | {230, nullptr, "AuthenticateServiceAsync"}, | 52 | {230, nullptr, "AuthenticateServiceAsync"}, |
| 53 | {250, nullptr, "GetBaasAccountAdministrator"}, | 53 | {250, nullptr, "GetBaasAccountAdministrator"}, |
| 54 | {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, | 54 | {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, |
| 55 | {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, | 55 | {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, // 3.0.0+ |
| 56 | {299, nullptr, "SuspendBackgroundDaemon"}, | 56 | {299, nullptr, "SuspendBackgroundDaemon"}, |
| 57 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, | 57 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, // 3.0.0+ |
| 58 | {998, nullptr, "DebugSetUserStateClose"}, | 58 | {998, nullptr, "DebugSetUserStateClose"}, |
| 59 | {999, nullptr, "DebugSetUserStateOpen"}, | 59 | {999, nullptr, "DebugSetUserStateOpen"}, |
| 60 | }; | 60 | }; |
diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp index fb4e7e772..49f6e20f1 100644 --- a/src/core/hle/service/acc/acc_u0.cpp +++ b/src/core/hle/service/acc/acc_u0.cpp | |||
| @@ -17,23 +17,23 @@ ACC_U0::ACC_U0(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 17 | {3, &ACC_U0::ListOpenUsers, "ListOpenUsers"}, | 17 | {3, &ACC_U0::ListOpenUsers, "ListOpenUsers"}, |
| 18 | {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"}, | 18 | {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"}, |
| 19 | {5, &ACC_U0::GetProfile, "GetProfile"}, | 19 | {5, &ACC_U0::GetProfile, "GetProfile"}, |
| 20 | {6, nullptr, "GetProfileDigest"}, | 20 | {6, nullptr, "GetProfileDigest"}, // 3.0.0+ |
| 21 | {50, &ACC_U0::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, | 21 | {50, &ACC_U0::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, |
| 22 | {51, &ACC_U0::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, | 22 | {51, &ACC_U0::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, |
| 23 | {60, nullptr, "ListOpenContextStoredUsers"}, | 23 | {60, nullptr, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0 |
| 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, | 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+ |
| 25 | {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"}, | 25 | {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"}, |
| 26 | {101, &ACC_U0::GetBaasAccountManagerForApplication, "GetBaasAccountManagerForApplication"}, | 26 | {101, &ACC_U0::GetBaasAccountManagerForApplication, "GetBaasAccountManagerForApplication"}, |
| 27 | {102, nullptr, "AuthenticateApplicationAsync"}, | 27 | {102, nullptr, "AuthenticateApplicationAsync"}, |
| 28 | {103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, | 28 | {103, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ |
| 29 | {110, nullptr, "StoreSaveDataThumbnail"}, | 29 | {110, nullptr, "StoreSaveDataThumbnail"}, |
| 30 | {111, nullptr, "ClearSaveDataThumbnail"}, | 30 | {111, nullptr, "ClearSaveDataThumbnail"}, |
| 31 | {120, nullptr, "CreateGuestLoginRequest"}, | 31 | {120, nullptr, "CreateGuestLoginRequest"}, |
| 32 | {130, nullptr, "LoadOpenContext"}, | 32 | {130, nullptr, "LoadOpenContext"}, // 5.0.0+ |
| 33 | {131, nullptr, "ListOpenContextStoredUsers"}, | 33 | {131, nullptr, "ListOpenContextStoredUsers"}, // 6.0.0+ |
| 34 | {140, &ACC_U0::InitializeApplicationInfoRestricted, "InitializeApplicationInfoRestricted"}, | 34 | {140, &ACC_U0::InitializeApplicationInfoRestricted, "InitializeApplicationInfoRestricted"}, // 6.0.0+ |
| 35 | {141, &ACC_U0::ListQualifiedUsers, "ListQualifiedUsers"}, | 35 | {141, &ACC_U0::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+ |
| 36 | {150, &ACC_U0::IsUserAccountSwitchLocked, "IsUserAccountSwitchLocked"}, | 36 | {150, &ACC_U0::IsUserAccountSwitchLocked, "IsUserAccountSwitchLocked"}, // 6.0.0+ |
| 37 | }; | 37 | }; |
| 38 | // clang-format on | 38 | // clang-format on |
| 39 | 39 | ||
diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index 9f29cdc82..f47004f84 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp | |||
| @@ -17,28 +17,29 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module, std::shared_ptr<ProfileManager> p | |||
| 17 | {3, &ACC_U1::ListOpenUsers, "ListOpenUsers"}, | 17 | {3, &ACC_U1::ListOpenUsers, "ListOpenUsers"}, |
| 18 | {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, | 18 | {4, &ACC_U1::GetLastOpenedUser, "GetLastOpenedUser"}, |
| 19 | {5, &ACC_U1::GetProfile, "GetProfile"}, | 19 | {5, &ACC_U1::GetProfile, "GetProfile"}, |
| 20 | {6, nullptr, "GetProfileDigest"}, | 20 | {6, nullptr, "GetProfileDigest"}, // 3.0.0+ |
| 21 | {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, | 21 | {50, &ACC_U1::IsUserRegistrationRequestPermitted, "IsUserRegistrationRequestPermitted"}, |
| 22 | {51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, | 22 | {51, &ACC_U1::TrySelectUserWithoutInteraction, "TrySelectUserWithoutInteraction"}, |
| 23 | {60, nullptr, "ListOpenContextStoredUsers"}, | 23 | {60, nullptr, "ListOpenContextStoredUsers"}, // 5.0.0 - 5.1.0 |
| 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, | 24 | {99, nullptr, "DebugActivateOpenContextRetention"}, // 6.0.0+ |
| 25 | {100, nullptr, "GetUserRegistrationNotifier"}, | 25 | {100, nullptr, "GetUserRegistrationNotifier"}, |
| 26 | {101, nullptr, "GetUserStateChangeNotifier"}, | 26 | {101, nullptr, "GetUserStateChangeNotifier"}, |
| 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, | 27 | {102, nullptr, "GetBaasAccountManagerForSystemService"}, |
| 28 | {103, nullptr, "GetProfileUpdateNotifier"}, | 28 | {103, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, |
| 29 | {104, nullptr, "CheckNetworkServiceAvailabilityAsync"}, | 29 | {104, nullptr, "GetProfileUpdateNotifier"}, |
| 30 | {105, nullptr, "GetBaasUserAvailabilityChangeNotifier"}, | 30 | {105, nullptr, "CheckNetworkServiceAvailabilityAsync"}, // 4.0.0+ |
| 31 | {106, nullptr, "GetProfileSyncNotifier"}, | 31 | {106, nullptr, "GetProfileSyncNotifier"}, // 9.0.0+ |
| 32 | {110, nullptr, "StoreSaveDataThumbnail"}, | 32 | {110, nullptr, "StoreSaveDataThumbnail"}, |
| 33 | {111, nullptr, "ClearSaveDataThumbnail"}, | 33 | {111, nullptr, "ClearSaveDataThumbnail"}, |
| 34 | {112, nullptr, "LoadSaveDataThumbnail"}, | 34 | {112, nullptr, "LoadSaveDataThumbnail"}, |
| 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, | 35 | {113, nullptr, "GetSaveDataThumbnailExistence"}, // 5.0.0+ |
| 36 | {130, nullptr, "ActivateOpenContextRetention"}, | 36 | {120, nullptr, "ListOpenUsersInApplication"}, // 10.0.0+ |
| 37 | {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, | 37 | {130, nullptr, "ActivateOpenContextRetention"}, // 6.0.0+ |
| 38 | {150, nullptr, "AuthenticateApplicationAsync"}, | 38 | {140, &ACC_U1::ListQualifiedUsers, "ListQualifiedUsers"}, // 6.0.0+ |
| 39 | {190, nullptr, "GetUserLastOpenedApplication"}, | 39 | {150, nullptr, "AuthenticateApplicationAsync"}, // 10.0.0+ |
| 40 | {191, nullptr, "ActivateOpenContextHolder"}, | 40 | {190, nullptr, "GetUserLastOpenedApplication"}, // 1.0.0 - 9.2.0 |
| 41 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, | 41 | {191, nullptr, "ActivateOpenContextHolder"}, // 7.0.0+ |
| 42 | {997, nullptr, "DebugInvalidateTokenCacheForUser"}, // 3.0.0+ | ||
| 42 | {998, nullptr, "DebugSetUserStateClose"}, | 43 | {998, nullptr, "DebugSetUserStateClose"}, |
| 43 | {999, nullptr, "DebugSetUserStateOpen"}, | 44 | {999, nullptr, "DebugSetUserStateOpen"}, |
| 44 | }; | 45 | }; |
diff --git a/src/core/hle/service/lm/manager.cpp b/src/core/hle/service/lm/manager.cpp index b67081b86..3ee2374e7 100644 --- a/src/core/hle/service/lm/manager.cpp +++ b/src/core/hle/service/lm/manager.cpp | |||
| @@ -86,7 +86,8 @@ std::string FormatField(Field type, const std::vector<u8>& data) { | |||
| 86 | return Common::StringFromFixedZeroTerminatedBuffer( | 86 | return Common::StringFromFixedZeroTerminatedBuffer( |
| 87 | reinterpret_cast<const char*>(data.data()), data.size()); | 87 | reinterpret_cast<const char*>(data.data()), data.size()); |
| 88 | default: | 88 | default: |
| 89 | UNIMPLEMENTED(); | 89 | UNIMPLEMENTED_MSG("Unimplemented field type={}", type); |
| 90 | return ""; | ||
| 90 | } | 91 | } |
| 91 | } | 92 | } |
| 92 | 93 | ||
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 308d8b55f..bae1d527c 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h | |||
| @@ -47,7 +47,7 @@ public: | |||
| 47 | bool is_written = false, bool use_fast_cbuf = false) { | 47 | bool is_written = false, bool use_fast_cbuf = false) { |
| 48 | std::lock_guard lock{mutex}; | 48 | std::lock_guard lock{mutex}; |
| 49 | 49 | ||
| 50 | const auto& memory_manager = system.GPU().MemoryManager(); | 50 | auto& memory_manager = system.GPU().MemoryManager(); |
| 51 | const std::optional<VAddr> cpu_addr_opt = memory_manager.GpuToCpuAddress(gpu_addr); | 51 | const std::optional<VAddr> cpu_addr_opt = memory_manager.GpuToCpuAddress(gpu_addr); |
| 52 | if (!cpu_addr_opt) { | 52 | if (!cpu_addr_opt) { |
| 53 | return {GetEmptyBuffer(size), 0}; | 53 | return {GetEmptyBuffer(size), 0}; |
| @@ -59,7 +59,6 @@ public: | |||
| 59 | constexpr std::size_t max_stream_size = 0x800; | 59 | constexpr std::size_t max_stream_size = 0x800; |
| 60 | if (use_fast_cbuf || size < max_stream_size) { | 60 | if (use_fast_cbuf || size < max_stream_size) { |
| 61 | if (!is_written && !IsRegionWritten(cpu_addr, cpu_addr + size - 1)) { | 61 | if (!is_written && !IsRegionWritten(cpu_addr, cpu_addr + size - 1)) { |
| 62 | auto& memory_manager = system.GPU().MemoryManager(); | ||
| 63 | const bool is_granular = memory_manager.IsGranularRange(gpu_addr, size); | 62 | const bool is_granular = memory_manager.IsGranularRange(gpu_addr, size); |
| 64 | if (use_fast_cbuf) { | 63 | if (use_fast_cbuf) { |
| 65 | u8* dest; | 64 | u8* dest; |
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp index 389b58989..30abb66e5 100644 --- a/src/video_core/macro/macro_jit_x64.cpp +++ b/src/video_core/macro/macro_jit_x64.cpp | |||
| @@ -553,7 +553,7 @@ Xbyak::Reg32 MacroJITx64Impl::Compile_GetRegister(u32 index, Xbyak::Reg32 dst) { | |||
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u32 reg) { | 555 | void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u32 reg) { |
| 556 | auto SetRegister = [=](u32 reg, Xbyak::Reg32 result) { | 556 | const auto SetRegister = [this](u32 reg, const Xbyak::Reg32& result) { |
| 557 | // Register 0 is supposed to always return 0. NOP is implemented as a store to the zero | 557 | // Register 0 is supposed to always return 0. NOP is implemented as a store to the zero |
| 558 | // register. | 558 | // register. |
| 559 | if (reg == 0) { | 559 | if (reg == 0) { |
| @@ -561,7 +561,7 @@ void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u3 | |||
| 561 | } | 561 | } |
| 562 | mov(dword[STATE + offsetof(JITState, registers) + reg * sizeof(u32)], result); | 562 | mov(dword[STATE + offsetof(JITState, registers) + reg * sizeof(u32)], result); |
| 563 | }; | 563 | }; |
| 564 | auto SetMethodAddress = [=](Xbyak::Reg32 reg) { mov(METHOD_ADDRESS, reg); }; | 564 | const auto SetMethodAddress = [this](const Xbyak::Reg32& reg) { mov(METHOD_ADDRESS, reg); }; |
| 565 | 565 | ||
| 566 | switch (operation) { | 566 | switch (operation) { |
| 567 | case Macro::ResultOperation::IgnoreAndFetch: | 567 | case Macro::ResultOperation::IgnoreAndFetch: |
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index dbee9f634..ff5505d12 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp | |||
| @@ -210,10 +210,11 @@ bool MemoryManager::IsBlockContinuous(const GPUVAddr start, const std::size_t si | |||
| 210 | return range == inner_size; | 210 | return range == inner_size; |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | void MemoryManager::ReadBlock(GPUVAddr src_addr, void* dest_buffer, const std::size_t size) const { | 213 | void MemoryManager::ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, |
| 214 | const std::size_t size) const { | ||
| 214 | std::size_t remaining_size{size}; | 215 | std::size_t remaining_size{size}; |
| 215 | std::size_t page_index{src_addr >> page_bits}; | 216 | std::size_t page_index{gpu_src_addr >> page_bits}; |
| 216 | std::size_t page_offset{src_addr & page_mask}; | 217 | std::size_t page_offset{gpu_src_addr & page_mask}; |
| 217 | 218 | ||
| 218 | auto& memory = system.Memory(); | 219 | auto& memory = system.Memory(); |
| 219 | 220 | ||
| @@ -234,11 +235,11 @@ void MemoryManager::ReadBlock(GPUVAddr src_addr, void* dest_buffer, const std::s | |||
| 234 | } | 235 | } |
| 235 | } | 236 | } |
| 236 | 237 | ||
| 237 | void MemoryManager::ReadBlockUnsafe(GPUVAddr src_addr, void* dest_buffer, | 238 | void MemoryManager::ReadBlockUnsafe(GPUVAddr gpu_src_addr, void* dest_buffer, |
| 238 | const std::size_t size) const { | 239 | const std::size_t size) const { |
| 239 | std::size_t remaining_size{size}; | 240 | std::size_t remaining_size{size}; |
| 240 | std::size_t page_index{src_addr >> page_bits}; | 241 | std::size_t page_index{gpu_src_addr >> page_bits}; |
| 241 | std::size_t page_offset{src_addr & page_mask}; | 242 | std::size_t page_offset{gpu_src_addr & page_mask}; |
| 242 | 243 | ||
| 243 | auto& memory = system.Memory(); | 244 | auto& memory = system.Memory(); |
| 244 | 245 | ||
| @@ -259,10 +260,11 @@ void MemoryManager::ReadBlockUnsafe(GPUVAddr src_addr, void* dest_buffer, | |||
| 259 | } | 260 | } |
| 260 | } | 261 | } |
| 261 | 262 | ||
| 262 | void MemoryManager::WriteBlock(GPUVAddr dest_addr, const void* src_buffer, const std::size_t size) { | 263 | void MemoryManager::WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, |
| 264 | const std::size_t size) { | ||
| 263 | std::size_t remaining_size{size}; | 265 | std::size_t remaining_size{size}; |
| 264 | std::size_t page_index{dest_addr >> page_bits}; | 266 | std::size_t page_index{gpu_dest_addr >> page_bits}; |
| 265 | std::size_t page_offset{dest_addr & page_mask}; | 267 | std::size_t page_offset{gpu_dest_addr & page_mask}; |
| 266 | 268 | ||
| 267 | auto& memory = system.Memory(); | 269 | auto& memory = system.Memory(); |
| 268 | 270 | ||
| @@ -283,11 +285,11 @@ void MemoryManager::WriteBlock(GPUVAddr dest_addr, const void* src_buffer, const | |||
| 283 | } | 285 | } |
| 284 | } | 286 | } |
| 285 | 287 | ||
| 286 | void MemoryManager::WriteBlockUnsafe(GPUVAddr dest_addr, const void* src_buffer, | 288 | void MemoryManager::WriteBlockUnsafe(GPUVAddr gpu_dest_addr, const void* src_buffer, |
| 287 | const std::size_t size) { | 289 | const std::size_t size) { |
| 288 | std::size_t remaining_size{size}; | 290 | std::size_t remaining_size{size}; |
| 289 | std::size_t page_index{dest_addr >> page_bits}; | 291 | std::size_t page_index{gpu_dest_addr >> page_bits}; |
| 290 | std::size_t page_offset{dest_addr & page_mask}; | 292 | std::size_t page_offset{gpu_dest_addr & page_mask}; |
| 291 | 293 | ||
| 292 | auto& memory = system.Memory(); | 294 | auto& memory = system.Memory(); |
| 293 | 295 | ||
| @@ -306,16 +308,18 @@ void MemoryManager::WriteBlockUnsafe(GPUVAddr dest_addr, const void* src_buffer, | |||
| 306 | } | 308 | } |
| 307 | } | 309 | } |
| 308 | 310 | ||
| 309 | void MemoryManager::CopyBlock(GPUVAddr dest_addr, GPUVAddr src_addr, const std::size_t size) { | 311 | void MemoryManager::CopyBlock(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, |
| 312 | const std::size_t size) { | ||
| 310 | std::vector<u8> tmp_buffer(size); | 313 | std::vector<u8> tmp_buffer(size); |
| 311 | ReadBlock(src_addr, tmp_buffer.data(), size); | 314 | ReadBlock(gpu_src_addr, tmp_buffer.data(), size); |
| 312 | WriteBlock(dest_addr, tmp_buffer.data(), size); | 315 | WriteBlock(gpu_dest_addr, tmp_buffer.data(), size); |
| 313 | } | 316 | } |
| 314 | 317 | ||
| 315 | void MemoryManager::CopyBlockUnsafe(GPUVAddr dest_addr, GPUVAddr src_addr, const std::size_t size) { | 318 | void MemoryManager::CopyBlockUnsafe(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, |
| 319 | const std::size_t size) { | ||
| 316 | std::vector<u8> tmp_buffer(size); | 320 | std::vector<u8> tmp_buffer(size); |
| 317 | ReadBlockUnsafe(src_addr, tmp_buffer.data(), size); | 321 | ReadBlockUnsafe(gpu_src_addr, tmp_buffer.data(), size); |
| 318 | WriteBlockUnsafe(dest_addr, tmp_buffer.data(), size); | 322 | WriteBlockUnsafe(gpu_dest_addr, tmp_buffer.data(), size); |
| 319 | } | 323 | } |
| 320 | 324 | ||
| 321 | bool MemoryManager::IsGranularRange(GPUVAddr gpu_addr, std::size_t size) { | 325 | bool MemoryManager::IsGranularRange(GPUVAddr gpu_addr, std::size_t size) { |
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index 0ddd52d5a..87658e87a 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h | |||
| @@ -79,9 +79,9 @@ public: | |||
| 79 | * in the Host Memory counterpart. Note: This functions cause Host GPU Memory | 79 | * in the Host Memory counterpart. Note: This functions cause Host GPU Memory |
| 80 | * Flushes and Invalidations, respectively to each operation. | 80 | * Flushes and Invalidations, respectively to each operation. |
| 81 | */ | 81 | */ |
| 82 | void ReadBlock(GPUVAddr src_addr, void* dest_buffer, std::size_t size) const; | 82 | void ReadBlock(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size) const; |
| 83 | void WriteBlock(GPUVAddr dest_addr, const void* src_buffer, std::size_t size); | 83 | void WriteBlock(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size); |
| 84 | void CopyBlock(GPUVAddr dest_addr, GPUVAddr src_addr, std::size_t size); | 84 | void CopyBlock(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, std::size_t size); |
| 85 | 85 | ||
| 86 | /** | 86 | /** |
| 87 | * ReadBlockUnsafe and WriteBlockUnsafe are special versions of ReadBlock and | 87 | * ReadBlockUnsafe and WriteBlockUnsafe are special versions of ReadBlock and |
| @@ -93,9 +93,9 @@ public: | |||
| 93 | * WriteBlockUnsafe instead of WriteBlock since it shouldn't invalidate the texture | 93 | * WriteBlockUnsafe instead of WriteBlock since it shouldn't invalidate the texture |
| 94 | * being flushed. | 94 | * being flushed. |
| 95 | */ | 95 | */ |
| 96 | void ReadBlockUnsafe(GPUVAddr src_addr, void* dest_buffer, std::size_t size) const; | 96 | void ReadBlockUnsafe(GPUVAddr gpu_src_addr, void* dest_buffer, std::size_t size) const; |
| 97 | void WriteBlockUnsafe(GPUVAddr dest_addr, const void* src_buffer, std::size_t size); | 97 | void WriteBlockUnsafe(GPUVAddr gpu_dest_addr, const void* src_buffer, std::size_t size); |
| 98 | void CopyBlockUnsafe(GPUVAddr dest_addr, GPUVAddr src_addr, std::size_t size); | 98 | void CopyBlockUnsafe(GPUVAddr gpu_dest_addr, GPUVAddr gpu_src_addr, std::size_t size); |
| 99 | 99 | ||
| 100 | /** | 100 | /** |
| 101 | * IsGranularRange checks if a gpu region can be simply read with a pointer | 101 | * IsGranularRange checks if a gpu region can be simply read with a pointer |
diff --git a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp index 1e96b0310..eb5158407 100644 --- a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp | |||
| @@ -281,14 +281,14 @@ private: | |||
| 281 | 281 | ||
| 282 | template <const std::string_view& op> | 282 | template <const std::string_view& op> |
| 283 | std::string Unary(Operation operation) { | 283 | std::string Unary(Operation operation) { |
| 284 | const std::string temporary = AllocTemporary(); | 284 | std::string temporary = AllocTemporary(); |
| 285 | AddLine("{}{} {}, {};", op, Modifiers(operation), temporary, Visit(operation[0])); | 285 | AddLine("{}{} {}, {};", op, Modifiers(operation), temporary, Visit(operation[0])); |
| 286 | return temporary; | 286 | return temporary; |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | template <const std::string_view& op> | 289 | template <const std::string_view& op> |
| 290 | std::string Binary(Operation operation) { | 290 | std::string Binary(Operation operation) { |
| 291 | const std::string temporary = AllocTemporary(); | 291 | std::string temporary = AllocTemporary(); |
| 292 | AddLine("{}{} {}, {}, {};", op, Modifiers(operation), temporary, Visit(operation[0]), | 292 | AddLine("{}{} {}, {}, {};", op, Modifiers(operation), temporary, Visit(operation[0]), |
| 293 | Visit(operation[1])); | 293 | Visit(operation[1])); |
| 294 | return temporary; | 294 | return temporary; |
| @@ -296,7 +296,7 @@ private: | |||
| 296 | 296 | ||
| 297 | template <const std::string_view& op> | 297 | template <const std::string_view& op> |
| 298 | std::string Trinary(Operation operation) { | 298 | std::string Trinary(Operation operation) { |
| 299 | const std::string temporary = AllocTemporary(); | 299 | std::string temporary = AllocTemporary(); |
| 300 | AddLine("{}{} {}, {}, {}, {};", op, Modifiers(operation), temporary, Visit(operation[0]), | 300 | AddLine("{}{} {}, {}, {}, {};", op, Modifiers(operation), temporary, Visit(operation[0]), |
| 301 | Visit(operation[1]), Visit(operation[2])); | 301 | Visit(operation[1]), Visit(operation[2])); |
| 302 | return temporary; | 302 | return temporary; |
| @@ -304,7 +304,7 @@ private: | |||
| 304 | 304 | ||
| 305 | template <const std::string_view& op, bool unordered> | 305 | template <const std::string_view& op, bool unordered> |
| 306 | std::string FloatComparison(Operation operation) { | 306 | std::string FloatComparison(Operation operation) { |
| 307 | const std::string temporary = AllocTemporary(); | 307 | std::string temporary = AllocTemporary(); |
| 308 | AddLine("TRUNC.U.CC RC.x, {};", Binary<op>(operation)); | 308 | AddLine("TRUNC.U.CC RC.x, {};", Binary<op>(operation)); |
| 309 | AddLine("MOV.S {}, 0;", temporary); | 309 | AddLine("MOV.S {}, 0;", temporary); |
| 310 | AddLine("MOV.S {} (NE.x), -1;", temporary); | 310 | AddLine("MOV.S {} (NE.x), -1;", temporary); |
| @@ -331,7 +331,7 @@ private: | |||
| 331 | 331 | ||
| 332 | template <const std::string_view& op, bool is_nan> | 332 | template <const std::string_view& op, bool is_nan> |
| 333 | std::string HalfComparison(Operation operation) { | 333 | std::string HalfComparison(Operation operation) { |
| 334 | const std::string tmp1 = AllocVectorTemporary(); | 334 | std::string tmp1 = AllocVectorTemporary(); |
| 335 | const std::string tmp2 = AllocVectorTemporary(); | 335 | const std::string tmp2 = AllocVectorTemporary(); |
| 336 | const std::string op_a = Visit(operation[0]); | 336 | const std::string op_a = Visit(operation[0]); |
| 337 | const std::string op_b = Visit(operation[1]); | 337 | const std::string op_b = Visit(operation[1]); |
| @@ -367,15 +367,14 @@ private: | |||
| 367 | AddLine("MOV.F {}.{}, {};", value, Swizzle(i), Visit(meta.values[i])); | 367 | AddLine("MOV.F {}.{}, {};", value, Swizzle(i), Visit(meta.values[i])); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | const std::string result = coord; | 370 | AddLine("ATOMIM.{}.{} {}.x, {}, {}, image[{}], {};", op, type, coord, value, coord, |
| 371 | AddLine("ATOMIM.{}.{} {}.x, {}, {}, image[{}], {};", op, type, result, value, coord, | ||
| 372 | image_id, ImageType(meta.image.type)); | 371 | image_id, ImageType(meta.image.type)); |
| 373 | return fmt::format("{}.x", result); | 372 | return fmt::format("{}.x", coord); |
| 374 | } | 373 | } |
| 375 | 374 | ||
| 376 | template <const std::string_view& op, const std::string_view& type> | 375 | template <const std::string_view& op, const std::string_view& type> |
| 377 | std::string Atomic(Operation operation) { | 376 | std::string Atomic(Operation operation) { |
| 378 | const std::string temporary = AllocTemporary(); | 377 | std::string temporary = AllocTemporary(); |
| 379 | std::string address; | 378 | std::string address; |
| 380 | std::string_view opname; | 379 | std::string_view opname; |
| 381 | if (const auto gmem = std::get_if<GmemNode>(&*operation[0])) { | 380 | if (const auto gmem = std::get_if<GmemNode>(&*operation[0])) { |
| @@ -396,7 +395,7 @@ private: | |||
| 396 | 395 | ||
| 397 | template <char type> | 396 | template <char type> |
| 398 | std::string Negate(Operation operation) { | 397 | std::string Negate(Operation operation) { |
| 399 | const std::string temporary = AllocTemporary(); | 398 | std::string temporary = AllocTemporary(); |
| 400 | if constexpr (type == 'F') { | 399 | if constexpr (type == 'F') { |
| 401 | AddLine("MOV.F32 {}, -{};", temporary, Visit(operation[0])); | 400 | AddLine("MOV.F32 {}, -{};", temporary, Visit(operation[0])); |
| 402 | } else { | 401 | } else { |
| @@ -407,7 +406,7 @@ private: | |||
| 407 | 406 | ||
| 408 | template <char type> | 407 | template <char type> |
| 409 | std::string Absolute(Operation operation) { | 408 | std::string Absolute(Operation operation) { |
| 410 | const std::string temporary = AllocTemporary(); | 409 | std::string temporary = AllocTemporary(); |
| 411 | AddLine("MOV.{} {}, |{}|;", type, temporary, Visit(operation[0])); | 410 | AddLine("MOV.{} {}, |{}|;", type, temporary, Visit(operation[0])); |
| 412 | return temporary; | 411 | return temporary; |
| 413 | } | 412 | } |
| @@ -1156,20 +1155,20 @@ void ARBDecompiler::VisitAST(const ASTNode& node) { | |||
| 1156 | } | 1155 | } |
| 1157 | 1156 | ||
| 1158 | std::string ARBDecompiler::VisitExpression(const Expr& node) { | 1157 | std::string ARBDecompiler::VisitExpression(const Expr& node) { |
| 1159 | const std::string result = AllocTemporary(); | ||
| 1160 | if (const auto expr = std::get_if<ExprAnd>(&*node)) { | 1158 | if (const auto expr = std::get_if<ExprAnd>(&*node)) { |
| 1159 | std::string result = AllocTemporary(); | ||
| 1161 | AddLine("AND.U {}, {}, {};", result, VisitExpression(expr->operand1), | 1160 | AddLine("AND.U {}, {}, {};", result, VisitExpression(expr->operand1), |
| 1162 | VisitExpression(expr->operand2)); | 1161 | VisitExpression(expr->operand2)); |
| 1163 | return result; | 1162 | return result; |
| 1164 | } | 1163 | } |
| 1165 | if (const auto expr = std::get_if<ExprOr>(&*node)) { | 1164 | if (const auto expr = std::get_if<ExprOr>(&*node)) { |
| 1166 | const std::string result = AllocTemporary(); | 1165 | std::string result = AllocTemporary(); |
| 1167 | AddLine("OR.U {}, {}, {};", result, VisitExpression(expr->operand1), | 1166 | AddLine("OR.U {}, {}, {};", result, VisitExpression(expr->operand1), |
| 1168 | VisitExpression(expr->operand2)); | 1167 | VisitExpression(expr->operand2)); |
| 1169 | return result; | 1168 | return result; |
| 1170 | } | 1169 | } |
| 1171 | if (const auto expr = std::get_if<ExprNot>(&*node)) { | 1170 | if (const auto expr = std::get_if<ExprNot>(&*node)) { |
| 1172 | const std::string result = AllocTemporary(); | 1171 | std::string result = AllocTemporary(); |
| 1173 | AddLine("CMP.S {}, {}, 0, -1;", result, VisitExpression(expr->operand1)); | 1172 | AddLine("CMP.S {}, {}, 0, -1;", result, VisitExpression(expr->operand1)); |
| 1174 | return result; | 1173 | return result; |
| 1175 | } | 1174 | } |
| @@ -1186,7 +1185,7 @@ std::string ARBDecompiler::VisitExpression(const Expr& node) { | |||
| 1186 | return expr->value ? "0xffffffff" : "0"; | 1185 | return expr->value ? "0xffffffff" : "0"; |
| 1187 | } | 1186 | } |
| 1188 | if (const auto expr = std::get_if<ExprGprEqual>(&*node)) { | 1187 | if (const auto expr = std::get_if<ExprGprEqual>(&*node)) { |
| 1189 | const std::string result = AllocTemporary(); | 1188 | std::string result = AllocTemporary(); |
| 1190 | AddLine("SEQ.U {}, R{}.x, {};", result, expr->gpr, expr->value); | 1189 | AddLine("SEQ.U {}, R{}.x, {};", result, expr->gpr, expr->value); |
| 1191 | return result; | 1190 | return result; |
| 1192 | } | 1191 | } |
| @@ -1231,13 +1230,13 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1231 | } | 1230 | } |
| 1232 | 1231 | ||
| 1233 | if (const auto immediate = std::get_if<ImmediateNode>(&*node)) { | 1232 | if (const auto immediate = std::get_if<ImmediateNode>(&*node)) { |
| 1234 | const std::string temporary = AllocTemporary(); | 1233 | std::string temporary = AllocTemporary(); |
| 1235 | AddLine("MOV.U {}, {};", temporary, immediate->GetValue()); | 1234 | AddLine("MOV.U {}, {};", temporary, immediate->GetValue()); |
| 1236 | return temporary; | 1235 | return temporary; |
| 1237 | } | 1236 | } |
| 1238 | 1237 | ||
| 1239 | if (const auto predicate = std::get_if<PredicateNode>(&*node)) { | 1238 | if (const auto predicate = std::get_if<PredicateNode>(&*node)) { |
| 1240 | const std::string temporary = AllocTemporary(); | 1239 | std::string temporary = AllocTemporary(); |
| 1241 | switch (const auto index = predicate->GetIndex(); index) { | 1240 | switch (const auto index = predicate->GetIndex(); index) { |
| 1242 | case Tegra::Shader::Pred::UnusedIndex: | 1241 | case Tegra::Shader::Pred::UnusedIndex: |
| 1243 | AddLine("MOV.S {}, -1;", temporary); | 1242 | AddLine("MOV.S {}, -1;", temporary); |
| @@ -1333,13 +1332,13 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1333 | } else { | 1332 | } else { |
| 1334 | offset_string = Visit(offset); | 1333 | offset_string = Visit(offset); |
| 1335 | } | 1334 | } |
| 1336 | const std::string temporary = AllocTemporary(); | 1335 | std::string temporary = AllocTemporary(); |
| 1337 | AddLine("LDC.F32 {}, cbuf{}[{}];", temporary, cbuf->GetIndex(), offset_string); | 1336 | AddLine("LDC.F32 {}, cbuf{}[{}];", temporary, cbuf->GetIndex(), offset_string); |
| 1338 | return temporary; | 1337 | return temporary; |
| 1339 | } | 1338 | } |
| 1340 | 1339 | ||
| 1341 | if (const auto gmem = std::get_if<GmemNode>(&*node)) { | 1340 | if (const auto gmem = std::get_if<GmemNode>(&*node)) { |
| 1342 | const std::string temporary = AllocTemporary(); | 1341 | std::string temporary = AllocTemporary(); |
| 1343 | AddLine("SUB.U {}, {}, {};", temporary, Visit(gmem->GetRealAddress()), | 1342 | AddLine("SUB.U {}, {}, {};", temporary, Visit(gmem->GetRealAddress()), |
| 1344 | Visit(gmem->GetBaseAddress())); | 1343 | Visit(gmem->GetBaseAddress())); |
| 1345 | AddLine("LDB.U32 {}, {}[{}];", temporary, GlobalMemoryName(gmem->GetDescriptor()), | 1344 | AddLine("LDB.U32 {}, {}[{}];", temporary, GlobalMemoryName(gmem->GetDescriptor()), |
| @@ -1348,14 +1347,14 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1348 | } | 1347 | } |
| 1349 | 1348 | ||
| 1350 | if (const auto lmem = std::get_if<LmemNode>(&*node)) { | 1349 | if (const auto lmem = std::get_if<LmemNode>(&*node)) { |
| 1351 | const std::string temporary = Visit(lmem->GetAddress()); | 1350 | std::string temporary = Visit(lmem->GetAddress()); |
| 1352 | AddLine("SHR.U {}, {}, 2;", temporary, temporary); | 1351 | AddLine("SHR.U {}, {}, 2;", temporary, temporary); |
| 1353 | AddLine("MOV.U {}, lmem[{}].x;", temporary, temporary); | 1352 | AddLine("MOV.U {}, lmem[{}].x;", temporary, temporary); |
| 1354 | return temporary; | 1353 | return temporary; |
| 1355 | } | 1354 | } |
| 1356 | 1355 | ||
| 1357 | if (const auto smem = std::get_if<SmemNode>(&*node)) { | 1356 | if (const auto smem = std::get_if<SmemNode>(&*node)) { |
| 1358 | const std::string temporary = Visit(smem->GetAddress()); | 1357 | std::string temporary = Visit(smem->GetAddress()); |
| 1359 | AddLine("LDS.U32 {}, shared_mem[{}];", temporary, temporary); | 1358 | AddLine("LDS.U32 {}, shared_mem[{}];", temporary, temporary); |
| 1360 | return temporary; | 1359 | return temporary; |
| 1361 | } | 1360 | } |
| @@ -1535,7 +1534,7 @@ std::string ARBDecompiler::Assign(Operation operation) { | |||
| 1535 | } | 1534 | } |
| 1536 | 1535 | ||
| 1537 | std::string ARBDecompiler::Select(Operation operation) { | 1536 | std::string ARBDecompiler::Select(Operation operation) { |
| 1538 | const std::string temporary = AllocTemporary(); | 1537 | std::string temporary = AllocTemporary(); |
| 1539 | AddLine("CMP.S {}, {}, {}, {};", temporary, Visit(operation[0]), Visit(operation[1]), | 1538 | AddLine("CMP.S {}, {}, {}, {};", temporary, Visit(operation[0]), Visit(operation[1]), |
| 1540 | Visit(operation[2])); | 1539 | Visit(operation[2])); |
| 1541 | return temporary; | 1540 | return temporary; |
| @@ -1545,12 +1544,12 @@ std::string ARBDecompiler::FClamp(Operation operation) { | |||
| 1545 | // 1.0f in hex, replace with std::bit_cast on C++20 | 1544 | // 1.0f in hex, replace with std::bit_cast on C++20 |
| 1546 | static constexpr u32 POSITIVE_ONE = 0x3f800000; | 1545 | static constexpr u32 POSITIVE_ONE = 0x3f800000; |
| 1547 | 1546 | ||
| 1548 | const std::string temporary = AllocTemporary(); | 1547 | std::string temporary = AllocTemporary(); |
| 1549 | const Node& value = operation[0]; | 1548 | const Node& value = operation[0]; |
| 1550 | const Node& low = operation[1]; | 1549 | const Node& low = operation[1]; |
| 1551 | const Node& high = operation[2]; | 1550 | const Node& high = operation[2]; |
| 1552 | const auto imm_low = std::get_if<ImmediateNode>(&*low); | 1551 | const auto* const imm_low = std::get_if<ImmediateNode>(&*low); |
| 1553 | const auto imm_high = std::get_if<ImmediateNode>(&*high); | 1552 | const auto* const imm_high = std::get_if<ImmediateNode>(&*high); |
| 1554 | if (imm_low && imm_high && imm_low->GetValue() == 0 && imm_high->GetValue() == POSITIVE_ONE) { | 1553 | if (imm_low && imm_high && imm_low->GetValue() == 0 && imm_high->GetValue() == POSITIVE_ONE) { |
| 1555 | AddLine("MOV.F32.SAT {}, {};", temporary, Visit(value)); | 1554 | AddLine("MOV.F32.SAT {}, {};", temporary, Visit(value)); |
| 1556 | } else { | 1555 | } else { |
| @@ -1574,7 +1573,7 @@ std::string ARBDecompiler::FCastHalf1(Operation operation) { | |||
| 1574 | } | 1573 | } |
| 1575 | 1574 | ||
| 1576 | std::string ARBDecompiler::FSqrt(Operation operation) { | 1575 | std::string ARBDecompiler::FSqrt(Operation operation) { |
| 1577 | const std::string temporary = AllocTemporary(); | 1576 | std::string temporary = AllocTemporary(); |
| 1578 | AddLine("RSQ.F32 {}, {};", temporary, Visit(operation[0])); | 1577 | AddLine("RSQ.F32 {}, {};", temporary, Visit(operation[0])); |
| 1579 | AddLine("RCP.F32 {}, {};", temporary, temporary); | 1578 | AddLine("RCP.F32 {}, {};", temporary, temporary); |
| 1580 | return temporary; | 1579 | return temporary; |
| @@ -1588,7 +1587,7 @@ std::string ARBDecompiler::FSwizzleAdd(Operation operation) { | |||
| 1588 | AddLine("ADD.F {}.x, {}, {};", temporary, Visit(operation[0]), Visit(operation[1])); | 1587 | AddLine("ADD.F {}.x, {}, {};", temporary, Visit(operation[0]), Visit(operation[1])); |
| 1589 | return fmt::format("{}.x", temporary); | 1588 | return fmt::format("{}.x", temporary); |
| 1590 | } | 1589 | } |
| 1591 | const std::string lut = AllocVectorTemporary(); | 1590 | |
| 1592 | AddLine("AND.U {}.z, {}.threadid, 3;", temporary, StageInputName(stage)); | 1591 | AddLine("AND.U {}.z, {}.threadid, 3;", temporary, StageInputName(stage)); |
| 1593 | AddLine("SHL.U {}.z, {}.z, 1;", temporary, temporary); | 1592 | AddLine("SHL.U {}.z, {}.z, 1;", temporary, temporary); |
| 1594 | AddLine("SHR.U {}.z, {}, {}.z;", temporary, Visit(operation[2]), temporary); | 1593 | AddLine("SHR.U {}.z, {}, {}.z;", temporary, Visit(operation[2]), temporary); |
| @@ -1766,21 +1765,21 @@ std::string ARBDecompiler::LogicalAssign(Operation operation) { | |||
| 1766 | } | 1765 | } |
| 1767 | 1766 | ||
| 1768 | std::string ARBDecompiler::LogicalPick2(Operation operation) { | 1767 | std::string ARBDecompiler::LogicalPick2(Operation operation) { |
| 1769 | const std::string temporary = AllocTemporary(); | 1768 | std::string temporary = AllocTemporary(); |
| 1770 | const u32 index = std::get<ImmediateNode>(*operation[1]).GetValue(); | 1769 | const u32 index = std::get<ImmediateNode>(*operation[1]).GetValue(); |
| 1771 | AddLine("MOV.U {}, {}.{};", temporary, Visit(operation[0]), Swizzle(index)); | 1770 | AddLine("MOV.U {}, {}.{};", temporary, Visit(operation[0]), Swizzle(index)); |
| 1772 | return temporary; | 1771 | return temporary; |
| 1773 | } | 1772 | } |
| 1774 | 1773 | ||
| 1775 | std::string ARBDecompiler::LogicalAnd2(Operation operation) { | 1774 | std::string ARBDecompiler::LogicalAnd2(Operation operation) { |
| 1776 | const std::string temporary = AllocTemporary(); | 1775 | std::string temporary = AllocTemporary(); |
| 1777 | const std::string op = Visit(operation[0]); | 1776 | const std::string op = Visit(operation[0]); |
| 1778 | AddLine("AND.U {}, {}.x, {}.y;", temporary, op, op); | 1777 | AddLine("AND.U {}, {}.x, {}.y;", temporary, op, op); |
| 1779 | return temporary; | 1778 | return temporary; |
| 1780 | } | 1779 | } |
| 1781 | 1780 | ||
| 1782 | std::string ARBDecompiler::FloatOrdered(Operation operation) { | 1781 | std::string ARBDecompiler::FloatOrdered(Operation operation) { |
| 1783 | const std::string temporary = AllocTemporary(); | 1782 | std::string temporary = AllocTemporary(); |
| 1784 | AddLine("MOVC.F32 RC.x, {};", Visit(operation[0])); | 1783 | AddLine("MOVC.F32 RC.x, {};", Visit(operation[0])); |
| 1785 | AddLine("MOVC.F32 RC.y, {};", Visit(operation[1])); | 1784 | AddLine("MOVC.F32 RC.y, {};", Visit(operation[1])); |
| 1786 | AddLine("MOV.S {}, -1;", temporary); | 1785 | AddLine("MOV.S {}, -1;", temporary); |
| @@ -1790,7 +1789,7 @@ std::string ARBDecompiler::FloatOrdered(Operation operation) { | |||
| 1790 | } | 1789 | } |
| 1791 | 1790 | ||
| 1792 | std::string ARBDecompiler::FloatUnordered(Operation operation) { | 1791 | std::string ARBDecompiler::FloatUnordered(Operation operation) { |
| 1793 | const std::string temporary = AllocTemporary(); | 1792 | std::string temporary = AllocTemporary(); |
| 1794 | AddLine("MOVC.F32 RC.x, {};", Visit(operation[0])); | 1793 | AddLine("MOVC.F32 RC.x, {};", Visit(operation[0])); |
| 1795 | AddLine("MOVC.F32 RC.y, {};", Visit(operation[1])); | 1794 | AddLine("MOVC.F32 RC.y, {};", Visit(operation[1])); |
| 1796 | AddLine("MOV.S {}, 0;", temporary); | 1795 | AddLine("MOV.S {}, 0;", temporary); |
| @@ -1800,7 +1799,7 @@ std::string ARBDecompiler::FloatUnordered(Operation operation) { | |||
| 1800 | } | 1799 | } |
| 1801 | 1800 | ||
| 1802 | std::string ARBDecompiler::LogicalAddCarry(Operation operation) { | 1801 | std::string ARBDecompiler::LogicalAddCarry(Operation operation) { |
| 1803 | const std::string temporary = AllocTemporary(); | 1802 | std::string temporary = AllocTemporary(); |
| 1804 | AddLine("ADDC.U RC, {}, {};", Visit(operation[0]), Visit(operation[1])); | 1803 | AddLine("ADDC.U RC, {}, {};", Visit(operation[0]), Visit(operation[1])); |
| 1805 | AddLine("MOV.S {}, 0;", temporary); | 1804 | AddLine("MOV.S {}, 0;", temporary); |
| 1806 | AddLine("IF CF.x;"); | 1805 | AddLine("IF CF.x;"); |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index a77fa35c3..29001953c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -1154,7 +1154,7 @@ void RasterizerVulkan::SetupTexture(const Tegra::Texture::FullTextureInfo& textu | |||
| 1154 | const auto sampler = sampler_cache.GetSampler(texture.tsc); | 1154 | const auto sampler = sampler_cache.GetSampler(texture.tsc); |
| 1155 | update_descriptor_queue.AddSampledImage(sampler, image_view); | 1155 | update_descriptor_queue.AddSampledImage(sampler, image_view); |
| 1156 | 1156 | ||
| 1157 | const auto image_layout = update_descriptor_queue.GetLastImageLayout(); | 1157 | VkImageLayout* const image_layout = update_descriptor_queue.LastImageLayout(); |
| 1158 | *image_layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; | 1158 | *image_layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; |
| 1159 | sampled_views.push_back(ImageView{std::move(view), image_layout}); | 1159 | sampled_views.push_back(ImageView{std::move(view), image_layout}); |
| 1160 | } | 1160 | } |
| @@ -1180,7 +1180,7 @@ void RasterizerVulkan::SetupImage(const Tegra::Texture::TICEntry& tic, const Ima | |||
| 1180 | view->GetImageView(tic.x_source, tic.y_source, tic.z_source, tic.w_source); | 1180 | view->GetImageView(tic.x_source, tic.y_source, tic.z_source, tic.w_source); |
| 1181 | update_descriptor_queue.AddImage(image_view); | 1181 | update_descriptor_queue.AddImage(image_view); |
| 1182 | 1182 | ||
| 1183 | const auto image_layout = update_descriptor_queue.GetLastImageLayout(); | 1183 | VkImageLayout* const image_layout = update_descriptor_queue.LastImageLayout(); |
| 1184 | *image_layout = VK_IMAGE_LAYOUT_GENERAL; | 1184 | *image_layout = VK_IMAGE_LAYOUT_GENERAL; |
| 1185 | image_views.push_back(ImageView{std::move(view), image_layout}); | 1185 | image_views.push_back(ImageView{std::move(view), image_layout}); |
| 1186 | } | 1186 | } |
diff --git a/src/video_core/renderer_vulkan/vk_update_descriptor.cpp b/src/video_core/renderer_vulkan/vk_update_descriptor.cpp index 681ecde98..351c048d2 100644 --- a/src/video_core/renderer_vulkan/vk_update_descriptor.cpp +++ b/src/video_core/renderer_vulkan/vk_update_descriptor.cpp | |||
| @@ -24,35 +24,25 @@ void VKUpdateDescriptorQueue::TickFrame() { | |||
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | void VKUpdateDescriptorQueue::Acquire() { | 26 | void VKUpdateDescriptorQueue::Acquire() { |
| 27 | entries.clear(); | 27 | // Minimum number of entries required. |
| 28 | } | 28 | // This is the maximum number of entries a single draw call migth use. |
| 29 | static constexpr std::size_t MIN_ENTRIES = 0x400; | ||
| 29 | 30 | ||
| 30 | void VKUpdateDescriptorQueue::Send(VkDescriptorUpdateTemplateKHR update_template, | 31 | if (payload.size() + MIN_ENTRIES >= payload.max_size()) { |
| 31 | VkDescriptorSet set) { | ||
| 32 | if (payload.size() + entries.size() >= payload.max_size()) { | ||
| 33 | LOG_WARNING(Render_Vulkan, "Payload overflow, waiting for worker thread"); | 32 | LOG_WARNING(Render_Vulkan, "Payload overflow, waiting for worker thread"); |
| 34 | scheduler.WaitWorker(); | 33 | scheduler.WaitWorker(); |
| 35 | payload.clear(); | 34 | payload.clear(); |
| 36 | } | 35 | } |
| 36 | upload_start = &*payload.end(); | ||
| 37 | } | ||
| 37 | 38 | ||
| 38 | // TODO(Rodrigo): Rework to write the payload directly | 39 | void VKUpdateDescriptorQueue::Send(VkDescriptorUpdateTemplateKHR update_template, |
| 39 | const auto payload_start = payload.data() + payload.size(); | 40 | VkDescriptorSet set) { |
| 40 | for (const auto& entry : entries) { | 41 | const void* const data = upload_start; |
| 41 | if (const auto image = std::get_if<VkDescriptorImageInfo>(&entry)) { | 42 | const vk::Device* const logical = &device.GetLogical(); |
| 42 | payload.push_back(*image); | 43 | scheduler.Record([data, logical, set, update_template](vk::CommandBuffer) { |
| 43 | } else if (const auto buffer = std::get_if<VkDescriptorBufferInfo>(&entry)) { | 44 | logical->UpdateDescriptorSet(set, update_template, data); |
| 44 | payload.push_back(*buffer); | 45 | }); |
| 45 | } else if (const auto texel = std::get_if<VkBufferView>(&entry)) { | ||
| 46 | payload.push_back(*texel); | ||
| 47 | } else { | ||
| 48 | UNREACHABLE(); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | scheduler.Record( | ||
| 53 | [payload_start, set, update_template, logical = &device.GetLogical()](vk::CommandBuffer) { | ||
| 54 | logical->UpdateDescriptorSet(set, update_template, payload_start); | ||
| 55 | }); | ||
| 56 | } | 46 | } |
| 57 | 47 | ||
| 58 | } // namespace Vulkan | 48 | } // namespace Vulkan |
diff --git a/src/video_core/renderer_vulkan/vk_update_descriptor.h b/src/video_core/renderer_vulkan/vk_update_descriptor.h index cc7e3dff4..945320c72 100644 --- a/src/video_core/renderer_vulkan/vk_update_descriptor.h +++ b/src/video_core/renderer_vulkan/vk_update_descriptor.h | |||
| @@ -15,17 +15,13 @@ namespace Vulkan { | |||
| 15 | class VKDevice; | 15 | class VKDevice; |
| 16 | class VKScheduler; | 16 | class VKScheduler; |
| 17 | 17 | ||
| 18 | class DescriptorUpdateEntry { | 18 | struct DescriptorUpdateEntry { |
| 19 | public: | 19 | DescriptorUpdateEntry(VkDescriptorImageInfo image_) : image{image_} {} |
| 20 | explicit DescriptorUpdateEntry() {} | ||
| 21 | |||
| 22 | DescriptorUpdateEntry(VkDescriptorImageInfo image) : image{image} {} | ||
| 23 | 20 | ||
| 24 | DescriptorUpdateEntry(VkDescriptorBufferInfo buffer) : buffer{buffer} {} | 21 | DescriptorUpdateEntry(VkDescriptorBufferInfo buffer_) : buffer{buffer_} {} |
| 25 | 22 | ||
| 26 | DescriptorUpdateEntry(VkBufferView texel_buffer) : texel_buffer{texel_buffer} {} | 23 | DescriptorUpdateEntry(VkBufferView texel_buffer_) : texel_buffer{texel_buffer_} {} |
| 27 | 24 | ||
| 28 | private: | ||
| 29 | union { | 25 | union { |
| 30 | VkDescriptorImageInfo image; | 26 | VkDescriptorImageInfo image; |
| 31 | VkDescriptorBufferInfo buffer; | 27 | VkDescriptorBufferInfo buffer; |
| @@ -45,32 +41,34 @@ public: | |||
| 45 | void Send(VkDescriptorUpdateTemplateKHR update_template, VkDescriptorSet set); | 41 | void Send(VkDescriptorUpdateTemplateKHR update_template, VkDescriptorSet set); |
| 46 | 42 | ||
| 47 | void AddSampledImage(VkSampler sampler, VkImageView image_view) { | 43 | void AddSampledImage(VkSampler sampler, VkImageView image_view) { |
| 48 | entries.emplace_back(VkDescriptorImageInfo{sampler, image_view, {}}); | 44 | payload.emplace_back(VkDescriptorImageInfo{sampler, image_view, {}}); |
| 49 | } | 45 | } |
| 50 | 46 | ||
| 51 | void AddImage(VkImageView image_view) { | 47 | void AddImage(VkImageView image_view) { |
| 52 | entries.emplace_back(VkDescriptorImageInfo{{}, image_view, {}}); | 48 | payload.emplace_back(VkDescriptorImageInfo{{}, image_view, {}}); |
| 53 | } | 49 | } |
| 54 | 50 | ||
| 55 | void AddBuffer(VkBuffer buffer, u64 offset, std::size_t size) { | 51 | void AddBuffer(VkBuffer buffer, u64 offset, std::size_t size) { |
| 56 | entries.emplace_back(VkDescriptorBufferInfo{buffer, offset, size}); | 52 | payload.emplace_back(VkDescriptorBufferInfo{buffer, offset, size}); |
| 57 | } | 53 | } |
| 58 | 54 | ||
| 59 | void AddTexelBuffer(VkBufferView texel_buffer) { | 55 | void AddTexelBuffer(VkBufferView texel_buffer) { |
| 60 | entries.emplace_back(texel_buffer); | 56 | payload.emplace_back(texel_buffer); |
| 61 | } | 57 | } |
| 62 | 58 | ||
| 63 | VkImageLayout* GetLastImageLayout() { | 59 | VkImageLayout* LastImageLayout() { |
| 64 | return &std::get<VkDescriptorImageInfo>(entries.back()).imageLayout; | 60 | return &payload.back().image.imageLayout; |
| 65 | } | 61 | } |
| 66 | 62 | ||
| 67 | private: | 63 | const VkImageLayout* LastImageLayout() const { |
| 68 | using Variant = std::variant<VkDescriptorImageInfo, VkDescriptorBufferInfo, VkBufferView>; | 64 | return &payload.back().image.imageLayout; |
| 65 | } | ||
| 69 | 66 | ||
| 67 | private: | ||
| 70 | const VKDevice& device; | 68 | const VKDevice& device; |
| 71 | VKScheduler& scheduler; | 69 | VKScheduler& scheduler; |
| 72 | 70 | ||
| 73 | boost::container::static_vector<Variant, 0x400> entries; | 71 | const DescriptorUpdateEntry* upload_start = nullptr; |
| 74 | boost::container::static_vector<DescriptorUpdateEntry, 0x10000> payload; | 72 | boost::container::static_vector<DescriptorUpdateEntry, 0x10000> payload; |
| 75 | }; | 73 | }; |
| 76 | 74 | ||
diff --git a/src/video_core/renderer_vulkan/wrapper.cpp b/src/video_core/renderer_vulkan/wrapper.cpp index 2ce9b0626..42eff85d3 100644 --- a/src/video_core/renderer_vulkan/wrapper.cpp +++ b/src/video_core/renderer_vulkan/wrapper.cpp | |||
| @@ -725,8 +725,7 @@ bool PhysicalDevice::GetSurfaceSupportKHR(u32 queue_family_index, VkSurfaceKHR s | |||
| 725 | return supported == VK_TRUE; | 725 | return supported == VK_TRUE; |
| 726 | } | 726 | } |
| 727 | 727 | ||
| 728 | VkSurfaceCapabilitiesKHR PhysicalDevice::GetSurfaceCapabilitiesKHR(VkSurfaceKHR surface) const | 728 | VkSurfaceCapabilitiesKHR PhysicalDevice::GetSurfaceCapabilitiesKHR(VkSurfaceKHR surface) const { |
| 729 | noexcept { | ||
| 730 | VkSurfaceCapabilitiesKHR capabilities; | 729 | VkSurfaceCapabilitiesKHR capabilities; |
| 731 | Check(dld->vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, surface, &capabilities)); | 730 | Check(dld->vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, surface, &capabilities)); |
| 732 | return capabilities; | 731 | return capabilities; |
diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h index 98937a77a..da42ca88e 100644 --- a/src/video_core/renderer_vulkan/wrapper.h +++ b/src/video_core/renderer_vulkan/wrapper.h | |||
| @@ -779,7 +779,7 @@ public: | |||
| 779 | 779 | ||
| 780 | bool GetSurfaceSupportKHR(u32 queue_family_index, VkSurfaceKHR) const; | 780 | bool GetSurfaceSupportKHR(u32 queue_family_index, VkSurfaceKHR) const; |
| 781 | 781 | ||
| 782 | VkSurfaceCapabilitiesKHR GetSurfaceCapabilitiesKHR(VkSurfaceKHR) const noexcept; | 782 | VkSurfaceCapabilitiesKHR GetSurfaceCapabilitiesKHR(VkSurfaceKHR) const; |
| 783 | 783 | ||
| 784 | std::vector<VkSurfaceFormatKHR> GetSurfaceFormatsKHR(VkSurfaceKHR) const; | 784 | std::vector<VkSurfaceFormatKHR> GetSurfaceFormatsKHR(VkSurfaceKHR) const; |
| 785 | 785 | ||
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index b543fc8c0..85075e868 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1053,7 +1053,7 @@ private: | |||
| 1053 | void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, | 1053 | void DeduceBestBlit(SurfaceParams& src_params, SurfaceParams& dst_params, |
| 1054 | const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { | 1054 | const GPUVAddr src_gpu_addr, const GPUVAddr dst_gpu_addr) { |
| 1055 | auto deduced_src = DeduceSurface(src_gpu_addr, src_params); | 1055 | auto deduced_src = DeduceSurface(src_gpu_addr, src_params); |
| 1056 | auto deduced_dst = DeduceSurface(src_gpu_addr, src_params); | 1056 | auto deduced_dst = DeduceSurface(dst_gpu_addr, dst_params); |
| 1057 | if (deduced_src.Failed() || deduced_dst.Failed()) { | 1057 | if (deduced_src.Failed() || deduced_dst.Failed()) { |
| 1058 | return; | 1058 | return; |
| 1059 | } | 1059 | } |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 4119d7907..059b96e70 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -217,7 +217,20 @@ GMainWindow::GMainWindow() | |||
| 217 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", yuzu_build_version, Common::g_scm_branch, | 217 | LOG_INFO(Frontend, "yuzu Version: {} | {}-{}", yuzu_build_version, Common::g_scm_branch, |
| 218 | Common::g_scm_desc); | 218 | Common::g_scm_desc); |
| 219 | #ifdef ARCHITECTURE_x86_64 | 219 | #ifdef ARCHITECTURE_x86_64 |
| 220 | LOG_INFO(Frontend, "Host CPU: {}", Common::GetCPUCaps().cpu_string); | 220 | const auto& caps = Common::GetCPUCaps(); |
| 221 | std::string cpu_string = caps.cpu_string; | ||
| 222 | if (caps.avx || caps.avx2 || caps.avx512) { | ||
| 223 | cpu_string += " | AVX"; | ||
| 224 | if (caps.avx512) { | ||
| 225 | cpu_string += "512"; | ||
| 226 | } else if (caps.avx2) { | ||
| 227 | cpu_string += '2'; | ||
| 228 | } | ||
| 229 | if (caps.fma || caps.fma4) { | ||
| 230 | cpu_string += " | FMA"; | ||
| 231 | } | ||
| 232 | } | ||
| 233 | LOG_INFO(Frontend, "Host CPU: {}", cpu_string); | ||
| 221 | #endif | 234 | #endif |
| 222 | LOG_INFO(Frontend, "Host OS: {}", QSysInfo::prettyProductName().toStdString()); | 235 | LOG_INFO(Frontend, "Host OS: {}", QSysInfo::prettyProductName().toStdString()); |
| 223 | LOG_INFO(Frontend, "Host RAM: {:.2f} GB", | 236 | LOG_INFO(Frontend, "Host RAM: {:.2f} GB", |
diff --git a/src/yuzu/yuzu.rc b/src/yuzu/yuzu.rc index 1b253653f..4a3645a71 100644 --- a/src/yuzu/yuzu.rc +++ b/src/yuzu/yuzu.rc | |||
| @@ -16,4 +16,4 @@ IDI_ICON1 ICON "../../dist/yuzu.ico" | |||
| 16 | // RT_MANIFEST | 16 | // RT_MANIFEST |
| 17 | // | 17 | // |
| 18 | 18 | ||
| 19 | 1 RT_MANIFEST "../../dist/yuzu.manifest" | 19 | 0 RT_MANIFEST "../../dist/yuzu.manifest" |
diff --git a/src/yuzu_cmd/yuzu.rc b/src/yuzu_cmd/yuzu.rc index 7de8ef3d9..0cde75e2f 100644 --- a/src/yuzu_cmd/yuzu.rc +++ b/src/yuzu_cmd/yuzu.rc | |||
| @@ -14,4 +14,4 @@ YUZU_ICON ICON "../../dist/yuzu.ico" | |||
| 14 | // RT_MANIFEST | 14 | // RT_MANIFEST |
| 15 | // | 15 | // |
| 16 | 16 | ||
| 17 | 1 RT_MANIFEST "../../dist/yuzu.manifest" | 17 | 0 RT_MANIFEST "../../dist/yuzu.manifest" |
diff --git a/src/yuzu_tester/service/yuzutest.cpp b/src/yuzu_tester/service/yuzutest.cpp index 85d3f436b..2d3f6e3a7 100644 --- a/src/yuzu_tester/service/yuzutest.cpp +++ b/src/yuzu_tester/service/yuzutest.cpp | |||
| @@ -53,7 +53,7 @@ private: | |||
| 53 | 53 | ||
| 54 | IPC::ResponseBuilder rb{ctx, 3}; | 54 | IPC::ResponseBuilder rb{ctx, 3}; |
| 55 | rb.Push(RESULT_SUCCESS); | 55 | rb.Push(RESULT_SUCCESS); |
| 56 | rb.Push<u32>(write_size); | 56 | rb.Push<u32>(static_cast<u32>(write_size)); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void StartIndividual(Kernel::HLERequestContext& ctx) { | 59 | void StartIndividual(Kernel::HLERequestContext& ctx) { |
diff --git a/src/yuzu_tester/yuzu.rc b/src/yuzu_tester/yuzu.rc index 7de8ef3d9..0cde75e2f 100644 --- a/src/yuzu_tester/yuzu.rc +++ b/src/yuzu_tester/yuzu.rc | |||
| @@ -14,4 +14,4 @@ YUZU_ICON ICON "../../dist/yuzu.ico" | |||
| 14 | // RT_MANIFEST | 14 | // RT_MANIFEST |
| 15 | // | 15 | // |
| 16 | 16 | ||
| 17 | 1 RT_MANIFEST "../../dist/yuzu.manifest" | 17 | 0 RT_MANIFEST "../../dist/yuzu.manifest" |