Repository navigation
gpui: Support in-place image updates - #4
Merged
Merged
Conversation
Add stable atlas uploads across Metal, WGPU, and DirectX, explicit nearest-neighbor polychrome sampling, and cached-scene presentation for externally updated images.
remorses
added a commit
to remorses/gpuix
that referenced
this pull request
Sep 10, 2026
Fast-forward the submodule from 5f672a20b1 to 81c99f816b on origin/gpuix. That is remorses/zed#4: atlas uploads keep a same-sized tile on Metal, WGPU, and DirectX, plus nearest-neighbor polychrome sampling and Window::present_cached_frame. GPUIX needed no code change. rust-toolchain stays 1.97.1. cargo check, cargo test --lib, bun run build, and img.test.tsx all passed. Session: ses_f7ec2f4c6ffekfPE4MgCvjex0R
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.
Objective
Solution
RenderImage::from_bgrafor tightly packed, single-frame pixel buffers.PlatformAtlas::update, with in-place uploads for Metal, WGPU, and DirectX and the existing remove/reinsert behavior as the default fallback.Window::update_image, which reports whether every atlas tile retained its identity, andWindow::present_cached_framefor safely presenting that updated stable scene.The separate monochrome glyph sampling discussion in zed-industries/zed#57777 and zed-industries/zed#57781 is intentionally out of scope.
Testing
cargo test -p gpui -p gpui_apple --lib --features gpui_apple/runtime_shaders— 269 GPUI tests and 4 Metal atlas tests passed.cargo test -p gpui_wgpu --lib— 31 tests passed, including same-size reuse, resize fallback, BGRA swizzling, WGSL validation, WebGL transport, and sprite stride coverage../script/clippy -p gpui_apple,./script/clippy -p gpui_wgpu, and./script/clippy -p gpui_windowspassed.cargo clippy -p gpui --release --lib --all-features -- --deny warningspassed. The repository wrapper's all-target GPUI run is currently blocked by a pre-existingredundant_clonelint incrates/gpui/src/interactive.rs:881.MetalHeadlessRendererwith runtime shaders to compile the complete changed Metal shader successfully.git diff --checkpassed.Tested on macOS Apple Silicon. Metal and WGPU executed locally. The DirectX implementation was linted but requires Windows CI or hardware for runtime validation.
Self-Review Checklist:
Release Notes: