Open-source project
sebbbi/NoGraphicsAPI avatar
sebbbi/NoGraphicsAPI

NoGraphicsAPI: GPU pointers and descriptor heaps over Metal 4 and Vulkan 1.4, and the hardware floor that comes with them

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.

1,732 stars63 forksC++MIT

At a glance

What is it?
NoGraphicsAPI is a C++20 graphics library by Sebastian Aaltonen that drops buffer objects, binding layouts and resource barriers in favour of GPU pointers, application-owned descriptor heaps and one root pointer per draw. This review covers the data model, what it leaves to you, its error handling and the narrow Metal and Vulkan hardware it accepts.
Who is it for?
NoGraphicsAPI suits graphics programmers who want to try the pointer-and-heap model from the No Graphics API blog on current Apple silicon or on Vulkan drivers that expose the descriptor-heap extension. It is a poor fit for anyone shipping to Intel Macs, older Vulkan drivers, Linux windowed apps or ARM Windows, and for teams that want the library to manage memory and synchronization.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 8 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • sebbbi/NoGraphicsAPI1,732 ★ · +285
Star history
Repository2026-09-212026-11-15
sebbbi/NoGraphicsAPI1.4k1.7k

285 Stars in the last 55 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Buffers disappear and the application owns the allocator

The central change in NoGraphicsAPI is that there is no public buffer type. You allocate GPU heaps and partition them with an application-side allocator. Mapped heaps expose both a CPU address and a GPU address, so the CPU writes data straight into memory the GPU will read. Vertex data, constants and arbitrary structures are all allocations, not separate buffer objects.

Shaders follow 64-bit pointers stored in structures shared between C++ and Slang. Arrays, pointer arithmetic and nested data structures work without buffer descriptors or binding slots, and vertex shaders fetch their own vertices, so there is no vertex-layout declaration at all. Textures and samplers are bindless: the application owns the descriptor heaps and picks the indices, and materials carry those indices as plain data. Changing a material therefore does not mean building or rebinding a per-material descriptor set.

The cost of this model is responsibility. The README states plainly that this is a low-level library and the application still owns allocation policy, resource lifetime and GPU synchronization. If you want a library that hides memory management, this is the opposite of that. An optional NoGraphicsAPIUtility library supplies shared shader types, math, allocators, upload queues and deferred deletion, but keeps them out of the graphics API itself.

Every draw takes one root pointer, and its lifetime is your problem

Each draw or dispatch receives a GPU pointer to a structure containing GPU pointers, texture indices and constants. You declare it once in a header shared by C++ and Slang, so there are no descriptor-set layouts or pipeline layouts to keep in agreement.

cpp
struct RootArguments
{
    Vertex* vertices;
    Material* material;
    float4x4 transform;
    uint32 texture_index;
    uint32 padding[3];
};

You allocate a root from mapped storage, fill it through the CPU address and pass the GPU address to the draw:

cpp
const gpu::GpuCpuRange<RootArguments> root = bump_allocator.allocate<RootArguments>();
*root.cpu = {
    .vertices = vertex_memory.gpu,
    .material = material_memory.gpu,
    .transform = transform,
    .texture_index = texture_index,
};
gpu::draw(commands, root.gpu, vertex_count);

The README adds two constraints. Roots follow the shared constant-buffer layout, while pointed-to data keeps C POD layout, so the padding member in the struct is not decoration. And you must keep each root allocation alive and stable until its GPU use completes. Freeing or reusing that memory early is not caught by an error code, because frame operations return none, so a bump allocator that wraps around too soon produces corrupted draws and not a clean failure.

The shader reads the same struct through GPU_ROOT

On the shader side, including the NoGraphicsAPI shader.slang header gives you a macro that binds the shared structure to a name, and the shader then reads fields directly:

slang
GPU_ROOT(RootArguments, root);
Vertex vertex = root.vertices[vertex_id];
Material material = *root.material;
Texture2D<float4> texture = gpu_texture<Texture2D<float4>>(root.texture_index);

Vertices are indexed like an ordinary array through a pointer, the material is dereferenced, and the texture is fetched from the descriptor heap with the index stored in the root. Both backends compile the same Slang sources, so there is one shader path and not a Metal one plus a Vulkan one.

Two more properties follow from the design. Draws and dispatches take GPU root pointers directly, including roots written by earlier GPU work, which means one pass can build the arguments for the next without a CPU round trip. And all graphics stages share the same root, so a vertex and a fragment shader see one declaration.

The cost is that a mismatch between the C++ and Slang views of the struct is only caught if you share the header. The README points to docs/slang.md for the root and pointer layout rules and complete shader examples, and to docs/no-graphics-api-comparison.md for the remaining differences from the blog design.

Pipeline objects shrink, but rasterization state and formats are still baked in

NoGraphicsAPI removes resource-binding and vertex layouts from pipeline creation. Viewport, scissor and depth and stencil state are set independently of the pipeline, which cuts the number of pipeline permutations you build. That is a real reduction in state-object churn for a renderer that varies depth settings per pass.

The README is careful not to overclaim here: rasterization, blending and attachment formats still belong to pipeline objects. A renderer that switches blend modes or render target formats still needs one pipeline per combination, so the permutation problem is smaller and not gone.

Synchronization changes in a similar way. Barriers describe which work produces and consumes data, not a list of buffer and image transitions, and applications do not track image layouts. That removes bookkeeping, but it moves the dependency reasoning to you. Because the library does not own lifetime or synchronization, a barrier that names the wrong producer and consumer compiles and runs and then races. The docs folder includes a Metal validation page and implementation pages for both backends, which is where the mapping from this model to native commands is explained for readers who need to debug at that level.

Frame calls return no errors, so diagnostics depend on a callback and debug assertions

The error model is split by phase. Initialization and resource creation failures return an error or an empty handle. Ordinary frame operations, including draws, dispatches and descriptor writes, return no error codes at all, and native results are checked with debug assertions.

To see what went wrong inside a backend, install set_error_callback on the initialization thread. It reports backend diagnostics, including the Vulkan operation, the result and the requested allocation size. The callback is synchronous, thread-local and disabled by default. The README advises clearing it before ordinary frame execution when you only want diagnostics during startup, since a synchronous callback on a hot path adds cost.

There is one explicit check to remember: call UploadQueue::valid() after construction. A failed initialization releases its partial resources, so an invalid queue is the signal to stop.

The consequence is that a release build will not tell you about most frame-time failures. You find them in debug builds with assertions on, or you wire the callback early and watch for output. Code that treats a draw call as always succeeding is relying on the debug build having already shown it a failure.

The Metal path needs Metal 4, OS 26 and Apple GPU family 7, and drops Intel Macs

The Metal backend requires Metal 4 on macOS, iOS or iPadOS 26 or later, and an Apple GPU family 7 or newer. The README's device table puts Apple silicon Macs from M1, iPhone 12 and newer with A14, iPad Pro from 2021 with M1, iPad Air from 2020 with A14, iPad mini from 2021 with A15, and the 2022 iPad with A14 inside the baseline.

Within that baseline, direct task and mesh draws work everywhere, but indirect mesh draws require A17 Pro or M3 or newer. BC texture compression is a separate capability, so check it before shipping compressed assets. Intel Macs, the Simulator, tvOS and visionOS are not supported targets. Metal 4 draw and dispatch commands accept native GPU addresses directly, and indexed textures use MTLTextureViewPool.

The practical effect is that you cannot develop on an older Mac or test in the iOS Simulator. A team needs real Apple silicon hardware on a current OS, and any feature that depends on indirect mesh draws has to be gated by device. The README points to docs/metal-support.md for these limits and docs/metal-validation.md for tested hardware and known issues.

The Vulkan path is x86-64 only and needs three extensions that many drivers lack

The Vulkan backend targets little-endian x86-64, and the utility math requires AVX2 and FMA. That excludes ARM machines from the Vulkan path even if the driver has the extensions. The README says Vulkan 1.4 alone is insufficient. Required extensions include VK_EXT_descriptor_heap for application-owned descriptor heaps, VK_EXT_mesh_shader for task and mesh shaders, and VK_KHR_shader_untyped_pointers for descriptor-heap shader support.

VK_KHR_device_address_commands is optional. Vulkan uses device-address commands when they are available and resolves addresses to backing buffers otherwise, so the absence of that extension costs you a slower path and not a failure. The README text on the full requirements list is cut off, so check docs/vulkan-support.md for the complete set.

Platform coverage is uneven. CMake selects Metal on macOS and iOS and Vulkan on Windows and Linux. Windows and macOS include windowed examples, while Linux currently supports headless use only, so you cannot open a window on Linux through the examples. The repository ships triangle, cube and deferred_renderer examples. It has no GitHub releases, so you build from the main branch. The last push was on 2026-11-02, the project is not archived, and the license is MIT.

Editorial conclusion

NoGraphicsAPI suits graphics programmers who want to try the pointer-and-heap model from the No Graphics API blog on current Apple silicon or on Vulkan drivers that expose the descriptor-heap extension. It is a poor fit for anyone shipping to Intel Macs, older Vulkan drivers, Linux windowed apps or ARM Windows, and for teams that want the library to manage memory and synchronization. Before starting, check that your GPU driver advertises VK_EXT_descriptor_heap or that your Apple device meets the Metal 4 baseline.

Frequently asked questions

What is NoGraphicsAPI as a graphics API?

NoGraphicsAPI is a minimal C++20 graphics library for Metal 4 and Vulkan 1.4 devices. It replaces buffer objects, binding layouts and resource-list barriers with GPU pointers, descriptor heaps and one root pointer per draw or dispatch.

Which Vulkan extensions does NoGraphicsAPI require?

It needs Vulkan 1.4 plus VK_EXT_descriptor_heap, VK_EXT_mesh_shader and VK_KHR_shader_untyped_pointers. VK_KHR_device_address_commands is optional.

Does NoGraphicsAPI run on Linux with a window?

No. CMake selects Vulkan on Windows and Linux, but Linux currently supports headless use only. Windows and macOS include windowed examples.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. sebbbi/NoGraphicsAPI on GitHub
Community

Where developers are discussing it

Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 0 in the last 30 days; newest first.

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sebbbi-nographicsapi.svg)](https://hysenlabs.com/projects/sebbbi-nographicsapi)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/sebbbi-nographicsapi.svg)](https://hysenlabs.com/projects/sebbbi-nographicsapi)

Was this useful?