Skip to content

macOS: drop aqtinstall, use Homebrew for everything#711

Merged
ten9876 merged 1 commit into
mainfrom
auto/macOS-drop-aqtinstall-use-Homebrew-for-everything
Apr 5, 2026
Merged

macOS: drop aqtinstall, use Homebrew for everything#711
ten9876 merged 1 commit into
mainfrom
auto/macOS-drop-aqtinstall-use-Homebrew-for-everything

Conversation

@ten9876

@ten9876 ten9876 commented Apr 5, 2026

Copy link
Copy Markdown
Collaborator

One package manager, one prefix, no conflicts. Homebrew's Qt is 6.7+
which satisfies QRhiWidget. Eliminates the aqtinstall/Homebrew Qt
version conflicts that caused Qt6GuiPrivate and linker failures.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

One package manager, one prefix, no conflicts. Homebrew's Qt is 6.7+
which satisfies QRhiWidget. Eliminates the aqtinstall/Homebrew Qt
version conflicts that caused Qt6GuiPrivate and linker failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ten9876 ten9876 enabled auto-merge (squash) April 5, 2026 01:23
@ten9876 ten9876 merged commit c474b1b into main Apr 5, 2026
2 checks passed
@ten9876 ten9876 deleted the auto/macOS-drop-aqtinstall-use-Homebrew-for-everything branch April 5, 2026 01:27
boydsoftprez added a commit to boydsoftprez/AetherSDR that referenced this pull request Apr 5, 2026
The upstream CMakeLists.txt skips finding Qt6GuiPrivate on macOS to
avoid Homebrew/aqtinstall conflicts. But Qt6GuiPrivate is required for
QRhi headers (rhi/qrhi.h) used by the GPU spectrum rendering. With
Homebrew-only builds (aqtinstall dropped in aethersdr#711), this conflict no
longer applies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ten9876 pushed a commit that referenced this pull request Apr 5, 2026
* Port optimizations to upstream v0.8.0: Retina DPR, overlay caching, state detection

Fixes ported from our GPU branch onto upstream's v0.8.0 codebase:

1. WA_NativeWindow + setApi(Metal) — required for QRhi initialization on macOS
2. Retina DPR overlay — render overlay QImages at device pixel resolution
   with setDevicePixelRatio() for sharp text on Retina displays
3. Overlay upload caching — skip 5.8MB texture upload when overlay content
   unchanged (only upload after m_overlayStaticDirty triggers repaint)
4. State change detection — monitor centerMhz, bandwidthMhz, refLevel,
   dynamicRange, spectrumFrac in renderGpuFrame to catch zoom/scroll that
   bypass markOverlayDirty()
5. Qt6GuiPrivate enabled on macOS (needed for rhi/qrhi.h)

Known tradeoff: WA_NativeWindow on macOS adds ~75% CPU overhead from
native window compositing (paintSiblingsRecursive). Without it, QRhi
doesn't initialize (grey screen). This is a Qt/macOS limitation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix macOS CPU: skip redundant QPainter, prevent VFO cascade, cache overlays

Three optimizations that reduce macOS CPU from ~100% to ~35% idle:

1. paintEvent GPU guard: When QRhi is initialized, skip the full QPainter
   rendering path and delegate to SPECTRUM_BASE_CLASS::paintEvent() which
   triggers the GPU render() pipeline. The QPainter path was running the
   complete software rendering (grid, spectrum, waterfall, overlays) every
   frame even though render() already handles everything via Metal.

2. VFO cascade prevention: VfoWidget::updatePosition() was calling move()
   and raise() on 4-5 child widgets every frame from renderGpuFrame().
   The raise() calls force z-order changes that trigger Qt's
   paintSiblingsRecursive, causing double rendering per frame. Fix: add
   position-change guard (skip if pos unchanged) and remove per-frame
   raise() calls (buttons are raised once on creation/activation).

3. Overlay dirty fix: setWfBlackLevel() was calling markOverlayDirty()
   25x/sec from the auto-black calculation, forcing full QPainter overlay
   re-rendering every frame. Black level only affects waterfall, not the
   overlay (grid/scales/markers). Fix: use update() instead, and add
   change guards to setWfBlackLevel, setWfColorGain, setFrequencyRange,
   setDbmRange, and setSliceOverlay to skip when values unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Fix macOS build: enable Qt6GuiPrivate for QRhi headers

The upstream CMakeLists.txt skips finding Qt6GuiPrivate on macOS to
avoid Homebrew/aqtinstall conflicts. But Qt6GuiPrivate is required for
QRhi headers (rhi/qrhi.h) used by the GPU spectrum rendering. With
Homebrew-only builds (aqtinstall dropped in #711), this conflict no
longer applies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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