SDL3 Introduces A Vulkan Renderer

Written by Michael Larabel in Vulkan on 23 February 2024 at 06:48 AM EST. 15 Comments
VULKAN
The Simple DirectMedia Library that is commonly used as an abstraction layer by cross-platform games and other software is now introducing a Vulkan renderer with SDL3.

Development work on SDL 3.0 continues heavy. SDL already works with games built atop the Vulkan API but this new change is about introducing a Vulkan renderer to SDL itself for rendering using its API. Similar to the Direct3D 12 renderer introduced last year, SDL3 Git now has a Vulkan renderer.

SDL Vulkan renderer merged


This SDL Vulkan renderer was written by Dan Ginsburg who works for Valve as well as his Upsample Software consultancy firm. Ginsburg explained in the SDL pull request:
"This pull request adds an implementation of a Vulkan Render backend to SDL. I have so far tested this primarily on Windows, but also smoke tested on Linux and macOS (MoltenVK). I have not tried it yet on Android, but it should be usable there as well (sans any bugs I missed). This began as a port of the SDL Direct3D12 Renderer, which is the closest thing to Vulkan as existed in the SDL codebase. The shaders are more or less identical (with the only differences being in descriptor bindings vs root descriptors). The shaders are built using the HLSL frontend of glslang.

Everything in the code is pure Vulkan 1.0 (no extensions), with the exception of HDR support which requires the Vulkan instance extension VK_EXT_swapchain_colorspace. The code could have been simplified considerably if I used dynamic rendering, push descriptors, extended dynamic state, and other modern Vulkan-isms, but I felt it was more important to make the code as vanilla Vulkan as possible so that it would run on any Vulkan implementation."

More details for those interested via this SDL PR.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week