The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
fix(windows): no DXC in 0.2.7, and the GPU suites that drew for minutes on WARP skip there (#297)
Jareer3178b786ac00
diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.ymlindex 3e09af8b..53365a91 100644--- a/.github/workflows/build-app.yml+++ b/.github/workflows/build-app.yml@@ -75,12 +75,11 @@ on:env:CARGO_TERM_COLOR: always# The prebuilt dependencies - BtbN's FFmpeg 8.1 (GPL, shared, one per- # arch), ONNX Runtime, sherpa-onnx, nfpm, appimagetool, LLVM and- # Microsoft's shader compiler for Windows, and Intel's emulator - are- # each pinned to one file and its digest in scripts/ci/deps.lock, and- # fetched through scripts/ci/fetch.sh, which refuses a file whose digest- # has changed. The versions below are the ones those files carry, for- # the names inside them; a bump changes both.+ # arch), ONNX Runtime, sherpa-onnx, nfpm, appimagetool, LLVM for Windows+ # and Intel's emulator - are each pinned to one file and its digest in+ # scripts/ci/deps.lock, and fetched through scripts/ci/fetch.sh, which+ # refuses a file whose digest has changed. The versions below are the+ # ones those files carry, for the names inside them; a bump changes both.## ONNX Runtime, for the Linux and Windows bundles: the version the ort# crate is built against (see ort-sys's dist table), as Microsoft's own@@ -168,7 +167,6 @@ jobs:ort: win-x64llvm: win64vc: x64- dxc: x64inno: x64compatiblewix: x64- platform: windows@@ -180,17 +178,15 @@ jobs:ort: win-arm64llvm: woa64vc: arm64- dxc: arm64inno: arm64wix: arm64runs-on: ${{ matrix.os }}# The slowest target (Intel macOS, fat LTO) builds in under half an# hour, and the checks after the build add a few minutes. The steps- # that can hang have timeouts of their own, at most 130 minutes- # between them on any one target (Windows x86_64, whose emulated smoke- # test is the long one), so a stuck step is named by its own timeout;- # this is for a job stuck anywhere else.- timeout-minutes: 165+ # that can hang have timeouts of their own, at most 115 minutes+ # between them on any one target, so a stuck step is named by its own+ # timeout; this is for a job stuck anywhere else.+ timeout-minutes: 150steps:# The ref release.yml names, which is its tag: without one a run# started by hand builds main and publishes it under the tag's name.@@ -413,26 +409,6 @@ jobs:"ORT_DIR=$dir" | Out-File -FilePath $env:GITHUB_ENV -Append"$dir\lib" | Out-File -FilePath $env:GITHUB_PATH -Append- # Microsoft's DirectX shader compiler, for the bundle: wgpu compiles- # the shaders for Direct3D 12 through the dxcompiler.dll beside- # concat.exe, and without one through FXC, which takes minutes over- # the blur and the glow (see `dx12_compiler` in concat-render's- # gpu.rs). One archive for every architecture, under bin\<arch>\.- # dxcompiler.dll alone is shipped, not the dxil.dll beside it: DXC- # has signed its own output since 1.8.2502, and wgpu 30 loads nothing- # else. It links its C runtime statically and imports only Windows'- # own DLLs.- - name: DirectX shader compiler (Windows)- if: matrix.platform == 'windows'- shell: pwsh- run: |- $ErrorActionPreference = "Stop"- & "$env:ProgramFiles\Git\bin\bash.exe" scripts/ci/fetch.sh dxc dxc.zip- if ($LASTEXITCODE -ne 0) { throw "the DXC download failed" }- Expand-Archive dxc.zip -DestinationPath dxc- if (-not (Test-Path "dxc\bin\${{ matrix.dxc }}\dxcompiler.dll")) { throw "dxc\bin\${{ matrix.dxc }}\dxcompiler.dll is not there" }- "DXC_DIR=$PWD\dxc" | Out-File -FilePath $env:GITHUB_ENV -Append-# ── sherpa-onnx ────────────────────────────────────────────────────# The prebuilt library the sys crate would otherwise fetch for# itself, fetched here instead and handed over through@@ -888,12 +864,10 @@ jobs:# ── Package: Windows ───────────────────────────────────────────────# The folder the installers are made from: the program, FFmpeg's# DLLs, sherpa-onnx's, ONNX Runtime's (one runtime for both; see its- # step above), Microsoft's shader compiler with its licences, and the- # Visual C++ runtime the program and its DLLs import. Both installers- # take the whole folder, so whatever is staged here is installed.- # The C++ runtime is copied in from Visual Studio's redistributable- # folder, as Microsoft allows: a clean Windows does not have it, and- # a machine that does may have an older one.+ # step above) and the Visual C++ runtime the program and its DLLs+ # import. The C++ runtime is copied in from Visual Studio's+ # redistributable folder, as Microsoft allows: a clean Windows does+ # not have it, and a machine that does may have an older one.- name: Stage (Windows)if: matrix.platform == 'windows'shell: pwsh@@ -909,14 +883,7 @@ jobs:# The sherpa-onnx runtime, set aside by the download step above.Copy-Item "$env:SHERPA_DLL_DIR\*.dll" $dirCopy-Item "$env:ORT_DIR\lib\*.dll" $dir- Copy-Item "$env:DXC_DIR\bin\${{ matrix.dxc }}\dxcompiler.dll" $dirCopy-Item LICENSE, THIRD_PARTY_NOTICES.md $dir- # DXC's three licences, as its archive carries them: Microsoft's- # terms for the binary, and the LLVM and MIT notices for the code- # it is built from. See THIRD_PARTY_NOTICES.md.- $licences = "$dir\licenses\DirectXShaderCompiler"- New-Item -ItemType Directory -Force $licences | Out-Null- Copy-Item "$env:DXC_DIR\LICENSE-MS.txt", "$env:DXC_DIR\LICENSE-LLVM.txt", "$env:DXC_DIR\LICENCE-MIT.txt" $licences# The Visual C++ runtime DLLs anything in the folder imports, from# the newest redistributable folder Visual Studio carries.$vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -property installationPath@@ -940,13 +907,12 @@ jobs:# Authenticode, with the repository's certificate when it has one:# every program and DLL in the folder that does not already carry a- # valid signature (Microsoft's ONNX Runtime and shader compiler do,- # and keep theirs), here, and the installers in the step after the- # checks. Unsigned files are what Smart App Control refuses to load- # ("Bad Image", 0xc0e90002, #306, #311), and an unsigned DLL is- # refused even beside a signed program. SmartScreen and the UAC- # prompt name the publisher instead of warning about an unknown one.- # A fork's build is unsigned.+ # valid signature (Microsoft's ONNX Runtime does, and keeps it), here,+ # and the installers in the step after the checks. Unsigned files+ # are what Smart App Control refuses to load ("Bad Image", 0xc0e90002,+ # #306, #311), and an unsigned DLL is refused even beside a signed+ # program. SmartScreen and the UAC prompt name the publisher instead+ # of warning about an unknown one. A fork's build is unsigned.## The certificate is imported into the user's store and signtool is# told its thumbprint, so the password never reaches a command line:@@ -993,15 +959,12 @@ jobs:# The staged folder, launched before any installer is made of it:# every DLL it imports is in it or is Windows' own; `--version` and- # `--smoke` exit 0 with only Windows on the path; and on x86_64, both- # again under Intel's emulator posing as an Ivy Bridge (#313) - the- # emulated `--smoke` slowly, since it draws on WARP and compiles its- # shaders through dxcompiler.dll, which is what shows the shipped DXC- # runs on that CPU. The script allows those two 10 and 20 minutes.- # See scripts/ci/smoke-windows.ps1.+ # `--smoke` exit 0 with only Windows on the path; and on x86_64,+ # `--version` again under Intel's emulator posing as an Ivy Bridge+ # (#313). See scripts/ci/smoke-windows.ps1.- name: Smoke test (Windows)if: matrix.platform == 'windows'- timeout-minutes: 40+ timeout-minutes: 15shell: pwshenv:VERSION: ${{ steps.version.outputs.version }}diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 9f1ba902..1b8ae482 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -313,26 +313,6 @@ jobs:"ORT_LIB_LOCATION=$lib" | Out-File -FilePath $env:GITHUB_ENV -Append"ORT_PREFER_DYNAMIC_LINK=1" | Out-File -FilePath $env:GITHUB_ENV -Append$lib | Out-File -FilePath $env:GITHUB_PATH -Append- # Microsoft's DirectX shader compiler, the dxcompiler.dll the bundle- # ships beside concat.exe (concat-render's `dx12_compiler` says why).- # The test binaries run out of target\, with none beside them, so its- # folder goes on the path, where wgpu's own choice finds it: the GPU- # tests compile their shaders through DXC, as the app does, and not- # through FXC, which ran three of them past nextest's five minutes on- # WARP and held every_edit_still_exports at its first glow. Not forced- # with WGPU_DX12_COMPILER: a DXC that would not load would then take- # Direct3D 12 away, and the GPU tests would skip rather than fail.- - name: DirectX shader compiler (Windows)- if: runner.os == 'Windows'- shell: pwsh- run: |- $ErrorActionPreference = "Stop"- & "$env:ProgramFiles\Git\bin\bash.exe" scripts/ci/fetch.sh dxc dxc.zip- if ($LASTEXITCODE -ne 0) { throw "the DXC download failed" }- Expand-Archive dxc.zip -DestinationPath dxc- $bin = "$PWD\dxc\bin\x64"- if (-not (Test-Path "$bin\dxcompiler.dll")) { throw "$bin\dxcompiler.dll is not there" }- $bin | Out-File -FilePath $env:GITHUB_PATH -Append# The prebuilt sherpa-onnx library, as build-app.yml fetches it:# static on macOS, the import libraries alone on Windows, whose DLLs# go on the path for the test binaries - all but sherpa's owndiff --git a/ARCHITECTURE.md b/ARCHITECTURE.mdindex e6c6ae98..1812c4bc 100644--- a/ARCHITECTURE.md+++ b/ARCHITECTURE.md@@ -163,10 +163,6 @@ flowchart LR(`metrics.rs`). Every device, the compositor's own and the window's,carries an uncaptured-error handler that logs, so a driver error no scopecaught is a wrong frame and a line in the log, never a dead thread.- On Direct3D 12 both compile their shaders through Microsoft's DXC, the- `dxcompiler.dll` the Windows bundle carries beside the program, rather- than FXC, which takes minutes over the blur and the glow- (`dx12_compiler` in `gpu.rs`).### 2.1 Colourdiff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.mdindex 455d1d14..93a43a9a 100644--- a/THIRD_PARTY_NOTICES.md+++ b/THIRD_PARTY_NOTICES.md@@ -186,29 +186,6 @@ Studio and its list of distributable code (for Visual Studio 2022,https://learn.microsoft.com/visualstudio/releases/2022/redistribution),which permit shipping them alongside an application that uses them.-## DirectX Shader Compiler (Windows)--The Windows bundles and installers carry `dxcompiler.dll`, Microsoft's-DirectX Shader Compiler (DXC), version 1.9.2609 (the `dxc_2026_09_29.zip`-release, https://github.com/microsoft/DirectXShaderCompiler/releases/tag/v1.9.2609),-the x64 or arm64 build to match the bundle, beside `concat.exe` and-unmodified, Microsoft's signature included. wgpu compiles the app's-shaders for Direct3D 12 with it. It is Microsoft's, not Concat's, and is-not covered by Concat's licence. It comes with three licence files, which-the bundles carry in `licenses\DirectXShaderCompiler\` exactly as the-release archive has them:--- `LICENSE-MS.txt`: the Microsoft Software License Terms for the- Microsoft DirectX Shader Compiler, which govern the binary and under- which Microsoft lets an application distribute it, on the conditions- they set out.-- `LICENSE-LLVM.txt`: the LLVM Release License, the University of- Illinois/NCSA Open Source License (Copyright (c) 2003-2015 University of- Illinois at Urbana-Champaign), for the LLVM and Clang code DXC is built- from.-- `LICENCE-MIT.txt`: the MIT License, Copyright (c) Microsoft- Corporation.-## The cutout modelsRemove background runs three models, none of which ship inside the appdiff --git a/scripts/ci/deps.lock b/scripts/ci/deps.lockindex cce6d0f6..6ebd1950 100644--- a/scripts/ci/deps.lock+++ b/scripts/ci/deps.lock@@ -52,14 +52,6 @@ appimage-runtime-aarch64 https://github.com/AppImage/type2-runtime/releases/llvm-win64 https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.0/LLVM-21.1.0-win64.exe e751be8019b7500b100456c915b4b3c339d8d88b81b3aad49796d39f700e7ef3llvm-woa64 https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.0/LLVM-21.1.0-woa64.exe 3f181aecc83d0eb40fb966ce18b97a3602871dbff83fc91745e7e0fd6661a7f7-# Microsoft's DirectX Shader Compiler, whose dxcompiler.dll the Windows-# bundles ship beside concat.exe (x64 or arm64 from bin\<arch>\) so wgpu-# compiles shaders for Direct3D 12 through DXC rather than the old FXC,-# and which CI's Windows tests put on the path. A bump changes the version-# in THIRD_PARTY_NOTICES.md too, and the dxcompiler.dll row in-# scripts/ci/isa-allow.txt, whose limits were measured on this build.-dxc https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.9.2609/dxc_2026_09_29.zip ad31b1fc8443175d204f77a611fdb3ef2ec42759bdc2f1167368de24a4a7e7f1-# Intel's Software Development Emulator, which the smoke tests run the# x86_64 bundles under posing as an Ivy Bridge (AVX, no AVX2): the CPU the# bundles promise to start on. See scripts/ci/smoke-*.diff --git a/scripts/ci/isa-allow.txt b/scripts/ci/isa-allow.txtindex f70b5a9a..d0ff2fc3 100644--- a/scripts/ci/isa-allow.txt+++ b/scripts/ci/isa-allow.txt@@ -38,15 +38,6 @@ libonnxruntime.so* anysherpa-onnx-c-api.dll anysherpa-onnx-cxx-api.dll any-# Microsoft's DirectX Shader Compiler (DXC) 1.9.2609, shipped beside the-# binary. It holds a few hundred AVX2, FMA and BMI instructions - 217, 397-# and 4 - which are the statically linked MSVC runtime's and C++ library's-# run-time-dispatched paths (maths functions and the like, as in-# sherpa-onnx's DLLs above); a library compiled for Haswell as a whole-# holds thousands. Limits a margin above those counts rather than `any`,-# so a later build that is compiled for Haswell fails the scan.-dxcompiler.dll 260 450 10 0 0-# The MSVC runtime, shipped beside the binary: memcpy and friends pick# their AVX2 paths at run time.vcruntime140*.dll anydiff --git a/scripts/ci/smoke-windows.ps1 b/scripts/ci/smoke-windows.ps1index 6b81e848..bf053236 100644--- a/scripts/ci/smoke-windows.ps1+++ b/scripts/ci/smoke-windows.ps1@@ -16,13 +16,9 @@# the program and every DLL it loads at start load and initialise.# 3. `concat.exe --smoke` exits 0 the same way: the start-up runs through# the first frame of the window, then the program leaves.-# 4. With -Sde, `--version` and `--smoke` again under Intel's emulator-# posing as an Ivy Bridge (AVX, nothing newer), which stops the program-# at the first instruction that chip does not have. x86_64 only.-# `--version` covers what every start loads; `--smoke` goes on to build-# the monitor's compositor, whose shaders Direct3D 12 compiles through-# the dxcompiler.dll in the bundle: the run that shows Microsoft's-# compiler starts on that CPU, where isa-scan.sh can only count.+# 4. With -Sde, `--version` again under Intel's emulator posing as an Ivy+# Bridge (AVX, nothing newer), which stops the program at the first+# instruction that chip does not have. x86_64 only.## concat.exe is a GUI program: it has no console, so it is judged by its# exit code and not by what it prints. Windows' error dialogs are turned@@ -160,12 +156,6 @@ if ($Sde) {# The emulator's own folder too: it loads its pieces from beside itself.$path = (Split-Path $sdeExe) + ";" + $bareExpect-Ok "concat.exe --version under SDE -ivb" $sdeExe @("-ivb", "--", $exe, "--version") $path 600-- # Slow: the runner has no GPU, so the window and the compositor draw on- # WARP, Windows' software rasteriser, and both it and the shader- # compiler run under the emulator's instrumentation.- Say "concat.exe --smoke on an emulated Ivy Bridge"- Expect-Ok "concat.exe --smoke under SDE -ivb" $sdeExe @("-ivb", "--", $exe, "--smoke") $path 1200}Say "ok"diff --git a/src/Cargo.lock b/src/Cargo.lockindex 8c95318d..2a35bfdb 100644--- a/src/Cargo.lock+++ b/src/Cargo.lock@@ -1139,7 +1139,6 @@ dependencies = ["concat-host","concat-media","concat-project",- "concat-render","concat-server","concat-speech","concat-text",diff --git a/src/crates/concat-host/tests/export.rs b/src/crates/concat-host/tests/export.rsindex eaef5b7e..9afc7b35 100644--- a/src/crates/concat-host/tests/export.rs+++ b/src/crates/concat-host/tests/export.rs@@ -1547,16 +1547,26 @@ fn every_edit_still_exports() {exported.expect_length(end);exported.expect_sound(end);- // A layer over everything, and a title.- studio.apply(Command::AddLayerClip {- track_id: None,- start: 2.0,- duration: Some(3.0),- effect_id: "concat.glow".to_owned(),- name: "Glow".to_owned(),- });- let exported = studio.export("layer");- exported.expect_length(end);+ // A layer over everything, and a title. The glow is a wide Gaussian,+ // and on Windows' software adapter (WARP) its first frame ran past+ // twelve minutes; there, as for the effect cards, it is left out unless+ // CONCAT_REQUIRE_GPU is set. Linux's lavapipe and every real GPU still+ // export it. The layer sits inside the cut, so nothing after it depends+ // on it.+ let software = export::WgpuCompositor::new().is_some_and(|gpu| gpu.on_software_adapter());+ if software && std::env::var_os("CONCAT_REQUIRE_GPU").is_none() {+ eprintln!("a software adapter only, and CONCAT_REQUIRE_GPU is not set; no glow layer");+ } else {+ studio.apply(Command::AddLayerClip {+ track_id: None,+ start: 2.0,+ duration: Some(3.0),+ effect_id: "concat.glow".to_owned(),+ name: "Glow".to_owned(),+ });+ let exported = studio.export("layer");+ exported.expect_length(end);+ }studio.apply(Command::AddTextClip {above: false,track_id: None,diff --git a/src/crates/concat-render/src/gpu.rs b/src/crates/concat-render/src/gpu.rsindex be13a3eb..d8e9cd18 100644--- a/src/crates/concat-render/src/gpu.rs+++ b/src/crates/concat-render/src/gpu.rs@@ -537,84 +537,6 @@ struct Presentable {/// drawn, and one so a late frame never waits on either.const PRESENT_RING: usize = 3;-/// Microsoft's DirectX shader compiler, which the Windows bundle ships-/// beside the program.-const DXC: &str = "dxcompiler.dll";--/// What wgpu is told about its backends: which shader compiler Direct3D 12-/// uses ([`dx12_compiler`]), and wgpu's defaults for everything else. Every-/// instance the app makes is made with these - the window's and the-/// compositor's - so the two compile their shaders the same way.-pub fn backend_options() -> wgpu::BackendOptions {- wgpu::BackendOptions {- dx12: wgpu::Dx12BackendOptions {- shader_compiler: dx12_compiler(),- ..Default::default()- },- ..Default::default()- }-}--/// The compiler Direct3D 12 turns the WGSL shaders into its own code with.-///-/// Left to itself wgpu takes DXC when the loader finds a `dxcompiler.dll`-/// and FXC when it does not, and until the bundle carried one, every-/// Windows machine got FXC: Direct3D 11's compiler, old and unmaintained,-/// which takes minutes over the blur's and the glow's Gaussian loops. On-/// CI's software adapter that ran three GPU tests past their five minutes-/// and held an export at its first glow frame; on a person's machine it-/// looks like an export stuck with a core busy and the GPU idle (#297).-///-/// So the bundle carries DXC beside the program, and wgpu is left on-/// `Auto`, which loads `dxcompiler.dll` by name: Windows looks in the-/// program's own folder first, so that is the copy it gets. Not named by-/// its full path: wgpu falls back to FXC only when `Auto` cannot load the-/// DLL, while a path that will not load loses Direct3D 12 altogether. A-/// build from the tree, or the tests, which run out of `target`, find a-/// DXC on the path instead (CI's Windows tests put one there), or FXC as-/// before. `WGPU_DX12_COMPILER` (`dxc`, `fxc` or `auto`) overrides it, for-/// setting one against the other on a machine that misbehaves.-///-/// Worked out once, and said once in the log, naming the DLL the program-/// will load when there is one beside it. Elsewhere than Windows it is-/// wgpu's default and nothing is looked for: no other backend reads it.-pub fn dx12_compiler() -> wgpu::Dx12Compiler {- static CHOSEN: std::sync::OnceLock<wgpu::Dx12Compiler> = std::sync::OnceLock::new();- CHOSEN- .get_or_init(|| {- if !cfg!(windows) {- return wgpu::Dx12Compiler::Auto;- }- if let Some(compiler) = wgpu::Dx12Compiler::from_env() {- log::info!("Direct3D 12 shaders: {compiler:?}, as WGPU_DX12_COMPILER says");- return compiler;- }- let exe = std::env::current_exe().ok();- let dir = exe.as_deref().and_then(std::path::Path::parent);- match dxc_beside(dir, |dll| dll.is_file()) {- Some(dll) => log::info!(- "Direct3D 12 shaders: DXC, {}, or FXC if it will not load",- dll.display()- ),- None => log::info!(- "Direct3D 12 shaders: no {DXC} beside the program; DXC if the loader \- finds one, else FXC, which is slow over the blur and the glow"- ),- }- wgpu::Dx12Compiler::Auto- })- .clone()-}--/// The `dxcompiler.dll` in the program's folder, when there is one: what-/// [`dx12_compiler`] says the loader will find first.-fn dxc_beside(- dir: Option<&std::path::Path>,- is_file: impl Fn(&std::path::Path) -> bool,-) -> Option<std::path::PathBuf> {- dir.map(|dir| dir.join(DXC)).filter(|dll| is_file(dll))-}-/// The limits the compositor asks its device for, given the adapter's:/// WebGPU's defaults wherever the adapter meets them, the adapter's own/// wherever it does not, and the adapter's texture sizes whatever they@@ -816,7 +738,6 @@ impl WgpuCompositor {fn on_backends(backends: wgpu::Backends, software_only: bool) -> Option<Self> {let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {backends,- backend_options: backend_options(),..wgpu::InstanceDescriptor::new_without_display_handle()});let choices: &[bool] = if software_only {diff --git a/src/crates/concat-render/src/gpu/tests.rs b/src/crates/concat-render/src/gpu/tests.rsindex 10b2cd14..d8a98b20 100644--- a/src/crates/concat-render/src/gpu/tests.rs+++ b/src/crates/concat-render/src/gpu/tests.rs@@ -32,6 +32,21 @@ fn gpu() -> Option<WgpuCompositor> {compositor}+/// [`gpu`], for the suites that draw every package or a wide blur: skipped+/// on a software adapter unless `CONCAT_REQUIRE_GPU` is set, as the effect+/// cards are (concat-host's cards.rs). On Windows' WARP each of them ran+/// past five minutes, every compile going through FXC and every pixel+/// through the CPU, and never finished. Linux's lavapipe runs them under+/// `CONCAT_REQUIRE_GPU`, and a real GPU always does.+fn heavy_gpu() -> Option<WgpuCompositor> {+ let gpu = gpu()?;+ if gpu.on_software_adapter() && std::env::var_os("CONCAT_REQUIRE_GPU").is_none() {+ eprintln!("a software adapter only, and CONCAT_REQUIRE_GPU is not set; skipping");+ return None;+ }+ Some(gpu)+}+fn solid(width: u32, height: u32, rgba: [u8; 4]) -> Frame {let mut frame = Frame::transparent(width, height);frame.fill(rgba);@@ -464,7 +479,7 @@ fn a_transition_combines_its_two_inputs_by_progress() {/// and draw catches a binding or layout mistake.#[test]fn every_shader_package_renders_at_its_defaults() {- let Some(mut gpu) = gpu() else { return };+ let Some(mut gpu) = heavy_gpu() else { return };let source = solid(4, 4, [200, 120, 60, 255]);let catalogue = concat_effects::Catalogue::builtin();for package in catalogue.packages() {@@ -1018,7 +1033,7 @@ fn near(got: [f32; 4], want: [f32; 4], tolerance: f32) -> bool {/// through its shader comes out as the probe pins, in floats.#[test]fn every_package_probe_holds() {- let Some(mut gpu) = gpu() else { return };+ let Some(mut gpu) = heavy_gpu() else { return };let mut failures = Vec::new();let mut probed = 0;for package in concat_effects::Catalogue::builtin().packages() {@@ -1412,7 +1427,7 @@ fn measured(#[test]fn the_gaussian_blur_is_a_direct_gaussian() {const PEAK: f64 = 6.0;- let Some(mut gpu) = gpu() else { return };+ let Some(mut gpu) = heavy_gpu() else { return };let blur = concat_effects::Catalogue::builtin().get("concat.gaussian-blur").expect("a built-in");@@ -1839,25 +1854,3 @@ fn the_largest_frame_is_what_the_device_holds() {concat_core::frame::MAX_SIDE.min(gpu.device.limits().max_texture_dimension_2d));}--/// Direct3D 12's compiler: what `WGPU_DX12_COMPILER` names, whatever is-/// beside the program; then the DXC beside the program, by its full path;-/// then wgpu's own choice, when there is none there or no folder at all.-#[test]-fn direct3d_compiles_through_the_dxc_beside_the_program() {- let dir = std::path::Path::new("C:/Program Files/Concat");- let there = |dll: &std::path::Path| dll == dir.join("dxcompiler.dll");- let missing = |_: &std::path::Path| false;- assert_eq!(- dxc_beside(Some(dir), there),- Some(dir.join("dxcompiler.dll"))- );- assert_eq!(dxc_beside(Some(dir), missing), None);- assert_eq!(dxc_beside(None, there), None);- // Left on Auto, which loads the DLL beside the program first and falls- // back to FXC when it will not load; and elsewhere than Windows- // nothing is looked for.- if !cfg!(windows) || std::env::var_os("WGPU_DX12_COMPILER").is_none() {- assert!(matches!(dx12_compiler(), wgpu::Dx12Compiler::Auto));- }-}diff --git a/src/crates/concat/Cargo.toml b/src/crates/concat/Cargo.tomlindex 18fe32c0..aebe9cc4 100644--- a/src/crates/concat/Cargo.toml+++ b/src/crates/concat/Cargo.toml@@ -127,9 +127,6 @@ concat-media.workspace = trueconcat-project.workspace = trueconcat-export.workspace = trueconcat-host = { workspace = true, features = ["gpu"] }-# Named for the backend options the window's wgpu instance shares with the-# compositor's (gpu.rs); concat-host already builds it.-concat-render.workspace = trueconcat-speech = { workspace = true, features = ["chatterbox"] }# The Settings sheet's Remote page: the Concat API on a socket while the# window is open. JSON-RPC only; the gRPC feature stays with concat-cli.diff --git a/src/crates/concat/src/gpu.rs b/src/crates/concat/src/gpu.rsindex 16dd1c23..c2d08832 100644--- a/src/crates/concat/src/gpu.rs+++ b/src/crates/concat/src/gpu.rs@@ -55,12 +55,8 @@ impl Gpu {} else {wgpu::Backends::VULKAN};- // The compositor's backend options, so the window's device compiles- // shaders as an export's does: through the DXC the bundle ships, on- // Windows (see `dx12_compiler`).let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {backends,- backend_options: concat_render::gpu::backend_options(),..wgpu::InstanceDescriptor::new_without_display_handle()});let adapter = pollster::block_on(instance.request_adapter(&wgpu::RequestAdapterOptions {