The Vulkan API, released in February 2016, is the Khronos Group’s answer to Microsoft’s Direct3D 12 API published in 2015. Due to the revolutionary capabilities provided by the new API’s to the programmer, the releases were accompanied by an enormous hype. Vulkan and Direct3D 12 provides the programmer unprecedented control and empowerment over the GPU and its memory, which might introduce a new era in GPU computing.
This elaboration deals with the design and implementation of a graphic engine along with state-of-the-art rendering features using the Vulkan API. The Vulkan engine is built upon the OpenGL engine "Oreon Engine" developed in a previous work and used in the research elaboration "Realtime GPGPU FFT Ocean Water Simulation".
Further, an extensive study concering the capabilities of the new Vulkan API and its performance advantage compared to OpenGL is demonstrated.
Table of Contents
1 Introduction
2 Why New API?
2.1 Origin and History of Vulkan
2.2 Vulkan - More Performance and Efficieny
2.3 Will OpenGL Get Outdated?
3 Vulkan API Overview
3.1 Layers
3.2 Extensions
3.3 Vulkan Instance
3.4 Devices
3.4.1 VkPhysicalDeviceProperties
3.4.2 VkPhysicalDeviceFeatures
3.4.3 VkPhysicalDeviceMemoryProperties
3.4.4 VkDevice
3.5 Queues
3.6 Window System Integration
3.7 Command Buffers
3.8 Render Passes
3.9 Framebuffers
3.10 Pipelines
3.11 Descriptors
3.12 Push Constants
3.13 Buffers
3.14 Images
3.15 Synchronization
3.15.1 Fences
3.15.2 Events
3.15.3 Semaphores
3.15.4 Barriers
3.16 SPIR-V Shaders
4 The Case Study Scenario
4.1 Deferred Shading with MSAA
4.2 Transparency Blending
4.3 FXAA
4.4 Bloom
4.5 Dynamic Panel Overlay
5 Engine Design and Implementation
5.1 Ocean Resources
5.1.1 Displacement Maps
5.1.2 Dy-Normalmap and Mipmap Generation
5.1.3 Scene Reflection/Refraction and Deferred Shading
5.2 Opaque Scene G-Buffer
5.3 Sample Coverage and Deferred Shading
5.4 Transparent Scene and Blending
5.5 FXAA and Post Processing
5.6 Panel Overlay
5.7 Presentation
6 Case Study: OpenGL vs. Vulkan
7 Evaluation
Research Objectives and Themes
This thesis investigates the development and implementation of a graphics engine using the Vulkan API, specifically analyzing its performance advantages over the traditional OpenGL API. The core research question addresses whether Vulkan provides significant performance improvements and reduced CPU overhead in complex rendering scenarios compared to its predecessors.
- Design and development of a custom graphics engine using the Vulkan API.
- Implementation of advanced rendering techniques including deferred shading, MSAA, and bloom.
- Detailed analysis of GPGPU simulation using Fast Fourier Transform (FFT) for ocean water rendering.
- Performance benchmarking and comparison between Vulkan and OpenGL under various load configurations.
Excerpt from the Book
3.15.4 Barriers
Barriers are the most extensive synchronization objects in Vulkan and provide execution and memory synchronization between sets of commands within a single command buffer execution. Barriers can be placed within a command buffer with the vkCmdPipelineBarrier command. As an example, if one command execution depends on the completion or a specific progress level of another command execution, a proper vkCmdPipelineBarrier between these two commands ensures synchronization based on the execution and/or memory dependencies specified in vkCmdPipelineBarrier. A memory dependency snychronizes read and write access to images or buffers while an execution dependency ensures a specific sequence of command executions. As mentioned in the section about render passes (3.8), the subpass dependencies and image layout transitions can be explicitly specified to induce the driver doing implicit synchronizations. These synchronizations are nothing more than barriers which are implicitly placed by the driver. [16] [25]
Figures 3.7 and 3.8 show two different use case examples of barriers.
Summary of Chapters
1 Introduction: Provides an overview of the evolution of GPU computing and the transition from traditional APIs like OpenGL to modern hardware-aware interfaces like Vulkan.
2 Why New API?: Compares the history and architectural philosophy of OpenGL and Vulkan, highlighting Vulkan's explicit control as a means to reduce driver overhead.
3 Vulkan API Overview: Explains the core technical components of Vulkan, including devices, queues, memory management, pipelines, and synchronization primitives.
4 The Case Study Scenario: Describes the theoretical simulation framework, including ocean water rendering via FFT and the successive image synthesis pipeline.
5 Engine Design and Implementation: Details the practical development of the Vulkan graphics engine, covering resource generation and command buffer organization.
6 Case Study: OpenGL vs. Vulkan: Presents the empirical performance data collected during tests comparing Vulkan and OpenGL metrics.
7 Evaluation: Analyzes the gathered performance data, confirming the efficiency gains of Vulkan regarding CPU usage and rendering performance.
Keywords
Vulkan, OpenGL, Graphics Engine, GPU Computing, Deferred Shading, MSAA, FXAA, Bloom Effect, FFT, Synchronization, Driver Overhead, API Comparison, Performance Benchmarking, Command Buffers, Memory Management
Frequently Asked Questions
What is the primary focus of this thesis?
The thesis focuses on the design and implementation of a graphics engine built with the Vulkan API and investigates its performance advantages over the traditional OpenGL API.
What are the central topics covered?
Key topics include Vulkan architecture (devices, queues, pipelines), GPGPU simulation using FFT for ocean water, deferred shading techniques, and performance benchmarking between Vulkan and OpenGL.
What is the primary goal of this research?
The goal is to demonstrate that the explicit control offered by the Vulkan API enables more effective GPU utilization and significantly lower CPU overhead compared to OpenGL.
Which scientific methodology is used?
The work utilizes a comparative performance analysis through case study scenarios, measuring metrics like FPS, CPU load, and GPU load across different antialiasing configurations on identical hardware.
What does the main body address?
It details the technical specifications of Vulkan, the implementation of a specific rendering scenario (including ocean water simulation), and the comparative evaluation of performance results.
Which keywords best describe this work?
Vulkan, OpenGL, Graphics Engine, Deferred Shading, Performance Benchmarking, GPGPU, and Synchronization are the most defining keywords.
How does Vulkan reduce CPU overhead?
Vulkan minimizes driver overhead by requiring the programmer to explicitly manage state changes, memory allocation, and command buffer recording, eliminating the implicit work traditional drivers perform.
Why is the "Oreon Engine" mentioned?
The Oreon Engine provides the existing OpenGL implementation used as a baseline for the performance comparison conducted in this research.
What role does the FFT simulation play?
The FFT simulation serves as the heavy GPGPU workload for the case study, allowing the author to test how efficiently Vulkan handles compute-intensive tasks compared to OpenGL.
- Quote paper
- Fynn Flügge (Author), 2018, Design and Implementation of a Vulkan Engine, Munich, GRIN Verlag, https://www.grin.com/document/456305