Commit Graph
7 Commits
Author SHA1 Message Date
7a70220777 Integration: one gpu test binary, no GPU pass for neutral settings (#6923)
- crates/gpu/tests/camera_raw.rs was its own test binary taking
  testkit's gpu_lock; since #8644 the crate's integration tests are one
  binary (tests/it) sharing crate::GPU_LOCK, so in that binary it would
  open a device next to the other modules. Moved into tests/it with
  GPU_LOCK; the testkit dev-dependency goes.
- Default (neutral) settings uploaded, rendered and read back the proxy
  although the CPU develop returns at once. CameraRawGpu::develop now
  leaves them to the CPU; neutral_settings_skip_the_gpu_round_trip fails
  without it (backend "gpu").
- docs/hardware-parity.md: the CPU range was one backend's (21-28 ms);
  measured 11-16 ms on an RTX 5070 Ti, so 11-28 ms, machine-dependent.

Co-authored-by: p0rps <134095787+fjamesprice@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:45:52 +02:00
fjamespriceandClaude Opus 5.5 49df3fb921 perf(camera-raw): develop the preview's per-pixel stages on the GPU (#6916)
Step 1 of #6916: one wgpu fragment pass for develop's per-pixel stages
(white balance and exposure, Contrast without Texture or Clarity, Whites
and Blacks, Vibrance and Saturation, tone curves, Color Mixer, Color
Grading, vignette, grain in full-resolution coordinates).

- algo: camera_raw::per_pixel resolves those stages' constants and
  tables; the CPU develop builds its own from the same functions, so its
  output is unchanged bit for bit.
- gpu: CameraRawDevelop (camera_raw.rs, camera_raw.wgsl), curves and
  Whites/Blacks rows in one R32Float table texture, readback for the
  histogram and scopes. Built on demand, not with the compositor (#6419).
- ui-egui: the proxy worker develops on the GPU when the settings have no
  spatial stage; Rendering Mode CPU, no GPU canvas, a software adapter, a
  fault or a failed develop use the CPU develop. The pipeline builds on a
  thread at the first open. describe() reports developMs and
  developBackend.

GPU vs CPU at 8, 16 and 32 bits: at most 2.7e-5 (RTX 5060 Ti, Vulkan and
DX12), 6.7e-6 (WARP); tests hold 1/4096. 858x572 proxy, release: CPU
20.7-28.1 ms, GPU 2.7 ms.

Part of #6916.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:10:13 -04:00
David MannandClaude Opus 5.5 afb7de2d3a Performance: brush dab on a CMYK document within budget (#5108)
A brush dab on an A4 300 ppi CMYK page spent ~5 ms per touched tile in the
GPU canvas's tile upload: every pixel of the 256x256 tile went through the
CMYK -> sRGB transform on one thread. CMYK and Lab tiles now convert in
16-row bands in parallel, and a run of identical pixels (the transparent or
flat area around a dab) is converted once. Texels are bit-identical to the
per-pixel conversion.

The band workers enter the document's CMYK profile scope; before, the rayon
workers converting tiles did not, so a CMYK document tagged with its own
profile uploaded tiles through the built-in coated CMYK instead.

P33 (Windows 11, 32 threads, RTX 5070 Ti, 15 reps): p95 13.7-16.8 ms -> 2.6-3.3 ms.
enforce stays false: the committed baseline machine measures every row
over budget, so it is left for the next baseline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 18:10:21 +02:00
Brandon ThomasandClaude Opus 4.8 ae7d802726 GPU: fall back to Rgba16Float when Rgba32Float isn't renderable (#7, #4) (#22)
Some drivers (e.g. Intel Vulkan on Linux/Windows) can't render to Rgba32Float,
so creating the 'fs_content' pipeline panicked with 'Format Rgba32Float is not
renderable' as soon as a document/image was opened. The accumulation format is
now chosen per adapter: Compositor::preferred_acc_format() keeps Rgba32Float
where it's a valid render target and falls back to Rgba16Float otherwise. The
compositor carries the format (pipelines, accumulation texture, byte size and
the readback half-decode all follow it); the app picks it from the eframe
adapter. Capable GPUs are unchanged (parity still exact, 18/18). A new test
forces the Rgba16Float path on any GPU and confirms it renders within display
tolerance (blend + adjustment). wasm green.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-04 02:27:54 -04:00
Brandon Thomas aad724f28e work in progress 2026-10-01 10:07:04 -04:00
Brandon Thomas 6b44c393fa continued work 2026-10-01 09:16:17 -04:00
Brandon Thomas ae92ac20bf continued wip 2026-09-30 09:37:18 -04:00