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

Aperta
#242 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
3
Fork
1
Merge medio
9h 51m
PR unite (30g)
310

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeatlasdev/atlas

Tutte le issue di codeatlasdev/atlas

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.