Game Porting Toolkit 4: Agentic Game Ports on Mac
“I am using Claude Code for everything today.” David Srour, an engineer on Apple’s Metal Ecosystem Team, said that sentence on a WWDC 2026 stage, then spent the rest of session 357 porting Microsoft’s MiniEngine from D3D12 on Windows to Metal 4 on macOS with an agent doing the platform work.1 The vehicle is Game Porting Toolkit 4, which ships agentic skills as a plugin you install from the Game Porting Toolkit marketplace on GitHub: expert skills that carry the platform knowledge, workflow skills that impose a milestone-based process, and a porting assistant agent that orchestrates both.1 Apple also built the primitive that made the demo possible at all. macOS 27 adds gpucapture and gpudebug, command-line tools that let an agent capture a GPU frame and analyze it without a human driving Xcode.1
Apple published a first-party skill pack for a coding agent, aimed at a domain agents previously could not touch on their own: bringing up a renderer, debugging wrong pixels, and tuning an upscaler. Session 356 is the companion piece, where CD PROJEKT RED’s Paweł Sasko walks through how the studio brought Cyberpunk 2077: Ultimate Edition to the Mac by hand. The Cyberpunk port predates the agentic skills; nobody at CDPR ran a porting assistant. Apple pairs the two sessions deliberately, closing the Cyberpunk talk by pointing developers at the agentic one.2 Read together, they make one argument: the manual playbook works at AAA scale, and Game Porting Toolkit 4 hands that playbook to an agent.
TL;DR
- Game Porting Toolkit 4 adds agentic skills for game porting: expert skills (domain knowledge), workflow skills (a milestone-based process), and a porting assistant agent that orchestrates them, distributed as a plugin from the Game Porting Toolkit marketplace on GitHub.1
- The workflow runs discover (codebase scan, reference captures from the evaluation environment, preference questions), plan, execute, and validate; each milestone auto-loads its expert skills “without relying on whether the model decides to use them or not,” and the agent “stores what it learns across milestones.”1
- macOS 27 ships
gpucaptureandgpudebug, CLI tools that “support fully autonomous agent workflows,” plus Metal HUD extensions for MetalFX: an exposure readout, a jitter scatter plot that flags out-of-range values in red, and live overrides.1 - Apple demoed the skills porting Microsoft’s MiniEngine from D3D12 to Metal 4, then pointed the assistant at Godot, which gained a Metal 4 backend “up and running in a few days.”1
- Cyberpunk 2077 proves the underlying pipeline at AAA scale, the manual way: evaluation-environment-first profiling, the “For this Mac” auto-preset, auto-calibrated HDR via EDR, and head-tracked spatial audio, and it won Mac Game of the Year in Apple’s 2025 App Store Awards.2
The porting assistant and its skills (Session 357)
David Srour names his agent and installs the plugin from the Game Porting Toolkit marketplace, starting at 3:26.
A typical port means scoping the work, getting a build going, converting shaders, bringing up the renderer, remapping inputs, polishing for a native feel, and optimizing performance.1 Game Porting Toolkit 4 attacks that list with two kinds of skills. Expert skills provide technical guidance: platform knowledge, best practices, and flags for common porting anti-patterns. Workflow skills provide the structured approach. The porting assistant agent ties them together, and Apple is explicit about why orchestration matters: “During execution, all planned milestones automatically load the necessary expert skills without relying on whether the model decides to use them or not.”1 Skill selection stops being a roll of the model’s dice and becomes part of the process definition.
Distribution goes through the agent’s own plugin system. “The skills and assistant are provided as a plugin from the Game Porting Toolkit marketplace on GitHub. You will first add the marketplace. And then install the plugin.”1 The repository behind that marketplace is apple/game-porting-toolkit, described as “Resources for porting games and engines to Apple platforms”; its README documents the same split, expert skills covering Metal 4, MetalFX, shader compilation, platform frameworks, and debugging tools, and workflow skills that run a milestone-based porting process and persist state between sessions.3 In Claude Code, registering the marketplace is one command: /plugin marketplace add apple/game-porting-toolkit.3
The assistant’s workflow has three stages. Discover looks at your codebase, grabs reference captures from the evaluation environment (the same translated-Windows-build environment CDPR used, more on that below), and asks you questions about your preferences. Then you and the assistant plan milestone goals, “since porting a whole title is usually too big for one session.”1 For each milestone the agent executes the changes while you guide it, and then validation runs a multi-point checklist: the app launches properly, Metal validation passes on API usage and shaders, screen captures confirm visual correctness against ground truth references, the agent reviews the code against known anti-patterns from the skills it used, and it checks for memory issues.1 The agent also “stores what it learns across milestones, so nothing gets lost between sessions.”1
The MiniEngine demo shows what the expert skills actually buy. For the first milestone, a window with correct frame pacing, four skills load together: window creation and lifecycle, swap-chain concept mapping, drawable presentation, and metal-cpp object lifetimes.1 For scene rendering, the resources skill teaches Metal 4’s residency model: register resources in a residency set early, because without that knowledge the agent produces code that compiles while the GPU cannot read the texture.1 The shader pipeline and converter skills have the agent query argument buffer offsets from the Metal shader converter runtime instead of copying MiniEngine’s index-times-size arithmetic, which breaks when the converter lays buffers out differently: “No error, just incorrect rendering.”1 The synchronization skill maps D3D12’s barrier model to Metal 4’s producer-consumer model rather than letting the agent fall back to blanket barriers at encoder boundaries, which work in simple cases and silently break as the pipeline grows.1 A pattern emerges across all three: the failure mode the skills prevent is rarely a crash. It is wrong pixels with no error message.
The skills extend past first playable. A game controller skill covers GCController discovery and teaches the agent to query what a connected device actually supports instead of assuming XInput’s fixed layout.1 Two MetalFX skills handle upscaling and frame interpolation: the upscaling skill configures jitter in pixel space (normalized values would effectively disable temporal accumulation), sets up motion vectors with the right scale and conventions, and provides MIP bias and history reprojection setup; the frame interpolation skill establishes a dedicated present thread so interpolated and rendered frames stay evenly spaced.1
Srour closed with a second codebase: “I pointed the porting assistant at Godot, a production engine with an existing Metal 3 backend, and asked it to add Metal 4 alongside it.”1 Same workflow, same skills, validation against ground truths. “It’s still a collaborative effort, but the skills sped things up significantly. It was up and running in a few days.”1 His division of labor for the whole session is the part worth quoting to anyone skeptical of agentic porting: “I let the skills do the heavy lifting, while I focused on other things: making the architectural decisions, reviewing the agent’s output, and providing important context about the game.”1
gpucapture and gpudebug: the autonomous-debugging primitive
The pivotal moment in session 357 arrives midway through the MiniEngine port, when first light comes up with wrong lighting and visibly stretched wall textures. Srour names the gap directly: “Normally I’d capture a frame in Xcode and diagnose the issue. But until now, an agent couldn’t do that on its own.”1 GPU debugging has been the hard wall for autonomous graphics work; everything ran through a GUI.
macOS 27 removes the wall: “macOS 27 introduces new command-line tools which support fully autonomous agent workflows: gpucapture for capturing a GPU frame, and gpudebug for analyzing it.”1 In the demo, Srour describes the visual symptoms, the agent loads a debugging-rendering-issues skill with a structured symptoms-to-root-cause methodology, captures a trace with gpucapture while the app runs, then uses gpudebug to inspect “anything you’d normally check in Xcode, resource bindings, constants, resource contents, and data flow through the pipeline,” tracing where the output diverges from the evaluation environment until it finds and fixes the problem.1 The same tools then feed validation: the agent compares dispatch calls, pipelines, and dispatch dimensions against the original trace, a side-by-side comparison Srour calls tedious to do by hand for every milestone.1 Apple’s product page makes the framing explicit: with command-line access for Metal tools, agents can now capture, debug, and profile Metal workloads directly.3
macOS 27 also extends the Metal HUD for MetalFX integration work. The HUD now displays the upscaler’s exposure parameter so you can confirm it reaches the API, shows jitter sequence information with out-of-range jitters marked in red on a scatter plot, and offers live overrides for jitter multipliers and motion vector scales that take effect while the app runs.1 The demo diagnosis is a tidy example of the technique: wobbling artifacts during camera motion, the HUD shows the motion vector X-scale negated, flipping it in the overrides panel fixes the wobble, and “if the HUD overrides fix the output, that tells you where the bug is.”1 You then trace the fix back to the source logic.
Cyberpunk 2077: the manual playbook at AAA scale (Session 356)
Paweł Sasko tours the “For this Mac” preset on an M5 Max MacBook Pro, starting at 15:26.
Session 356 pairs Garrett Austin, an engineer on Apple’s Game Performance team, with Paweł Sasko, Associate Game Director at CD PROJEKT RED.2 To be precise about the timeline: Cyberpunk 2077: Ultimate Edition shipped on Mac and won Mac Game of the Year in Apple’s 2025 App Store Awards, before Game Porting Toolkit 4’s agentic skills existed.2 CDPR did every step in the session by hand. The reason the session belongs in a post about agentic porting is that the pipeline CDPR walked manually is the same one the porting assistant now orchestrates, evaluation environment, Metal shader converter, MetalFX, ground-truth validation, and Apple connects the two itself, closing the Cyberpunk session by sending viewers to “Speedrun your game port with agentic coding.”2
CDPR’s first move set the pattern. “Before we started building the native path for Cyberpunk 2077 on Mac, we used Apple’s Game Porting Toolkit to evaluate the Windows build in a translated environment on macOS. This let us gain valuable insight before writing any code.”2 The studio ran a predetermined set of hotspot sequences in the evaluation environment and read each run from three angles: statistical frame time data from the in-engine profiler, Metal HUD correlation between scene events and the trace, and engine-internal profiling broken down by thread.2 The signals were clear early. GPU time looked healthy on high-spec hardware, while dense city driving exposed CPU pressure as the real hotspot. The environment even flagged its own artifacts, frame-time oscillation from live shader translation and heavy-looking audio middleware, both of which resolved in native binaries; Game Porting Toolkit identified them so CDPR knew to investigate early.2 Map that onto session 357’s discover stage, where the assistant grabs reference captures from the same evaluation environment before planning a single milestone, and the inheritance is direct.
The shipping polish is where the Mac version stands apart, starting with first launch. “For this Mac” is a device-based graphics preset system: it detects the hardware in your Mac and automatically configures settings for the device.2 CDPR picked per-device settings that hold image fidelity, set target frame rates of 30 or 60 FPS, ran MetalFX with Dynamic Resolution Scaling between tuned minimum and maximum resolution boundaries, set VSync for frame pacing, and enabled HDR based on display capability, then tuned every remaining setting per device in a measure-refine-revalidate loop.2 Sasko demoed the result on a MacBook Pro with the M5 Max chip: Ultra preset as the base, a 60 FPS lock with VSync, Dynamic Resolution Scaling rendering between 50 and 80 percent of a 2336x1460 output, holding 60 FPS through Dogtown’s Black Market, one of the heaviest areas in the game, on out-of-the-box settings.2 The idea is spreading: “other developers are starting to adopt ‘For this Mac’ settings in their games as well.”2
HDR ships with no calibration screen. CDPR implemented HDR through Apple’s Extended Dynamic Range pipeline, polling maximumExtendedDynamicRangeColorComponentValue for the display’s current maximum EDR value and feeding it straight to the tone mapper; the value changes with display hardware and conditions, so the tone mapper always tracks what the panel can actually do.2 HDR turns on by default when a display has the headroom for it: the game checks maximumPotentialExtendedDynamicRangeColorComponentValue and enables HDR when the display’s maximum potential EDR value exceeds 2.0.2
Audio gets the same default-on treatment. Cyberpunk’s middleware implements Apple’s spatial audio APIs via AVAudioEngine, and CDPR enabled head tracking for AirPods by setting the AVAudioEnvironmentNode’s listenerHeadTrackingEnabled property to true, on by default with no additional setup.2 Game Mode helps the same hardware: it gives games higher-priority access to CPU and GPU and doubles the Bluetooth sampling rate, cutting latency for wireless controllers and AirPods audio, and macOS enables it automatically for apps categorized as games.2
The outcome numbers close the case for the platform. Cyberpunk 2077 has sold 35 million copies across all platforms plus an additional 10 million copies of Phantom Liberty, and Cyberpunk 2077: Ultimate Edition won Mac Game of the Year in Apple’s 2025 App Store Awards.2 Sasko’s summary is the one studios will remember: “what matters is not how much work you put into something, but what the result is for our players.”2
How to start
The two sessions compose into a sequence:
- Run your Windows build in the evaluation environment first. No code required, and the environment now supports Metal 4 for compatibility and performance testing.3 Follow CDPR’s read: hotspot sequences, frame time statistics, Metal HUD correlation, and per-thread CPU profiling, and treat translation-layer artifacts as flagged leads, not verdicts.2
- Install the skills. Add the Game Porting Toolkit marketplace and install the plugin; in Claude Code the marketplace registration is
/plugin marketplace add apple/game-porting-toolkit.13 If you’re unsure what to do next, ask the porting assistant; its first step is discovery.1 - Plan milestones with the assistant and let validation gate each one. App launch, Metal validation, capture comparison against ground truth, anti-pattern review, and memory checks run per milestone, and the agent carries what it learned into the next session.1
- Get on macOS 27 for the debugging loop.
gpucaptureandgpudebuggive the agent autonomous frame capture and analysis, and the Metal HUD’s MetalFX extensions (exposure readout, jitter scatter plot, live overrides) localize upscaler bugs while the game runs.1 - Steal the Cyberpunk ship checklist. A “For this Mac” style auto-preset for first launch, EDR-driven auto-calibrated HDR with default-on above 2.0 potential headroom, and head-tracked spatial audio through
listenerHeadTrackingEnabled.2
FAQ
What exactly does Game Porting Toolkit 4 add for agents?
Three things: expert skills that give a coding agent platform knowledge, best practices, and anti-pattern flags across Metal 4, MetalFX, shader compilation, platform frameworks, and debugging; workflow skills that impose a milestone-based process with persisted state; and a porting assistant agent that orchestrates the methodology, auto-loading the right expert skills per milestone instead of leaving the choice to the model.13
Which coding agent does the porting assistant run on?
Apple’s session demo runs entirely on Claude Code; Srour states he is “using Claude Code for everything today.”1 The skills install as a plugin from the Game Porting Toolkit marketplace on GitHub, and the repository organizes its install documentation per coding agent, with Claude Code’s marketplace command documented directly.3
What are gpucapture and gpudebug?
New command-line tools in macOS 27. gpucapture captures a GPU frame from a running application; gpudebug analyzes the capture, exposing resource bindings, constants, resource contents, and pipeline data flow that previously required Xcode’s GUI. Apple built them so agent workflows can be “fully autonomous”: an agent can now go from a visual symptom to a root cause to a validated fix without a human capturing frames.1
Did CD PROJEKT RED use the agentic skills to port Cyberpunk 2077?
No. The Cyberpunk 2077 Mac port was a manual effort that shipped and won Mac Game of the Year in Apple’s 2025 App Store Awards before Game Porting Toolkit 4’s agentic skills existed.2 The relevance runs the other direction: CDPR’s pipeline (evaluation environment first, Metal shader converter, MetalFX with Dynamic Resolution Scaling, ground-truth visual validation) is the same playbook the porting assistant now executes with an agent.12
How does the “For this Mac” preset work?
It detects the hardware in the player’s Mac and configures graphics and video settings for that device automatically: a 30 or 60 FPS target, MetalFX with Dynamic Resolution Scaling inside tuned resolution boundaries, VSync, output resolution, and HDR based on display capability, with every remaining setting hand-tuned per device. On an M5 Max MacBook Pro the preset uses Ultra as its base and holds a locked 60 FPS while rendering 50 to 80 percent of 2336x1460.2
Running Agentic AI on the Mac with MLX covers the local-inference side of agentic work on the Mac, and Xcode 27 Went Agentic covers the IDE side; Game Porting Toolkit 4 is the game-porting-specific third leg. Metal 4 Essentials unpacks the API the skills target. The full series hub is the Apple Ecosystem Series.
References
-
Apple, WWDC 2026 session 357, Speedrun your game port with agentic coding. Source for Game Porting Toolkit 4’s expert skills, workflow skills, and porting assistant agent; plugin distribution from the Game Porting Toolkit marketplace on GitHub; the discover, plan, execute, validate workflow with auto-loaded skills, ground-truth captures, and cross-milestone memory; the
gpucaptureandgpudebugCLI tools in macOS 27; the Metal HUD MetalFX extensions (exposure display, jitter scatter plot with out-of-range red, live overrides); the MiniEngine D3D12-to-Metal 4 port; the Godot Metal 4 backend running in a few days; and the David Srour quotes, including “I am using Claude Code for everything today.” ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩ -
Apple, WWDC 2026 session 356, Bringing Cyberpunk 2077 to Mac. Source for the evaluation-environment-first approach and its three profiling angles; the “For this Mac” device-based preset (30/60 FPS targets, MetalFX with Dynamic Resolution Scaling, VSync, HDR by display capability); the M5 Max demo (Ultra base, 60 FPS lock, 50-80 percent of 2336x1460); auto-calibrated HDR via
maximumExtendedDynamicRangeColorComponentValueand the default-on check againstmaximumPotentialExtendedDynamicRangeColorComponentValueexceeding 2.0; head-tracked spatial audio viaAVAudioEnvironmentNode.listenerHeadTrackingEnabled; Game Mode’s doubled Bluetooth sampling rate; the 35 million copies, 10 million Phantom Liberty, and Mac Game of the Year facts; speaker attribution for Garrett Austin (Apple Game Performance) and Paweł Sasko (CD PROJEKT RED); and the closing cross-reference to session 357. ↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩↩ -
Apple, game-porting-toolkit repository (“Resources for porting games and engines to Apple platforms”) and the Game Porting Toolkit product page. Source for the repository’s expert-skill coverage (Metal 4, MetalFX, shader compilation, platform frameworks, debugging tools) and workflow-skill state persistence, the Claude Code marketplace command
/plugin marketplace add apple/game-porting-toolkit, per-agent install documentation, command-line access for Metal tools letting agents capture, debug, and profile Metal workloads, and the evaluation environment’s Metal 4 support. Verified 2026-06-09. ↩↩↩↩↩↩↩