Commit Graph
12140 Commits
Author SHA1 Message Date
FredApps a348a2a460 test(gpu): treat an already-answered request as a skipped smoke check; test_gpu waits without limit
The zero-timeout smoke tests now skip, instead of failing, if the driver
answered first, whether with a success or an initialization error.
test_gpu waits for its timed-out request without a limit while it holds the
GPU lock. A request that never finishes then shows up as a slow test,
instead of the next GPU test starting beside it.

Signed-off-by: FredApps <[email protected]>
2026-11-18 16:31:19 +07:00
FredApps e10c6ec6fe test(gpu): wait for a timed-out request under the GPU lock, and skip when none timed out
bounded_readback's test_gpu now waits for its own timed-out request before
releasing GPU_LOCK, so the next GPU test doesn't start beside a request still
inside the driver. init_timeout no longer reads the process-wide count. The
renderer test skips if the driver answered before the zero timeout, instead of
failing.

Signed-off-by: FredApps <[email protected]>
2026-11-18 15:57:34 +07:00
FredApps c06ae97029 fix(gpu): wait for this renderer's own timed-out request, and test it without a driver
Review follow-ups:

- A timed-out request now returns `GpuContextError::TimedOut` with an
  `AbandonedRequest` handle (same message as before). `GpuRenderer`
  keeps only its own handle and waits on that when dropped, so an
  ordinary adapter failure no longer waits for another renderer's
  abandoned request.
- The result goes through a rendezvous channel, and the receiver is
  dropped on timeout, so an unclaimed context is dropped on the worker
  before the request counts as finished.
- The timeout is now `run_with_timeout`, unit-tested with held work:
  it counts as running until released, and an unclaimed result is
  dropped first.
- The docs say what a `false` from either wait means.

Signed-off-by: FredApps <[email protected]>
2026-11-18 15:44:03 +07:00
FredApps 8543937a76 fix(gpu): wait for a timed-out GPU request before the process exits
`NativeContext::request` gives up after its timeout (10 s by default) but
leaves its `pc_gpu_init` thread inside wgpu and the driver. When the
process then exits, the driver is torn down under that thread, and
Lavapipe crashes the process: on a loaded CI runner two headless GPU
tests took the "no GPU adapter available" path, printed ok, and then
died with SIGSEGV ("error: scalar-to-vector conversion failed" from
LLVM) as the test process exited (#9824's Ubuntu gate).

Count the initialization threads a request gave up on, and add
`NativeContext::wait_for_abandoned_requests(limit)` to wait for them.
A `GpuRenderer` whose request failed now waits (at least 30 s, bounded)
for its abandoned request when it is dropped, so the process no longer
exits under it.

Signed-off-by: FredApps <[email protected]>
2026-11-18 15:25:11 +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
Dylan M. Taylor 2163bd45af security(doc): resolve slice visibility in one sweep, cap resolved slice count (#10959) 2026-11-16 21:59:41 -05:00
Dylan M. Taylor d71e9fd1bf text: bound copies of preserved style data and font names (#11046) 2026-11-16 21:59:36 -05:00
Dylan M. Taylor 43c2d1bd45 Camera Raw sidecar read: one nonblocking open judged by the opened handle (#13359) 2026-11-16 21:59:31 -05:00
Dylan M. Taylor 3ef7d5cf7a oracle_diff example: skip directory symlinks, refuse an oversized dump (#13362) 2026-11-16 21:59:26 -05:00
David MannandClaude Opus 5.5 e3e97d17e0 text: nextest test processes skip the shared engine's system font scan (#15377)
cfg!(test) only covers photocraft-text's own tests; every other crate's
test binaries link it as a normal dependency, so each nextest test
process started a background scan of the installed fonts (on Windows
also a reg.exe child for the UI locale) beside the GPU tests, and tests
silently depended on the machine's fonts. Skip it when NEXTEST is set,
as CI runs every test through nextest. Tests that want installed fonts
already build their own engine with TextEngine::with_system_fonts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-17 02:37:53 +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
FredApps 957b10cccb test(ui-egui): hold the background redraw in tests that need it still running (#15359)
`a_redraw_across_a_text_gamma_change_and_back_is_not_kept` stepped two frames and expected the
4096x3072 CPU redraw to still be running. Nothing holds the worker, so on the FreeBSD VM
(software Vulkan, 4 cores) the redraw finished within those frames ("the redraw finished before
the change back"; FreeBSD runs on eb3c99d65 and 02e9907f6).

Start the redraw with the existing test hold (`hold_redraws` + `wait_for_held_redraw`, already
used by `an_edit_during_a_redraw_is_not_overwritten_by_blocks_drawn_before_it`) in every test
that needs the redraw running at a later frame: the gamma change and back, the gamma change,
the hidden document's gamma change, Memory Usage dropping mid-redraw, and closing the document.
The hold is released before `settle`, so each redraw still finishes and the kept-composite
assertions still check what they guarded: without `forget_if_gamma_changed` the held redraw
draws every block with the original gamma and is kept, failing the test.
2026-11-17 00:12:23 +01:00
Dylan M. Taylor ee2482c662 Merge pull request #15341 from storytold/cutover/shared-tysh-fallback
psd: preserve lenient TySh recovery through craft-psd
2026-11-16 17:56:31 -05:00
FredApps 566375510e perf: open the benches' PSD files under a benchmark memory budget (#15340)
* perf: open the benches' PSD files under a benchmark memory budget

The PSD import budget (#10503, sized from free RAM since #10897) refuses
the 36 MP PSD in interactive_bench and the 2 GB PSD and 4.4 GB PSB in
large_file_bench on the hosted macOS runner, so P20, P63 and P40-P44 have
been missing from every nightly perf run since 2 November.

The benches time decoding, not admission. They now open these files
under an explicit budget: the app's policy for a machine whose free
memory can't be measured, with the high-memory approval given up front
as file.openAs does with approveHighMemory. Only the bench thread sees it
(photocraft-io's testgen seam), so the app's budget is unchanged.

A failed open is now a row error in the --json report instead of a
panic that lost every row of interactive_bench, and large_file_bench
exits 0 once its report holds the reasons, so cargo xtask perf fails
only the affected rows and says why.

* perf: large_file_bench reports no timing row for a case that failed in any repetition

With the report now read on success, a case whose first open worked and a later one failed would have shown its timing row and hidden the error (CodeRabbit review).
2026-11-16 22:23:24 +01:00
FredApps 6a82de1411 Content-Aware Fill: keep the workspace open while a background fill runs (#15338)
With background jobs on, Apply and OK start edit.contentAwareFill as a job
and get {"job", "pending": true} back. The workspace treated that as a
finished fill: OK closed at once, so a fill that then failed or was
cancelled left no workspace to fix and retry from, and Apply refreshed
before the fill had landed and let a second fill start meanwhile.

The workspace now records the job it started. While it runs, the
controls, tools, shortcuts and a second Apply/OK are refused; Cancel (the
button, Esc or the control channel) cancels the job and closes. When the
job ends, a successful OK closes the workspace and a successful Apply
refreshes it; a failed or cancelled fill keeps it open with the reason in
its panel, as a failed synchronous OK does. Jobs of another workspace or
document are ignored. describe() reports pending and pendingJob.

Taken from the Content-Aware Fill part of #8506.
2026-11-16 21:23:28 +01:00
FredApps 6fce43018c io: drop an imported TySh when a type layer's block can't be rebuilt
With write_tysh refusing unsafe geometry, a layer without psd_raw can end up
with no generated TySh; the imported block (text from before the edit) was then
kept. Export now drops it so the layer is written as pixels with the existing
warning. TySh selection moves into type_tysh/type_blocks (cognitive complexity).
2026-11-16 13:41:10 +01:00
FredApps 193661aea3 io: keep PSD export's content_blocks under the cognitive-complexity limit 2026-11-16 12:59:29 +01:00
FredApps 421adc18cf io tests: forge hostile TySh transforms in the bytes (the shared writer refuses them) 2026-11-16 12:37:37 +01:00
FredApps a94e84dd8d text: take the TySh envelope from craft-psd (#778)
parse_tysh/write_tysh/translate_tysh/transform_is_safe become adapters over
craft_psd::text::envelope (extracted from here in craft-libs#1594); only the
Affine <-> [f64; 6] mapping stays. write_tysh/build_tysh return Option: a block
the shared writer refuses (unsafe transform, non-finite bounds, > 8 MiB) is not
written, and export falls back to pixels with its existing warning. craft-psd
re-pinned to craft-libs main eafb50af (additions only in crates/psd).
2026-11-16 12:35:11 +01:00
FredApps d53b5edb60 Merge pull request #11566 from hnoerenberg/fix/gaussian-blur-edge-parity-11528
test(algo): pin the Gaussian blur edge profile and its ATN identity
2026-11-16 11:57:45 +01:00
FredApps 6f4a2cbaed Merge pull request #15036 from Terra854/codex/raw-adapter-safety
Unify shared adapters and preserve RAW calibration and provenance
2026-11-16 11:14:43 +01:00
FredApps 5e5292c1a2 Merge remote-tracking branch 'origin/main' into raw-adapter-safety 2026-11-16 09:57:19 +01:00
FredApps 3a28b6a25e raw: keep the U16 develop sample loop to one range comparison
The per-sample normalization in fill_samples called a helper that tested
range.is_finite() and range <= 0.0 for every sample, which made 24 MP
monochrome U16 develops ~30% slower than main. A single range > 0.0
test gives the same results (NaN, zero, negative and infinite ranges all
end at 0) and restores main's speed; output hashes are unchanged.
2026-11-16 09:57:19 +01:00
FredApps 7ba9f0d619 Merge main into extract/shared-displace-payload 2026-11-16 09:50:24 +01:00
hnoerenberg d98386f43b test(engine): import craft_psd in the gaussian edge profile test
The shared PSD crate is craft_psd now. The test still imported photocraft_psd, so the engine test target did not compile on a merge with current main.
2026-11-16 08:25:49 +01:00
FredApps 2d4bc13c49 Merge main into cutover/psd-unicode-names 2026-11-16 08:10:43 +01:00
FredApps ca014193a3 Merge pull request #15210 from storytold/cutover/psd-channel-resources
io: use shared PSD DisplayInfo and alternate spot records
2026-11-16 08:09:16 +01:00
FredApps e8531bbfd9 Merge main into codex/raw-adapter-safety
Keep main's newer craft-psd (2284a6bf) and craft-cms (c6eb84d4) pins;
keep this branch's unified fe6b443a pins elsewhere (newer than main's
ad8faa1c). Cargo.lock regenerated from main's lock.
2026-11-16 07:04:22 +01:00
FredApps 1ad3e068b5 Merge main into cutover/psd-unicode-names 2026-11-16 06:52:53 +01:00
FredApps 40076f8c56 Merge main into cutover/psd-channel-resources 2026-11-16 06:52:35 +01:00
FredApps f06fc89d31 Merge branch 'main' into switch-photocraft-io 2026-11-16 06:51:35 +01:00
FredApps 471d97c3c2 Merge remote-tracking branch 'origin/main' into w15191
# Conflicts:
#	Cargo.lock
#	crates/io/Cargo.toml
2026-11-16 02:33:37 +01:00
Dylan M. Taylor 8531232050 Merge shared annotation and guide integrations into channel names cutover 2026-11-15 20:23:16 -05:00
Dylan M. Taylor e76ca374e8 Merge pull request #15189 from storytold/refactor/shared-psd-guides
Use shared PSD guides resource decoding
2026-11-15 20:21:08 -05:00
Dylan M. Taylor 99657bbbf5 Merge pull request #15148 from storytold/refactor/shared-psd-annotations
io: cut PSD annotation records over to shared codec
2026-11-15 20:12:25 -05:00
Dylan M. Taylor 7980844cbc Merge pull request #15107 from storytold/cutover/shared-cube-writer
engine: cut CUBE serialization over to craft-cms
2026-11-15 20:07:38 -05:00
Dylan M. Taylor e48e49d5e2 Merge pull request #15230 from storytold/cutover/psd-alpha-identifiers
Use shared PSD alpha-channel identifier writer
2026-11-15 19:32:34 -05:00
hnoerenberg 29d0068c08 Merge upstream/main into fix/gaussian-blur-edge-parity-11528 2026-11-16 01:31:39 +01:00
FredApps c24804f285 Merge remote-tracking branch 'origin/main' into w15191
# Conflicts:
#	Cargo.lock
2026-11-16 01:21:59 +01:00
Dylan M. Taylor 51e8a99bf0 Merge pull request #8455 from Higgs32584/fix/8272-delayload-prntvpt
Windows: PhotoCraft starts without prntvpt.dll (#8272)
2026-11-15 18:23:32 -05:00
Dylan M. Taylor f557e43982 Integrate main shortcut fix and merged PSD names codec 2026-11-15 17:21:20 -05:00
Dylan M. Taylor c1fa809f74 Pin shared PSD guides to its merged prerequisite 2026-11-15 16:51:07 -05:00
Dylan M. Taylor 52093dffb5 Merge main shortcut and artboard regression fixes 2026-11-15 16:48:57 -05:00
Dylan M. Taylor 44ec9f15d8 Merge main shortcut test and dependency fixes 2026-11-15 16:47:34 -05:00
Dylan M. Taylor 0d4d506cbf Merge main shortcut test and dependency fixes 2026-11-15 16:47:34 -05:00
Dylan M. Taylor 2f0aaf4b7f Merge main shortcut test and dependency fixes 2026-11-15 16:47:34 -05:00
Dylan M. Taylor 68c3807e88 Merge main shortcut test and dependency fixes 2026-11-15 16:47:34 -05:00
Dylan M. TaylorandJason D 07eeaf8e94 Use shared PSD alpha-channel identifier writer
Reuse the byte-identical resource 1053 implementation already pinned in craft-psd. Retain existing app ordering policy, callers and byte regression tests; no dependency changes.

Co-authored-by: Jason D <[email protected]>
2026-11-15 15:39:38 -05:00
Dylan M. Taylor 2d74ae4aab io: retain note popup normalization and target layered TIFF tests 2026-11-15 15:14:57 -05:00