All notable changes to this project will be documented in this file. Breaking changes in the generated code will be considered as breaking changes when versioning wgsl_bindgen itself.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added
BindGroups::set
method for setting all bind groups from a struct.
- Moved vertex input methods from vertex module to top level.
- Moved
set_bind_groups
to top level and changed parameters to directly take bind group references.
- Fixed an issue where
@builtin()
attributes were not supported in struct definitions.
- Added
create_shader_module_embedded
for including the source as a string literal instead of usinginclude_str!
. - Added
#[derive(Debug)]
to generated types for easier debugging and profiling.
- Adjusted code generation to skip structs that are only used internally in the shader.
- Update naga to 0.12.0 to match wgpu 0.16.
- Added vertex buffer layout function to each vertex input struct.
- Added support for nalgebra for matrix and vector types.
- Added const asserts to check approriate Rust struct memory layouts with WGSL when deriving bytemuck.
- Added support for storage textures.
- Added support for multisampled textures.
- Added a function for creating compute pipelines.
- Added optional derives for
serde::Serialize
andserde::Deserialize
. - Added functions to initialize vertex state for pipeline descriptors.
- Skip generating structs for shader stage outputs since they aren't needed.
- Updated documentation.
- Added a check to force bind groups to be consecutive.
- Added a check for repeated bind groups or bindings.
- Added an example project.
- Added support for array bindings.
- Added support for depth textures.
- Added support for additional WGSL scalar types.
- Added
WriteOptions
to control generated derives. - Added support for
glam
or Rust types for vectors and matrices. - Added the workgroup size for generated code for compute shaders.
- Changed the return type of
create_shader_module
toString
instead of writing to a file. - Changed the visibility of resources to match the shader stages present in the module.
- Changed shader source parameter of
create_shader_module
take&str
instead of a path. - Changed bind groups to be more flexible by taking
wgpu::BufferBinding
instead ofwgpu::Buffer
. - Changed project to depend on
wgpu-types
instead ofwgpu
itself.
- Removed the notice for generated code from the generated module string.
- Removed vertex attribute location code.
- Removed inaccurate generated struct size code.
- Added create_pipeline_layout function.
- Added create_shader_module function.
- Added constants for vertex input locations.
- Added functions to set all bind groups or individual bind groups.
- Added Rust structs for global types like uniforms and vertex inputs.
- Added code to generate vertex state from vertex input structs.
- Added
#[derive(PartialEq)]
to generated structs.
- Fixed an issue where the generated code would not use
wgpu::ComputePass
for compute only modules.
- Moved bindgroup layout descriptors to constants.
- Converted the procedural macro to a function to be used in build scripts.
- Always generate Rust types like arrays instead of forcing glam.
Initial release!