sebbbi/NoGraphicsAPI

Minimal graphics API. Built on top of latest Vulkan extensions. As close as possibly to my "No Graphics API" blog post and the SIGGRAPH talk.

What it solves

NoGraphicsAPI simplifies GPU programming by removing the complex machinery of traditional graphics APIs. It eliminates the need for buffer objects, vertex-layout declarations, and binding tables, making GPU memory and data structures feel more like standard CPU-side programming.

How it works

The library leverages modern hardware features (Metal 4 and Vulkan 1.4) to implement a bindless data model:

  • GPU Pointers: Uses 64-bit pointers for data, allowing shaders to follow pointers to arrays and nested structures without descriptor sets.
  • Descriptor Heaps: Implements bindless textures and samplers where the application manages indices rather than rebinding resources.
  • Root Arguments: Replaces binding tables with a single GPU pointer to a shared C++/Slang structure containing all necessary constants and resource indices for a draw or dispatch call.
  • Direct Memory Access: Uses mapped heaps that allow the CPU to write data directly to GPU-accessible memory, bypassing separate buffer types.
  • Simplified Synchronization: Focuses on synchronization based on work production and consumption rather than tracking specific image layouts.

Who it’s for

Low-level graphics programmers who want to reduce the boilerplate and state-coupling associated with traditional rendering pipelines on modern hardware.

Highlights

  • Cross-platform backend: Native support for Metal 4 (macOS/iOS) and Vulkan 1.4 (Windows/Linux).
  • Slang integration: Uses shared Slang shaders to ensure the CPU and GPU share the same data declarations.
  • Reduced Pipeline State: Decouples resource binding and vertex layouts from pipeline creation, reducing the number of pipeline permutations.
  • Hardware-optimized: Specifically targets high-end modern GPUs (e.g., Apple Silicon M1+, NVIDIA RTX 30/40/50 series, AMD RDNA 3/4).

Related

  • Project
  • Project
  • Project
  • Project
  • Project