Emil 6e9e90fb34 feat: Vulkan renderer with instanced rendering (Phase 4)
VulkanRenderer using ash 0.38 + winit:
- Instance with KHR_surface + xlib + wayland extensions
- Physical device selection (first GPU with graphics+present)
- Swapchain (FIFO present mode, B8G8R8A8_UNORM)
- Render pass with color attachment
- Graphics pipeline with instanced rendering:
  - Vertex buffer: unit quad (4 verts, 6 indices)
  - Instance buffer: 8000 CellInstance structs (32 bytes each)
  - 2 vertex bindings: per-vertex (quad pos) + per-instance (grid pos,
    atlas UV, fg/bg colors)
  - Push constants: screen size + cell size
- Glyph atlas: R8_UNORM texture, uploaded via staging buffer
  - fontdue rasterizes DejaVu Sans Mono at startup
  - Linear filtering sampler
- Descriptor set: combined image sampler for atlas
- 2 frames in flight with semaphores + fences
- Persistent mapped instance buffer (zero-copy per frame)

Shaders (pre-compiled SPIR-V):
- cell.vert: positions quad from instance data, maps to clip space
- cell.frag: samples atlas alpha, blends fg/bg

--mode vulkan: tries Vulkan, falls back to softbuffer window mode
109 tests, 0 failures
2026-06-21 00:34:01 +03:00
S
Description
ASCII physical game
1.9 MiB
Languages
Rust 98.6%
GLSL 1%
Python 0.4%