View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vidéos

Ouvrir le menu Fermer le menu
  • Collections
  • Toutes les vidéos
  • À propos

Plus de vidéos

  • À propos
  • Code
  • Optimize high-end games for Apple GPUs

    Optimize your high-end games for Apple GPUs: We'll show you how you can use our rendering and debugging tools to eliminate performance issues and make your games great on Apple platforms. Learn from our experiences working with developers at Larian Studios and 4A Games as we help them optimize their games for Apple GPUs.

    We'll explore various techniques for improving your game's performance, including optimizing shaders, reducing memory bandwidth utilization, and increasing the overlap of your GPU workloads. We'll also dive into the new GPU Timeline profiling tool in Xcode 13 to identify possible performance bottlenecks in “Divinity: Original Sin 2” when running on iPad.

    For this session, you should be familiar with the tile-based deferred rendering architecture in Apple GPUs, and have a working knowledge of Xcode and the Metal API.

    Check out “Discover Metal debugging, profiling, and asset creation tools” or the WWDC20 session “Optimize Metal apps and games with GPU counters” to learn more about using our tools to profile graphics workloads.

    Ressources

    • Debugging the shaders within a draw command or compute dispatch
    • Metal Performance Shaders
    • Metal
    • Metal Shading Language Specification
      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC21

    • Discover Metal debugging, profiling, and asset creation tools
    • Enhance your app with Metal ray tracing
    • Explore bindless rendering in Metal
    • Explore hybrid rendering with Metal ray tracing

    WWDC20

    • Harness Apple GPUs with Metal
    • Optimize Metal apps and games with GPU counters
  • Rechercher dans cette vidéo…
    • 15:24 - Pseudocode to choose shared and private buffer count

      // Number of frames application is processing
      static const uint32_t MAX_FRAMES_IN_FLIGHT = 3;
      
      uint32_t sharedBuffersCount  = 0; // Number of buffers with MTLStorageModeShared to create
      uint32_t privateBuffersCount = 0; // Number of buffers with MTLStorageModePrivate to create
      if (device.hasUnifiedMemory)
      {
    // Use extra buffer to reduce impact of completion handler
          sharedBuffersCount = MAX_FRAMES_IN_FLIGHT + 1;
          privateBuffersCount = 0;
      }
      else // GPUs with dedicated memory
      {
          sharedBuffersCount = MAX_FRAMES_IN_FLIGHT;
          privateBuffersCount = 1;
      }
      
      // Create shared buffers MTLStorageModeShared
      // If applicable, create private buffer
    • 21:40 - Pseudocode to avoid redundant bindings

      void Renderer::SetFragmentTexture(uint32_t index, id<MTLTexture> texture)
      {
          if (m_FragmentTextures[index] != texture)
          {
              m_FragmentTextures[index] = texture;
              m_FragmentTexturesChanged = true;
          }
      }
      
      void Renderer::BindFragmentTextures()
      {
          if (m_FragmentTexturesChanged)
          {
              [m_RenderCommandEncoder setFragmentTextures:m_FragmentTextures 
                                withRange:NSMakeRange(0, m_LastFragmentTexture + 1)];
      
              m_FragmentTexturesChanged = false;
          }
      }

Developer Footer

  • Vidéos
  • WWDC21
  • Optimize high-end games for Apple GPUs
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines