fix(exporter): set default render backend for ModernVideoExporter#769
Open
maxmedina05 wants to merge 1 commit into
Open
fix(exporter): set default render backend for ModernVideoExporter#769maxmedina05 wants to merge 1 commit into
maxmedina05 wants to merge 1 commit into
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesLightning backend selection
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ModernVideoExporterpassespreferredRenderBackend: undefinedtoModernFrameRenderer. With no preference andnavigator.gpupresent (always, in Electron), the backend order becomes["webgpu", "webgl"], so Lightning renders through Pixi's WebGPU path — which is broken on Linux across GPU vendors (#644 has Intel, AMD, and NVIDIA reporters).backendPolicyalready exportsgetDefaultLightningRenderBackend(), which returns"webgl"and has a passing test, but the exporter never called it. This wires it up, flipping the order to["webgl", "webgpu"]— the same order the Legacy pipeline uses, which reporters confirm works — while keeping WebGPU as a fallback if WebGL fails to init.Part of a series of Linux fixes for Ubuntu 24.04; each PR is standalone and touches disjoint files.
Motivation
WebGPU
requestAdapter()succeeds, then rendering crashes deeper inside Pixi's bind-group system, so the renderer's init-time fallback never fires and export dies with:Because the adapter check passes, gating on
requestAdapter()would not help — the WebGPU path itself is the flaw, not the presence check. Preferring WebGL avoids it entirely.Type of Change
Related Issue(s)
Fixes #644
Screenshots / Video
Not a UI change. The observable difference is the export banner:
Renderer: webgpu(crashes) before,Renderer: webgl(completes) after.Testing Guide
npx vitest --run npm run dev # export with Lightning (Beta); banner should read "Renderer: webgl"Confirmed on Ubuntu 24.04 (X11, hybrid Intel iGPU + NVIDIA RTX 3070): with WebGPU,
requestAdapter()returns a valid adapter yet Pixi still crashes as above; WebGL initializes cleanly asANGLE (Intel, Mesa Intel(R) UHD Graphics (CML GT2), OpenGL 4.6).Scope
getDefaultLightningRenderBackend()returns"webgl"unconditionally, so this applies to all platforms, not just Linux. #644 notes a possibly-related macOS variant (#501). If you'd rather keep WebGPU-first on macOS/Windows, I can gate this onplatform === "linux"instead — happy to adjust.Checklist
Notes
Investigated and drafted with Claude Code. The error and adapter behaviour described are from real runs on the hardware listed, not generated — I can re-run on request.
Thank you for contributing!
Summary by CodeRabbit