Skip to content

[MEDIUM] Rendering: WSLg uses software OpenGL ES — no GPU acceleration #38

@pjt222

Description

@pjt222

Summary

The application runs on OpenGL ES via software rendering under WSLg, not Vulkan with hardware GPU. This is the primary performance bottleneck — all compute shaders (drainage, caustics, branched flow) execute in software emulation.

Evidence

From app log (RUST_LOG=info):

[INFO  wgpu_hal::gles::egl] Using X11 platform
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering

wgpu selects the OpenGL ES backend because Vulkan is not available through WSLg's X11 forwarding. DRI3 (Direct Rendering Infrastructure 3) is not supported, so EGL falls back to software rendering.

Impact

  • Branched flow trace pass is slow even at reduced 8K rays / 200 steps
  • GPU timestamp profiler may not report meaningful timings (measuring CPU, not GPU)
  • All GPU compute optimizations have reduced impact when running in software

Potential Solutions

  • Investigate WSL2 GPU-PV (GPU paravirtualization) for Vulkan passthrough
  • Test with `WGPU_BACKEND=vulkan` to force Vulkan selection (may fail if not available)
  • Build a WebGPU browser target (shaders are already WGSL) — browser Vulkan/Metal support bypasses WSLg
  • Document the performance expectation: software rendering is for development/testing, not real-time interaction

Context

Discovered during visual inspection on 2026-03-13. The app runs and renders correctly but is too slow for interactive branched flow visualization. Code-side optimizations (spatial hash, adaptive stepping, reduced defaults) help at the margins but cannot compensate for lack of hardware GPU.

Workaround: Run on native Linux with Vulkan drivers, or build for WebGPU browser target.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingperformancePerformance optimizations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions