How lint111/vbvs--vixen works
Project type and purpose
• VIXEN is a modular C++-based Vulkan rendering framework and toolchain.
• It provides:
– A node-based RenderGraph for declarative frame construction.
– A caching layer (CashSystem) for Vulkan objects.
– An event messaging bus (EventBus).
– Shader management (compile, reflection, bundling).
– Resource state management.
– Application scaffolding (VulkanApplicationBase, GraphApplication).
File structure
• Top-level “VIXEN” directory contains CMake targets:
– CashSystem (caches pipelines, shaders, descriptors, meshes, textures)
– EventBus (intra-module message passing)
– RenderGraph (core graph compiler + node libraries + tests)
– ResourceManagement (resource lifetime & state)
– ShaderManagement (SPIR-V reflection, shader bundling, caching)
– include/, source/, Shaders/, BuiltAssets/, cache/, generated/
• Documentation under documentation/ explains each module’s architecture.
• Tests for each subsystem reinforce intended responsibilities.
Key excerpts from documentation
• GraphArchitecture describes the RenderGraph’s compile & execution phases.
• CashSystem docs outline resource caching patterns.
• ShaderManagement docs show pre-compilation workflows.
• EventBus docs explain how messages flow between threads/modules.
Main components
a. Application Layer
– main.cpp → VulkanApplicationBase → VulkanGraphApplication
– Configuration code that instantiates the RenderGraph, EventBus, Logger
b. RenderGraph Module
– GraphCompiler, NodeRegistry, NodeInstances, Scheduler/LoopManager
– Uses ResourceManagement, CashSystem, EventBus
c. CashSystem Module
– CacherBase + specialized Cachers (Pipeline, DescriptorSet, Mesh, Texture…)
– Interacts with VulkanResources to create/retain engine objects
d. ShaderManagement Module
– ShaderCompiler, SPIRVReflection, ShaderCacheManager, AsyncShaderBundleBuilder
– Reads shader source files, writes out SPIR-V, integrates with CashSystem
e. EventBus Module
– MessageBus, WorkerThreadBridge, Message types
– Connects subsystems that emit or consume events (e.g., resource changes)
f. ResourceManagement Module
– ResourceState, RM.h
– Manages state transitions and tracks lifetimes of Vulkan handles
g. Vulkan Backend
– VulkanInstance, VulkanDevice, SwapChain, Descriptor, Pipeline, Buffer, Image
– Wrapped by VulkanResources library code
h. Supporting Utilities
– Logger (ILoggable, FrameRateLogger)
– EngineTime
– TextureHandling loaders (STB, GLI)
i. External/Infrastructure
– File system (shader files, manifest.json, cache files)
– GPU driver
Relationships & data flows
• At startup: Application → constructs VulkanInstance/Device → EventBus, Logger, EngineTime initialized
• Application → configures RenderGraph (nodes + parameters)
• RenderGraph Compiler → queries ShaderManagement for compiled modules → asks CashSystem for pipelines & descriptor layouts → instructs VulkanResources to create handles
• During frame loop: RenderGraph executes nodes → enqueues Vulkan commands → uses ResourceManagement to track resource states → EventBus broadcasts lifecycle events (e.g., RenderGraphEvents)
• ShaderManagement watches filesystem → rebuilds shaders on the fly → notifies CashSystem to update caches → graph recompilation triggered
• Logger subscribes to events from RenderGraph (performance), ShaderManagement (compile logs), CashSystem (cache hits/misses)
Architectural patterns & design principles
• Modular library approach (each subsystem is a CMake target)
• Node-based graph execution (dataflow programming)
• Caching façade for expensive Vulkan objects
• Event-driven internal communication
• Separation of interface (include/) and implementation (src/)
• Code generation (generated/sdi) for shader interface descriptors