DOOM Ported To Run Atop AMD ROCm + LLVM libc

Written by Michael Larabel in Radeon on 30 September 2024 at 11:00 AM EDT. 43 Comments
RADEON
An open-source developer at AMD has carried out a DOOM port that runs almost entirely atop AMD GPUs for rendering and the game logic. This DOOM GPU port relies on the AMD ROCm library with the LLVM libc C library for offloading the classic DOOM to the AMD GPU.

Joseph Huber who works for AMD decided to experiment with porting DOOM to run atop AMD GPUs using ROCm and the LLVM C library for GPUs. Huber explains in his GitHub repository for this intriguing DOOM port:
"The clang compiler can target GPUs directly. We emit a single kernel that calls the 'main' function. Functions that require the operating system are handled through the RPC interface. See my LLVM talk for more information.

This implementation defines the amdgpu-loader utility, which handles launching the main kernel, setting up the SDL2 window interface, and provides functions to get the input keys and write the output framebuffer. Okay, it's not entirely on the GPU, but all the logic and rendering runs on the GPU."

And here is Huber showing off this DOOM GPU port with LLVM libc + ROCm:

AMDGPU ROCm DOOM example


Fascinating port and great for showing off the possibilities of the LLVM C library for GPUs. Those curious about the code or to learn more on the project, visit this GitHub repository.
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