mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-17 15:00:47 +02:00
fix(runtime): stop forcing single-sample MSAA (#185)
* fix(runtime): stop forcing single-sample MSAA * test removed * Fix race in webview helper launcher test
This commit is contained in:
1 parent
74eedada0b
commit
37b88103f4
3 files changed
+36
-4
No files matched your search
@@ -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<ClientSetting, 62> 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<ClientSetting, 61> 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"},
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -312,10 +312,13 @@ TEST(WebViewHelperLauncherTest, SendsNormalizedInternalRouteToHelper) {
|
||||
ASSERT_TRUE(
|
||||
WriteExecutable(helper, "#!/bin/sh\ncat > '" + output.string() + "'\n"));
|
||||
|
||||
auto exit_probe = std::make_shared<ExitProbe>();
|
||||
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<char>(input)),
|
||||
|
||||
Reference in new issue
Block a user