Skip to content

Play your Steam library's Windows games on a jailbroken PS5.

C++

Let the runtime kit default pixel shaders to wave32

Leonardo Lobato3d95ede1744a
diff --git a/dependencies.lock.json b/dependencies.lock.json
index d22c7b4..73826b4 100644
--- a/dependencies.lock.json
+++ b/dependencies.lock.json
@@ -177,7 +177,7 @@
}
},
"prospero_win": {
- "revision": "031302d2a713b3793c77e18f42ee0778e48d93a3",
+ "revision": "ce289425bb34acbcc98f77b4e00ac98b3c16e4bc",
"url": "https://github.com/leolobato/prospero-win.git",
"default_source": "third_party/prospero-win",
"published": false,
@@ -185,7 +185,7 @@
"retained_runtime_artifact_revision": "bceed2d-kit-h-r1",
"upstream_url": "https://github.com/mpereiraesaa/prospero-win.git",
"branch": "main",
- "note": "Rebased onto upstream b510eb3 on 2026-10-08. Any-title shell on fixed kit B (25a967d). Firmware 13.60 uses the authorized no-drop fallback; games retain root recovery. Runtime remains bea2be5. Same tree as kit C's shell revision 850e62c (history squashed; the old commits are on backup/playden-ps5-850e62c). 33130a9 adds publication metadata schema 3 (game_root.unowned) for game folders on exFAT drives. a9ce0d0 pins the packager to the kit D runtime built from 8ff88bf (rebased forks, direct-memory heap). Test branch feat/upstream-2026-10-10 (2026-10-10): rebased onto upstream ce890c0 (Mesa WGL/Zink OpenGL, PS5 OpenGL SDK path removed); patch 0663 dropped, ours renumbered 0950-0955; 3f8f559 pins the packager to the kit G runtime f29127a. Rebased again onto upstream 644e32e (kit H): our 0602 and the translator fallback 063f851 dropped for upstream #678/#677, patch 0956 keeps a window's pixel format with Mesa's WGL; 77231eb pins the packager to the kit H runtime bceed2d. 03b6495 (feat/playden-ps5) adds only test, documentation and allowlist fixes on top of ab3b29e. 13fa077 adds Wine patch 0603 (upstream PR #688: Windows memory queries report the title's direct-memory budget) and ea6e6ee pins the packager to the kit H r8 runtime built from 13fa077. c5808b2 pins the packager to the kit 0.10 runtime built from cd3de27 (media backend and Wine patches 0964, 0965, 0970-0972, 0980, 0981). 7961dcb adds only test and documentation fixes on top of c5808b2. d0e60e8 adds Wine patch 0982 (the PS5 high reserved area at 0x1000000000 asks for 512 GiB and halves down to 16 GiB, PW_PS5_HIGH_RESERVE_GB); kit 0.10 and its runtime are unchanged until a kit is built from it. f729534 (feat/120hz-output) adds Wine patch 0983 (the PS5 driver reports 120 Hz when the title asks for it) and the [display] frame_rate key; the title passes PS5_VIDEOOUT_REFRESH and PS5_VIDEOOUT_FRAME_RATE to libvulkan.prx. ee24762 pins the packager to the kit 0.12 runtime built from f729534. ffb3b7a changes only the title shell: the game keeps its XInput controller, neutral, while the PS5 system overlay has the DualSense; the kit 0.12 runtime is unchanged. 031302d adds Wine patch 0984 (the PS5 user driver posts WM_DEVICECHANGE when the title's controller connects or disconnects) and a sink call in ntdll for it; a DualSense that turns off disconnects the game's controller again. A kit with it needs ntdll.prx and win32u.prx from 031302d."
+ "note": "Rebased onto upstream b510eb3 on 2026-10-08. Any-title shell on fixed kit B (25a967d). Firmware 13.60 uses the authorized no-drop fallback; games retain root recovery. Runtime remains bea2be5. Same tree as kit C's shell revision 850e62c (history squashed; the old commits are on backup/playden-ps5-850e62c). 33130a9 adds publication metadata schema 3 (game_root.unowned) for game folders on exFAT drives. a9ce0d0 pins the packager to the kit D runtime built from 8ff88bf (rebased forks, direct-memory heap). Test branch feat/upstream-2026-10-10 (2026-10-10): rebased onto upstream ce890c0 (Mesa WGL/Zink OpenGL, PS5 OpenGL SDK path removed); patch 0663 dropped, ours renumbered 0950-0955; 3f8f559 pins the packager to the kit G runtime f29127a. Rebased again onto upstream 644e32e (kit H): our 0602 and the translator fallback 063f851 dropped for upstream #678/#677, patch 0956 keeps a window's pixel format with Mesa's WGL; 77231eb pins the packager to the kit H runtime bceed2d. 03b6495 (feat/playden-ps5) adds only test, documentation and allowlist fixes on top of ab3b29e. 13fa077 adds Wine patch 0603 (upstream PR #688: Windows memory queries report the title's direct-memory budget) and ea6e6ee pins the packager to the kit H r8 runtime built from 13fa077. c5808b2 pins the packager to the kit 0.10 runtime built from cd3de27 (media backend and Wine patches 0964, 0965, 0970-0972, 0980, 0981). 7961dcb adds only test and documentation fixes on top of c5808b2. d0e60e8 adds Wine patch 0982 (the PS5 high reserved area at 0x1000000000 asks for 512 GiB and halves down to 16 GiB, PW_PS5_HIGH_RESERVE_GB); kit 0.10 and its runtime are unchanged until a kit is built from it. f729534 (feat/120hz-output) adds Wine patch 0983 (the PS5 driver reports 120 Hz when the title asks for it) and the [display] frame_rate key; the title passes PS5_VIDEOOUT_REFRESH and PS5_VIDEOOUT_FRAME_RATE to libvulkan.prx. ee24762 pins the packager to the kit 0.12 runtime built from f729534. ffb3b7a changes only the title shell: the game keeps its XInput controller, neutral, while the PS5 system overlay has the DualSense; the kit 0.12 runtime is unchanged. 031302d adds Wine patch 0984 (the PS5 user driver posts WM_DEVICECHANGE when the title's controller connects or disconnects) and a sink call in ntdll for it; a DualSense that turns off disconnects the game's controller again. A kit with it needs ntdll.prx and win32u.prx from 031302d. ce28942 changes only the title shell: it reads [runtime] version; a profile without it (version 1) keeps wave64 pixel shaders with RADV_PS5_PS_WAVE64=1 unless it asks for pswave32, version 2 takes the driver's default (wave32 with PS5_Mesa 15f78ec). A kit with it lists the capability profile-version-2."
},
"prospero_bottle_preparation": {
"hl2-fresh-v16": {
diff --git a/src/homebrew/runtime_host.cpp b/src/homebrew/runtime_host.cpp
index 572fd47..f495ef2 100644
--- a/src/homebrew/runtime_host.cpp
+++ b/src/homebrew/runtime_host.cpp
@@ -1403,7 +1403,8 @@ rt::KitCapabilities RuntimeHost::TitleKit(const Composition& c, const rt::Runtim
if (!c.kit) return {};
const auto kit = rt::KitCapabilitiesFromManifest(c.kit->capabilities, true);
// The title's markers are read only when the kit has something an older runtime would refuse.
- return kit.display_120hz ? rt::KitForTitleRuntime(kit, TitleRuntimeCurrent(c, record)) : kit;
+ return kit.display_120hz || kit.profile_version_2 ? rt::KitForTitleRuntime(kit, TitleRuntimeCurrent(c, record))
+ : kit;
}
// The complete OWNER protocol for the publish-profile step: persist the exact
diff --git a/src/runtime/game_settings.cpp b/src/runtime/game_settings.cpp
index 6e12101..00bb5fe 100644
--- a/src/runtime/game_settings.cpp
+++ b/src/runtime/game_settings.cpp
@@ -200,7 +200,7 @@ std::vector<SettingDefinition> BuildCatalogue() {
"How the GPU runs pixel shaders. Wave64 freezes the console in some games.",
"RADV_PERFTEST=pswave32", T::kCompatibility,
{{"wave32", "Wave32", "Stops GPU freezes in some games, such as Stray."},
- {"wave64", "Wave64", "The driver's own default. May freeze the console in some games."}},
+ {"wave64", "Wave64", "May freeze the console in some games, such as Stray."}},
"wave32"));
list.push_back(Choice("steam_features", "Steam features", "How the game reaches Steam without the Steam client.",
"steam_api.dll · steam_api64.dll", T::kCompatibility,
@@ -301,11 +301,13 @@ std::string TrimSpaces(std::string text) {
// - wave64: RADV_PS5_PS_WAVE64=1 goes first; pswave32 is taken out of the player's RADV_PERFTEST, which stays where it
// was (or is left out when nothing else is in it). A RADV_PERFTEST with "all" fails: it turns pswave32 on.
// - empty (the row is unavailable on this kit): the player's text, unchanged.
+// driver_wave32: the title applies the driver's own default, wave32 ([runtime] version 2), so wave32 adds no pswave32;
+// the player's RADV_PERFTEST stays as typed and a RADV_PS5_PS_WAVE64 of the player's is still left out.
// debug_env: the variables go to [debug] env lines, whose values are shorter than [environment]'s. Fails with a reason
// when RADV_PERFTEST with pswave32 no longer fits there: the game must not start without it.
// Options are read as PS5_Mesa's parse_debug_string (src/util/u_debug.c) reads them.
-bool WithPixelShaderEnvironment(const std::string& entries, const std::string& waves, bool debug_env, std::string* out,
- std::string* reason) {
+bool WithPixelShaderEnvironment(const std::string& entries, const std::string& waves, bool driver_wave32, bool debug_env,
+ std::string* out, std::string* reason) {
if (waves != "wave32" && waves != "wave64") {
*out = entries;
return true;
@@ -338,7 +340,7 @@ bool WithPixelShaderEnvironment(const std::string& entries, const std::string& w
if (reason)
*reason = "RADV_PERFTEST=" + option +
" in Environment variables turns on wave32 pixel shaders. Remove it, or set Pixel shaders to "
- "Wave32 or Automatic.";
+ "Wave32.";
return false;
}
if (option == "pswave32") {
@@ -354,7 +356,9 @@ bool WithPixelShaderEnvironment(const std::string& entries, const std::string& w
if (!TrimSpaces(entry).empty()) rest += (rest.empty() ? "" : ";") + entry;
}
std::string first;
- if (wave32) {
+ if (wave32 && driver_wave32) {
+ if (!perftest.empty()) first = "RADV_PERFTEST=" + perftest;
+ } else if (wave32) {
if (!listed) perftest += (perftest.empty() ? "" : ",") + std::string("pswave32");
if (debug_env ? !IsProsperoDebugEnvEntry("RADV_PERFTEST", perftest)
: !IsProsperoEnvironmentEntry("RADV_PERFTEST", perftest)) {
@@ -366,7 +370,7 @@ bool WithPixelShaderEnvironment(const std::string& entries, const std::string& w
} else {
first = "RADV_PS5_PS_WAVE64=1";
}
- *out = rest.empty() ? first : first + ";" + rest;
+ *out = first.empty() ? rest : rest.empty() ? first : first + ";" + rest;
return true;
}
@@ -725,6 +729,7 @@ bool BuildEffectiveSettings(const GameRecipe& recipe, const SettingsPreset* pres
out.graphics = out.values["graphics"].value;
out.environment_as_debug_env = !kit.environment && kit.opengl_zink;
out.debug_env_lines = kit.opengl_zink;
+ out.profile_version = kit.profile_version_2 ? 2 : 1;
out.display_120hz = kit.display_120hz;
out.display_120hz_needs_update = kit.display_120hz_needs_update;
@@ -1058,6 +1063,8 @@ bool RenderProsperoProfile(const GameRecipe& recipe, const EffectiveSettings& se
const bool audio_section = settings.values.at("volume").available && value("volume") != "100";
if (audio_section) text += "\n[audio]\nvolume = " + value("volume") + "\n";
+ // [runtime] version 2: the title takes the driver's defaults. Without the line the profile is version 1.
+ if (settings.profile_version == 2) text += "\n[runtime]\nversion = 2\n";
if (value("logging") == "verbose") text += std::string("\n[debug]\nwinedebug = ") + kVerboseWinedebug + "\n";
if (value("logging") == "input") text += std::string("\n[debug]\nwinedebug = ") + kInputWinedebug + "\n";
@@ -1066,8 +1073,8 @@ bool RenderProsperoProfile(const GameRecipe& recipe, const EffectiveSettings& se
std::string environment_entries;
if (environment.available) {
std::string why;
- if (!WithPixelShaderEnvironment(environment.value, settings.pixel_shader_waves, settings.environment_as_debug_env,
- &environment_entries, &why))
+ if (!WithPixelShaderEnvironment(environment.value, settings.pixel_shader_waves, settings.profile_version == 2,
+ settings.environment_as_debug_env, &environment_entries, &why))
return fail(why);
}
bool debug_env = false;
@@ -1147,6 +1154,7 @@ bool RenderProsperoProfile(const GameRecipe& recipe, const EffectiveSettings& se
features.input_wheel = wheel;
features.audio_section = audio_section;
features.display_frame_rate = frame_rate;
+ features.runtime_version = settings.profile_version == 2;
if (!CheckProsperoProfile(text, &why, features)) return fail("generated profile is invalid: " + why);
*profile = {target.id, std::move(text)};
return true;
@@ -2846,6 +2854,7 @@ KitCapabilities KitCapabilitiesFromManifest(const std::vector<std::string>& capa
kit.wine_mono = has(kKitWineMono);
kit.vkd3d_proton = has(kKitVkd3dProton);
kit.display_120hz = has(kKitDisplay120Hz);
+ kit.profile_version_2 = has(kKitProfileVersion2);
kit.registry = bottle_access;
return kit;
}
@@ -2855,6 +2864,10 @@ KitCapabilities KitForTitleRuntime(KitCapabilities kit, bool title_runtime_curre
kit.display_120hz = false;
kit.display_120hz_needs_update = true;
}
+ if (!title_runtime_current && kit.profile_version_2) {
+ kit.profile_version_2 = false;
+ kit.profile_version_2_needs_update = true;
+ }
return kit;
}
diff --git a/src/runtime/game_settings.h b/src/runtime/game_settings.h
index 7112cb8..8c2a6d8 100644
--- a/src/runtime/game_settings.h
+++ b/src/runtime/game_settings.h
@@ -52,6 +52,10 @@ struct KitCapabilities {
// that runs this kit's runtime: an older runtime refuses a profile with frame_rate (KitForTitleRuntime).
bool display_120hz = false;
bool display_120hz_needs_update = false; // the kit has it, but the game's title still runs an older runtime
+ // [runtime] version = 2: the title applies the driver's defaults (wave32 pixel shaders), and keeps wave64 for a
+ // profile without the key. Counts only for a title that runs this kit's runtime, like display_120hz.
+ bool profile_version_2 = false;
+ bool profile_version_2_needs_update = false;
};
struct SettingChoice {
@@ -208,6 +212,9 @@ struct EffectiveSettings {
// Pixel shaders as the driver gets them: "wave32" or "wave64" adds a variable to the environment; empty (a kit
// without environment variables) leaves the driver's default.
std::string pixel_shader_waves;
+ // The profile's [runtime] version: 2 when the game's title applies the driver's defaults (wave32 pixel shaders, so
+ // Wave32 needs no variable); 1 (no key written) otherwise, and Wave32 adds pswave32 itself.
+ int profile_version = 1;
// The title's runtime honors [display] refresh on every graphics path and paces [display] frame_rate itself
// (KitCapabilities::display_120hz); without it Frame limit is DXVK's maxFrameRate, as before.
bool display_120hz = false;
@@ -486,6 +493,9 @@ inline constexpr const char* kKitVkd3dProton = "vkd3d-proton";
// The runtime honors [display] refresh = 60|120 on every graphics path (Wine reports the rate it asked for) and
// [display] frame_rate = 0|120|60|40|30, which the display paces. Runtimes without it refuse a profile with frame_rate.
inline constexpr const char* kKitDisplay120Hz = "display-120hz";
+// The title reads [runtime] version: version 2 takes the driver's defaults (pixel shaders in wave32), a profile without
+// it (version 1) keeps wave64. Runtimes without it refuse a profile with [runtime] version.
+inline constexpr const char* kKitProfileVersion2 = "profile-version-2";
const std::vector<std::string>& SettingsKitCapabilityNames();
// Settings gates from a verified kit's capabilities. bottle_access: the adapter can edit the
@@ -495,7 +505,7 @@ KitCapabilities KitCapabilitiesFromManifest(const std::vector<std::string>& capa
// The installed kit's capabilities for one game's title. A prepared title keeps its own copy of the runtime until
// Update, so a capability that adds profile keys counts only when the title runs this kit's runtime
// (title_runtime_current: the title's owner markers name this kit, PackageInstaller::TitleCurrent). Otherwise
-// display_120hz is off and display_120hz_needs_update says why.
+// display_120hz and profile_version_2 are off and their _needs_update say why.
KitCapabilities KitForTitleRuntime(KitCapabilities kit, bool title_runtime_current);
// Everything one game's settings put on disk for its next launch.
diff --git a/src/runtime/kit_trust.cpp b/src/runtime/kit_trust.cpp
index a247ff4..e33a831 100644
--- a/src/runtime/kit_trust.cpp
+++ b/src/runtime/kit_trust.cpp
@@ -14,7 +14,7 @@ KitAdmissionConfig DevelopmentKitAdmission() {
kKitTitleAnyId, kKitGameRootUnowned, kKitBottleProfileShared, kKitOpenGLZink,
kKitAudioVolume, kKitDxvkConfig, kKitDxvkPresent, kKitInputTuning,
kKitInputWheel, kKitEnvironment, kKitWineMono, kKitVkd3dProton,
- kKitDisplay120Hz};
+ kKitDisplay120Hz, kKitProfileVersion2};
std::sort(config.known_capabilities.begin(), config.known_capabilities.end());
return config;
}
diff --git a/src/runtime/prospero_profile.cpp b/src/runtime/prospero_profile.cpp
index 976f7e8..258ae32 100644
--- a/src/runtime/prospero_profile.cpp
+++ b/src/runtime/prospero_profile.cpp
@@ -238,7 +238,7 @@ bool CheckProsperoProfile(std::string_view text, std::string* reason, ProsperoPr
const auto name = Lower(line.substr(1, line.size() - 2));
if ((name != "application" && name != "display" && name != "input" && name != "debug" &&
!(features.environment_section && name == "environment") &&
- !(features.audio_section && name == "audio")) ||
+ !(features.audio_section && name == "audio") && !(features.runtime_version && name == "runtime")) ||
std::find(sections.begin(), sections.end(), name) != sections.end())
return fail("section [" + name + "] unknown or repeated");
if (sections.empty() != (name == "application")) return fail("[application] must come first");
@@ -336,6 +336,10 @@ bool CheckProsperoProfile(std::string_view text, std::string* reason, ProsperoPr
} else {
return fail("unknown [input] key " + key);
}
+ } else if (section == "runtime") {
+ // Only the profile's version: the defaults the title applies (prospero-win's [runtime] has more keys).
+ if (key != "version") return fail("unknown [runtime] key " + key);
+ if (value != "1" && value != "2") return bad("not 1 or 2");
} else if (section == "audio") {
if (key != "volume") return fail("unknown [audio] key " + key);
if (!IsDigits(value, 3) || std::atol(std::string(value).c_str()) > 100) return bad("not 0-100");
diff --git a/src/runtime/prospero_profile.h b/src/runtime/prospero_profile.h
index 499d478..c367066 100644
--- a/src/runtime/prospero_profile.h
+++ b/src/runtime/prospero_profile.h
@@ -79,6 +79,7 @@ struct ProsperoProfileFeatures {
bool audio_section = false; // [audio] volume
bool debug_env = false; // [debug] env = NAME=value (upstream prospero-win)
bool display_frame_rate = false; // [display] frame_rate = 0|120|60|40|30 (kit capability display-120hz)
+ bool runtime_version = false; // [runtime] version = 1|2 (kit capability profile-version-2)
};
// A [debug] env variable the runtime takes: PW_, DXVK_, MESA_, GALLIUM_, ZINK_, RADV_ or VK_ names, without the ones
// the title sets itself or the performance overlay owns.
diff --git a/tests/game_settings_test.cpp b/tests/game_settings_test.cpp
index ac25b5d..9f66e5f 100644
--- a/tests/game_settings_test.cpp
+++ b/tests/game_settings_test.cpp
@@ -720,6 +720,46 @@ int main(int argc, char** argv) {
CHECK(settings.values.at("pixel_shader_waves").source == ValueSource::kRecipe);
reread_wave.defaults["pixel_shader_waves"] = "wave16";
CHECK(!BuildEffectiveSettings(reread_wave, nullptr, {}, environment_kit, &settings, &error));
+
+ // A kit whose title applies the profile's version (profile-version-2): Playden writes version 2, and the driver's
+ // own default is wave32, so Wave32 needs no variable at all.
+ CHECK(KitCapabilitiesFromManifest({kKitProfileVersion2}, false).profile_version_2);
+ CHECK(!KitCapabilitiesFromManifest({kKitEnvironment}, false).profile_version_2);
+ auto version_kit = environment_kit;
+ version_kit.profile_version_2 = true;
+ const std::string version_2 = "\n[runtime]\nversion = 2\n";
+ CHECK(render(hl2, {}, version_kit) == base + version_2);
+ CHECK(settings.profile_version == 2 && settings.pixel_shader_waves == "wave32");
+ CHECK(render(stray, {}, version_kit) == base + version_2);
+ CHECK(!CheckProsperoProfile(profile.text, &reason)); // a runtime without it refuses [runtime]
+ CHECK(CheckProsperoProfile(profile.text, &reason, {.runtime_version = true}));
+ CHECK(!CheckProsperoProfile(base + "\n[runtime]\nversion = 3\n", &reason, {.runtime_version = true}));
+ CHECK(!CheckProsperoProfile(base + "\n[runtime]\ncpu = native\n", &reason, {.runtime_version = true}));
+ // Wave64 is the opt-out: RADV_PS5_PS_WAVE64=1, as before.
+ CHECK(render(stray, {{"pixel_shader_waves", "wave64"}}, version_kit) ==
+ base + version_2 + "\n[environment]\nRADV_PS5_PS_WAVE64 = 1\n");
+ CHECK(CheckProsperoProfile(profile.text, &reason, {.environment_section = true, .runtime_version = true}));
+ // The player's variables: RADV_PERFTEST stays as typed, a RADV_PS5_PS_WAVE64 of the player's is left out, and a
+ // RADV_PERFTEST too long to take pswave32 is fine, since nothing is added to it.
+ CHECK(render(hl2, conflicting, version_kit) ==
+ hl2_expected.substr(0, hl2_expected.find("\n[environment]\n")) + version_2 +
+ "\n[environment]\nWINE_CPU_TOPOLOGY = 4:0,1,2,3\nRADV_PERFTEST = pswave32,sam\nDXVK_FRAME_RATE = 45\n");
+ CHECK(render(stray, {{"environment", "RADV_PERFTEST=sam"}}, version_kit) ==
+ base + version_2 + "\n[environment]\nRADV_PERFTEST = sam\n");
+ CHECK(render(stray, {{"environment", perftest(119)}}, version_kit).find(std::string(119, 'x') + "\n") !=
+ std::string::npos);
+ // A Zink kit with it: no [debug] env line for the default.
+ auto version_debug_kit = debug_kit;
+ version_debug_kit.profile_version_2 = true;
+ CHECK(render(stray, {}, version_debug_kit).find("RADV_") == std::string::npos);
+ CHECK(profile.text.find(version_2) != std::string::npos);
+ // A title still on an older runtime (Update pending) refuses [runtime] version: version 1, pswave32 written.
+ const auto stale_version = KitForTitleRuntime(version_kit, false);
+ CHECK(!stale_version.profile_version_2 && stale_version.profile_version_2_needs_update);
+ CHECK(KitForTitleRuntime(version_kit, true).profile_version_2);
+ CHECK(!KitForTitleRuntime(environment_kit, false).profile_version_2_needs_update);
+ CHECK(render(stray, {}, stale_version) == base + "\n[environment]\nRADV_PERFTEST = pswave32\n");
+ CHECK(settings.profile_version == 1);
}
// Stick dead zone and rumble need a runtime with controller tuning and the Xbox controller;
// only values that differ from the runtime's defaults are written.
diff --git a/third_party/prospero-win b/third_party/prospero-win
index 031302d..ce28942 160000
--- a/third_party/prospero-win
+++ b/third_party/prospero-win
@@ -1 +1 @@
-Subproject commit 031302d2a713b3793c77e18f42ee0778e48d93a3
+Subproject commit ce289425bb34acbcc98f77b4e00ac98b3c16e4bc