Optimizing a Vulkan Program Part 3: Further Optimizations

This is the third in a series of blog posts about how I wrote and optimized VkColors, a small compute program written using Vulkan.

The previous post added a simple GPU implementation. This post will add several optimizations that improve performance massively.

Continue reading “Optimizing a Vulkan Program Part 3: Further Optimizations”

Optimizing a Vulkan Program Part 2: GPU Implementation

This is the second in a series of blog posts about how I wrote and optimized VkColors, a small compute program written using Vulkan.

This post will examine the GPU implementations of VkColors. The algorithms are written as Vulkan compute shaders.

Continue reading “Optimizing a Vulkan Program Part 2: GPU Implementation”

Optimizing a Vulkan Program Part 1: Introduction

This is the first in a series of blog posts about how I wrote and optimized VkColors, a small compute program written using Vulkan.

During the summer between university semesters, I found a post on the Code Golf Stack Exchange. The challenge was to generate an image with all possible RGB colors, arranged however the contestant felt was best. The winner was Jozsef Fejes.

Jozsef’s program outputs the final image by saving a PNG file to disk. However, he provided a few GIFs that showed the image while the algorithm was running. That inspired me to write VkColors, a program that could generate those images as fast as possible and display them at 60 frames per second. I chose to use Vulkan because this was a good opportunity to use both the graphical and compute capabilities of the API.

Read more