Skip to content

fix(gpui): keep rejected in scope for the external-texture draw - #11

Merged
soyboyscout merged 1 commit into
mainfrom
fix/windows-external-texture-rejected-scope
Sep 26, 2026
Merged

soyboyscout merged 1 commit into
mainfrom
fix/windows-external-texture-rejected-scope

Conversation

@soyboyscout

@soyboyscout soyboyscout commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

What this fixes

The Windows build of gpui_windows failed to compile. In DirectXRenderer's external-texture draw, rejected was declared inside the device-borrow block, but the partial-upload check that reads it runs after that block ends. The fix moves the declaration above the block. There is no behaviour change on any platform.

Why merge it now

Cherry Pick already pins this commit (d31a784): cherrypick main has pointed its cherrypick-zed submodule here since 877920ef ("point cherrypick-zed at the Windows external-texture compile fix"). The commit exists only on this branch, so deleting or force-pushing the branch would leave the pinned submodule commit unfetchable for fresh clones and CI. Merging it into main makes the pin reachable from the default branch.

Checks

  • One commit, crates/gpui_windows/src/directx_renderer.rs, +4/−1.
  • It sits directly on top of main (6397a12), so the merge is a fast-forward with no conflicts.
  • Cherry Pick main and CodeCraftersLLC/cherrypick#132 already check out this commit as their submodule. Their PR CI does not compile the Windows renderer, so the Windows build itself was not re-verified here.

🤖 Generated with Claude Code


Note

Low Risk
Single-line scoping fix in Windows rendering with no intended runtime behavior change.

Overview
Fixes a Windows compile error in draw_external_frame: the rejected flag was declared inside the scoped block that borrows the D3D device, but the function still reads it after that block when deciding whether to return ExternalTextureUpload::Partial.

The change moves let mut rejected = false above the device block and adds a short comment. Upload validation still sets rejected inside the block; the post-draw partial-upload path is unchanged in intent—only the variable’s lifetime is widened so the crate builds.

Reviewed by Cursor Bugbot for commit d31a784. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes the Windows compile failure in gpui_windows's external-texture draw by moving the rejected flag above the device-borrow block, where the partial-upload check reads it after the borrow ends. No behavior change on any platform.

Merge note

  • Cherry Pick's cherrypick-zed submodule pins this commit, which exists only on this branch; merging into main keeps the pin reachable for fresh clones and CI.

Written for commit d31a784. Summary will update on new commits.

Review in cubic

The flag was declared inside the device borrow, but the partial-upload
return runs after that borrow ends, so Windows failed to compile.
Copilot AI lite review requested due to automatic review settings September 26, 2026 01:47
@matterai-app

matterai-app Bot commented Sep 26, 2026

Copy link
Copy Markdown

Caution

PR Summary Skipped - Monthly Quota Exceeded

PR summary skipped as you have reached the free tier limit of 50 PR summaries per month. Please upgrade to a paid plan for MatterAI.

Current Plan: Free Tier
Free Tier Limit: 25 PR Summaries per month
Current Usage: 25 PR Summaries
Resets in: 4 days

Upgrade your plan on the console here: https://app.matterai.so/ai-code-reviews?tab=Billing

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 88a23ed9-8b7b-4268-8204-5a87f5b09aab

📥 Commits

Reviewing files that changed from the base of the PR and between 6397a12 and d31a784.

📒 Files selected for processing (1)
  • crates/gpui_windows/src/directx_renderer.rs
 _________________________________________________________________________________________________
< I reached into your code and found nothing there to ease the pressure on my ever-worrying mind. >
 -------------------------------------------------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@soyboyscout
soyboyscout merged commit 12d1a3b into main Sep 26, 2026
38 of 39 checks passed

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.

Copilot review overview

🟢 Approval recommended

The scoping-only fix resolves the compile error without changing behavior.

Review effort: Lite
Findings: None

What changed in this PR

Fixes a Windows compilation error by widening rejected’s scope in external-texture drawing.

Changes:

  • Moves rejected outside the device-borrow block.
  • Preserves existing partial-upload behavior.
File Description
crates/​gpui_windows/​src/​directx_renderer.rs Fixes variable scoping in external-texture drawing.

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

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