Skip to content

Add bring-your-own encoder functions to GPU contexts - #504

Merged
mkeeter merged 5 commits into
mainfrom
bring-your-own-encoder-redux
Oct 10, 2026
Merged

mkeeter merged 5 commits into
mainfrom
bring-your-own-encoder-redux

Conversation

@mkeeter

@mkeeter mkeeter commented Oct 10, 2026

Copy link
Copy Markdown
Owner

This lets us integrate into rendering pipelines where we're only given a CommandEncoder and don't want to submit work to the GPU queue behind its back.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

SSAO synchronization and staging-belt lifecycle documentation need correction.

2 open findings
What changed in this PR

Adds caller-provided command encoder support to GPU rendering pipelines.

Changes:

  • Adds low-level encode APIs using staging belts.
  • Refactors submission methods around the new APIs.
  • Documents usage and lifecycle requirements.
File Description
fidget-wgpu/​src/​voxel/​mod.rs Adds voxel encoding support.
fidget-wgpu/​src/​voxel/​effects/​mod.rs Adds encoder-based voxel effects.
fidget-wgpu/​src/​pixel/​mod.rs Adds pixel encoding support.
fidget-wgpu/​src/​pixel/​effects/​mod.rs Adds encoder-based pixel effects.
fidget-wgpu/​src/​lib.rs Documents encoding APIs.
fidget-wgpu/​src/​color.rs Converts color uploads to staged copies.
fidget-wgpu/​src/​buf.rs Adds staged config-buffer writes.
CHANGELOG.md Records the new APIs.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

.unwrap();
writer.copy_from_slice(cfg.as_bytes());
}
compute_pass.set_pipeline(&self.blur_pipeline);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect; WebGPU handles this kind of synchronization internally.

Comment thread fidget-wgpu/src/lib.rs
@mkeeter
mkeeter merged commit b927c44 into main Oct 10, 2026
14 checks passed
@mkeeter
mkeeter deleted the bring-your-own-encoder-redux branch October 10, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants