export: GPU-resident decode for software + HDR export (Stage 3c-export pt 1)

The software and HDR export paths already composite on the shared device (the
eframe device, via render_next_video_frame), so they can consume the same
hardware-decoded NV12 GPU frames the preview uses — no CPU download/upload:

- ExportGpuResources gains the Nv12BlitPipeline; the export compositor's Video arm
  branches on inst.gpu (NV12 blit, mirroring stage.rs) vs the RGBA upload path.
- render_frame_to_gpu_rgba takes a hardware_ok flag: true for the software video +
  image export (shared device), false for the zero-copy path (own device, must
  download). render_frame_to_yuv10_hdr sets it true.

Drops the 4K software/HDR-export decode wall (HW decode + GPU composite, no
per-frame RGBA upload). The common Linux H.264 zero-copy path is unchanged
(separate device) — that's pt 2. Falls back to software when no shared device /
importer (flag is harmless then: get_frame returns CPU anyway). Compiles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Skyler Lehmkuhl
2026-06-26 05:07:02 -04:00
co-authored by Claude Opus 4.8
parent 33dec6f327
commit bb3369b709
2 changed files with 32 additions and 11 deletions
@@ -625,6 +625,7 @@ impl ExportOrchestrator {
floating_selection,
state.settings.allow_transparency,
raster_store,
true, // image export composites on the shared device
)?;
queue.submit(Some(encoder.finish()));
@@ -1393,6 +1394,7 @@ impl ExportOrchestrator {
None, // No floating selection during video export
false, // Video export is never transparent
raster_store,
true, // software export composites on the shared device → may use HW frames
)?;
let render_end = Instant::now();
@@ -1498,6 +1500,7 @@ impl ExportOrchestrator {
None,
false,
Some(&raster_store),
false, // zero-copy runs on its own device → download HW frames to CPU
) {
Ok(cmd) => cmd,
Err(e) => {