Commit Graph
7 Commits
Author SHA1 Message Date
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
DingusMcRinkyDinkyandClaude Opus 5.5 ba11aec176 GPU tests: skip the instance stress test without Vulkan; keep the instance in new tests
- The threading test makes Vulkan instances, so it is skipped when
  WGPU_BACKEND leaves Vulkan out: nothing is kept then, and that is how
  a broken driver is kept out of the tests.
- The bounded readback tests from main get their device through
  NativeContext::request, which makes and drops an instance of its own;
  they now take the kept instance first, so the Vulkan loader isn't torn
  down when it goes. The shader cache stress test uses the kept one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
2026-11-06 16:43:26 +01:00
DingusMcRinkyDinkyandClaude Opus 5.5 e532df3895 Merge main into fix-gpu-tests-lock
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
2026-11-06 16:37:51 +01:00
David MannandClaude Opus 5.5 f05bb0ea9b Fix-up for #9979, #9182 and #10837: review findings on the batch
- #9979: ui.dialog.set can no longer rewrite an open field picker's __colorPicker
  marker (its OK went to the Crop shield instead of the field), and Preferences Apply
  waits for an open colour picker as OK does, so it never saves a previewed colour.
  Both have regression tests that fail without the fix.
- #9182: the stress test's PC_BUILD_ROUNDS / PC_BUILDS_PER_DEVICE fall back to the
  default for 0, which ran no builds and passed.
- #10837: the ROADMAP entry no longer says a Latin hint rules windows-1251 out; the
  hint settles a word-initial rare letter and breaks exact ties.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 13:22:51 +01:00
DingusMcRinkyDinkyandClaude Opus 5.5 abdbc6ee8e GPU tests: keep one instance in photocraft-gpu's tests; follow WGPU_BACKEND
photocraft-gpu's own tests made and dropped an instance each, so they
could still hit the libvulkan teardown crash. They now share one
instance, kept for the whole run and made from WGPU_BACKEND (one test
used wgpu's defaults, which ignore it).

The kept Vulkan instance in gpu_lock ignored WGPU_BACKEND, so setting
it to keep a broken Vulkan driver out of the tests didn't. With Vulkan
left out, no instance is kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
2026-11-04 12:58:03 +01:00
Finn NewickandClaude Opus 5.5 6a39ccd52e fix(gpu): build compositor pipelines without sharing FXC shader blobs across threads (#9173)
wgpu-hal's D3D12 backend caches each compiled shader and hands every pipeline a clone of the
cached ID3DBlob, calling AddRef under the cache lock and Release outside it
(gfx-rs/wgpu#10547). Compositor::build creates its pipelines in parallel, all from one vertex
entry point and each effect-map kernel twice from one fragment shader, so on D3D12 + FXC the
builds raced on shared blobs and dropping the device could abort (0xc0000409 on CI's WARP runs).

The build stays parallel, but no shader is shared between threads: the vertex stage moves to a
generated module with one entry point per build job; an effect-map kernel builds both formats
in one job; and concurrent Compositor::build calls take turns behind a process-wide lock.

Fixes #9173.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 08:51:02 +00:00
3175a3c4cb Integration: keep failed compositor pipelines in the map (#8118)
The parallel build skipped a non-map pipeline whose creation raised an
error, so with new_with_format (errors logged, compositor still returned)
its key was missing from kit.pipelines and the first draw panicked on the
`self.kit.pipelines[&(kernel, acc)]` index. As before the PR, a failed
non-map pipeline now keeps its invalid handle (draws report GPU errors);
only a failed effect-map pipeline is skipped (all maps go to the CPU).

Test: a_compositor_with_failed_pipelines_draws_without_panicking builds
new_with_format(Rgb9e5Ufloat) on a device with an uncaptured-error
handler and renders: it panicked at the index without the fix. The PR's
test moves into tests/it (one test binary) and takes GPU_LOCK.

Co-authored-by: 00xJS <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-22 21:42:40 +02:00