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]>
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]>
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]>
`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]>
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.
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]>
- 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]>
`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.
* 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).
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.
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).
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).
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.
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]>