# slackermanz/svk-engine architecture

> Architecture diagram of the GitHub repository slackermanz/svk-engine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/slackermanz/svk-engine
- Repository: https://github.com/slackermanz/svk-engine

## Overview

VulkanAutomata is a C++/Vulkan GPU cellular-automata engine. Its principal workflow is to initialize a Vulkan context and device, load a compute shader and derive its descriptor resources, create a pipeline and command buffers, then submit GPU work using seeded image data. The sampled entry point shows setup, image barriers, command recording, queue submission, and synchronization; README identifies the product but documents few runtime details. Several implementation paths are unsampled, so the graph omits unverified connections and treats shaders as a documented product capability rather than claiming a specific dispatch path.

Main entry points: [`SlackAutomata.cpp`](https://github.com/slackermanz/svk-engine/blob/master/SlackAutomata.cpp) (Automata entry point), [`source/slack_engine.cpp`](https://github.com/slackermanz/svk-engine/blob/master/source/slack_engine.cpp) (Vulkan engine), [`source/slack_vulkan.cpp`](https://github.com/slackermanz/svk-engine/blob/master/source/slack_vulkan.cpp) (Vulkan resources), [`source/spirv_reflect.c`](https://github.com/slackermanz/svk-engine/blob/master/source/spirv_reflect.c) (SPIR-V reflection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application workflow"]
  node_entry["Automata entry point<br/>[SlackAutomata.cpp]"]
  node_seed["Image seeding<br/>[slack_tools.cpp]"]
  node_output["Output handling<br/>[slack_tools.cpp]"]
end

subgraph group_vulkan["Vulkan runtime"]
  node_engine["Vulkan engine<br/>[slack_engine.cpp]"]
  node_backend["Vulkan resources<br/>[slack_vulkan.cpp]"]
  node_queues["Device queues<br/>[slack_vkinfo.cpp]"]
end

subgraph group_shader["Shader processing"]
  node_compute_shaders["Compute shaders<br/>[cgol.comp]"]
  node_shader_variants["Shader variants"]
  node_reflect["SPIR-V reflection<br/>[spirv_reflect.c]"]
  node_spirv_defs["SPIR-V definitions<br/>[spirv.h]"]
end

subgraph group_support["Runtime support"]
  node_debug["Diagnostics<br/>[slack_debug.cpp]"]
  node_utilities["Utility functions<br/>[slack_utils.cpp]"]
end

node_user(("User"))
node_vulkan_api[("Vulkan runtime")]

node_user -->|"starts"| node_entry
node_entry -->|"initializes"| node_engine
node_entry -->|"seeds image"| node_seed
node_entry -.->|"loads shader"| node_compute_shaders
node_entry -.->|"writes output"| node_output
node_engine -->|"creates resources"| node_backend
node_engine -->|"reflects shader"| node_reflect
node_reflect -->|"uses definitions"| node_spirv_defs
node_engine -->|"queries memory"| node_queues
node_backend -->|"calls"| node_vulkan_api
node_engine -->|"creates pipeline"| node_vulkan_api
node_entry -->|"submits work"| node_vulkan_api

click node_entry "https://github.com/slackermanz/svk-engine/blob/master/SlackAutomata.cpp"
click node_seed "https://github.com/slackermanz/svk-engine/blob/master/source/slack_tools.cpp"
click node_output "https://github.com/slackermanz/svk-engine/blob/master/source/slack_tools.cpp"
click node_compute_shaders "https://github.com/slackermanz/svk-engine/blob/master/shaders/cgol.comp"
click node_shader_variants "https://github.com/slackermanz/svk-engine/tree/master/shaders"
click node_engine "https://github.com/slackermanz/svk-engine/blob/master/source/slack_engine.cpp"
click node_backend "https://github.com/slackermanz/svk-engine/blob/master/source/slack_vulkan.cpp"
click node_reflect "https://github.com/slackermanz/svk-engine/blob/master/source/spirv_reflect.c"
click node_spirv_defs "https://github.com/slackermanz/svk-engine/blob/master/include/include/spirv/unified1/spirv.h"
click node_queues "https://github.com/slackermanz/svk-engine/blob/master/source/slack_vkinfo.cpp"
click node_debug "https://github.com/slackermanz/svk-engine/blob/master/source/slack_debug.cpp"
click node_utilities "https://github.com/slackermanz/svk-engine/blob/master/source/slack_utils.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_seed,node_output,node_user toneBlue
class node_engine,node_backend,node_queues,node_vulkan_api toneAmber
class node_compute_shaders,node_shader_variants,node_reflect,node_spirv_defs toneMint
class node_debug,node_utilities toneRose
```

## Components

### Application workflow

- [Automata entry point](https://github.com/slackermanz/svk-engine/blob/master/SlackAutomata.cpp): `SlackAutomata.cpp`
- [Image seeding](https://github.com/slackermanz/svk-engine/blob/master/source/slack_tools.cpp): `source/slack_tools.cpp`
- [Output handling](https://github.com/slackermanz/svk-engine/blob/master/source/slack_tools.cpp): `source/slack_tools.cpp`

### Vulkan runtime

- [Vulkan engine](https://github.com/slackermanz/svk-engine/blob/master/source/slack_engine.cpp): `source/slack_engine.cpp`
- [Vulkan resources](https://github.com/slackermanz/svk-engine/blob/master/source/slack_vulkan.cpp): `source/slack_vulkan.cpp`
- [Device queues](https://github.com/slackermanz/svk-engine/blob/master/source/slack_vkinfo.cpp): `source/slack_vkinfo.cpp`

### Shader processing

- [Compute shaders](https://github.com/slackermanz/svk-engine/blob/master/shaders/cgol.comp): `shaders/cgol.comp`
- [Shader variants](https://github.com/slackermanz/svk-engine/tree/master/shaders): `shaders`
- [SPIR-V reflection](https://github.com/slackermanz/svk-engine/blob/master/source/spirv_reflect.c): `source/spirv_reflect.c`
- [SPIR-V definitions](https://github.com/slackermanz/svk-engine/blob/master/include/include/spirv/unified1/spirv.h): `include/include/spirv/unified1/spirv.h`

### Runtime support

- [Diagnostics](https://github.com/slackermanz/svk-engine/blob/master/source/slack_debug.cpp): `source/slack_debug.cpp`
- [Utility functions](https://github.com/slackermanz/svk-engine/blob/master/source/slack_utils.cpp): `source/slack_utils.cpp`

### Other components

- **User**
- **Vulkan runtime**

## Connections

- User → Automata entry point: starts (evidence: `README.md`)
- Automata entry point → Vulkan engine: initializes (evidence: `SlackAutomata.cpp`)
- Automata entry point → Image seeding: seeds image (evidence: `SlackAutomata.cpp`)
- Automata entry point → Compute shaders: loads shader
- Automata entry point → Output handling: writes output
- Vulkan engine → Vulkan resources: creates resources (evidence: `source/slack_engine.cpp`)
- Vulkan engine → SPIR-V reflection: reflects shader (evidence: `source/slack_engine.cpp`)
- SPIR-V reflection → SPIR-V definitions: uses definitions
- Vulkan engine → Device queues: queries memory (evidence: `source/slack_engine.cpp`)
- Vulkan resources → Vulkan runtime: calls
- Vulkan engine → Vulkan runtime: creates pipeline (evidence: `source/slack_engine.cpp`)
- Automata entry point → Vulkan runtime: submits work (evidence: `SlackAutomata.cpp`)
