Dcompute Vulkan Backend

Mentor: Nicholas Wilson

Spec Details
Difficulty Level hard
Project Duration 350 hours
Number of Contributors 1
Prerequisites Compilers (prefereably LLVM and/or DMD), C++ or D, Graphics or Compute APIs (Prefereably vulkan)

Description

Dcompute is a compiler extension and runtime library that currently interfaces to OpenCL and CUDA by the SPIRV and PTX backends of LLVM to generate programs that can run D code natively on GPUs.

LLVM’s SPIRV backend has recently been enhanced to be able to produce compute shaders for use with the Vulkan API for graphics and compute.

The goal of this project is to extend the LLVM D compiler (LDC) to utilise the new capabilities of the SPIRV backend to produce and run Vulkan compute shaders.

Project Milestones

  • Build LDC + LLVM with the vulkan backend enabled, become familiar with the IR accpted by the SPIRV Vulkan backend
  • Add Vulkan as a backend for Dcompute to LDC (see this PR
    • add command line switches
    • generate IR in the format accepted by the SRPIV Vulkan backend.
    • Design a consistent ABI for the compiler and Dcompute runtime to interface to each other to launch compute shaders
  • Write a dcompute runtime backend to interface to Vulkan
  • Test and validate generated shaders using Vulkan

First Step

Clone and build LDC and LLVM

Resources


This site uses Just the Docs, a documentation theme for Jekyll.