Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Vulkan

You're reading from   Learning Vulkan Get introduced to the next generation graphics API—Vulkan

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher Packt
ISBN-13 9781786469809
Length 466 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Parminder Singh Parminder Singh
Author Profile Icon Parminder Singh
Parminder Singh
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started with the NextGen 3D Graphics API 2. Your First Vulkan Pseudo Program FREE CHAPTER 3. Shaking Hands with the Device 4. Debugging in Vulkan 5. Command Buffer and Memory Management in Vulkan 6. Allocating Image Resources and Building a Swapchain with WSI 7. Buffer Resource, Render Pass, Framebuffer, and Shaders with SPIR-V 8. Pipelines and Pipeline State Management 9. Drawing Objects 10. Descriptors and Push Constant 11. Drawing Textures

What this book covers  

Chapter 1, Getting Started with the NextGen 3D Graphics API, will begin with the fundamentals of the Vulkan API and provides an overview of all its distinct features compared to its predecessor OpenGL API. This chapter will cover the basics, concepts, application model, and technical jargon used in Vulkan programming that is extremely helpful for first-time learners. You will also walk through the Vulkan programming model and see an outline of each module and its role.

Chapter 2, Your First Vulkan Pseudo Program, will help you program a simple Hello World program using a pseudocode approach. This will help the beginners to get a flavor of Vulkan programming and learn the step-by-step process to build their first Vulkan application. You will also learn how to install necessary software and the SDK.

Chapter 3, Shaking Hands with the Device, will help you to set up the programming environment to start with building your very first Vulkan example. You will create the Vulkan instance and initialize the program. You will connect with the physical hardware device, explore different types of queues exposed by it, and query various available layers and extensions. This chapter will provide a detailed understanding of the device queue and queue family concept and its relation with logical devices.

Chapter 4, Debugging in Vulkan, will describe how to perform debugging in a Vulkan application. Vulkan allows debugging through validation layers. In this chapter, we will discuss the role of each validation layer and program a simple example to understand the debugging in action. In addition, we will also query the layer extensions to add extra features that may not be a part of the Vulkan specifications.

Chapter 5, Command Buffer and Memory Management in Vulkan, will thoroughly discuss and implement command buffers in Vulkan. You will understand the role of the command pool and will learn how to record command buffers in Vulkan. The second half of the chapter will cover memory management in Vulkan; you will dig through device memory, and learn methods to allocate or deallocate GPU memory and understand the mapping of CPU and GPU memory.

Chapter 6, Allocating Image Resources and Building a Swapchain with WSI, will shed light on image resources and discuss memory management concepts, such as image creation, allocation, binding and mapping. Using this, we will create a depth image for depth testing. This chapter will also introduce the WSI swapchain, which is used for presentation and renders the drawing output onscreen. We will acquire the swapchain color images and create image views that will be used for drawing primitives.

Chapter 7, Buffer Resource, Render Pass, Frame Buffer, and Shaders with SPIR-V, will discuss the buffer resource and its usage for implementing the vertex buffer containing a drawing object’s geometry information. This chapter will give a detailed introduction to using the Render Pass to define a single unit of work specifying drawing operations using various attachments and subpasses. We will use Render Pass and implement frame buffers in Vulkan and demonstrate simple example to clear the background. As the chapter closes, we will implement our first shader in Vulkan using SPIR-V; we learn about SDK tools that convert GLSL into SPIR-V intermediate representation.

Chapter 8, Pipelines and Pipeline State Management, will introduce Vulkan’s compute and graphics pipeline. This chapter will provide an overview of the graphic pipeline flow and cover the role of various modules from start to end. We will discuss pipeline state objects, pipeline cache objects, and pipeline layouts. This chapter will cover all the pipeline states thoroughly, also covering dynamics states, input assembly with drawing primitives, rasterization, blending, viewport, depth/stencil testing, and multisampling. We will use these states' objects and implement the graphics pipeline.

Chapter 9, Drawing Objects, will thoroughly cover the process of drawing objects in Vulkan. We will record and execute the drawing object command buffers. The recording associates the Render Pass, framebuffer, and pipeline together along with the viewport and geometry data. The command buffer execution involves the submission of the command buffer to the device queue and presenting the drawn swapchain image to the presentation engine. We will also discuss the Vulkan synchronization mechanisms and understand fences, semaphore, and memory barriers. In addition, we will also cover drawing APIs and demonstrate it through some easy-to-follow examples.

Chapter 10, Descriptors and Push Constant, will describe how to update shader resources from a Vulkan application using descriptors and push constants. In descriptors, we will discuss and create descriptor pools and descriptor set layout. You will learn how to use the pipeline layouts and use the descriptors to update the buffer resource residing on the device memory and render the updated geometry on screen. Unlike descriptors, push constant do not use the command buffer and provides an optimized path to update the resources. You will implement a small example to understand push constants in action.

Chapter 11Drawing Textures, will bring realism to our rendered 3D drawing object by adding textures. You will learn how to create the image resource and apply samplers to it. You will also learn how to apply textures using linear and optimal tiling. In optimal tiling implementation, you will learn to transfer buffer and image memory through staging.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime