Skip to content
Games & CGI
  • GPUOpen
  • Games & CGI
  • Professional Compute
  • Archive
  • Like
    Radeon GPU Profiler 1.3

    Radeon GPU Profiler 1.3 First, happy birthday to RGP! We released 1.0 publicly almost exactly a year ago at the time of writing, something I’ve …

    8 0 08/31/2018
    Decoding Radeon Vulkan versions

    There are traditionally just two hard problems in computer science — naming things, cache invalidation, and off-by-1 errors — but I’ve long thought that there …

    7 0 08/02/2018
    Porting your engine to Vulkan or DX12

    Adam Sawicki, a member of AMD RTG’s Game Engineering team, has spent the best part of a year assisting one of the world’s biggest game …

    16 1 07/06/2018
    Understanding GPU context rolls

    If you’ve ever heard the term “context roll” in the context of AMD GPUs — I’ll do that a lot in this post, sorry in …

    19 1 06/29/2018
    Microsoft PIX Introduces AMD-Integrated Plug-In with Occupancy Data Graph

    Microsoft PIX is the premiere integrated performance tuning and debugging tool for Windows game developers using DirectX 12.  PIX enables developers to debug and analyze …

    3 0 06/26/2018
    GDC 2018 Presentation Links

    With GDC 2018 done and dusted, we thought it’d be valuable to reemphasise that all of the presented content from the Advanced Graphics Techniques Tutorial …

    6 0 06/07/2018
    AMD GPU Services 5.2.0

    The AMD GPU Services (AGS) library provides game and application developers with the ability to query information about installed AMD GPUs and their driver, in …

    4 0 05/31/2018
    Radeon GPU Profiler 1.2

    Radeon GPU Profiler 1.2 At GDC 2018 we talked about a new version of RGP that would interoperate with RenderDoc, allowing the two tools to …

    8 0 05/25/2018
    Compressonator V3.0 Release Brings Powerful New 3D Model Features

    Compressonator is a set of tools that allows artists and developers to work easily with compressed assets and easily visualize the quality impact of various …

    5 0 05/14/2018
    TrueAudio Next Version 1.2 Now Posted to Github

    We have posted the version 1.2 update to the TrueAudio Next open-source library to Github. It is available here. This update has a number of …

    6 2 05/10/2018
    Reducing Vulkan API call overhead

    Vulkan™ is designed to have significantly smaller CPU overhead compared to other APIs like OpenGL®. This is achieved by various means – the API is …

    25 0 04/26/2018
    First steps when implementing FP16

    Introduction Half-precision (FP16) computation is a performance-enhancing GPU technology long exploited in console and mobile devices not previously used or widely available in mainstream PC …

    11 0 04/20/2018
    GDC 2018 Presentation: Real-Time Ray-Tracing Techniques for Integration into Existing Renderers

    Real Time Ray Tracing was one of the hottest topics last week at GDC 2018. In this presentation, AMD Software Development Engineer and architect of Radeon …

    13 0 03/29/2018
    Real-Time Ray Tracing with Radeon ProRender

    The level of visual detail required of CAD models for the automotive industry or the most advanced film VFX requires a level of visual accuracy …

    29 4 03/20/2018
    GDC 2018 Presentations

    If you’re into the state of the art in games, especially real-time gaming graphics, your eyes will undoubtedly be on Moscone Center in San Francisco, …

    13 5 02/19/2018
    TrueAudio Next is Now Integrated into Steam Audio

    The long wait is over. The GPU processing power of TrueAudio Next (TAN) has now been integrated into Steam Audio from Valve (Beta 13 release). …

    8 3 02/09/2018
    Radeon GPU Profiler 1.1.1

    Radeon GPU Profiler 1.1.1 With GDC 2018 getting ever closer, we wanted to get one last minor release of RGP out before things get hectic …

    5 0 02/07/2018
    Radeon GPU Profiler 1.1.0

    Radeon GPU Profiler 1.1.0 It feels like just last week that we released Radeon GPU Profiler (RGP) 1.0.3 but my calendar says almost 2 months …

    20 0 12/12/2017
    Deferred Path Tracing By Enscape

    Insights from Enscape as to how they designed a renderer that produces path traced real time global illumination and can also converge to offline rendered image quality

    17 0 12/06/2017
    Compressonator V2.7 Release adds cross platform support and 3D Model compression with glTF v2.0

    We are excited to announce the release of Compressonator V2.7! This version contains several new features and optimizations, including: Cross Platform Support Due to popular demand, …

    5 1 11/27/2017
    Radeon GPU Profiler 1.0.3

    Radeon GPU Profiler 1.0.3 A couple of months on from the release of 1.0.2, we’ve fully baked and sliced 1.0.3 for your low-level DX12- and …

    11 0 10/18/2017
    AMD GPU Services 5.1.1

    The AMD GPU Services (AGS) library provides game and application developers with the ability to query information about installed AMD GPUs and their driver, in …

    7 1 09/27/2017
    CPU core count detection on Windows

    Due to architectural differences between Zen and our previous processor architecture, Bulldozer, developers need to take care when using the Windows® APIs for processor and core enumeration. …

    18 2 09/14/2017
    Stable barycentric coordinates

    The AMD GCN Vulkan extensions allow developers to get access to some additional functionalities offered by the GCN architecture which are not currently exposed in the Vulkan API. One of these is the ability to access the barycentric coordinates at the fragment-shader level.

    9 0 08/30/2017
    Radeon GPU Profiler 1.0.2

    Thanks (again!) Before we dive into a run over the release notes for the 1.0.2 release of Radeon GPU Profiler, we’d like to thank everyone …

    14 0 08/22/2017
    AMD Vega Instruction Set Architecture documentation

    Understanding the instruction-level capabilities of any processor is a worthwhile endeavour for any developer writing code for it, even if the instructions that get executed …

    24 7 08/10/2017
    Understanding Vulkan objects

    An important part of learning the Vulkan API – just like any other API – is to understand what types of objects are defined in it, what they represent and how they relate to each other. To help with this, we’ve created a diagram that shows all of the Vulkan objects and some of their relationships, especially the order in which you create one from another.

    36 1 08/07/2017
    Open-source Radeon ProRender

    Summary In this blog post we are announcing the open-source availability of the Radeon™ ProRender renderer, an implementation of the Radeon ProRender API. We will give …

    22 1 07/30/2017
    Radeon GPU Profiler 1.0

    Introduction and thanks Effective GPU performance analysis is a more complex proposition for developers today than it ever has been, especially given developments in how …

    27 8 07/26/2017
    TressFX 4 Simulation Changes

    TressFX 4 introduces a number of improvements. This blog post focuses on three of these, all of which are tied to simulation: Bone-based skinning Signed distance …

    15 1 07/20/2017
    Vulkan Memory Allocator 1.0

    Full application control over GPU memory is one of the major differentiating features of the newer explicit graphics APIs such as Vulkan® and Direct3D® 12. …

    12 0 07/10/2017
    Compressonator V2.6 Release Adds HDR Tonemapping Compression, New Image Analysis Features

    We are excited to announce the release of Compressonator V2.6. This version contains several new features and optimizations, including: Adaptive Format Conversion for general transcoding operations …

    5 0 07/03/2017
    Vega Frontier : How to for developers

    When getting a new piece of hardware, the first step is to install the driver. You can see how to install them for the Radeon …

    4 0 06/29/2017
    Vega Frontier : How to install the driver

    In this blog we will go through the installation process of the driver for your new Radeon Vega Frontier card. We will go through the …

    4 5 06/29/2017
    Optimizing GPU occupancy and resource usage with large thread groups

    When using a compute shader, it is important to consider the impact of thread group size on performance. Limited register space, memory latency and SIMD occupancy each affect shader performance in different ways. This article discusses potential performance issues, and techniques and optimizations that can dramatically increase performance if correctly applied.

    51 6 05/24/2017
    DirectX12 Hardware Counter Profiling with Microsoft PIX and the AMD Plugin

    The AMD Developer Tools team is thrilled to announce the availability of the AMD plugin for Microsoft’s PIX for Windows tool. PIX is a performance …

    11 0 05/17/2017
    CodeXL 2.3 is released!

    A new version of the CodeXL open-source developer tool is out! Here are the major new features in this release: CPU Profiling Support for AMD …

    6 0 05/10/2017
    Content Creation Tools and Multi-GPU

    When it comes to multi-GPU (mGPU), most developers immediately think of complicated Crossfire setups with two or more GPUs and how to make their game …

    8 0 05/05/2017
    Capsaicin and Cream developer talks at GDC 2017

    Introduction Shortly after our Capsaicin and Cream event at GDC this year where we unveiled Radeon RX Vega, we hosted a developer-focused event designed to …

    6 0 04/05/2017
    Compressonator V2.5 Release Adds Enhanced HDR Support

     BC6 HDR Compression The BC6H codec has been improved and now offers better quality then previous releases, along with support for both 16 bit Half …

    4 0 03/29/2017
    Live VGPR Analysis with Radeon GPU Analyzer

    This article explains how to use Radeon GPU Analyzer (RGA) to produce a live VGPR analysis report for your shaders and kernels. Basic RGA usage …

    10 5 03/21/2017
    The Radeon Loom Stitching Pipeline

    I’m Mike Schmit, Director of Software Engineering with the Radeon Technologies Group at AMD. I’m leading the development of a new open-source 360-degree video-stitching framework …

    9 3 03/15/2017
    AMD LiquidVR MultiView Rendering in Serious Sam VR

    AMD LiquidVR MultiView Rendering in Serious Sam VR with the GPU Services (AGS) Library AMD’s MultiView Rendering feature reduces the number of duplicated object draw …

    9 1 02/27/2017
    TrueAudio Next Demo and Paper at GameSoundCon

    In 2016, AMD brought TrueAudio Next to GameSoundCon. GameSoundCon was held Sept 27-28 at the Millennium Biltmore Hotel in Los Angeles. GameSoundCon caters to game …

    4 2 02/24/2017
    Profiling video memory with Windows Performance Analyzer

    Budgeting, measuring and debugging video memory usage is essential for the successful release of game titles on Windows. As a developer, this can be efficiently achieved with the …

    12 0 02/09/2017
    GDC 2017 Presentations

    Another year, another Game Developer Conference! GDC is held earlier this year (27 February – 3 March 2017) which is leaving even less time for …

    16 5 02/01/2017
    AGS 5.0 – Shader Compiler Controls

    With the launch of AGS 5.0 developers now have access to the shader compiler control API.  Here’s a quick summary of the how and why…. Background …

    18 0 01/12/2017
    Optimizing Terrain Shadows

    There are many games out there taking place in vast environments. The basic building block of every environment is height-field based terrain – there’s no …

    12 2 12/15/2016
    Leveraging asynchronous queues for concurrent execution

    Understanding concurrency (and what breaks it) is extremely important when optimizing for modern GPUs. Modern APIs like DirectX® 12 or Vulkan™ provide the ability to …

    37 12 12/01/2016
    Selecting the Best Graphics Device to Run a 3D Intensive Application

    Summary Many Gaming and workstation laptops are available with both (1) integrated power saving and (2) discrete high performance graphics devices. Unfortunately, 3D intensive application …

    10 2 11/16/2016
    Vulkan and DOOM

    This post is taking a look at some of the interesting bits of helping id Software with their DOOM® Vulkan™ effort, from the perspective of …

    17 1 11/10/2016
    Implementing LiquidVR™ Affinity Multi-GPU support in Serious Sam VR

    This blog is guest authored by Croteam developer Karlo Jez and he will be giving us a detailed look at how Affinity Multi-GPU support was …

    12 0 10/31/2016
    AMD Driver Symbol Server

    When opening a 64-bit crash dump you will find that you will not necessarily get a sensible call stack. This is because 64-bit crash dumps …

    38 7 10/27/2016
    Vulkan barriers explained

    Vulkan™’s barrier system is unique as it not only requires you to provide what resources are transitioning, but also specify a source and destination pipeline …

    28 10 10/18/2016
    VDR Follow Up – Tonemapping for HDR Signals

    This is the third post in the follow up series to my prior GDC talk on Variable Dynamic Range. Prior posts covered dithering, today’s topic …

    8 0 10/05/2016
    Using RapidFire for Virtual Desktop and Cloud Gaming

    Virtual desktop infrastructure systems and cloud gaming are increasingly gaining popularity thanks to an ever more improved internet infrastructure. This gives more flexibility to the …

    8 0 09/27/2016
    AMD TrueAudio Next and CU Reservation – What is the Context?

    As noted in my previous blog, new innovations in virtual reality have spearheaded a renewed interest in audio processing, and many new as well as …

    28 0 09/26/2016
    Anatomy Of The Total War Engine: Part V

    This week marks the last in the series of our regular Warhammer Wednesday blog posts. We’d like to extent our thanks to Creative Assembly’s Lead …

    13 0 08/22/2016
    The Importance of Audio in VR

    Audio Must be Consistent With What You See Virtual reality demands a new way of thinking about audio processing. In the many years of history …

    10 8 08/16/2016
    Anatomy Of The Total War Engine: Part IV

    Happy Warhammer Wednesday! This week Creative Assembly’s Lead Graphics Programmer Tamas Rabel talks about how Total War: Warhammer utilized asynchronous compute to extract some extra …

    8 0 08/16/2016
    Anatomy Of The Total War Engine: Part III

    It’s Wednesday, so we’re continuing with our series on Total War: Warhammer. Here’s Tamas Rabel again with some juicy details about how Creative Assembly brought …

    16 2 08/10/2016
    Blazing CodeXL 2.2 is here!

    A new release of the CodeXL open-source developer tool is out! Here’s the hot new stuff in this release: New platforms support Support Linux systems …

    21 5 08/08/2016
    Anatomy Of The Total War Engine: Part II

    We’re back again on this fine Warhammer Wednesday with more from Tamas Rabel, Lead Graphics Programmer on the Total War series. In last week’s post …

    6 1 08/03/2016
    Anatomy Of The Total War Engine: Part I

    For the next few weeks we’ll be having a regular feature on GPUOpen that we’ve affectionately dubbed “Warhammer Wednesdays”. We’re extremely lucky to have Tamas Rabel, …

    12 10 07/27/2016
    Texel Shading

    Game engines do most of their shading work per-pixel or per-fragment. But there is another alternative that has been popular in film for decades: object …

    24 3 07/21/2016
    Vulkan Device Memory

    EDIT: 2016/08/08 – Added section on Targeting Low-Memory GPUs This post serves as a guide on how to best use the various Memory Heaps and …

    35 2 07/21/2016
    Performance Tweets Series: Root signature & descriptor sets

    Before Direct3D® 12 and Vulkan™, resources were bound to shaders through a “slot” system. Some of you might remember when hardware did have only very …

    4 8 07/14/2016
    Performance Tweets Series: Multi-GPU

    Multi-GPU systems are much more common than you might think. Most of the time, when someone mentions mGPU, you think about high-end gaming machines with …

    14 2 07/05/2016
    Compressonator v2.3 Release Delivers ASTC, ETC2 Codec Support and GPU Rendered Image Views

    Compressonator is a set of tools to allow artists and developers to more easily create compressed texture image assets and easily visualize the quality impact …

    10 0 06/27/2016
    Performance Tweets Series: Debugging & Robustness

    Prior to explicit graphics APIs a lot of draw-time validation was performed to ensure that resources were synchronized and everything set up correctly. A side-effect of this robustness …

    6 0 06/22/2016
    Performance Tweets Series: Rendering and Optimizations

    Direct3D® 12 and Vulkan™ significantly reduce CPU overhead and provide new tools to better use the GPU. For instance, one common use case for the …

    3 0 06/14/2016
    Performance Tweets Series: Streaming & Memory Management

    As promised, we’re back and today I’m going to cover how to get resources to and from the GPU. In the last post, we learned …

    5 0 06/07/2016
    CodeXL 2.1 is out and Searing hot with Vulkan

    A new CodeXL release is out! For the first time the AMD Developer Tools group worked on this release on the CodeXL GitHub public repository, …

    20 0 05/31/2016
    ShadowFX Effect Library for DirectX 12

    Today, we are excited to announce that we are releasing an update for ShadowFX that adds support for DirectX® 12. Features Different shadowing modes Union of …

    12 1 05/26/2016
    Turbocharge your Graphics and GPU Compute Applications with GPUPerfAPI

    Achieving high performance from your Graphics or GPU Compute applications can sometimes be a difficult task. There are many things that a shader or kernel …

    13 3 05/25/2016
    GCN Shader Extensions for Direct3D and Vulkan

    The GCN architecture contains a lot of functionality in the shader cores which is not currently exposed in current APIs like Vulkan™ or Direct3D® 12. One …

    21 11 05/24/2016
    AMD DOPPEngine – Post Processing on Your Desktop in Practice

    A Complete Tool to Transform Your Desktop Appearance After introducing our Display Output Post Processing (DOPP) technology, we are introducing a new tool to change …

    33 0 05/23/2016
    Fast compaction with mbcnt

    Compaction is a basic building block of many algorithms – for instance, filtering out invisible triangles as seen in Optimizing the Graphics Pipeline with Compute. …

    14 8 05/20/2016
    TressFX 3.1

    We are releasing TressFX 3.1. Our biggest update in this release is a new order-independent transparency (OIT) option we call “ShortCut”. We’ve also addressed some of …

    10 4 05/19/2016
    GeometryFX 1.2 – Cluster Culling

    Today’s update for GeometryFX introduces cluster culling. Previously, GeometryFX worked on a per-triangle level only. With cluster culling, GeometryFX is able to reject large chunks …

    7 7 05/18/2016
    Unlock the Rasterizer with Out-of-Order Rasterization

    Full-speed, out-of-order rasterization If you’re familiar with graphics APIs, you’re certainly aware of the API ordering guarantees. At their core, these guarantees mean that if …

    15 6 05/17/2016
    AMD FireRays 2.0 – Open Sourcing and Customizing Ray Tracing for Efficient Hardware Platforms Support

    A New Milestone After the success of the first version, FireRays is moving to another major milestone. We are open sourcing the entire library which …

    30 2 05/16/2016
    Slides from our “The most common Vulkan mistakes” talk

    Last week, we organized a two hours-long talk at University of Lodz in Poland where we discussed the most common mistakes we come across in Vulkan applications. Dominik Witczak, …

    8 5 05/13/2016
    Compressonator (AMD Compress) is Going Open Source

    We are very pleased to be announcing that AMD is open-sourcing one of our most popular tools and SDKs.  Compressonator (previously released as AMD Compress …

    17 0 05/12/2016
    AMD Crossfire API

    Gaming at optimal performance and quality at high screen resolutions can sometimes be a demanding task for a single GPU. 4K monitors are becoming mainstream and gamers …

    19 5 05/05/2016
    AMD GPU Services, an introduction

    If you have supported Crossfire™ or Eyefinity™ in your previous titles, then you have probably already used our AMD GPU Services (AGS) library.  A lot of …

    17 1 04/28/2016
    Performance Tweets Series: Resource Creation

    Resource creation and management has changed dramatically in Direct3D® and Vulkan™ compared to previous APIs. In older APIs, memory is managed transparently by the driver. …

    8 0 04/20/2016
    CodeXL 2.0 is Here and Open Source

    CodeXL major release 2.0 is out! It is chock-full of new features and a drastic change in the CodeXL development model: CodeXL is now open …

    26 6 04/19/2016
    VDR Follow Up – Grain and Fine Details

    The prior post in this series established a base technique for adding grain, and now this post is going to look at very subtle changes to …

    3 0 04/13/2016
    Performance Tweets Series: Shaders, Threading, Compiling

    Welcome back to our performance & optimization series. Today, we’ll be looking more closely at shaders. On the surface, it may look as if they …

    12 1 04/06/2016
    VDR Follow Up – Fine Art of Film Grain

    This is the first of a series of posts expanding on the ideas presented at GDC in the Advanced Techniques and Optimization of VDR Color …

    8 1 04/04/2016
    GDC 2016 Presentations Available

    The Game Developer Conference 2016 was an event of epic proportions. Presentations, tutorials, round-tables, and the show floor are only one part of the story …

    8 2 03/30/2016
    GCN Memory Coalescing

    This post describes how GCN hardware coalesces memory operations to minimize traffic throughout the memory hierarchy. The post uses the term “invocation” to describe one …

    13 1 03/21/2016
    Delta Color Compression Overview

    Bandwidth is always a scarce resource on a GPU. On one hand, hardware has made dramatic improvements with the introduction of ever faster memory standards …

    25 10 03/14/2016
    Using the Vulkan™ Validation Layers

    Vulkan™ provides unprecedented control to developers over generating graphics and compute workloads for a wide range of hardware, from tiny embedded processors to high-end workstation GPUs with wildly different …

    42 6 03/09/2016
    GDC 2016 Presentations

    The Game Developer Conference 2016 (GDC16) is held March 14-18 in the Moscone Center in San Francisco. This is the most important event for game developers, …

    36 0 02/29/2016
    Performance Tweets series: Barriers, fences, synchronization

    Welcome back to our DX12 series! Let’s dive into one of the hottest topics right away: synchronization, that is, barriers and fences! Barriers A barrier is …

    15 1 02/22/2016
    Vulkan Renderpasses

    Vulkan™ is a high performance, low overhead graphics API designed to allow advanced applications to drive modern GPUs to their fullest capacity. Where traditional APIs …

    58 0 02/16/2016
    Say Hello to a New Rendering API in Town!

    Imagine that you were asked one day to design an API with bleeding-edge graphics hardware in mind. It would need to be as efficient as …

    45 3 02/16/2016
    Performance Tweets Series: Command lists

    Hello and welcome to our series of blog posts covering performance advice for Direct3D® 12 & Vulkan™. You may have seen the #DX12PerfTweets on Twitter, and …

    11 1 02/10/2016
    Fetching From Cubes and Octahedrons

    For GPU-side dynamically generated data structures which need 3D spherical mappings, two of the most useful mappings are cubemaps and octahedral maps. This post explores …

    10 0 02/04/2016
    It’s Time to Open up the GPU

    I have met enough game developers in my professional life to know that these guys are among the smartest people on the planet. Those particular individuals will go …

    412 34 01/26/2016
    Up and Running with CodeXL Analyzer CLI

    About CodeXL Analyzer CLI CodeXL Analyzer CLI is an offline compiler and performance analysis tool for OpenCL™ kernels, DirectX® shaders and OpenGL® shaders. Using CodeXL …

    24 0 01/26/2016
    Create Your own GPU PerfStudio DirectX® 12 Plugin

    GPU PerfStudio supports DirectX® 12 on Windows® 10 PCs. The current tool set for DirectX 12 comprises of an API Trace, a new GPU Trace …

    10 0 01/26/2016
    Maxing out GPU usage in nBodyGravity

    Today we’re going to take a look at how asynchronous compute can help you to get the maximum out of a GPU. I’ll be explaining …

    26 6 01/26/2016
    Have You Tootled Your 3D Models?

    What’s New With the recent adoption of new APIs such as DirectX® 12 and Vulkan™, we are seeing renewed interest in an older tool.  AMD …

    35 0 01/26/2016
    Optimized Reversible Tonemapper for Resolve

    A typical problem with MSAA Resolve mixed with HDR is that a single sample with a large HDR value can over-power all other samples, resulting …

    18 1 01/26/2016

    Understanding Vulkan objects

    Posted on August 7, 2017August 7, 2017 by Adam Sawicki
    GPU, Vulkan

    An important part of learning the Vulkan® API – just like any other API – is to understand what types of objects are defined in it, what they represent and how they relate to each other. To help with this, we’ve created a diagram that shows all of the Vulkan objects and some of their relationships, especially the order in which you create one from another.

    Each Vulkan object is a value of a specific type with the prefix Vk . These prefixes are omitted in the diagram for clarity, just like the vk prefix for function names. For example, Sampler on the diagram means that there is a Vulkan object type called VkSampler . These types shouldn’t be treated as pointers or ordinal numbers. You shouldn’t interpret their values in any way. Just treat them as opaque handles, pass them from one function to another and of course do not forget to destroy them when they are no longer needed. Objects with a green background don’t have their own types. Instead they are represented by numeric index of type uint32_t inside their parent object, like Queries inside QueryPool.

    Solid lines with arrows represent the order of creation. For example, you must specify an existing DescriptorPool to create a DescriptorSet. Solid lines with a diamond represent composition, which means that you don’t have to create that object, but it already exists inside its parent object and can be fetched from it. For example, you can enumerate PhysicalDevice objects from an Instance object. Dashed lines represent other relationships, like submitting various commands to a CommandBuffer.

    The diagram is divided into three sections. Each section has a main object, shown in red. All other objects in a section are created directly or indirectly from that main object. For example, vkCreateSampler – the function that creates a Sampler – takes VkDevice as its first parameter. Relationships to main objects are not drawn on this diagram for clarity.

    Vulkan object diagram

    Here is a brief description of all the objects:

    Instance is the first object you create. It represents the connection from your application to the Vulkan runtime and therefore only should exist once in your application. It also stores all application specific state required to use Vulkan. Therefore you must specify all layers (like the Validation Layer) and all extensions you want to enable when creating an Instance.

    PhysicalDevice represents a specific Vulkan-compatible device, like a graphics card. You enumerate these from “Instance” and you can then query them for their vendorID , deviceID , and supported features, as well as other properties and limits.

    PhysicalDevice can enumerate all available types of Queue Families. The graphics queue is the main one, but you may also have additional ones that support only Compute or Transfer.

    PhysicalDevice can also enumerate Memory Heaps and Memory Types inside them. A Memory Heap represents a specific pool of RAM. It may abstract your system RAM on the motherboard or a certain memory space in video RAM on a dedicated graphics card, or any other host- or device-specific memory the implementation wants to expose. You must specify the Memory Type when allocating memory. It holds specific requirements for the memory blob like visible to the host, coherent (between CPU and GPU) and cached. There may be an arbitrary combination of these, depending on the device driver.

    Device can be thought of as a logical device, or opened device. It is the main object that represents an initialized Vulkan device that is ready to create all other objects. This is a similar concept to the Device object in DirectX®. During device creation, you need to specify which features you want to enable, and some of them are fundamental like anisotropic texture filtering. You also must state all queues that will be in use, their number and their Queue Families.

    Queue is an object representing a queue of commands to be executed on the device. All the actual work to be done by the GPU is requested by filling CommandBuffers and submitting them to Queues, using the function vkQueueSubmit . If you have multiple queues like the main graphics queue and a compute queue, you can submit different CommandBuffers to each of them. This way you can enable asynchronous compute, which can lead to a substantial speed up if done right.

    CommandPool is a simple object that is used to allocate CommandBuffers. It’s connected to a specific Queue Family.

    CommandBuffer is allocated from a specific CommandPool. It represents a buffer of various commands to be executed by a logical Device. You can call various functions on a command buffer, all of them starting with vkCmd . They are used to specify the order, type and parameters of tasks that should be performed when the CommandBuffer is submitted to a Queue and is finally consumed by the Device.

    Sampler is not bound to any specific Image. It is rather just a set of state parameters, like filtering mode (nearest or linear) or addressing mode (repeat, clamp-to-edge, clamp-to-border etc.).

    Buffer and Image are two types of resources that occupy device memory. Buffer is the simpler one. It is a container for any binary data that just has its length, expressed in bytes. Image, on the other hand, represents a set of pixels. This is the object known in other graphics APIs as a texture. There are many more parameters needed to specify creation of an Image. It can be 1D, 2D or 3D, have various pixel formats (like R8G8B8A8_UNORM or R32_SFLOAT ) and can also consist of many discrete images, because it can have multiple array layers or MIP levels (or both). Image is a separate object type because it doesn’t necessarily consist of just a linear set of pixels that can be accessed directly. Images can have a different implementation-specific internal format (tiling and layout) managed by the graphics driver.

    Creating a Buffer of certain length or an Image with specific dimensions doesn’t automatically allocate memory for it. It is a 3-step process that must be manually performed by you. You can also choose to use our Vulkan Memory Allocator library which takes care of the allocation for you

    1. Allocate DeviceMemory,
    2. Create Buffer or Image,
    3. Bind them together using function vkBindBufferMemory or vkBindImageMemory .

    That’s why you must also create a DeviceMemory object. It represents a block of memory allocated from a specific memory type (as supported by PhysicalDevice) with a specific length in bytes. You shouldn’t allocate separate DeviceMemory for each Buffer or Image. Instead, you should allocate bigger chunks of memory and assign parts of them to your Buffers and Images. Allocation is a costly operation and there is a limit on maximum number of allocations as well, all of which can be queried from your PhysicalDevice.

    One exception to the obligation to allocate and bind DeviceMemory for every Image is the creation of a Swapchain. This is a concept used to present the final image on the screen or inside the window you’re drawing into on your operating system. As such, the way of creating it is platform dependent. If you already have a window initialized using a system API, you first need to create a SurfaceKHR object. It needs the Instance object, as well as some system-dependent parameters. For example, on Windows these are: instance handle ( HINSTANCE ) and window handle ( HWND ). You can imagine SurfaceKHR object as the Vulkan representation of a window.

    From it you can create SwapchainKHR. This object requires a Device. It represents a set of images that can be presented on the Surface, e.g. using double- or triple-buffering. From the swapchain you can query it for the Images it contains. These images already have their backing memory allocated by the system.

    Buffers and Images aren’t always used directly in rendering. On top of them there is another layer, called views. You can think about them somewhat like views in databases – sets of parameters that can be used to look at a set of underlying data in a desired way. BufferView is an object created based on a specific buffer. You can pass offset and range during creation to limit the view to only a subset of buffer data. Similarly, ImageView is a set of parameters referring to a specific image. There you can interpret pixels as having some other (compatible) format, swizzle any components, and limit the view to a specific range of MIP levels or array layers.

    The way shaders can access these resources (Buffers, Images and Samplers) is through descriptors. Descriptors don’t exist on their own, but are always grouped in descriptor sets. But before you create a descriptor set, its layout must be specified by creating a DescriptorSetLayout, which behaves like a template for a descriptor set. For example, your shaders used by a rendering pass for drawing 3D geometry may expect:

    Binding slot Resource
    0 One uniform buffer (called constant buffer in DirectX) available to the vertex shader stage.
    1 Another uniform buffer available to the fragment shader stage.
    2 A sampled image.
    3 A sampler, also available to the fragment shader stage.

    You also need to create a DescriptorPool. It’s a simple object used to allocate descriptor sets. When creating a descriptor pool, you must specify the maximum number of descriptor sets and descriptors of different types that you are going to allocate from it.

    Finally, you allocate a DescriptorSet. You need both DescriptorPool and DescriptorSetLayout to be able to do it. The DescriptorSet represents memory that holds actual descriptors, and it can be configured so that a descriptor points to specific Buffer, BufferView, Image or Sampler. You can do it by using function vkUpdateDescriptorSets .

    Several DescriptorSets can be bound as active sets in a CommandBuffer to be used by rendering commands. To do this, use the function vkCmdBindDescriptorSets . This function requires another object as well – PipelineLayout,  because there may be multiple DescriptorSets bound and Vulkan wants to know in advance how many and what types of them it should expect. PipelineLayout represents a configuration of the rendering pipeline in terms of what types of descriptor sets will be bound to the CommandBuffer. You create it from an array of DescriptorSetLayouts.

    In other graphics APIs you can take the immediate mode approach and just render whatever comes next on your list. This is not possible in Vulkan. Instead, you need to plan the rendering of your frame in advance and organize it into passes and subpasses. Subpasses are not separate objects, so we won’t talk about them here, but they’re an important part of the rendering system in Vulkan. Fortunately, you don’t need to know all the details when preparing your workload. For example, you can specify the number of triangles to render on submission. The crucial part when defining a RenderPass in Vulkan is the number and formats of attachments that will be used in that pass.

    Attachment is Vulkan’s name for what you might otherwise know as a render target – an Image to be used as output from rendering. You don’t point to specific Images here – you just describe their formats. For example, a simple rendering pass may use a color attachment with format R8G8B8A8_UNORM and a depth-stencil attachment with format D16_UNORM . You also specify whether your attachment should have its content preserved, discarded or cleared at the beginning of the pass.

    Framebuffer (not to be confused with SwapchainKHR) represents a link to actual Images that can be used as attachments (render targets). You create a Framebuffer object by specifying the RenderPass and a set of ImageViews. Of course, their number and formats must match the specification of the RenderPass. Framebuffer is another layer on top of Images and basically groups these ImageViews together to be bound as attachments during rendering of a specific RenderPass. Whenever you begin rendering of a RenderPass, you call the function vkCmdBeginRenderPass and you also pass the Framebuffer to it.

    Pipeline is the big one, as it composes most of the objects listed before. It represents the configuration of the whole pipeline and has a lot of parameters. One of them is PipelineLayout – it defines the layout of descriptors and push constants. There are two types of Pipelines – ComputePipeline and GraphicsPipeline. ComputePipeline is the simpler one, because all it supports is compute-only programs (sometimes called compute shaders). GraphicsPipeline is much more complex, because it encompasses all the parameters like vertex, fragment, geometry, compute and tessellation where applicable, plus things like vertex attributes, primitive topology, backface culling, and blending mode, to name just a few. All those parameters that used to be separate settings in much older graphics APIs (DirectX 9, OpenGL), were later grouped into a smaller number of state objects as the APIs progressed (DirectX 10 and 11) and must now be baked into a single big, immutable object with today’s modern APIs like Vulkan.  For each different set of parameters needed during rendering you must create a new Pipeline. You can then set it as the current active Pipeline in a CommandBuffer by calling the function vkCmdBindPipeline .

    Shader compilation is a multi-stage process in Vulkan. First, Vulkan doesn’t support any high-level shading language like GLSL or HLSL. Instead, Vulkan accepts an intermediate format called SPIR-V which any higher-level language can emit. A buffer filled with data in SPIR-V is used to create a ShaderModule. This object represents a piece of shader code, possibly in some partially compiled form, but it’s not anything the GPU can execute yet. Only when creating the Pipeline for each shader stage you are going to use (vertex, tessellation control, tessellation evaluation, geometry, fragment, or compute) do you specify the ShaderModule plus the name of the entry point function (like “main”).

    There is also a helper object called PipelineCache, that can be used to speed up pipeline creation. It is a simple object that you can optionally pass in during Pipeline creation, but that really helps to improve performance via reduced memory usage, and the compilation time of your pipelines. The driver can use it internally to store some intermediate data, so that the creation of similar Pipelines could potentially be faster. You can also save and load the state of a PipelineCache object to a buffer of binary data, to save it on disk and use it the next time your application is executed. We recommend you use them!

    Query is another type of object in Vulkan. It can be used to read back certain numeric values written by the GPU. There are different kinds of queries like Occlusion (telling you whether some pixels were rendered, i.e. they passed all of the pre- and post-shading tests and made it through to the frame) or Timestamp (a timestamp value from some GPU hardware counter). Query doesn’t have its own type, because it always resides inside a QueryPool and is just represented by a uint32_t index. QueryPool can be created by specifying type and number of queries to contain. They can then be used to issue commands to CommandBuffer, like vkCmdBeginQuery , vkCmdEndQuery , or vkCmdWriteTimestamp .

    Finally, there are objects used for synchronization: Fence, Semaphore and Event. A Fence signals to the host that the execution of a task has completed. It can be waited on, polled, and manually unsignaled on the host. It doesn’t have its own command function, but it is passed when calling vkQueueSubmit . Once the submitted queue completes the according fence is signaled.

    A Semaphore is created without configuration parameters. It can be used to control resource access across multiple queues. It can be signaled or waited on as part of command buffer submission, also with a call to vkQueueSubmit , and it can be signaled on one queue (e.g. compute) and waited on other (e.g. graphics).

    An Event is also created without parameters. It can be waited on or signaled on the GPU as a separate command submitted to CommandBuffer, using the functions vkCmdSetEvent , vkCmdResetEvent , and vkCmdWaitEvents . It can also be set, reset and waited upon (via polling calls to vkGetEventStatus from one or more CPU threads. vkCmdPipelineBarrier can also be used for a similar purpose if synchronization occurs at a single point on the GPU, or subpass dependencies can be used within a render pass.

    After that you just need to learn how to call Vulkan functions (possibly in parallel!) to make the GPU perform actual work every frame. Then you are on your way to fully utilizing the great, flexible computational power offered by modern GPUs.

    Adam works in the European Game Engineering team, part of RTG, primarily on Vulkan games technology and the games that use it. Links to third party sites, and references to third party trademarks, are provided for convenience and illustrative purposes only. Unless explicitly stated, AMD is not responsible for the contents of such links, and no third party endorsement of AMD or any of its products is implied.

    1 Comment

    Comment
    Pietro Pesci Feltri says:
    February 20, 2018 at 11:17 am

    Thanks!!!. Really thanks for this explanation. The global diagram work like charm and is very useful if you want to understand Vulkan.
    This is the first time I get a decent overview about what all the different pieces are and how they fit together.

    Reply

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    • Terms and Conditions
    • /
    • Privacy
    • /
    • Cookie Policy
    • /
    • Trademarks
    ©2018 Advanced Micro Devices, Inc. OpenCL™ and the OpenCL™ logo are trademarks of Apple, Inc., used with permission by Khronos.