webgpu-wgsl-memory-layout
OfficialPrevent broken WGSL buffer layouts
Software Engineering#alignment#webgpu#wgsl#memory layout#uniform buffers#storage buffers#address spaces
AuthorImpertio-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents host and shader memory mismatches when WebGPU code binds WGSL structs, buffers, and pointers, especially the vec3 alignment trap that causes silent garbage reads.
Core Features & Use Cases
- Lays out uniform and storage structs with correct AlignOf, SizeOf, and padding.
- Chooses the right WGSL address space, including function, private, workgroup, uniform, storage, and handle.
- Handles runtime-sized arrays, array stride rules, and @align and @size annotations.
- Use it when a JavaScript typed array must match a shader struct, when a compute shader writes to storage buffers, or when a uniform buffer keeps producing incorrect values.
Quick Start
Ask the assistant to review my WGSL struct and matching JavaScript buffer and return the correct byte offsets, padding, and array sizes for the chosen address space.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: webgpu-wgsl-memory-layout Download link: https://github.com/Impertio-Studio/WebGPU-Claude-Skill-Package/archive/main.zip#webgpu-wgsl-memory-layout Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.