VRI· render hardware interface

VRI

One explicit rendering API. Every backend, every platform.

Write your renderer once — VRI runs it on Vulkan, Direct3D 12, Metal, WebGPU, and OpenGL, on desktop, mobile/embedded, and the web. A C ABI core with a header-only C++23 wrapper, honest capability queries, one diagnostics sink, and shaders authored in Slang.

write once

An explicit, modern surface (command buffers, descriptor sets, explicit synchronization) — à la Vulkan/D3D12 — that maps onto each platform's native graphics API.

// C ABI core, or a std::expected-based RAII layer in C++23:
auto device    = vri::Device::Create({ .graphicsAPI = VriGraphicsAPI_Auto });
auto swapchain = device->CreateSwapchain({ .window = window });
auto pipeline  = device->CreateGraphicsPipeline({ .shaders = { vs, fs }, ... });

cmd.BeginRendering({ .colors = { backbuffer } });
cmd.SetPipeline(*pipeline);
cmd.Draw({ .vertexNum = 3 });   // same image on every backend
cmd.EndRendering();

run everywhere

The desktop application requests Auto and VRI picks the best backend. On the web VRI runs through WebGPU and WebGL 2, both via Emscripten. A software (CPU) fallback renders with no GPU at all.

BackendPlatforms
VulkanWindows, Linux (and macOS via MoltenVK)
Direct3D 12Windows
MetalmacOS (Apple Silicon)
WebGPUWindows, Linux, macOS, Web
OpenGLWindows, Linux (and macOS, capped at 4.1)
WebGL 2Web
OpenGL ESLinux / embedded (e.g. Raspberry Pi)
Software (CPU)Windows, Linux, macOS — anywhere with a software Vulkan ICD

feature support

Every optional feature is queryable. If a backend can't do something, it tells you — it never silently no-ops.

✅ native  ·  🟡 emulated / simulated  ·  ⬜ planned  ·  ❌ unsupported by the API
FeatureVulkanD3D12MetalWebGPUOpenGLWebGL 2GL ES
Core rendering & swapchain
Depth / stencil, blending, MRT
MSAA + resolve
Mipmaps, instancing, cubemaps
Compute shaders
Push constants🟡🟡🟡🟡
Bindless / descriptor indexing🟡🟡🟡🟡🟡
Geometry shaders
Tessellation
Mesh shaders
Ray tracing🟡🟡
Opacity micromaps
Variable rate shading
Conservative rasterization
Fragment-shader barycentrics
Custom sampler border color
Subgroup / wave operations
Multiview (single-pass stereo)
External memory / interop (CUDA)
GPU timestamp queries🟡🟡
Occlusion queries
Pipeline-statistics queries
Calibrated GPU+CPU timestamps
Pipeline cache
Indirect draw count (GPU-driven)
Video memory budget
Clear storage buffer / texture
Built-in Dear ImGui renderer

Per-backend implementation notes — fallbacks, caveats, and the native extension each feature uses — are in DETAIL.md.