Quantcast
Jump to content


Recommended Posts

Posted

At GDC 2019, Arm and Samsung were joined on stage in the “All-in-One Guide to Vulkan on Mobile” talk to share their learning from helping numerous developers and studios in optimizing their Vulkan mobile games. In tandem, Arm released Vulkan Best Practices for Mobile Developers to address some of the most common challenges faced when coding Vulkan applications on mobile. It includes an expansive list of runnable samples with full source code available online.

This blog series delves in detail into each sample, investigates individual Vulkan features, and demonstrates best practices of how to use them.

Overview

Setting up a Vulkan swapchain involves picking between options that don’t have a straightforward connection to performance. The default options might not be the most efficient ones, and what works best on a desktop may be different from what works on mobile.

Looking at the VkSwapchainCreateInfoKHR struct, we identified three options that need a more detailed analysis:

  • presentMode: what does each present mode imply in terms of performance?
  • minImageCount: which is the best number of images?
  • preTransform: what does it mean, and what do we need to do about it?

This blog post covers the first two points, as they are both tied to the concept of buffering swapchain images. Surface transform is quite a complex topic that we’ll cover in a future post on the Arm community.

Choosing a present mode

Vulkan has several present modes, but mobile GPUs only support a subset of them. In general, presenting an image directly to the screen (immediate mode) is not supported.

The application will render an image, then pass it to the presentation engine via vkQueuePresentKHR. The presentation engine will display the image for the next VSync cycle, and then it will make it available to the application again.

The only present modes which support VSync are:

  • FIFO: VK_PRESENT_MODE_FIFO_KHR
  • MAILBOX: VK_PRESENT_MODE_MAILBOX_KHR

We will now each of these in more detail to understand which one is better for mobile.

Screen-Shot-2019-07-26-at-3.09.02-PM.png

Figure 1 shows an outline of how the FIFO present mode works. The presentation engine has a queue (or “FIFO”) of images, in this case, three of them. At each VSync signal, the image in front of the queue displays on screen and is then released. The application will acquire one of the available ones, draw to it and then hand it over to the presentation engine, which will push it to the back of the queue. You may be used to this behavior from other graphics APIs, double or triple buffering – more on that later!

An interesting property of the FIFO present mode is that if the GPU can process images really fast, the queue can become full at some point. When this happens, the CPU and the GPU will idle until an image finishes its time on screen and is available again. The framerate will be capped at a stable 60 fps, corresponding to VSync.

This idling behavior works well on mobile because it means that no unnecessary work is performed. The extra CPU and GPU budget will be detected by the DVFS (Dynamic Voltage and Frequency Scaling) system, which reduces their frequencies to save power at no performance cost. This limits overheating and saves battery life – even a small detail such as the present mode can have a significant impact on your users’ experience!

Let us take a look at MAILBOX now. The main difference, as you can see from Figure 2 below, is that there is no queue anymore. The presentation engine will now hold a single image that will be presented at each VSync signal.

Screen-Shot-2019-07-26-at-3.09.16-PM.png

The app can acquire a new image straight away, render to it, and present it. If an image is queued for presentation, it will be discarded. Mobile demands efficiency; hence, the word “discarded” should be a big red flag when developing on mobile – the aim should always be to avoid unnecessary work.

Since an image was queued for presentation, the framerate will not improve. What is the advantage of MAILBOX then? Being able to keep submitting frames lets you ensure you have the latest user input, so input latency can be lower versus FIFO.

The price you pay for MAILBOX can be very steep. If you don’t throttle your CPU and GPU at all, one of them may be fully utilized, resulting in higher power consumption. Unless you need low-input latency, our recommendation is to use FIFO.

Screen-Shot-2019-07-26-at-3.09.30-PM.png

Choosing the number of images

It is now clear that FIFO is the most efficient present mode for mobile, but what about minImageCount? In the context of FIFO, minImageCount differentiates between double and triple buffering, which can have an impact on performance.

The number of images you ask for needs to be bound within the minimum and maximum images supported by the surface (you can query these values via surface capabilities). You will typically ask for 2 or 3 images, but the presentation engine can decide to allocate more.

Let us start with double buffering. Figure 4 outlines the expected double-buffering behavior.

Screen-Shot-2019-07-26-at-3.09.45-PM.png

Double buffering works well if frames can be processed within 16.6ms, which is the interval between VSync signals at a rate of 60 fps. The rendered image is presented to the swapchain, and the previously presented one is made available to the application again.

What happens if the GPU cannot process frames within 16.6ms?

Screen-Shot-2019-07-26-at-3.09.59-PM.png

Double buffering breaks! As you can see from Figure 5, if no images are ready when the VSync signal arrives, the only option for the presentation engine is to keep the current image on screen. The app has to wait for another whole VSync cycle before it acquires a new image, which effectively limits the framerate to 30 fps. A much higher rate could be achieved if the GPU could keep processing frames. This may be ok for you if you are happy to limit framerate to 30 fps, but if you’re aiming for 60 fps, you should consider triple buffering.

Even if your app can achieve 60 fps most of the time, with double buffering the tiniest slowdown below 60 fps results in an immediate drop to 30 fps.

Screen-Shot-2019-07-26-at-3.10.12-PM.png

Figure 6 shows triple buffering in action. Even if the GPU has not finished rendering when VSync arrives, a previous frame is queued for presentation. This means that the presentation engine can release the currently displayed image and the GPU can acquire it as soon as it is ready.

In the example shown, triple buffering results in ~50 fps versus 30 fps with double buffering.

The sample

Our Vulkan Best Practice for Mobile Developers project on Github has a sample on swapchain images, that specifically compares double and triple buffering. You can check out the tutorial for the Swapchain Images sample.

Screen-Shot-2019-07-26-at-3.10.38-PM.png

 

Screen-Shot-2019-07-26-at-3.10.52-PM.png

As you can see from Figures 7 and 8, triple buffering lets the app achieve a stable 60 fps (16.6 ms frame time), providing x2 higher frame rate. When switching to double buffering the framerate drops.

We encourage you to check out the project on the Vulkan Mobile Best Practice GitHub page and try this or other samples for yourself! The sample code gives developers on-screen control to demonstrate multiple ways of using the feature. It also shows the performance impact of the different approaches through real-time hardware counters on the display. You are also warmly invited to contribute to the project by providing feedback and fixes and creating additional samples.

Please also visit the Arm Community for more in-depth blogs on the other Vulkan samples.

View the full blog at its source



  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Similar Topics

    • By Samsung Newsroom
      Samsung Electronics today unveiled its new AI-powered Interactive Display (WAFX-P model) at Bett 2025, Europe’s largest education technology exhibition. Through Samsung AI Assistant, the education-focused display combines advanced hardware and cutting-edge AI capabilities to create smarter learning environments that are more engaging and collaborative.
       
      “Samsung envisions a future where every classroom benefits from the transformative power of AI. By integrating advanced tools like generative AI and real-time transcription into our classroom displays with Samsung AI Assistant, we are not just enhancing learning — we are revolutionizing it,” said Hoon Chung, Executive Vice President of the Visual Display Business at Samsung Electronics. “We are committed to creating technology that inspires educators and students to explore, discover and grow together.”
       
       
      Transforming Classrooms With Samsung AI Assistant
      Samsung AI Assistant is a new educational solution built to adapt, engage and transform learning for the next generation. This dedicated teaching solution equips educators with intelligent, intuitive tools to organize lessons and transform traditional teaching into dynamic, interactive experiences that maximize learning outcomes.
       
      Samsung AI Assistant includes several innovative educational tools:
       
      Circle to Search instantly delivers search results from trusted sources when users simply circle on-screen images or text, making exploration during class effortless. AI Summary creates concise lesson recaps automatically, making lesson planning easier for teachers and simplifying post-class reviews for students. Live Transcript converts spoken words into text in real time for students to revisit and reinforce their classroom lessons.  

       
       
      Expanding Educational Opportunities Through Global Partnerships
      Samsung also plans to expand its AI services in the education market through partnerships with global AI companies.
       
      In collaboration with Google, Samsung aims to develop diverse and powerful AI scenarios for fostering digital classrooms of the future.
       
      The WAFX-P is Google EDLA-certified,1 as well, providing seamless access to services like Google Classroom and Google Drive, which further enrich the educational experience. With these features, Samsung’s AI Interactive Display acts as a powerful teaching assistant, fostering exploration and collaboration.
       
       
      Advanced Technology for AI-Powered Learning
      With 65”, 75” and 86” options, the full WAFX-P lineup supports powerful AI capabilities, with advanced hardware to deliver a seamless user experience. A neural processing unit (NPU) capable of performing up to 4.8 trillion operations per second ensures smooth operation of its AI features. Additional specifications include 16GB of RAM, 128GB of SSD storage and an octa-core CPU, collectively enabling efficient multitasking and resource-heavy educational applications. Its 450-nit max brightness, built-in 4K camera, microphone and 20-watt speaker create an immersive, multimedia-ready environment for video conferencing and collaborative learning.
       

       
      The WAFX-P is a versatile interactive display powered by Android 15 that includes software features to organize and maximize learning outcomes. Smart Note-On allows seamless transitions between handwriting and digital content, and File Converter simplifies the conversion of various file formats to enhance the display’s functionality and streamline workflows.
       
       
      Samsung’s Commitment to Long-Term Support
      In line with its commitment to empowering education, Samsung will continue to support its previous-generation displays, ensuring that the 2024 WAF series remains compatible with the new AI-based, interactive functionalities. This approach underscores the company’s commitment to delivering enduring value and innovation to educational institutions worldwide.
       
      Samsung looks forward to seeing its peers, customers and partners in person at booth #NE20 at Bett 2025. To learn more about Samsung’s interactive displays, please visit http://samsung.com.
       
       
      1 Enterprise Devices Licensing Agreement, a program Google introduced at the end of 2022 to help solutions providers offer devices with built-in Google Mobile Services.
      View the full article
    • By Samsung Newsroom
      Samsung Electronics today announced a partnership with game developers Nexon Korea and Neople to deliver unparalleled 3D experiences in the upcoming game ‘The First Berserker: Khazan.’ The game’s 3D elements are being specially customized and designed during development, utilizing Samsung technology and the advanced capabilities of the Odyssey 3D monitor to create an immersive 3D gaming experience.
       
      Through this partnership, Nexon, Neople and Samsung have been working closely to tailor the 3D visuals, carefully adjusting them based on the composition of characters, backgrounds and cinematics throughout the game. This process gives the developers an unprecedented level of control over the 3D effects, enabling them to bring their creative visions to life with precision.
       
      “The partnership between Samsung and Nexon will provide an unmatched gaming experience with ‘The First Berserker: Khazan’ on the Odyssey 3D monitor,” said Yongjae Kim, Executive Vice President of the Visual Display Business at Samsung Electronics. “We’ll continue to expand partnerships with premium gaming companies across the globe to deliver 3D gaming technology that provides the highest level of gaming immersion.”
       
      By fine-tuning the focal distance for 3D effects on a case-by-case basis, Nexon and Neople aim to develop specific scenarios that determine when and how elements become 3D. These efforts reduce crosstalk — a common issue causing visual overlap — while enhancing the clarity of epic boss battles and cinematic cutscenes.
       
      “This partnership marks a significant step in establishing a competitive 3D gaming model on a global scale, driving innovation across the whole industry,” said Choi Sung-wook, head of the publishing live division at Nexon. “We are excited for gamers worldwide to experience the vibrant graphics and intricate gameplay of ‘The First Berserker: Khazan,’ made possible by the cutting-edge technologies available to our developers and the industry-leading Samsung Odyssey gaming monitor.”
       
      ‘The First Berserker: Khazan’ is a hardcore action RPG (role playing game) where players experience Khazan’s legendary journey firsthand, immersing themselves in the world of Nexon’s leading franchise — the Dungeon & Fighter Universe. The game is set for global release on March 28 KST.
       
      The Odyssey 3D, unveiled at CES 2024 and recognized with the prestigious Best of Innovation award, will launch worldwide in April, delivering groundbreaking 3D technology that elevates gaming for players globally.
      View the full article
    • By Samsung Newsroom
      Samsung Electronics, a global leader in display technology, today announced it will showcase its highly anticipated 2025 hotel TV lineup at Integrated Systems Europe (ISE) 2025 in Barcelona. The new lineup combines sophisticated designs, cutting-edge in-room entertainment features and a unified platform, reinforcing Samsung’s commitment to redefining the premium hotel experience.
       
      “Our 2025 hotel TV lineup is designed to elevate the guest experience with personalization at its core,” said Hoon Chung, Executive Vice President of Visual Display Business at Samsung Electronics. “Hotels can customize their room’s ambiance with The Frame’s Art Mode, offer seamless streaming with Apple Airplay and the newly added Google Cast, and enable convenient control of the room environment through SmartThings Pro, all tailored to individual guest preferences.”
       
       
      Redefining Hotel Aesthetics With The Frame

      Samsung’s 2025 lineup introduces the award-winning The Frame (model name HL03F)1 as a hotel TV, bringing stunning 4K QLED picture quality with vivid colors, deep contrasts and lifelike visuals to every room, all while maintaining a sleek and sophisticated design that transforms interiors. With its innovative Art Mode, The Frame allows hotel managers to customize guest rooms and surroundings by displaying a curated selection of modern or classic artwork — or even other tailored images such as hotel-branded visuals — when the TV is not in use.
       
      Combined with an Anti-Reflection Matte Display that limits light interference and a Slim-Fit Wall Mount that enables the TV to sit flush against the wall like a true art piece, The Frame elevates hotel aesthetics with a unique blend of luxury and personalization.
       
      As the official visual display sponsor of Art Basel, The Frame reflects Samsung’s dedication to combining cutting-edge technology with timeless design. Its introduction sets a new benchmark for hotels seeking to deliver a refined, personalized and visually captivating experience for their guests.
       
       
      Enhancing Guest Experiences With Google Cast for Seamless Streaming
      ▲ Google Cast is a trademark of Google LLC.
       
      Samsung’s 2025 hotel TV lineup, along with the 2024 HBU8000, takes in-room entertainment to the next level by supporting Google Cast2 for secure, seamless, in-room streaming. Guests will be able to easily cast their favorite content directly from their Android and iOS devices to the TV without the need for additional dongles or login requirements. The connection process is quick and straightforward, utilizing QR codes for instant pairing.
       
      “We’re thrilled to bring Google Cast to Samsung TVs, extending the convenience of seamless content sharing to both hospitality and consumer models,” said Tiger Lan, Google’s Senior Director of engineering for multi-device experiences. “Whether guests are enjoying their favorite shows and playlists on hotel TVs or streaming effortlessly at home, this collaboration ensures users have reliable, personalized access to their content wherever they are.”
       
      The lineup also supports Apple AirPlay,3 allowing hotel guests to securely connect their iOS and iPadOS devices to the TVs in their rooms for an effortless streaming experience.

       
      Unlike traditional systems, both Apple Airplay and Google Cast can be used independently of third-party system integrator (SI) requirements, simplifying installation for hotels and reducing infrastructure demands. Furthermore, Samsung ensures robust privacy by ensuring that no personal information or device pairing data is stored, giving guests complete peace of mind during their stay.
       
       
      Streamlining Hotel Operations With a Connected Ecosystem
      Samsung’s 2025 hotel TV lineup introduces a fully connected ecosystem designed to enhance operations and elevate guest experiences. With Tizen 9.0, guests benefit from an intuitive and seamless interface that simplifies access to streaming apps, smart room controls and personalized services, creating a more enjoyable and connected stay.
       
      For hotel operators, LYNK Cloud offers a powerful cloud-based solution that combines customizable content delivery, remote device management and over-the-top (OTT) entertainment. Equipped with an e-commerce platform, it enables guests to perform service interactions such as ordering room service, booking hotel amenities and accessing a digital concierge. Simultaneously, hotel managers gain valuable insights to personalize guest content and deploy targeted promotions across rooms or properties globally, driving operational efficiency and guest satisfaction.
       
      SmartThings Pro further strengthens IoT connectivity by enabling secure and centralized control of Samsung Hospitality TVs, Smart Signage, air conditioning systems and more. With a scalable dashboard and customizable application programming interfaces (APIs), SmartThings Pro allows hotel IT teams to monitor performance, manage devices across multiple units and seamlessly integrate with existing systems.
       
       
      1 The functionality of The Frame in the hotel TV lineup may vary from the consumer version.
      2 Google Cast is a trademark of Google LLC. Google Cast supports Android 6 and above, and iOS 14 and above. Availability may vary by device, software version and region.
      3 AirPlay is compatible with iOS 11, iPadOS 13, macOS Mojave 10.14 and later versions. Availability may vary by device, software version and region.
      View the full article
    • By Samsung Newsroom
      Samsung Electronics today introduced its latest advancements in home audio technology with the new Q-series (HW-Q990F and HW-QS700F) soundbars These flagship models combine state-of-the-art hardware with intelligent AI-driven features, designed to elevate home entertainment with unparalleled sound
       
      “Our new soundbars combine exceptional audio quality with seamless convenience,” said Hun Lee, Executive Vice President of the Visual Display Business at Samsung Electronics. “With advanced AI technology in the HW-Q990F and the HW-QS700F’s innovative convertible design, these soundbars effortlessly adapt to any environment, delivering an immersive and personalized audio experience for every user.”
       
       
      HW-Q990F: Redefining Flagship Audio Performance

       
      As the successor to the highly acclaimed HW-Q990D, the HW-Q990F takes home audio to new heights. It features newly engineered dual active subwoofers that deliver robust bass and ultra-low-frequency precision. Plus, a new cube design reduces the subwoofers to half the size of its predecessor, minimizing resonance and blending flawlessly into modern interiors with a refined serrated finish.
       

       
      The HW-Q990F also delivers advanced AI-driven sound optimization through features such as:
       
      Dynamic Bass Control: Enhances clarity in low-frequency ranges by utilizing non-linear bass management for balanced and distortion-free sound. Q-Symphony: Immerses the user in 3D surround sound by detecting the position of wireless speakers like the Music Frame and automatically optimizing audio effects based on its distance and angle. Active Voice Amplifier Pro: Provides real-time content analysis that reduces background noise and emphasizes dialogue for an enhanced viewing experience.  
      Additionally, the HW-Q990F utilizes the Samsung TV’s Neural Processing Unit (NPU) in Q-Symphony mode, making dialogue clearer and delivering more immersive, synchronized audio.
       
       
      HW-QS700F: Versatility Meets Elegance and Superior Sound

       
      The HW-QS700F offers even more versatility in home audio with its sleek design and innovative gyro-sensor technology. Suitable for both wall-mounted and tabletop setups, this soundbar adapts to the user’s space. Its built-in gyro-sensor can automatically detect whether it’s positioned vertically or horizontally, fine-tuning the audio output to ensure optimal clarity and immersive sound in any configuration.
       

       
      With its slim, modern profile, the HW-QS700F integrates into any room. Its adaptive design offers flexibility without compromising style, making it the perfect companion for a cinematic wall-mounted display or a minimalist tabletop setup. This soundbar delivers an audio experience as sophisticated as its design — ideal for users who demand both elegance and performance.
       
      For more information, visit Samsung.com.
      View the full article
    • By Samsung Newsroom
      Samsung Electronics announced today that its Neo QLED and Lifestyle TVs have been awarded EyeCare Circadian certification by Verband Deutscher Elektrotechniker (VDE), a leading electrical engineering certification institute in Germany. This achievement highlights Samsung’s commitment to developing technology that supports natural circadian rhythms, promoting well-being and visual comfort.
       
      “This certification underscores our dedication to creating products that elevate the user experience by prioritizing eye comfort and reducing visual strain, all while delivering exceptional picture quality,” said Taeyong Son, Executive Vice President of Visual Display Business at Samsung Electronics. “We will continue to drive innovations that anticipate and adapt to users’ evolving needs, offering both immersive entertainment and sustainable long-term comfort.”
       
      The certification covers major models across the Neo QLED and Lifestyle lineups, including The Frame and The Serif. Six critical criteria are evaluated when determining when a product is fit for certification: Safety for Eyes, Gentle to the eyes, Flicker Level, Uniformity, Color Fidelity and Circadian Stimulus (CS) index — a framework designed to assess visual comfort and circadian rhythm alignment.
       
      Central to Samsung’s achievement is EyeComfort Mode, which automatically adjusts luminance and color temperature based on time of day and ambient lighting conditions. By simulating natural light patterns, the mode reduces strain during daytime viewing and fosters a restful nighttime environment, aligning with the body’s natural rhythms.
       
      This certification adds to a series of recognitions for Samsung TVs, highlighting their user-centric products and features. The Neo QLED series previously earned VDE’s Circadian Rhythm Display certification, while Samsung’s Lifestyle TVs received Glare-Free verification from Underwriters Laboratories (UL) for reducing visual strain. Additionally, for their exceptional color accuracy, Samsung TVs are Pantone Validated.
      View the full article





×
×
  • Create New...