Skip to content

feat(quickemu): enable GL on macOS (cocoa) and prefer virtio GL#1812

Merged
flexiondotorg merged 2 commits intomasterfrom
macos-gl
Jan 24, 2026
Merged

feat(quickemu): enable GL on macOS (cocoa) and prefer virtio GL#1812
flexiondotorg merged 2 commits intomasterfrom
macos-gl

Conversation

@flexiondotorg
Copy link
Member

  • Add check_cocoa_gl_es_support(): detect QEMU cocoa gl=es support and look for
    ANGLE/libEGL in QEMU prefix, Homebrew and DYLD paths
  • Use the check in configure_display() to enable "gl=es" for cocoa when available
    and fall back to disabling GL (preserving previous stability behaviour)
  • Improve virtio GL selection: prefer virtio-gpu(-gl) / virtio-gpu-gl-pci /
    virtio-vga-gl variants when GL is enabled and QEMU exposes the device
  • Remove the hard disable of GL for cocoa in display_param_check() (now handled
    by the detection function)
  • Ensure user-visible display/GL/VirGL status remains printed for diagnostics
    Enables safer GL usage on macOS (covers Nix/Homebrew QEMU and ANGLE cases);
    falls back cleanly when support is absent.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have performed a self-review of my code
  • I have tested my code in common scenarios and confirmed there are no regressions

- Add check_cocoa_gl_es_support(): detect QEMU cocoa gl=es support and
look for
  ANGLE/libEGL in QEMU prefix, Homebrew and DYLD paths
- Use the check in configure_display() to enable "gl=es" for cocoa when
available
  and fall back to disabling GL (preserving previous stability
behaviour)
- Improve virtio GL selection: prefer virtio-gpu(-gl) /
virtio-gpu-gl-pci /
  virtio-vga-gl variants when GL is enabled and QEMU exposes the device
- Remove the hard disable of GL for cocoa in display_param_check() (now
handled
  by the detection function)
- Ensure user-visible display/GL/VirGL status remains printed for
diagnostics
Enables safer GL usage on macOS (covers Nix/Homebrew QEMU and ANGLE
cases);
falls back cleanly when support is absent.

Signed-off-by: Martin Wimpress <martin@wimpress.org>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Confidence score: 3/5

  • Portability risk: quickemu uses grep with \| in BRE, which fails on macOS without -E, so pattern matching may break for macOS users.
  • Score reflects a concrete cross-platform behavior issue with medium severity, though it’s localized and straightforward to fix.
  • Pay close attention to quickemu - grep alternation should use -E for macOS compatibility.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="quickemu">

<violation number="1" location="quickemu:968">
P1: BSD grep on macOS doesn't support `\|` alternation in BRE. Use `-E` flag for extended regex to ensure the pattern works correctly on macOS.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@flexiondotorg flexiondotorg merged commit e3fb8c3 into master Jan 24, 2026
4 of 5 checks passed
@flexiondotorg flexiondotorg deleted the macos-gl branch January 24, 2026 14:02
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