Skip to content

Real VirtIO GPU driver with good 2D rendering handling - #3250

Merged
valentinbreiz merged 16 commits into
CosmosOS:gen3from
Epiczhul:gen3
Sep 21, 2026
Merged

valentinbreiz merged 16 commits into
CosmosOS:gen3from
Epiczhul:gen3

Conversation

@Epiczhul

@Epiczhul Epiczhul commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

This Extends the existing VirtIO GPU "driver" (if you can call it that) to a full driver, currently only 2D, not 3D
Performance is much better in QEMU now than with GOP.

Filled rectangles GOP: 23.0 fps vs. VirtIO-GPU: 47.4 fps
Sprite blits (DrawCanvas) GOP: 20.1 fps vs. VirtIO-GPU: 44.8 fps
Full-frame DrawArray GOP: 21.1 fps vs. VirtIO-GPU: 55.6 fps
Flush only (Display) GOP: 23.0 fps vs. VirtIO-GPU: 64.7 fps

Information about the low fps:
This was tested on a Laptop with:
Intel Core i5 2520M
8GB SODIMM DDR3
256GB Random Sata SSD
Nvidia NVS 4200M
image

xmb9 and others added 15 commits September 15, 2026 01:26
- `Ext2FilesystemType` (mount/format/destroy) mirroring `FatFilesystemType`
- Inode/file/dir ops: case-sensitive lookup, file/folder permissions, inline + block symlinks
- `VfsManager.TryResolve` follows symlinks (max depth 8)
- `IInodeOperations.TryReadLink` (default false, FAT unchanged)
- Host smoke tests: format/mount, read/write, case, symlink, chmod, indirect roundtrip
- I wasn't going to include the smoke test in this commit, but honestly I'm too lazy to remove it and there's not much reason to remove it regardless.
feat: experimental ext2 filesystem driver, symlink support
Added official chat badge and removed gen3 preview badge.
🔖 Bump version to 3.0.87
Add virtio-gpu device registration and canvas selection
Add virtio-gpu 2D driver and canvas
@github-actions

Copy link
Copy Markdown

🧪 Fat Tests

Cell x64 arm64
all ✅ 42/42 ✅ 42/42

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 File Tests

Cell x64 arm64
all ✅ 37/37 ✅ 37/37

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 GarbageCollector Tests

Cell x64 arm64
all ✅ 47/47 ✅ 47/47

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Graphic Tests

Cell x64 arm64
all ✅ 37/50, 13 skip ⚠️ 12/25, 13 skip
bare ⚠️ 12/25, 13 skip ⚠️ 12/25, 13 skip
vmware-svga ✅ 25/25 n/a

Skipped

  • x64: 13 skipped: VMware SVGA II adapter not present, needs the vmware-svga profile (13)
  • arm64: 13 skipped: VMware SVGA II adapter not present, needs the vmware-svga profile (13)

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 HelloWorld Tests

Cell x64 arm64
all ✅ 3/3 ✅ 3/3

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Interrupts Tests

Cell x64 arm64
all ✅ 12/12 ✅ 25/36, 11 skip
bare ✅ 12/12 ✅ 7/12, 5 skip
bare+gicv2 n/a ✅ 9/12, 3 skip
bare+gicv3 n/a ✅ 9/12, 3 skip

Skipped

  • arm64: 11 skipped: self-IPI harness is x64-only (3), LAPIC MSI address contract is x64-only (3), LAPIC timer vector is x64-only (3), gic-version not pinned by this cell (2)

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Math Tests

Cell x64 arm64
all ✅ 30/30 ✅ 30/30

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Network Tests

Cell x64 arm64
all ✅ 48/48 ✅ 48/48
e1000e ✅ 24/24 n/a
virtio-net-mmio n/a ✅ 24/24
virtio-net-pci ✅ 24/24 ✅ 24/24

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Pci Tests

Cell x64 arm64
all ✅ 6/6 ✅ 6/6

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Power Tests

Cell x64 arm64
all ✅ 4/4 ✅ 4/4

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Runtime Tests

Cell x64 arm64
all ✅ 103/103 ✅ 103/103

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Storage Tests

Cell x64 arm64
all ✅ 283/292, 9 skip ⚠️ 437/876, 439 skip
ahci ✅ 69/73, 4 skip ✅ 69/73, 4 skip
ahci+acpi-off ✅ 69/73, 4 skip ⚠️ 3/73, 70 skip
ahci+gicv2 n/a ✅ 69/73, 4 skip
ahci+gicv2+acpi-off n/a ⚠️ 3/73, 70 skip
ahci+gicv3 n/a ✅ 69/73, 4 skip
ahci+gicv3+acpi-off n/a ⚠️ 3/73, 70 skip
nvme ✅ 73/73 ✅ 70/73, 3 skip
nvme+acpi-off ✅ 72/73, 1 skip ⚠️ 3/73, 70 skip
nvme+gicv2 n/a ✅ 71/73, 2 skip
nvme+gicv2+acpi-off n/a ⚠️ 3/73, 70 skip
nvme+gicv3 n/a ✅ 71/73, 2 skip
nvme+gicv3+acpi-off n/a ⚠️ 3/73, 70 skip

Skipped

  • x64: 9 skipped: 64-bit BAR relocation probe is nvme-profile only (4), not an NVMe profile (2), NVMe controller API is nvme-profile only (2), acpi-off has no MSI routing to pin (1)
  • arm64: 439 skipped: no block device bound for partition-table tests (294), no block device bound for this profile (105), x64 mapper cell; arm64 installs Device mappings via DeviceMapper (12), BAR relocation probe is x64-only (same harness as the mapper cell) (12), NVMe controller API is nvme-profile only (9), not an NVMe profile (6), interrupt mode not pinned by this cell (1)

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Threading Tests

Cell x64 arm64
all ✅ 76/76 ✅ 76/76

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Timer Tests

Cell x64 arm64
all ✅ 26/26 ✅ 20/20

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 TypeCasting Tests

Cell x64 arm64
all ✅ 17/17 ✅ 17/17

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

@github-actions

Copy link
Copy Markdown

🧪 Virtio Tests

Cell x64 arm64
all ✅ 10/10 ✅ 17/20, 3 skip
virtio-mmio n/a ✅ 7/10, 3 skip
virtio-pci ✅ 10/10 ✅ 10/10

Skipped

  • arm64: 3 skipped: this cell presents virtio over MMIO (3)

📎 Artifacts

Architecture Test Results UART Log Kernel ISO
x64 XML Log ISO
arm64 XML Log ISO

📋 View full test summary | 📄 Kernel.cs

The profile matrix had no cell with a virtio GPU on the bus, so nothing
in CI ever reached VirtioGpuCanvas: the Graphic suite ran `bare` and
`vmware-svga`, and the catalog's only display axis was `vga`, a -vga
backend name.

Add a `gpu` key that attaches a display adapter with -device, and a
`virtio-gpu` profile using it on both arches. It has to be additive
rather than another `vga` entry for two reasons:

  * -vga REPLACES the machine's default adapter, and that default is
    what the firmware hands Limine — VBE over q35's std VGA, ramfb on
    virt. The suite renders into that framebuffer, so taking it away
    breaks every test instead of adding coverage.
  * QEMU resolves -vga virtio to the VGA-compatible virtio-vga on q35
    but refuses it on the virt machine ("Virtio VGA not available"), so
    one shape spanning both arches cannot go through -vga at all.

gic-version=3 on arm64 for the same reason as the virtio-pci profile:
the device comes up with MSI-X, routed by the GICv3 ITS, and virt
defaults to GICv2, which has none.

With the default adapter left in place, FullScreenCanvas still decides
which canvas the tests get, so the same 23 assertions run over
VirtioGpuCanvas in this cell and over the firmware framebuffer in the
others. Confirmed from the boot log rather than the pass count, since a
driver that fails to bind falls back to GOP and would pass quietly:

  x64    [VirtioPci] Device type 16 at 0:3.0 (MSI-X)
         [VirtioGpu] Initialization complete (1280x800)  69 tests, 0 failed
  arm64  [VirtioPci] Device type 16 at 0:2.0 (MSI-X)
         [VirtioGpu] Initialization complete (1280x800)  46 tests, 0 failed
@valentinbreiz
valentinbreiz merged commit acabb75 into CosmosOS:gen3 Sep 21, 2026
valentinbreiz added a commit that referenced this pull request Sep 21, 2026
The virtio-gpu files merged in #3250 align their const initializers into
columns, which `dotnet format --severity error` rejects (WHITESPACE), so
the .NET Format workflow has been red on gen3 since that merge.

Run `dotnet format` over Cosmos.Kernel.HAL to collapse the padding. No
behavior change - whitespace only.
valentinbreiz added a commit that referenced this pull request Sep 21, 2026
The CosmosOS/Cosmos changelog walks every merge commit between the two
tags and resolves each to its pull request. `/commits/{sha}/pulls`
answers with the pull request that *introduced* the commit, so a branch
that merged gen3 into itself, or a contributor's own fork-side merges,
resolved back to the same top-level pull request and repeated its line
once per merge commit.

v3.0.88 printed ten lines for four pull requests, #3250 six times.

Keep the first line per pull request URL; the duplicates are identical,
so ordering is unaffected.
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.

3 participants