Skip to content
Skills Library
Programming · Building & coding

gpu-rendering-vulkan-guide

/gpu-rendering-vulkan-guide

Use when implementing a Vulkan renderer: the concrete Vulkan API for device/queues, device memory + memory types + staging, images/buffers + pipeline barriers and layout transitions, descriptor sets/layouts + bindless, pipelines + pipeline cache + dynamic rendering, timeline semaphores + fences, command pools/buffers, and the swapchain. Triggers on Vk* types and vkCmd*/vkCreate* calls, VkImageMemoryBarrier2, VkDescriptorSet, VkPipeline, VkSemaphore, VkCommandPool, swapchain acquire/present, even when the user doesn't say 'Vulkan'.

Repository
platform ↗
Licence
MIT
Last repository change
08.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when implementing a Vulkan renderer: the concrete Vulkan API for device/queues, device memory + memory types + staging, images/buffers + pipeline barriers and layout transitions, descriptor sets/layouts + bindless, pipelines + pipeline cache + dynamic rendering, timeline semaphores + fences, command pools/buffers, and the swapchain. Triggers on Vk* types and vkCmd*/vkCreate* calls, VkImageMemoryBarrier2, VkDescriptorSet, VkPipeline, VkSemaphore, VkCommandPool, swapchain acquire/present, even when the user doesn't say 'Vulkan'.

Triggers from the description

t say
Original author description

Use when implementing a Vulkan renderer: the concrete Vulkan API for device/queues, device memory + memory types + staging, images/buffers + pipeline barriers and layout transitions, descriptor sets/layouts + bindless, pipelines + pipeline cache + dynamic rendering, timeline semaphores + fences, command pools/buffers, and the swapchain. Triggers on Vk* types and vkCmd*/vkCreate* calls, VkImageMemoryBarrier2, VkDescriptorSet, VkPipeline, VkSemaphore, VkCommandPool, swapchain acquire/present, even when the user doesn't say 'Vulkan'.

How it works

  1. Requirements
  2. Setup
  3. Resources & sync
  4. Pipelines & binding
  5. Commands & present
  6. Gotchas
  7. Progressive Disclosure
Original SKILL.md headings · 47 lines, 405 words
SKILL.md preview
---
name: gpu-rendering-vulkan-guide
description: "Use when implementing a Vulkan renderer: the concrete Vulkan API for device/queues, device memory + memory types + staging, images/buffers + pipeline barriers and layout transitions, descriptor sets/layouts + bindless, pipelines + pipeline cache + dynamic rendering, timeline semaphores + fences, command pools/buffers, and the swapchain. Triggers on Vk* types and vkCmd*/vkCreate* calls, VkImageMemoryBarrier2, VkDescriptorSet, VkPipeline, VkSemaphore, VkCommandPool, swapchain acquire/present, even when the user doesn't say 'Vulkan'."
---

# Vulkan Rendering Guidelines

The concrete Vulkan API for a low-level renderer. This skill is the Vulkan _how_; apply **gpu-rendering-guide** for the _why_ and the API-agnostic architecture (render graphs, binding model, sync model, frames-in-flight, memory strategy). For the general allocator principle behind device memory see memory-management-guide.

## Requirements

- Vulkan 1.3 (or 1.2 + the relevant extensions: `VK_KHR_synchronization2`, `VK_KHR_dynamic_rendering`, `VK_EXT_descriptor_indexing`, `VK_KHR_timeline_semaphore`).
- Validation layers + synchronization validation on in development; a frame debugger (RenderDoc-class) for capture.

## Setup

- **Device & queues** - `VkInstance` → physical device → `VkDevice`; select graphics/compute/transfer queue families, see [references/device-and-queues.md](references/device-and-queues.md)
- **Device memory** - `VkPhysicalDeviceMemoryProperties` types/heaps; few `vkAllocateMemory` + sub-allocation; staging, see [references/device-memory.md](references/device-memory.md)

## Resources & sync

- **Images/buffers & barriers** - `VkImage`/`VkBuffer` + views, `VkImageMemoryBarrier2` stage/access masks, layout transitions, see [references/resources-and-barriers.md](references/resources-and-barriers.md)
- **Synchronization** - `VkSemaphore` (binary + timeline), `VkFence`, pipeline stage/access masks, submit-time waits, see [references/synchronization.md](references/synchronization.md)

## Pipelines & binding

- **Descriptors** - `VkDescriptorSetLayout`/`Pool`/`Set`, update-after-bind for bindless, push constants, set frequency, see [references/descriptors.md](references/descriptors.md)
- **Pipelines** - `VkPipeline` (graphics/compute), `VkPipelineCache`, dynamic rendering vs render passes, dynamic state, see [references/pipelines.md](references/pipelines.md)

## Commands & present

- **Commands & swapchain** - `VkCommandPool` per thread per frame, primary/secondary buffers, `VkSwapchainKHR` acquire/present, fence per frame, see [references/commands-and-swapchain.md](references/commands-and-swapchain.md)

## Gotchas

- `vkAllocateMemory` is hard-capped (`maxMemoryAllocationCount`, often ~4096) and slow; sub-allocate from a few large blocks. The architecture rationale is in gpu-rendering-guide.
- A `VkImageMemoryBarrier2` that omits the layout transition, or uses `oldLayout` that does not match the image's current layout, is undefined behavior: track current layout per image/subresource.
- A `VkDescriptorSet` updated while the GPU may still read it (without `UPDATE_AFTER_BIND`) is a data race: gate on the frame `VkFence`.
- Binding a `VkPipeline` whose dynamic state you forgot to set (e.g. `vkCmdSetViewport`) draws nothing or validation-errors; declare every dynamic state you rely on.
- Ignoring `VK_ERROR_OUT_OF_DATE_KHR`/`VK_SUBOPTIMAL_KHR` from acquire/present leaves a stale swapchain after resize: recreate it.

## Progressive Disclosure

- Read [references/device-and-queues.md](references/device-and-queues.md) - Load when creating the instance/device or selecting queue families
- Read [references/device-memory.md](references/device-memory.md) - Load when allocating device memory, choosing memory types, or staging uploads
- Read [references/resources-and-barriers.md](references/resources-and-barriers.md) - Load when creating images/buffers or placing `VkImageMemoryBarrier2`/layout transitions
- Read [references/descriptors.md](references/descriptors.md) - Load when building descriptor set layouts/pools/sets, going bindless, or using push constants
- Read [references/pipelines.md](references/pipelines.md) - Load when building `VkPipeline`s, the pipeline cache, or dynamic rendering
- Read [references/synchronization.md](references/synchronization.md) - Load when using `VkSemaphore`/`VkFence`, stage/access masks, or submit-time waits
- Read [references/commands-and-swapchain.md](references/commands-and-swapchain.md) - Load when managing command pools/buffers, the swapchain, or frames-in-flight
Files in this package (12)
  • SKILL.md 4 KB
  • SOURCES.md 5 KB
  • eval-queries.json 6 KB
  • evals.json 3 KB
  • moon.yml 1 KB
  • references/commands-and-swapchain.md 6 KB
  • references/descriptors.md 6 KB
  • references/device-and-queues.md 4 KB
  • references/device-memory.md 5 KB
  • references/pipelines.md 6 KB
  • references/resources-and-barriers.md 3 KB
  • references/synchronization.md 5 KB

Versions

The database has no other skills named gpu-rendering-vulkan-guide.

Database snapshot: 13.11.2026 · package version 7c200c95d42a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95vulkan
    Use this skill when the user says 'vulkan', 'vkQueueSubmit', 'swapchain', 'render pass', 'dynamic rendering', 'pipeline barrier', 'synchronization2', 'descriptor sets', 'VMA', 'vulkan validation'. Guides explicit Vulkan rendering: instance/device setup, swapchain, dynamic…
  • 90gpu-rendering-guide
    Use when designing the architecture of a low-level GPU renderer on any explicit API (Vulkan/D3D12/Metal/WebGPU): render/frame graphs, shader/permutation systems, the descriptor/binding model, explicit GPU↔CPU synchronization, command recording and frames-in-flight, and GPU…
  • 100render-graph
    Use this skill when the user says 'render graph', 'frame graph', 'transient resources', 'barriers', 'async compute', 'GPU-driven rendering', 'command lists'. Designs render/frame graphs: pass declaration, resource lifetimes and aliasing, automatic barriers, queues and async…
  • 100managing-metal4-synchronization
    Metal 4 explicit synchronization — barriers, fences, events, and cross-API state translation (from D3D12, Vulkan, OpenGL). Use when porting GPU synchronization, translating resource state transitions, or debugging barrier-related visual corruption.
  • 100metal-game-rendering-workflow
    Guide native Apple game and custom-renderer work with Metal 3 and Metal 4. Use when Codex owns MTKView, CAMetalLayer, drawable presentation, render passes, command encoding, MSL shaders, pipeline states, GPU resources, Metal capability fallback, GPU capture, or renderer…
  • 95translating-to-metal4-api
    ALWAYS use as the Metal 4 API reference and cross-API translation map when porting graphics code to Metal 4 — translating Metal 3, D3D12, or Vulkan calls, looking up any MTL4 / Metal 4 API or renamed type, finding the Metal 4 equivalent of a source-API call, or learning what the…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.