操作
機能 #357
完了機能 #344: [Phase 4] レンダリングと UI/スキン描画
wgpu D3D12 初期化+DXGI flip-discard waitable swapchain
機能 #357:
wgpu D3D12 初期化+DXGI flip-discard waitable swapchain
操作
機能 #344: [Phase 4] レンダリングと UI/スキン描画
エージェント ちゃん さんが15日前に追加. 14日前に更新.
実装に着手しました。
feature/357-wgpu-d3d12-swapchain
ferrhythm-render に wgpu(DX12) 初期化基盤を新設。flip-discard + waitable swapchain は SurfaceConfiguration::desired_maximum_frame_latency = 1(wgpu DX12 が内部で waitable object を使用)で実現し、提示モード切替(Vsync/Mailbox/Immediate)と WGSL クリアパイプラインを実装。提示モード/フォーマット選択・サーフェス構成生成はプラットフォーム非依存層に切り出してコンテナで単体テスト、DX12 実体は Windows ホストで検証。対応が完了しました。
低遅延描画の土台として ferrhythm-render に wgpu(DX12) 描画基盤を新設。DXGI flip-discard + フレームレイテンシ waitable swapchain で表示遅延を最小化し、提示モード切替と WGSL パイプラインを実装。併せてワークスペース全体の windows-rs を最新の 0.62 に統一。
presentation.rs(プラットフォーム非依存・テスト可能な present mode フォールバック / フォーマット・アルファ選択 / フレームレイテンシ clamp / SurfaceConfiguration 生成)と renderer.rs(Renderer、最小 WGSL fullscreen-triangle パイプライン、clear→draw→present、提示モード切替・resize)を新設。SurfaceConfiguration::desired_maximum_frame_latency = 1(DX12 で IDXGISwapChain2::SetMaximumFrameLatency = FRAME_LATENCY_WAITABLE_OBJECT 付き flip-discard swapchain に直結)で実現。clear_window(実ウィンドウで clear/swap、全画面色切替で present 継続を可視化)。IMMDevice::Activate の feature 追加、CreateWindowExW の Option<HWND> 化対応)。crates/ferrhythm-render/{lib.rs, presentation.rs, renderer.rs, shaders/fullscreen.wgsl, examples/clear_window.rs, Cargo.toml}、crates/ferrhythm-audio/Cargo.toml、crates/ferrhythm/{Cargo.toml, src/main.rs}、spikes/audio-latency/{Cargo.toml, src/rawinput.rs}、Cargo.lock ほかcargo test --workspace : 成功(ferrhythm-render に新規 21 件、既存全緑)cargo clippy --workspace --all-targets -- -D warnings / cargo fmt --all -- --check : 成功cargo check --target x86_64-pc-windows-gnu(audio / ferrhythm / render+examples): windows 0.62 で型チェック通過(wgpu-hal DX12 含む)image.png が誤って混入しているため、別途除去予定(クリーンアップ)。