2.4 KiB

egui-wgpu 0.36.2 split-render experiment

renderer-range.patch is a prototype patch against the unmodified egui-wgpu 0.36.2 src/renderer.rs. It does not implement or activate background blur, change the application, or prove any visual result. The host must only emit a BackdropMarker once it supports the associated split passes; otherwise the UI must display an opaque readable surface.

The patch keeps Renderer::render compatible and adds Renderer::render_range. The input ranges must be contiguous slices from the same complete paint-job list supplied once to update_buffers. The offset is the number of Mesh primitives preceding the range, including meshes with an empty clip or missing texture. Callbacks and markers never increment that offset. A host can scan the complete list once, splitting at markers and accumulating the mesh count.

At a marker, the host must end the current pass and use the clipped marker rectangle in physical pixels to blur the already-rendered, current-frame offscreen attachment. It then composites through the rounded mask before continuing with Load. The marker's clip_rect, logical rectangle, and DPI all matter. Source and destination must not alias in a pass. This is a host and GPU pipeline problem; this patch does not implement those pieces.

Required integration checks before use:

  • Verify the patch applies to the exact selected vendored dependency and that Cargo resolves the patched package for eframe and the application.
  • Compare unsplit and split output with several mesh groups, empty clips, missing textures, callback-only ranges, markers at range boundaries, and multiple markers. Verify all legitimate prepare, finish_prepare, and paint callbacks retain order and run exactly once.
  • Test same-frame moving high-contrast backgrounds, clipping, overlapping markers, resizing, DPI scaling, color/alpha behavior, and captured output.
  • For MSAA, resolve each stored multisample pass to a sampleable texture, then composite with a pipeline matching the attachment sample count. Preserve configured depth/stencil contents across passes. Avoid GPU resource aliasing.
  • Check no-marker rendering still uses the original direct fast path. On unsupported GPU or allocation failure render a legible opaque surface.

No compilation, GPU execution, application launch, or visual verification has been performed for this experiment.