Skip to content

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

C++

Pick vkd3d-proton for Direct3D 12 games that also import an older Direct3D

Leonardo Lobatoed98cd603034
diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md
index e26eb2b..e05d101 100644
--- a/COMPATIBILITY.md
+++ b/COMPATIBILITY.md
@@ -143,7 +143,7 @@ Development builds carry the version they lead to, such as `0.11-dev.20261020.1`
| Kit | What changed for games |
| --- | --- |
| 0.10 | First stable kit. Windows video and audio decoding through GStreamer and FFmpeg, so games play their movies and compressed audio (Fallout 4, Bulletstorm, Metal Wolf Chaos XD). Source games (Portal 2, Team Fortress 2, Black Mesa) no longer hang at start-up with the controller. Call of Juarez Gunslinger's audio no longer freezes the game. A game that crashes now quits instead of freezing. |
-| 0.11 (in development) | Direct3D 12 through vkd3d-proton: Playden turns it on for games that only use Direct3D 12, and Game settings › Direct3D 12 turns it on for others (Unity and Unreal games then get `-force-d3d12` or `-dx12`). 64-bit games can reserve more address space (Cyberpunk 2077). |
+| 0.11 (in development) | Direct3D 12 through vkd3d-proton: Playden turns it on for games that use Direct3D 12, except Unity and Unreal games, where Game settings › Direct3D 12 turns it on (they then get `-force-d3d12` or `-dx12`). 64-bit games can reserve more address space (Cyberpunk 2077). |
| Earlier | Test kits before the first stable release, named by letter and revision (D to H r9). Kit 0.10 follows H r9: games set up on H r6 or later need nothing, and games set up earlier need Recreate bottle. |
To see which kit your console has, run the [log script](tools/collect_logs.py): it prints the kit version.
@@ -154,9 +154,8 @@ To see which kit your console has, run the [log script](tools/collect_logs.py):
runs inside the translator too.
- **New games can stay at *Waiting for the PS5*** when ShadowMountPlus stops registering titles. Reload
ShadowMountPlus.
-- **Direct3D 12 games** need a kit with vkd3d-proton (0.11 or later). Playden turns it on for games that only use
- Direct3D 12. For games that can also use Direct3D 11, set Game settings › Graphics = DXVK and Direct3D 12 =
- vkd3d-proton. Its own variables (`VKD3D_DEBUG`, `VKD3D_CONFIG`, …) go in Environment variables.
+- **Direct3D 12 games** need a kit with vkd3d-proton (0.11 or later). Playden turns it on for games that use
+ Direct3D 12, except Unity and Unreal games: for those, set Game settings › Direct3D 12 = vkd3d-proton. Its own variables (`VKD3D_DEBUG`, `VKD3D_CONFIG`, …) go in Environment variables.
- **Denuvo Anti-Tamper** games (for example Hi-Fi RUSH) cannot run, and support is not planned.
- **Kernel anti-cheat** games (for example Easy Anti-Cheat or BattlEye in kernel mode) cannot run.
- Games that need a **third-party launcher or account** (EA app, Ubisoft Connect, Rockstar) are not supported yet.
diff --git a/src/runtime/game_probe.cpp b/src/runtime/game_probe.cpp
index 965289d..8c8a804 100644
--- a/src/runtime/game_probe.cpp
+++ b/src/runtime/game_probe.cpp
@@ -356,8 +356,10 @@ GameDefaults DefaultsFor(const GameProbe& probe, const RuntimeAbilities& runtime
} else if (probe.engine == "godot") {
out.graphics = "opengl";
out.arguments = "--rendering-driver opengl3";
- } else if (has("d3d12") && !older_direct3d && runtime.vkd3d_proton) {
- // vkd3d-proton presents through DXVK's dxgi, so the game gets DXVK as well.
+ } else if (has("d3d12") && runtime.vkd3d_proton) {
+ // vkd3d-proton presents through DXVK's dxgi, so the game gets DXVK as well. A game that also imports an
+ // older Direct3D still asks for Direct3D 12 first (Mina the Hollower with d3d9, Ghosts 'n Goblins with d3d11)
+ // and falls back to software rendering or stops on Wine's own; one that picks the older one still gets DXVK.
out.graphics = "dxvk";
out.d3d12 = "vkd3d-proton";
} else if (direct3d || probe.engine == "gamemaker") {
@@ -399,6 +401,9 @@ std::string DetectedLabel(const std::string& summary) {
if (facts.count(id)) engine = name;
std::string api;
if (graphics == "opengl") api = "OpenGL";
+ else if (graphics == "dxvk" && facts.count("d3d12") && engine != "Unity" && engine != "Unreal Engine")
+ // Direct3D 12 also loads dxgi; a game that names both 11 and 12 can draw with either.
+ api = facts.count("d3d11") ? "Direct3D 11 and 12" : "Direct3D 12";
else if (graphics == "dxvk")
api = facts.count("unity-legacy") ? "Direct3D 9"
: facts.count("d3d11") || facts.count("dxgi") || engine == "Unity" || engine == "Unreal Engine" ||
diff --git a/tests/game_probe_test.cpp b/tests/game_probe_test.cpp
index f229fef..68e173c 100644
--- a/tests/game_probe_test.cpp
+++ b/tests/game_probe_test.cpp
@@ -198,6 +198,11 @@ int main() {
// Direct3D 12 games load dxgi too; that doesn't make them Direct3D 11 games.
const auto twelve_dxgi = DefaultsFor(ProbeGame(root.string(), "TwelveDxgi.exe"), vkd3d);
CHECK(twelve_dxgi.refusal.empty() && twelve_dxgi.graphics == "dxvk" && twelve_dxgi.d3d12 == "vkd3d-proton");
+ // An older Direct3D next to it is a fallback: the game still asks for Direct3D 12 first.
+ WritePe(root / "TwelveNine.exe", {true, {"d3d9.dll", "dxgi.dll", "d3d12.dll"}});
+ const auto twelve_nine = DefaultsFor(ProbeGame(root.string(), "TwelveNine.exe"), vkd3d);
+ CHECK(twelve_nine.refusal.empty() && twelve_nine.graphics == "dxvk" && twelve_nine.d3d12 == "vkd3d-proton");
+ CHECK(DefaultsFor(ProbeGame(root.string(), "TwelveNine.exe")).d3d12.empty());
KitCapabilities vkd3d_kit;
vkd3d_kit.vkd3d_proton = true;
CHECK(GameProgramRefusal(root.string(), "Twelve.exe", vkd3d_kit, false).empty());
@@ -470,6 +475,8 @@ int main() {
// The player's words for what was found.
CHECK(DetectedLabel("unity-il2cpp,d3d11,d3d12 graphics=dxvk") == "Unity \xC2\xB7 Direct3D 11");
CHECK(DetectedLabel("d3d9 graphics=dxvk") == "Direct3D 9");
+ CHECK(DetectedLabel("d3d12,d3d9,dxgi graphics=dxvk") == "Direct3D 12");
+ CHECK(DetectedLabel("d3d11,d3d12,dxgi,vulkan graphics=dxvk") == "Direct3D 11 and 12");
CHECK(DetectedLabel("godot,opengl,vulkan graphics=opengl") == "Godot \xC2\xB7 OpenGL");
CHECK(DetectedLabel("unknown graphics=auto").empty() && DetectedLabel("").empty());