From 37b88103f4d412cf56d8c2e55dfba0ba9cd5693a Mon Sep 17 00:00:00 2001 From: farwhile Date: Fri, 9 Oct 2026 05:33:32 +0000 Subject: [PATCH] fix(runtime): stop forcing single-sample MSAA (#185) * fix(runtime): stop forcing single-sample MSAA * test removed * Fix race in webview helper launcher test --- src/runtime/performance_policy.cc | 5 +++-- tests/performance_policy_test.cc | 28 +++++++++++++++++++++++++++ tests/webview_helper_launcher_test.cc | 7 +++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/runtime/performance_policy.cc b/src/runtime/performance_policy.cc index c104535..56f35b5 100644 --- a/src/runtime/performance_policy.cc +++ b/src/runtime/performance_policy.cc @@ -250,7 +250,9 @@ bool MergePerformanceClientSettingsOverrides(const PerformancePolicy& policy, // ForceCacheSize settings are byte counts. Let Roblox size its mesh and // SLIM content caches; values like 256/128 would cap them to a few bytes. - const std::array rendering_settings = {{ + // Leave MSAA selection to Roblox or explicit client-settings overrides. + // Forcing one sample disables anti-aliasing even at maximum quality. + const std::array rendering_settings = {{ {"FIntSmoothClusterTaskQueueMaxParallelTasks", workers}, {"FIntOcclusionWorkerThreadCount", occlusion_workers}, {"FFlagMovePrerenderV2", "True"}, @@ -301,7 +303,6 @@ bool MergePerformanceClientSettingsOverrides(const PerformancePolicy& policy, {"FFlagEnableSLIMAvatars", "True"}, {"FFlagEnableSlimAvatarsDefaultEnabled", "True"}, {"FFlagLayeredClothingCacheOptimizations", "True"}, - {"FIntDebugForceMSAASamples", "1"}, {"FFlagLuauStartupGcSuppression", "False"}, {"FIntLuauGcStepMul", "300"}, {"FIntLuauGcGoalCore", "120"}, diff --git a/tests/performance_policy_test.cc b/tests/performance_policy_test.cc index 9905a66..95d2910 100644 --- a/tests/performance_policy_test.cc +++ b/tests/performance_policy_test.cc @@ -153,6 +153,34 @@ TEST(PerformancePolicyTest, WorkerModesRetainRobloxManagedAssetCacheSizes) { } } +TEST(PerformancePolicyTest, WorkerModesPreserveRobloxAndExplicitMsaaSelection) { + for (const bool throughput : {false, true}) { + PerformancePolicy policy; + policy.multithreaded_rendering = !throughput; + policy.physical_core_count = 14; + policy.physics_worker_mode = throughput ? PhysicsWorkerMode::kThroughput + : PhysicsWorkerMode::kAuto; + for (const std::string samples : {"", "1", "4", "8"}) { + nlohmann::json requested = nlohmann::json::object(); + if (!samples.empty()) { + requested["FIntDebugForceMSAASamples"] = samples; + } + std::string merged; + std::string error; + ASSERT_TRUE(MergeRuntimeClientSettingsOverrides( + ParseFrameRatePolicy("144"), policy, requested.dump(), &merged, + &error)) << error; + const auto parsed = nlohmann::json::parse(merged); + EXPECT_FALSE(parsed.contains("")); + if (samples.empty()) { + EXPECT_FALSE(parsed.contains("FIntDebugForceMSAASamples")); + } else { + EXPECT_EQ(parsed.at("FIntDebugForceMSAASamples"), samples); + } + } + } +} + TEST(PerformancePolicyTest, PreservesExplicitAssetCacheByteBudgets) { const nlohmann::json requested = { {"FIntMeshContentProviderForceCacheSize", "268435456"}, diff --git a/tests/webview_helper_launcher_test.cc b/tests/webview_helper_launcher_test.cc index b5b0944..4f4df6d 100644 --- a/tests/webview_helper_launcher_test.cc +++ b/tests/webview_helper_launcher_test.cc @@ -312,10 +312,13 @@ TEST(WebViewHelperLauncherTest, SendsNormalizedInternalRouteToHelper) { ASSERT_TRUE( WriteExecutable(helper, "#!/bin/sh\ncat > '" + output.string() + "'\n")); + auto exit_probe = std::make_shared(); const WebViewHelperLaunchResult result = - LaunchWebViewHelper(helper, "www:games/servers-section/987654321"); + LaunchWebViewHelper(helper, "www:games/servers-section/987654321", + WebViewHelperExitObserver{exit_probe, &RecordExit}); ASSERT_TRUE(result) << result.error; - ASSERT_TRUE(WaitForFile(output, std::chrono::seconds(2))); + // Redirection creates the file before cat writes it; wait for completion. + ASSERT_TRUE(WaitForExit(exit_probe, std::chrono::seconds(2))); std::ifstream input(output); const std::string request((std::istreambuf_iterator(input)),