Commit Graph
392 Commits
Author SHA1 Message Date
David Mann 59147c730c Merge #15112 into the merge queue batch
fix(compose): honour Anti-aliased for the Inner Shadow map
2026-11-20 15:52:16 +01:00
David Mann 1a97ade598 Merge #15735 into the merge queue batch
fix(compose): draw a one-pixel Size 1 Inner Glow
2026-11-20 14:16:36 +01:00
David Mann 95af987938 Merge #15013 into the merge queue batch
Gradient Map: keep the gradient's lightness in Grayscale documents (#14698)
2026-11-20 14:16:34 +01:00
hnoerenberg 8b1af24cb8 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-20 14:14:18 +01:00
David Mann bb4dc343b3 Merge #15420 into the merge queue batch
fix(compose): fade split Blend If points over both ends in 8-bit documents (#14855)
2026-11-20 02:04:37 +01:00
David Mann 968d74adee Merge #15282 into the merge queue batch
Layer Style: Satin's Invert flips the result after the contour (#14981)
2026-11-20 02:04:36 +01:00
David Mann 3674da4f9d Merge pull request #10537 from admiralronton/fix/bevel-gloss-high-altitude
Bevel gloss contour: split at the unmapped sin(altitude) (#594)
2026-11-19 18:58:15 +01:00
aiongg 2f6f4cd7cc Merge pull request #15730 from FredApps/speed-gpu-fixtures-15707
Use strips for Camera Raw parity tests
2026-11-19 10:00:24 -05:00
hnoerenberg 3a06f56045 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-19 14:13:40 +01:00
aiongg a8f95bd16d Document layer index and index-ordered selection (#15704)
Document.layers is a LayerTree that builds an id index on first lookup and drops it on any mutable access. Layer lookups and selected_layers use the index instead of walking the document.
2026-11-19 10:07:19 +00:00
haranishi 378c31c92b fix(compose): render Size 1 Softer Inner Glow at edges 2026-11-19 18:38:36 +09:00
FredApps de5725af2f Use strips for Camera Raw parity tests 2026-11-19 09:40:39 +01:00
jayzed80 7752a5c076 Composite 8/16-bit Grayscale Gradient Maps on the CPU
The shader's Gradient Map LUT returns the stop colour unchanged, so the
GPU compositor kept a coloured gradient in a Grayscale document while
the CPU path now keeps the stop colour's CIE L* (#14698). The planner
returns Unsupported for that case, as it does for CMYK/Lab channels, so
the whole document falls back to the CPU compositor.
2026-11-19 02:24:19 +00:00
hnoerenberg 3d1b4633d9 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-19 02:00:52 +01:00
aiongg 773670ff52 Camera Raw GPU tests: run the large-proxy comparisons on strips 2026-11-18 22:05:05 +00:00
aiongg 626de094e9 Merge pull request #15641 from davidmann4/test-speed/15367-engine-gpu
Tests: trim repeated solves and loops in engine and GPU tests (#15367)
2026-11-18 15:33:05 -05:00
David MannandClaude Opus 5.5 d4797333de Tests: trim repeated solves and loops in engine and GPU tests (#15367)
- parity.rs: the two paging tests use a 660x580 document (3x3 pages, one interior cell)
  instead of 1100x900, and eviction runs 2 rounds; the residency tests that share the large
  document keep it. 16-bit runs only where the GPU reads the 16-bit upload (one effect stack,
  Dissolve and pattern cases). The disjoint-damage test paints 2 distinct series of 8 strokes
  and isolates its layers so strokes capture checkpoints, which makes its bytes assert able to
  fail. many_layers_submit_inside_one_chunk_paged is removed: its stats equal the whole test's.
- Coarse preview: drop an unchecked full-resolution solve; colour tests reuse solves and use
  Extend where Move only adds an unread fill.
- Crop fill eligibility is a unit test on additional_target; the integration test keeps 3 cases.
- PSD write oracle: one run with a passing and a failing case instead of two runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-18 20:47:59 +01:00
aiongg c55c0b7ce8 gpu: build each compositor pipeline on first use (#15439)
Every compositor built all ~30 pipelines when created. On the Windows CI
runners (WARP, FXC) that took 3 to 7.5 s in every GPU test process, and a
test that draws one layer needs two or three of them.

The pipelines now sit in one table per compositor (shared with its
siblings), one entry per kernel, each built the first time a draw needs
it. try_new_with_format_threads(_classified), which the app uses for its
background build, still builds every pipeline up front in parallel
through the same table, so the app keeps its start-up error and its
cached deterministic-failure path. A pipeline that fails on first use
makes that render Unsupported (CPU fallback); a failed effect-map
pipeline turns layer effects to the CPU as before.

The #9173 rules hold: each kernel has its own vertex entry point, a
kernel's formats are built on one thread, and every build in the process
takes the same lock.

every_compositor_pipeline_builds builds all pipelines through the
threaded build, so FXC still compiles every shader on Windows CI. New
count test: one layer builds a small share of the pipelines, and a second
render or a sibling builds none.
2026-11-18 18:51:38 +00:00
FredApps f7938dc479 Merge pull request #10499 from yoriswind/codex/blend-if-parity
Fix GPU Blend If rounding at whole channel levels
2026-11-18 16:22:38 +07:00
David Mann 01a5b5a389 Merge pull request #15381 from davidmann4/perf/test-speed-quick-wins
Test speed: no font scan in test processes, CMYK profile once, raw-develop at one depth (#15377)
2026-11-17 16:49:07 +01:00
aiongg ed14e1c413 PhotoCraft on the craft UI framework (#15449)
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
2026-11-17 10:41:35 -05:00
ljkx 0acff4c7f2 fix(compose): keep the plain Blend If ramp outside RGB documents
Only 8-bit RGB was measured for #14855; Grayscale and Duotone keep
today's split fade on the CPU and the GPU.
2026-11-17 09:53:38 +01:00
ljkx 9841d0f886 fix(compose): fade split Blend If points over both ends in 8-bit documents (#14855)
A split Blend If slider faded as (v - low) / (high - low), so the fade
started a level late and every value between the halves showed a little
less of the layer than the reference application. 8-bit documents now
fade as (v - low + 1) / (high - low + 1) on the black side and
(high - v + 1) / (high - low + 1) on the white side, on the CPU
(BlendRange::weight_8bit through blend_if_weight) and the GPU (bi_ramp,
flagged per pass in p4.z). Unsplit points and 16/32-bit documents keep
their behaviour.
2026-11-17 09:33:29 +01:00
David MannandClaude Opus 5.5 484483b691 test: build the CMYK test profile once, run large raw-develop sizes at one depth
- cmyk_flatten_profile: synthesise the test profile once per process and
  share one Arc, so CmykSpace's per-allocation cache builds the transforms
  once; exact() reads both rows from one run (4 documents, not 8).
- camera_raw GPU tests: the 858x572 and 1600x900 comparisons run at one
  depth each. The depth only changes the input quantization (8 and 16 bits
  both develop with float = false) and every depth runs at 171x113 above.
- cols_timing is a benchmark without assertions: ignore it like its
  siblings.
- compose: delete clipped_dissolve_is_binary_and_preserves_the_base_shape,
  a byte-identical copy of clipped_dissolve_opacity_fill_is_binary_and_
  preserves_base_shape (whose doc comment names both issues).

Part of #15376.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 02:03:03 +01:00
hnoerenberg 8264cd1ea4 test(gpu): pin the anti-aliased Inner Shadow at a Distance offset
The geometry gate reads the Size and the Choke, not the measured
Distance 0, so an Anti-aliased Inner Shadow at Distance 5 runs on the
sub-pixel source path with no pin on either compositor. Add it: the
source shift stage carries the whole-pixel light offset plus the third
of a pixel, exactly as `shadow_map` shifts by `dx + aa`; the Choke 50 %
program at that Distance stays the flag-off program, distance-field
stage included; and the GPU-vs-CPU parity check now covers both rows on
the whole-texture and the paged compositor. The Distance rows sit inside
the two tests that were red before the gate; on their own they pin that
the gate leaves a shifted light offset alone, so they would be green
either way.
2026-11-16 18:54:08 +01:00
hnoerenberg 857e0eb8e6 fix(effects): gate the Inner Shadow AA offset to the measured map
An independent review found that the third-of-a-pixel source offset sat on
every Size, Choke and Distance with Anti-aliased on, while only Size 10 at
Choke 0 was measured. Both neighbours of that configuration are
degeneracies of `spread_split`: at a blur width of 1 (Size 1, or Size 2 at
Choke 50 %) `dilate` no-ops and the tent blur is the identity, so the
offset became the whole map - 1/3 coverage on the bottom and right inner
edges (G 89.7 against the layer's own 128) and nothing at the top and
left, a one-sided black line. At a Choke that dilates the CPU recomputes
its chamfer distance on the offset map while `B::spread_blur` shifts the
whole-pixel `ChokeInside` field of the unshifted shape, so the two
compositors part by 40/255.

`aa_shift` now takes the Size and Choke and applies the offset only to a
split of no dilation and a blur wider than the identity, with the Gaussian
contour: a rule in the inputs, not the measured document's Size 10. Sizes
1.5 to 250 at Choke 0, Distance 5 and Choke 4 % (which dilates nothing)
still take it; Size 1, Size 2 at Choke 50 % and every Choke that dilates
keep today's map bit-for-bit. Four new CPU probes, one GPU stage-list
probe and one GPU-vs-CPU parity probe pin both sides: three of the CPU
probes and both GPU probes failed on this branch's head before the gate
(the parity probe at max diff 40.04/255, Size 10 Choke 50 %).
2026-11-16 18:43:03 +01:00
hnoerenberg 6434f86f89 Merge upstream/main into fix/inner-shadow-antialiased-14934 2026-11-16 17:26:06 +01:00
admiralronton 95302d354e Merge remote-tracking branch 'origin/main' into fix/bevel-gloss-high-altitude 2026-11-16 07:12:58 -08:00
NaufalDzzandOpenBot b84eb0fc74 Layer Style: Satin's Invert flips the result after the contour (#14981)
satin_map inverted the coverage before the contour LUT, so a curved
contour with Invert on was not the opposite of the same Satin without
Invert. Invert now applies after the contour on the CPU, and the GPU
satin stage uses fs_mfinish's existing after-contour mode.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
2026-11-16 08:08:38 +00:00
hnoerenberg 577c2b9070 fix(gpu): honour Anti-aliased in the Inner Shadow map program
gpu/fx: the review asks for the Done-when line "CPU and GPU compositors
agree". `B::shadow` built the Inner Shadow map from the shape shifted by
whole pixels only, so the Anti-aliased checkbox stayed invisible on the
GPU: the parity check of the issue's document measured 20.65/255
between the two compositors once the CPU honoured the flag.

The map builder now calls the same gate the CPU does (`effects::aa_shift`,
inner branch and the Gaussian contour only), and `fs_mshift` samples the
way `Map::shifted` does: four taps, bilinear, with the invert and the
`outside` fill applied per tap. A whole-pixel offset weights its taps 1
and 0, so every shift that exists today (drop shadows with Distance,
satin, the Choke/Spread field shift) reads exactly the texel it read
before. The stage radius ceils, so a sub-pixel shift's extra tap stays
inside the window the executor recomputes - what makes the paged
compositor agree.

Two tests: the stage list, which needs no device, and the issue's
document rendered on both compositors (plain and paged 256 px),
comparing the four edge ramps against the CPU and against the issue's
measured values.
2026-11-16 02:53:48 +01:00
David Mann 5ed5a10997 Merge pull request #15110 from Bobderto/codex/14983-satin-size-one
Render the measured Satin Size 1 edge on CPU and GPU
2026-11-15 16:13:36 +01:00
David Mann fdb793c9a1 Merge pull request #11410 from chamber074/fix/outer-glow-contour
Outer Glow: a flat contour paints the whole rectangle (#11361)
2026-11-15 15:57:20 +01:00
Dan 7ca01562c0 Merge commit '5bdbcc118' into codex/14983-satin-size-one 2026-11-15 12:54:33 +00:00
Dan ef60db3949 Render the measured Satin Size 1 edge on CPU and GPU 2026-11-15 11:55:51 +00:00
David Mann 0b52926b42 Merge PR #10865 2026-11-14 17:18:20 +01:00
Dylan M. Taylor fd943c466b Merge main into photo-cms-port; pin craft-cms to the head of storytold/craft-libs#858
main's one change to crates/cms since (#11055, the per-profile CLUT budget) is
already in craft-cms (storytold/craft-libs#815).
2026-11-11 23:18:18 +00:00
Dylan M. Taylor b4ad74fda8 fix(gpu): cap plan accumulator slots and gradient lookup tables (#11061) 2026-11-11 16:28:26 -05:00
Dylan M. Taylor 46f6ec4ccf Escape control characters in log lines and diagnostic output taken from files and plug-ins (#11218)
* Escape control characters in log lines and diagnostic output taken from files and plug-ins

* address review: escape the plug-in load error and the atn_dump path before printing
2026-11-11 16:23:55 -05:00
Dylan M. Taylor 2b75a0092d Use craft-cms from craft-libs; remove crates/cms
craft-cms was extracted from crates/cms (storytold/craft-libs#779), and both
copies changed afterwards. storytold/craft-libs#PRNUM ports the 41 commits made
here since the extraction, so the shared crate now has everything this copy
had, and PhotoCraft depends on it.

craft-cms returns errors where the local crate panicked on caller input:
transforms, tables and LUT constructors return Result. Call sites propagate
the error where the function already returns one, and fall back where the
arguments are fixed by construction (each with a comment saying why).
Lut3d's fields are private there; the proof and HDR display table is built
with Lut3d::from_fn.

The pin is the head of the craft-libs branch and moves to main when that
pull request merges.
2026-11-11 19:41:51 +00:00
DingusMcRinkyDinky 18f8a21c86 Merge remote-tracking branch 'upstream/main' into fix-gpu-tests-lock 2026-11-11 13:48:28 +01:00
Tanish Manku 4313eb2dbe Merge pull request #9319 from DuBearte/feat/8351-gradient-map-source
feat: Gradient Map keeps Photoshop's stops, midpoints and smoothness (#8351)
2026-11-11 00:03:04 -07:00
Tanish Manku 822ebbe252 Merge pull request #8732 from dotCooCoo/fix/gpu-timing-test-holds-on-every-gpu
Tests: the batched GPU timing test checks one span per command buffer
2026-11-11 00:00:28 -07:00
Tanish Manku 254000acaa Merge pull request #7020 from fjamesprice/perf/camera-raw-gpu-texture-dehaze
perf(camera-raw): develop Dehaze, Clarity and Texture on the GPU in the preview (#6916)
2026-11-10 23:58:06 -07:00
Tanish Manku 1d6cd334ba Merge pull request #6951 from fjamesprice/perf/camera-raw-gpu-local-tone
perf(camera-raw): develop Shadows and Highlights on the GPU in the preview (#6916)
2026-11-10 23:57:54 -07:00
Tanish Manku aaf11d9dd1 Merge pull request #6735 from vangel76/fix/6513-stroke-knockout
Compose: Normal inside/center stroke replaces the layer beneath it (#6513)
2026-11-10 23:56:46 -07:00
Tanish Manku 952be70074 Merge pull request #8734 from ebosido444-ai/fix/fxc-blend-channel
fix(gpu): return once at the end of blend_channel so FXC can build the compositor
2026-11-10 23:55:35 -07:00
Terra854 453ea8c9ca [Extend XCF import into native PhotoCraft documents 1/6] Persist import conversion data and bounded native filter foundations
Imported documents need durable conversion evidence and native pixel operations before XCF conversion can produce editable PhotoCraft data. This adds bounded document/report types, lossless pattern construction and `.pcraft` persistence, plus native HDR, percentile, noise, convolution, Average, coverage and matting kernels and checked Smart-filter mixing. Runtime color models/depths are retained; source attachments remain inert. Native SVG operations retain parsing, lowering, rendering and parser-tree destruction on one bounded worker, including nested resources; WebAssembly reports a controlled error for depths requiring native isolation.

Native filter corrections cover matte black points and signed HDR, extent-wide Smart-filter coverage, flat-image identity Auto Levels, opaque FillHoles capability, exact unselected channel preservation, coverage-preserving Average selection and bounded pattern expansion. Checked Smart-filter mixing rejects nonfinite native F32 samples, preserves unchanged Normal pixels without regenerating CMYK separations, and recovers representable alpha mixtures after an overflowing difference. HDR blend overflow retries use cold F64 arithmetic while retaining ordinary finite results and integer-depth behavior. Both opaque and alpha-bearing F32 mask recovery retain signed/HDR colors.

Stored pattern declarations remain lossless and inert. Dense PSD/PAT/ASL pattern export now checks dimensions and one shared plane-allocation budget before conversion. PAT/ASL report conversion errors; PSD/PSB report named omission warnings. Matching raw PSD pattern blocks remain verbatim. CMYK offsets retain the established brightness convention.

Command registration, XCF decoding and frontend workflows follow in dependent parts. The contributor entry is the author's existing chosen entry.

<!-- native-foundations-fixes-20261107:start -->
Small noise, convolution and point-operation edits admit their clipped work area on large owners while retaining output/workspace limits and whole-owner FillHoles bounds. HDR toning retains skipped transparent native samples. Normal Smart-filter strength interpolates stored CMYK/Lab/ink planes with premultiplied coverage, preserving unchanged channels. Bitmap Custom Pattern reads compact patterns in bounded row bands and ranks the complete map once. Embedded SVG isolation failures propagate independently of strict mode; ordinary invalid images can still be omitted, and private native parses share the complete-operation worker. The import-report regression now primes the layer blob cache and requires its specific limit diagnostic.
<!-- native-foundations-fixes-20261107:end -->

<!-- adversarial-5810371597:start -->
Import-report accounting uses portable fixed costs. HDR scene means use F64. Bitmap pattern ranking preflights a 256 MiB input/order/output budget, uses fallible allocation and heap-scratch-free sorting. Average uses the supplied image domain and retains one global mean across output tiles. Non-Normal Smart-filter coverage is classified once across the complete mixing extent. A fallible filter dispatcher and engine error conversion preserve checked native diagnostics and cancellation. Smart-filter engine integration remains in part 5 (#11032).
<!-- adversarial-5810371597:end -->

## Six-part series

Each branch is hosted in Terra854/photocraft, and every PR targets storytold/photocraft:main. Merge in the order below. Later drafts currently show cumulative diffs while prerequisites are unmerged; their descriptions link to isolated comparisons. Rebase each part onto current upstream main after its prerequisites merge, including squash-merge ancestry, and rerun affected checks before requesting review.

| Part | Upstream PR | Fork branch | Scope |
| --- | --- | --- | --- |
| 1 | [#11009](https://github.com/storytold/photocraft/pull/11009) | xcf-support-v2-01-import-data | Document/native-format data and pixel foundations |
| 2 | [#11029](https://github.com/storytold/photocraft/pull/11029) | xcf-support-v2-02-decoder | Bounded transport/records, precision, metadata, editable text and paths |
| 3 | [#11030](https://github.com/storytold/photocraft/pull/11030) | xcf-support-v2-03-effects-core | Native effect frames and primary tone/color/spatial/resource/transform adapters |
| 4 | [#11031](https://github.com/storytold/photocraft/pull/11031) | xcf-support-v2-04-effects-graphs | Remaining adapters, bounded graph lowering, coverage installation and source evidence |
| 5 | [#11032](https://github.com/storytold/photocraft/pull/11032) | xcf-support-v2-05-engine | Native commands, import preparation, historical choices, editing and persistence workflows |
| 6 | [#11033](https://github.com/storytold/photocraft/pull/11033) | xcf-support-v2-06-frontends | Desktop/web UI, CLI/MCP, translations, GPU diagnostics and qualification/docs |

The full integration remains preserved on `xcf-support-v2`; original #7098 remains available for reference.

## Validation

<!-- main-catchup-0d08cb7dd:start -->
Updated to upstream `main` at `0d08cb7dd` and restacked all six branches. Part 1 is `640a01f43`; full integration is `24cd17301`. The final six-part tree exactly matches the full integration tree.

The merge preserves both upstream's new tests/crop translations and the XCF historical-open tests/report labels. The automation adapter now preserves import-source protection across multiple granted read roots: relative source names cover every matching candidate so newly shadowing files cannot expose the original to overwrite, while absolute source names remain precise. Existing ordered reads and implicit-save provenance are retained. Read-only import source identity is kept independently of whether its library root grants an implicit Save target. Focused regressions cover source aliases, removed files, denied candidates, changing root precedence, and read-only library imports; the Windows escape fixture also uses a real junction when symlink privileges are unavailable. The new upstream UI import fixture also uses the native import outcome type.

Local validation passed affected host all-target checks, core and native frontend/automation unit and integration suites, forced-Vulkan GPU unit and integration suites, pinned IO corpora, strict all-target Clippy, formatting, layering, panel command dispatch, WASM, adversarial command tests, and the quick CPU performance harness. Offscreen historical-XCF prompt and conversion-report captures were reviewed. The first two PR boundaries also passed independent all-target engine checks. Tests used the pinned craft-fonts input, four Rayon workers, serial tests for large fixtures and opt-level=0 for engine/UI test glue; pixel/format crates retained their repository settings. Quick mode uses small documents and does not enforce full-size budgets. The part 1 push triggered fresh [CI](https://github.com/storytold/photocraft/actions/runs/42885527754) and [SonarCloud](https://github.com/storytold/photocraft/actions/runs/42885527740) runs. After upstream approval, CI passed the Linux gate, Windows unit/integration tests, no-HEIF tests, pinned corpora and web build. SonarCloud's instrumented archive, coverage shards and actual scan remain skipped behind its token guard; its outer green status does not mean coverage ran. Catching up with main therefore retriggered normal tests but did not remove that SonarCloud skip. Older validation below remains evidence for its explicitly named earlier commits.
<!-- main-catchup-0d08cb7dd:end -->

<!-- average-no-extent-4517477902:start -->
Average no-extent follow-up at part 1 `f8ddb626f` (full integration `882def329`), carried through all six branches. The checked Average dispatcher now uses the requested `area` when no owner extent is supplied; an explicit extent retains its existing clipping behavior. Other filters, the Average pixel kernel and resource admission are unchanged.

The new regression fails against the preceding revision and passes with the fix. It covers `apply`, one-pixel explicit tiling, and the cancellable tiled API at 8/16/32-bit, signed/HDR colors, hidden RGB, native alpha preservation, unchanged source data and pixels outside the requested area. Validation passed the algorithm unit/integration suite (935 tests; 27 existing ignored), strict all-target algorithm Clippy, formatting, layering, WASM (24 crates plus HEIF), and independent all-target engine checks of the first two PR boundaries. The broader suites below remain evidence for their named earlier commits and were not rerun for this dispatcher-only follow-up.
<!-- average-no-extent-4517477902:end -->

<!-- review-20261110:start -->
Review follow-up at part 1 `a3144d559` (full integration `b5fd3e211`), carried through all six branches. Average admits long thin regions within its existing pixel/workspace budgets, clamps finite selection coverage, and uses owner extents for off-canvas replay. HDR Toning also adapts over the owner extent. Pattern GPU uploads now use bounded bands; the warning-free `document_to_psd` API returns `Result` on pattern export failure and reuses prepared pattern blocks. Warning-enabled exports retain explicit omission warnings.

Five filter regressions fail against the previous revision and pass with the fixes. Local validation passed 1,597 algorithm/compositor/GPU tests with Vulkan, all 129 GPU integration tests separately on DX12 with FXC (the app uses FXC when no bundled DXC is present), a separate forced DX12 pattern upload/readback test, 1,144 IO unit and 675 pinned IO integration tests, 10 affected engine tests, strict all-target Clippy, formatting, layering, WASM and quick CPU performance checks. The first two PR boundaries passed independent all-target engine checks. This Intel driver's DX12/DXC configuration rejects the unchanged `fs_adjust` pipeline (`0x80070057`); DX12/FXC and Vulkan both pass. The full workspace suite was not rerun; earlier broad evidence below remains tied to its named commits. Quick performance mode does not enforce full-size budgets.

A separate 24 MP signed/HDR RGBA32F public Average-kernel probe retained exact mean RGB and original alpha. Three alternating runs had medians of 1,274.713 ms before and 1,259.885 ms after; this small difference is within run variation and is not a speedup claim.

The Minor/Poor-tradeoff report-deserialization finding remains open and documented. Encoded records are capped at 32 MiB and individual arrays are bounded, but compact targets can still amplify transient decoded memory before aggregate validation rejects the report. Early shared-budget deserialization is not implemented in this follow-up.
<!-- review-20261110:end -->

<!-- main-catchup-7c64653d5:start -->
Updated to upstream `main` at `7c64653d5` and restacked all six branches. Part 1 is `cbf068d5f`; full integration is `206f71012`. The full integration tree exactly matches part 6.

The merge retains main's alpha-preserving Average behavior with bounded checked processing, and uses it consistently for XCF coverage conversion and native replay. Historical XCF normalization and import preparation now run through main's resumable Place flow and Open as Smart Object; regression tests cover source byte order and native Edit Contents. XCF report/filter labels also cover the seven languages main promoted to menu-complete status.

The current tree passed affected host all-target checks, core/IO, GPU, engine and frontend suites, strict all-target Clippy, formatting, layering, panel command dispatch, WASM and the web build, adversarial command tests, pinned IO corpora and the quick CPU performance harness. Offscreen historical-XCF prompt and conversion-report captures were reviewed. The first two PR boundaries also passed independent all-target engine checks. Tests used CI-pinned craft-fonts `b076417b5880bd4154bd22f00695b1d28c6bea83`, four Rayon workers, serial tests for RAM-heavy suites and opt-level=0 for engine/UI test glue; pixel and format crates kept repository settings. Quick performance mode uses smaller documents and does not enforce full-size budgets. Older measurements below remain evidence for their named earlier commits.
<!-- main-catchup-7c64653d5:end -->

<!-- percentile-owner-4502952267:start -->
Percentile owner-bounds follow-up at part 1 `93946db04` (full integration `f7264af14`): nonempty owner bounds now supply edge samples without a dense whole-owner admission check. The unchanged preflight still bounds clipped output, padded halo, workspace and CPU work; dense-image adapter limits remain in place. Two new regressions failed with `InvalidGeometry` before the fix and pass afterward, covering small edits on 81 MP and wider sparse owners, clamped-edge oracles, fractional selections, source preservation, clipped requests, invalid domains, oversized output, work limits and cancellation.

This follow-up passed 903 algorithm tests (887 unit + 16 integration; 27 existing ignored), all-target strict algorithm Clippy, formatting, layering and WASM (24 crates plus the HEIF configuration). Only sampling-bound admission changed; percentile processing and resource-preflight code are byte-for-byte unchanged. The broader qualification below remains tied to its explicitly named earlier commits; the full workspace suite was not rerun for this one-file follow-up.
<!-- percentile-owner-4502952267:end -->

<!-- native-foundations-validation-20261107:start -->
The production fixes at part 1 `c16e274b8` (full integration `6f8349cd5`) passed 7,245 affected algorithm/compositor/document/engine/native-format/IO tests across 46 binaries, with 65 existing ignored tests, plus doctests, affected all-target strict Clippy, layering, WASM, adversarial command tests, formatting and the pinned IO corpus (1,107 unit + 661 integration tests, 26 existing ignored). The final diagnostics regressions also passed independently on the foundation and full integration branches. The first PR passed an independent all-target engine check. Tests used four Rayon/test workers and the existing CI font pin; engine test glue used opt-level=0, and the foundation-only diagnostic probe also used opt-level=0 for its algorithm dependency. The full integration tree exactly matches the final sixth branch.

Paired 24 MP release probes used three timed repetitions per version after warm-ups, alternating order, matching inlining controls, opaque parameters and a current public-API control, with four Rayon workers. Timings are completed operations on this host.

| Probe | Before (ms) | After (ms) | Public API (ms) |
| --- | ---: | ---: | ---: |
| HDR toning | 830.3 | 834.4 | 791.2 |
| Rgb-Normal | 1070.5 | 1069.3 | 1079.7 |
| Cmyk-Normal | 683.0 | 669.7 | 691.5 |
| Rgb-Multiply | 1103.1 | 1303.3 | 1297.5 |

The extent-wide coverage prepass adds 200.2 ms (18.2%) in the alpha-preserving Multiply case. This is the measured cost of applying one consistent coverage rule; the Normal RGB/CMYK controls remain near baseline.

The uniform HDR probe's middle-gray output changed from 0.200004 to 0.180000 (target 0.18); the public control agrees. Mixer probes check native colors and alpha at sampled positions. The quick CPU application harness also completed; its saved cross-machine comparison was skipped, and quick mode does not apply full-size budgets. No budgets or baselines changed.
<!-- native-foundations-validation-20261107:end -->

Earlier validation of full integration `c003e3f50`, before these follow-up fixes, completed the upstream `main` catch-up at `c101cbfb7` on 2026-11-07. The cumulative series passed affected host all-target checks, foundation and IO suites, GPU, engine and frontend suites, strict Clippy, layering, WASM, adversarial command tests, formatting, pinned IO corpora and the quick CPU performance harness. Offscreen historical-XCF prompt and conversion-report captures were reviewed. Local tests used CI-pinned craft-fonts `b076417b5880bd4154bd22f00695b1d28c6bea83`, four Rayon workers and temporary opt-level=0 overrides for engine/UI test glue; pixel and format crates retained repository settings. The full UI library passed 5,330 tests, and the final dialog-dispatch cleanup passed 945 focused dialog tests.

The decoder and engine PR boundaries also passed independent all-target checks. The full `xcf-support-v2` integration tree matches the final sixth branch exactly. SVG stack regressions retain their 512 KiB caller, isolated complete native lifecycle and 100 retained group levels.

The matched performance figures below were measured before this main integration; the HDR recovery arithmetic and bounded tile implementation are preserved.

Forward filter-mask mixing retains its existing four-buffer allocation optimization and arithmetic. Its matched 24 MP RGBA32F probes measured opaque pixels at 392.410→182.842 ms, semitransparent pixels at 383.321→179.916 ms, and signed HDR pixels at 373.696→183.903 ms (five-run medians, 50–53% faster).

Inverse filter-mask recovery now processes at most eight native tiles in parallel, with four reusable scratch buffers per slot and ordered surface publication. Small inputs, one-worker operation and WebAssembly use the same serial tile helper. All F64 and integer pixel arithmetic is unchanged. Bitwise regressions compare full/partial/missing tiles, negative coordinates, differing defaults and hidden/zero-alpha outputs across 30 format combinations; an explicit one-worker/two-worker comparison checks both execution paths.

Matched 24 MP HDR inverse-recovery public-API probes measured 166.972→90.565 ms (opaque, 45.8% faster), and 433.325→130.707 ms (semitransparent, 69.8% faster). Five-run medians use four Rayon workers on this host; all runs assert recovered HDR samples at three positions. The existing F64 precision and HDR saturation bounds are preserved.

Mask recovery retains signed/HDR colors, extreme finite values, subnormals and exact full coverage. The PSD/PSB regression uses a real blur on spatially varying HDR pixels and partial masks; raw exported channels must match the unmasked filter result, and reimported Smart caches must match independently authored masked values.

The prior quick CPU application harness completed. Its saved cross-machine baseline comparison was skipped, so the paired public-API measurements above provide the direct before/after evidence. No performance budgets or baselines changed.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Added image adjustments and filters for averaging, channel noise, convolution, percentile effects, alpha and coverage editing, black matte removal, HDR toning, and automatic tone, contrast, and color correction.
  * Added Smart-filter blending controls for opacity and blend modes.
  * Import-conversion information is preserved when saving and reopening documents.

* **Improvements**
  * Improved handling of deeply nested SVGs and large patterns, with bounded pattern processing and warnings when pattern export is not possible.
  * Improved stability when blending extreme HDR values and applying filters to HDR images.
  * Improved transparency handling for channel-selective filters and added clearer feedback when image processing or export cannot be completed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-11 07:35:40 +01:00
David Mann 4eb25099b7 Merge remote-tracking branch 'origin/main' into pr-9337 2026-11-09 19:01:55 +01:00
fjamespriceandClaude Opus 5.5 83edac1ee5 fix(camera-raw): the missing-texture error says RAW Develop
main's #12403 renamed the GPU develop's errors ("GPU RAW Develop
failed", "no RAW Develop target"). The error this PR adds for a stage
whose textures are missing follows them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014nuVUeq1gmQSpF78xazkX9
2026-11-09 02:42:52 -05:00
fjamespriceandClaude Opus 5.5 fa5ca22757 test(camera-raw): validate the Dehaze, Clarity and Texture shader without a GPU
The adapter-free shader test now validates camera_raw_filters.wgsl as
the pass compiles it, appended to camera_raw_tone.wgsl, so a runner
without a GPU still catches a filters shader that wouldn't compile.
Appending an undefined identifier to camera_raw_filters.wgsl fails it.

Part of #6916.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014nuVUg57HqXLARdhymFiTc
2026-11-09 02:42:52 -05:00