Repository navigation
fix(renderer): make --gl egl/angle actually use the GPU; add GPU userspace to the Docker image - #13
thecodacus wants to merge 1 commit into
Conversation
…space to the Docker image Plain --use-gl=egl / --use-gl=angle let headless Chromium fall back to SwiftShader even with a GPU and drivers present, so "GPU" renders silently ran on the CPU. egl now passes --use-angle=gl-egl and angle --use-angle=vulkan (verified on an NVIDIA RTX 3060 in Docker via the WebGL renderer string). The Studio image gains the Vulkan loader and GLVND EGL/GL (libvulkan1, libegl1, libgl1, libglvnd0), the NVIDIA Vulkan ICD and EGL vendor JSONs, and NVIDIA_DRIVER_CAPABILITIES=all, so a container run with --gpus all can render on the GPU. Without a GPU it still renders on the CPU. Measured: a GL-heavy 18-min video went from ~3 h to ~13 min. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe render options now select explicit ANGLE backends for EGL/GLES and Vulkan. The Docker image adds Vulkan and GLVND libraries and NVIDIA vendor configuration. The rendering guide and CLI descriptions document GPU options and Docker GPU access. ChangesGPU Rendering
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change makes the egl and angle GPU render modes select explicit ANGLE backends and adds NVIDIA GPU support to the Docker image. No actionable merge-blocking risk remains. Default CPU rendering is unchanged. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 5 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Problem
rendiv render --gl egl/--gl anglestill rendered on the CPU. Headless Chromium picks SwiftShader for plain--use-gl=egland--use-gl=angle, even with a GPU passed into the container. The Studio image also has no Vulkan loader, no GLVND EGL and no NVIDIA vendor files, so Chromium can't reach the driver the NVIDIA runtime injects.Measured inside the Studio container (RTX 3060,
--gpus all) by printing the WebGL renderer string:--use-gl=egl(old--gl egl)--use-gl=angle(old--gl angle)--use-gl=angle --use-angle=gl-egl--use-gl=angle --use-angle=vulkan(the last two only after adding the loaders + vendor files below)
Changes
egl→--use-gl=angle --use-angle=gl-egl,angle→--use-gl=angle --use-angle=vulkan.swiftshaderunchanged. Same option names, no API change.libvulkan1 libegl1 libgl1 libglvnd0, the NVIDIA Vulkan ICD + GLVND EGL vendor JSONs,ENV NVIDIA_DRIVER_CAPABILITIES=all, and a usage note for--gpus all. No GPU → still renders on the CPU.docs/rendering-performance.mddescribe what each mode uses.Result
Full render of an ~18-min, GL-heavy video (three.js/WebGL plates + motion blur) in the patched Studio container: ~3 h → ~13 min.
Summary by CodeRabbit