2026 AI & Machine LearningGraphics & Games
WWDC26 · 28 min · AI & Machine Learning / Graphics & Games
Speedrun your game port with agentic coding
Kickstart your game’s journey to Apple platforms with new agentic skills in Game Porting Toolkit 4 that can dramatically accelerate the process of porting your game. Explore how to work alongside your AI coding assistant to adopt Metal 4, integrate MetalFX, and tune your game for Apple hardware. Find out how agents can autonomously troubleshoot GPU rendering issues using Metal debugging tools, empowering you to focus on what matters most.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 5 snippets
Install Game Porting Toolkit skills
/plugin marketplace add apple/game-porting-toolkit
/plugin install game-porting-skills@game-porting-toolkit Register resources for residency
// With skill
residencySet->addAllocation(texture);
residencySet->commit();
// ...
argumentTable->setAddress(texture->gpuAddress(), bindPoint);
// Without skill
argumentTable->setAddress(texture->gpuAddress(), bindPoint); Query argument buffer offsets
// With skill
IRRootSignatureGetResourceLocations(m_MtlCurIRRootSig, locations);
size_t offset = locations[i].topLevelOffset;
// Without skill
size_t offset = paramIndex * descriptorSize; Map D3D12 states to Metal 4 stages
// With skill
m_MtlPendingProducerStages |= MtlProducerStageFromD3D12(OldState);
m_MtlPendingConsumerStages |= MtlConsumerStageFromD3D12(NewState);
// ...
m_ComputeEncoder->barrierAfterStages(
m_MtlPendingProducerStages,
m_MtlPendingConsumerStages,
MTL4::VisibilityOptionDevice);
// Without skill
m_ComputeEncoder->barrierAfterStages(
MTL::StageDispatch,
MTL::StageAll,
MTL4::VisibilityOptionDevice); Query shader reflection parameter count
// With skill
IRShaderReflection* refl = IRShaderReflectionCreate();
IRObjectGetReflection(compiledObj, IRShaderStageCompute, refl);
// ...
s_RootSignature.Reset(4, 2); // Reflection reveals: 4 params
// Without skill
s_RootSignature.Reset(5, 2); Resources
Related sessions
-
27 min