Terminal Phase 2 [Windows]: D3D11 backend for atlas-term + term/win.rs

未关闭
#242 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
12/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

Start with discussion #237 and the completed HWND spike, then read render/gpu.rs and render/mod.rs to see which of the 67 + 54 wgpu call sites the proposed backend trait has to cover. Read term/mac.rs alongside term_stub.rs so the Windows term/win.rs matches the existing command surface, and check build.rs for where term.wgsl would be run through naga and FXC. Done means pwsh renders interactively on Windows, render/tests.rs passes on both backends, and bun run check including rust-windows is green.

由索引模型根据 Issue 内容生成。

描述

area: terminal priority: 1 high status: confirmed type: feature

Part of the native GPU terminal roadmap. Design and evidence: discussion #237. Depends on the HWND spike.

Decision (from #237)

Native D3D11 on Windows; wgpu stays on macOS (Metal) and Linux (Vulkan). Measured: wgpu DX12 costs +65 MB and ~2.5× device time vs raw D3D11/D3D12, unchanged with lower limits. D3D11 also runs in VMs and on WARP (RDP).

Change

  • Extract a narrow GPU backend trait at the render/gpu.rs / render/mod.rs boundary (wgpu today: 67 + 54 uses; VT, fonts, graphics: none). Grid, atlas, instance building stay shared.
  • D3D11 backend: instanced quads, atlas texture, images; DXGI adapter by MINIMUM_POWER (iGPU); flip-model swapchain, frame-latency waitable object with SetMaximumFrameLatency(1), ALPHA_MODE_IGNORE when opaque; device-lost recreate; WARP when SM_REMOTESESSION or no hardware adapter.
  • One shader source: term.wgsl → naga HLSL → FXC SM 5.0 in build.rs. Spike: all 10 entry points compile once naga's DX12 sampler-heap lines are replaced by SamplerState atlas_smp : register(s0);; a build test fails if naga changes that output.
  • crates/atlas-desktop/src/term/win.rs replaces term_stub.rs on Windows, same commands as term/mac.rs.

Done when

pwsh opens and renders with keys, mouse, selection, copy; pixel comparison against macOS on the same frames; render/tests.rs passes on both backends; bun run check green incl. rust-windows.

主要语言
Rust
星标
3
派生
1
平均合并
9 小时 51 分钟
30 天内合并 PR
310

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codeatlasdev/atlas 的其他 Issue

查看 codeatlasdev/atlas 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。