Skip to content

[Feature] Compute pipeline creation #171

Description

@vmarcella

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.rspubstructComputePipeline{pipeline: wgpu::ComputePipeline,workgroup_size:[u32;3],}pubstructComputePipelineBuilder{shader:Option<ShaderModule>,entry_point:String,bind_group_layouts:Vec<BindGroupLayout>,}implComputePipelineBuilder{pubfnnew() -> Self;pubfnwith_shader(self,shader:&ShaderModule) -> Self;pubfnwith_entry_point(self,name:&str) -> Self;pubfnwith_bind_group_layout(self,layout:&BindGroupLayout) -> Self;pubfnbuild(self,gpu:&Gpu) -> Result<ComputePipeline,Error>;}implComputePipeline{pubfnworkgroup_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

Metadata

Metadata

Assignees

No one assigned

    Labels

    computeAll things compute relatedenhancementNew feature or requestlambda-rsIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions