Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

D3D11 on Windows, wgpu on Linux and macOS

Status: accepted. Date: 2026-11-05.

The Renderer has one portable frame builder and glyph atlas and a small per-platform GPU backend. On Windows the backend is hand-written Direct3D 11, following Windows Terminal's AtlasEngine: try hardware feature levels 11_1 down to 10_0, then fall back to WARP, Microsoft's in-box software rasterizer. This runs on Windows 7 era Intel graphics, in VMs, and over Remote Desktop, none of which OpenGL or Vulkan cover on Windows 7. wgpu was rejected for Windows because it has no D3D11 backend and its D3D12 and Vulkan backends do not fit Windows 7. On Linux and macOS the backend is wgpu, which selects Vulkan, Metal or OpenGL itself.

Consequences

  • Two short shader sources are kept in sync by hand: HLSL at shader model 4 for feature level 10_0, and WGSL for wgpu. naga's HLSL output targets newer shader models, so it is not used to generate the D3D11 shaders.
  • Unlike Windows Terminal there is no Direct2D fallback; WARP covers the no-GPU case.
  • A backend is: create device, upload atlas regions, upload the per-cell instance buffer, one instanced draw per pass, present. Anything larger belongs in the shared frame builder.