What problem does it solve?
It guides work on LuisaCompute's native XIR-to-SPIR-V code generator, where incorrect legalization, descriptor binding, or control-flow emission produces invalid Vulkan shaders that fail validation or misbehave at runtime.
Core Features & Use Cases
- Compilation pipeline guidance: Documents the two compile entries (
compile_spirv, compile_spirv_xir), the mandatory AST-to-XIR legalization pipeline, and the fail-closed dialect validation boundary.
- Structured control flow and Phi emission: Explains the frozen
ControlFlowPlan, native OpPhi emission, and rules for loop headers, merges, and forwarding blocks.
- Vulkan ABI and target features: Covers descriptor set layout, bindless heaps, buffer layout fallback planning, ray-query traversal loops, and the persisted required-feature mask contract.
- Use Case: When adding a new XIR opcode or fixing a SPIR-V validation failure in the Vulkan backend, follow this Skill to classify the opcode in the dialect, update the opcode-matrix test, and emit code that passes
SPV_ENV_VULKAN_1_2 validation.
Quick Start
Ask the AI to add support for a new XIR opcode in the native SPIR-V codegen following the dialect boundary and validation rules in this skill.