-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
computeAll things compute relatedAll things compute relatedenhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappers
Description
Overview
Add support for compute pipelines to enable GPU compute operations for
particle simulation, culling, and general-purpose computation.
Current State
No response
Scope
Goals:
- Compute shader loading and compilation
- Compute pipeline builder
- Workgroup size configuration
- Pipeline caching
Non-Goals:
- Storage buffers
- Dispatch commands
- Async compute queues
Proposed API
// crates/lambda-rs/src/render/compute.rs
pub struct ComputePipeline {
pipeline: wgpu::ComputePipeline,
workgroup_size: [u32; 3],
}
pub struct ComputePipelineBuilder {
shader: Option<ShaderModule>,
entry_point: String,
bind_group_layouts: Vec<BindGroupLayout>,
}
impl ComputePipelineBuilder {
pub fn new() -> Self;
pub fn with_shader(self, shader: &ShaderModule) -> Self;
pub fn with_entry_point(self, name: &str) -> Self;
pub fn with_bind_group_layout(self, layout: &BindGroupLayout) -> Self;
pub fn build(self, gpu: &Gpu) -> Result<ComputePipeline, Error>;
}
impl ComputePipeline {
pub fn workgroup_size(&self) -> [u32; 3];
}Acceptance Criteria
- Compute shaders compile successfully
- Pipeline creation with custom bind groups
- Workgroup size accessible
- Error handling for invalid shaders
- Example with simple compute shader
Affected Crates
lambda-rs, lambda-rs-platform
Notes
- Entry point typically "main" for compute
- Workgroup size declared in shader, queried from reflection
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
computeAll things compute relatedAll things compute relatedenhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappers