Skip to content

feat: AdapterInfo on DeviceProvider (ADR-020, v0.17.0)#16

Merged
kolkov merged 2 commits intomainfrom
feat/adapter-info
May 6, 2026
Merged

feat: AdapterInfo on DeviceProvider (ADR-020, v0.17.0)#16
kolkov merged 2 commits intomainfrom
feat/adapter-info

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented May 6, 2026

Summary

  • AdapterInfo — new AdapterInfo() method on DeviceProvider returning AdapterInfo{Name, Type}
  • AdapterType enum — Discrete, Integrated, Software, Unknown
  • Enables gg render mode auto-selection: CPU rasterizer on software adapters vs GPU accelerator on real hardware

Context

After SPIR-V interpreter (FEAT-SW-004), gg's GPU accelerator intercepted rendering on software backend, routing 2D operations through the interpreter at 0.65 FPS instead of the optimized CPU rasterizer at 60 FPS. With AdapterInfo, gg can detect software adapter and prefer its CPU path. See ADR-020.

Test plan

  • go build ./...
  • go test ./... — all pass
  • go vet ./... — clean
  • CI green

…-020)

Add AdapterType enum (Discrete, Integrated, Software, Unknown) and
AdapterInfo struct to DeviceProvider interface. Enables gg to detect
software adapter and prefer CPU rasterizer (60 FPS) over SPIR-V
interpreter (0.65 FPS) on software backend.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit 871ad21 into main May 6, 2026
10 checks passed
@kolkov kolkov deleted the feat/adapter-info branch May 6, 2026 14:55
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.

1 participant