-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
good first issueGood for newcomersGood for newcomersgpuGPU rendering pipelineGPU rendering pipelineuiUser interfaceUser interface
Description
Problem
The PerformanceHUD shows FPS from the frontend (frames received via IPC). When the GPU renderer is active, the real FPS is tracked in the Rust `GpuRenderer` but not exposed to the UI.
Implementation
Step 1: Expose GPU metrics via Tauri command
Add a command `get_gpu_metrics()` that returns:
```typescript
interface GpuMetrics {
fps: number;
frameTime: number; // ms per frame
publishTime: number; // ms for SharedFrame publish
uploadTime: number; // ms for write_texture
presentTime: number; // ms for submit + present
framesRendered: number;
textureWidth: number;
textureHeight: number;
adapterName: string;
}
```
Step 2: Store metrics in GpuRenderer
The FPS counter already exists (`frames_rendered`, `last_fps_log`). Add a `Mutex` field that's updated every frame and readable from any thread.
Step 3: Display in PerformanceHUD
When GPU renderer is active:
- Show "GPU: 60.0 FPS" instead of "FPS: 3"
- Show frame time breakdown (publish/upload/present)
- Show GPU adapter name
- Badge: "GPU Accelerated" in green
Files to modify
- `src-tauri/src/renderer/gpu.rs` — add metrics struct + getter
- `src-tauri/src/commands/session.rs` — add `get_gpu_metrics` command
- `src/components/session/PerformanceHUD.tsx` — display GPU metrics
- `src/hooks/useRdpSession.ts` — poll GPU metrics
Priority: P2 — observability for the GPU pipeline
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersgpuGPU rendering pipelineGPU rendering pipelineuiUser interfaceUser interface