Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a platform abstraction layer for wgpu command encoding and buffer operations. The changes move low-level wgpu details into a new platform module while providing higher-level wrappers for the renderer.
- Introduces
CommandEncoderandRenderPasswrapper types in the platform layer - Adds a new
buffermodule in the platform layer withBufferandBufferBuilder - Refactors the renderer to use these new abstractions instead of raw wgpu types
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 18 comments.
| File | Description |
|---|---|
| crates/lambda-rs/src/render/mod.rs | Updates imports and refactors command encoder/render pass creation to use new platform wrappers |
| crates/lambda-rs/src/render/buffer.rs | Refactors to delegate buffer creation to platform layer, adds helper methods and tests |
| crates/lambda-rs-platform/src/wgpu/mod.rs | Adds CommandEncoder and RenderPass wrapper types with convenience methods |
| crates/lambda-rs-platform/src/wgpu/buffer.rs | New file implementing platform-level buffer wrapper with builder pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When transitioning the engine to use
wgpuas opposed togfx-hal, a lot of shortcuts were taken to get the examples and API working with as minimal changes as possible. This starts refactoring some of the direct wgpu usage out oflambda-rsand implements wrappers overwgpuinside oflambda-rs-platform.