Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

fix(windows): shaders compile through DXC, not FXC, so a blur or a glow no longer stalls an export; and no Microsoft Store (#297)

Jareerbe1b8822de2f
diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml
index 5e5299f5..3e09af8b 100644
--- a/.github/workflows/build-app.yml
+++ b/.github/workflows/build-app.yml
@@ -8,7 +8,6 @@ name: Build app
# macOS arm64 (Apple silicon) x86_64 (Intel) -> Concat-*.dmg
# Linux x86_64 aarch64 -> Concat-*.deb, .rpm, .AppImage, .pkg.tar.zst
# Windows x86_64 aarch64 -> Concat-*-setup.exe, .msi
-# (+ .msix for the Store, apart)
#
# Installers and binaries only: the program is not shipped as an archive
# of a folder to unpack, so what a person downloads is what they run.
@@ -76,11 +75,12 @@ 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 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 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.
#
# 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,6 +168,7 @@ jobs:
ort: win-x64
llvm: win64
vc: x64
+ dxc: x64
inno: x64compatible
wix: x64
- platform: windows
@@ -179,15 +180,17 @@ jobs:
ort: win-arm64
llvm: woa64
vc: arm64
+ dxc: arm64
inno: arm64
wix: arm64
runs-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 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: 150
+ # 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
steps:
# 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.
@@ -410,6 +413,26 @@ 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
@@ -865,10 +888,12 @@ 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) 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.
+ # 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.
- name: Stage (Windows)
if: matrix.platform == 'windows'
shell: pwsh
@@ -884,7 +909,14 @@ jobs:
# The sherpa-onnx runtime, set aside by the download step above.
Copy-Item "$env:SHERPA_DLL_DIR\*.dll" $dir
Copy-Item "$env:ORT_DIR\lib\*.dll" $dir
+ Copy-Item "$env:DXC_DIR\bin\${{ matrix.dxc }}\dxcompiler.dll" $dir
Copy-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
@@ -908,12 +940,13 @@ 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 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.
+ # 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.
#
# The certificate is imported into the user's store and signtool is
# told its thumbprint, so the password never reaches a command line:
@@ -960,12 +993,15 @@ 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,
- # `--version` again under Intel's emulator posing as an Ivy Bridge
- # (#313). See scripts/ci/smoke-windows.ps1.
+ # `--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.
- name: Smoke test (Windows)
if: matrix.platform == 'windows'
- timeout-minutes: 15
+ timeout-minutes: 40
shell: pwsh
env:
VERSION: ${{ steps.version.outputs.version }}
@@ -1001,12 +1037,6 @@ jobs:
shell: pwsh
env:
VERSION: ${{ steps.version.outputs.version }}
- # The identity Partner Center reserved for the app. Unset, no
- # .msix is made: a fork has no Store listing to make one for.
- MSSTORE_IDENTITY_NAME: ${{ vars.MSSTORE_IDENTITY_NAME }}
- MSSTORE_PUBLISHER: ${{ vars.MSSTORE_PUBLISHER }}
- MSSTORE_PUBLISHER_DISPLAY_NAME: ${{ vars.MSSTORE_PUBLISHER_DISPLAY_NAME }}
- MSSTORE_DISPLAY_NAME: ${{ vars.MSSTORE_DISPLAY_NAME || 'Concat' }}
run: |
$ErrorActionPreference = "Stop"
$name = "Concat-$env:VERSION-windows-${{ matrix.arch }}"
@@ -1040,40 +1070,6 @@ jobs:
if ($LASTEXITCODE -ne 0) { throw "WiX failed with $LASTEXITCODE" }
if (-not (Test-Path "stage\$name.msi")) { throw "stage\$name.msi is not there" }
Sign "stage\$name.msi"
- # And the .msix, for the Microsoft Store, from the same folder with
- # the manifest and logos beside it. See assets/windows/AppxManifest.xml.
- # Into store/, not stage/: the Store signs it and takes it, and an
- # unsigned package in the release is one nobody can install.
- if ($env:MSSTORE_IDENTITY_NAME -and $env:MSSTORE_PUBLISHER) {
- $makeappx = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\makeappx.exe" |
- Sort-Object FullName -Descending | Select-Object -First 1
- if (-not $makeappx) { throw "makeappx.exe is not in the Windows SDK" }
- $pack = "$env:RUNNER_TEMP\msix"
- Copy-Item -Recurse "stage\$name" $pack
- Copy-Item -Recurse assets\windows\store "$pack\Assets"
- # The Store's four-part version, whose last part must be 0.
- $fill = [ordered]@{
- "{IdentityName}" = $env:MSSTORE_IDENTITY_NAME
- "{Publisher}" = $env:MSSTORE_PUBLISHER
- "{PublisherDisplayName}" = $env:MSSTORE_PUBLISHER_DISPLAY_NAME
- "{DisplayName}" = $env:MSSTORE_DISPLAY_NAME
- "{Version}" = "$env:VERSION.0"
- "{Arch}" = "${{ matrix.wix }}"
- }
- $manifest = Get-Content -Raw assets\windows\AppxManifest.xml
- foreach ($word in $fill.Keys) {
- $manifest = $manifest.Replace($word, [Security.SecurityElement]::Escape($fill[$word]))
- }
- # Through .NET, not Set-Content: on the runner Set-Content refused
- # -Encoding, which failed the v0.2.6 build. UTF-8 with no BOM.
- [IO.File]::WriteAllText("$pack\AppxManifest.xml", $manifest, [Text.UTF8Encoding]::new($false))
- New-Item -ItemType Directory -Force store | Out-Null
- & $makeappx.FullName pack /o /d $pack /p "store\$name.msix"
- if ($LASTEXITCODE -ne 0) { throw "makeappx failed with $LASTEXITCODE" }
- Remove-Item -Recurse -Force $pack
- } else {
- Write-Host "No Store identity in the repository's variables: no .msix."
- }
# The folder itself is not published: the two installers are.
Remove-Item -Recurse -Force "stage\$name"
@@ -1089,12 +1085,3 @@ jobs:
name: Concat-${{ matrix.platform }}-${{ matrix.arch }}
path: stage/*
if-no-files-found: error
-
- # The Store's package, apart from the release's bundles: release.yml
- # bundles the two architectures and submits them.
- - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
- if: matrix.platform == 'windows' && hashFiles('store/*.msix') != ''
- with:
- name: Store-windows-${{ matrix.arch }}
- path: store/*.msix
- if-no-files-found: error
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1b8ae482..9f1ba902 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -313,6 +313,26 @@ 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 own
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 86ee3707..65a8bb4b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -23,10 +23,6 @@ name: Release
# The release is created as a draft. A person looks it over - the notes,
# the files - and publishes it from the Releases page; nothing reaches
# the updater or the downloads page before then.
-#
-# A release that is not a pre-release also goes to the Microsoft Store,
-# once its draft is made here, when the repository is set up for it; see
-# the store job.
on:
push:
tags: ["v*"]
@@ -124,7 +120,6 @@ jobs:
permissions:
contents: write
steps:
- # The bundles only: the Store's packages are the store job's.
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
path: bundles
@@ -186,67 +181,3 @@ jobs:
body_path: ${{ runner.temp }}/notes.md
fail_on_unmatched_files: true
files: bundles/*
-
- # The Windows packages to the Microsoft Store: the two .msix files the
- # build made, as one .msixbundle, submitted to the app's listing with
- # Microsoft's msstore CLI and committed for certification. The Store
- # signs the package and keeps installs up to date.
- #
- # Pre-releases stay here: the Store's version is the release's number,
- # and v0.3.0-beta.1 and v0.3.0 would both be 0.3.0.0.
- #
- # Needs, from Partner Center, repository variables:
- # MSSTORE_PRODUCT_ID the app's Store ID, e.g. 9NBLGGH4R315
- # MSSTORE_IDENTITY_NAME Package/Identity/Name
- # MSSTORE_PUBLISHER Package/Identity/Publisher, CN=...
- # MSSTORE_PUBLISHER_DISPLAY_NAME Package/Properties/PublisherDisplayName
- # MSSTORE_DISPLAY_NAME the reserved name, if not Concat
- # and secrets, from the Entra ID app associated with the account:
- # MSSTORE_TENANT_ID, MSSTORE_SELLER_ID, MSSTORE_CLIENT_ID,
- # MSSTORE_CLIENT_SECRET
- # Without the product ID the job is skipped, as it is on a fork.
- store:
- name: Microsoft Store
- needs: [check, publish]
- if: ${{ !contains(needs.check.outputs.tag, '-') && vars.MSSTORE_PRODUCT_ID != '' }}
- runs-on: windows-2022
- timeout-minutes: 30
- steps:
- - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
- with:
- path: store
- pattern: Store-windows-*
- merge-multiple: true
-
- - name: Bundle
- shell: pwsh
- env:
- VERSION: ${{ needs.check.outputs.version }}
- run: |
- $ErrorActionPreference = "Stop"
- $makeappx = Get-ChildItem "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\makeappx.exe" |
- Sort-Object FullName -Descending | Select-Object -First 1
- if (-not $makeappx) { throw "makeappx.exe is not in the Windows SDK" }
- $packages = @(Get-ChildItem store\*.msix)
- if ($packages.Count -ne 2) { throw "expected the x86_64 and aarch64 .msix, found $($packages.Count)" }
- & $makeappx.FullName bundle /o /bv "$env:VERSION.0" /d store /p "Concat-$env:VERSION-windows.msixbundle"
- if ($LASTEXITCODE -ne 0) { throw "makeappx failed with $LASTEXITCODE" }
-
- - uses: microsoft/setup-msstore-cli@3b2ec9136230357ce9abc02b9d056626fb248d3f # v1
-
- - name: Submit
- shell: pwsh
- env:
- VERSION: ${{ needs.check.outputs.version }}
- PRODUCT_ID: ${{ vars.MSSTORE_PRODUCT_ID }}
- TENANT_ID: ${{ secrets.MSSTORE_TENANT_ID }}
- SELLER_ID: ${{ secrets.MSSTORE_SELLER_ID }}
- CLIENT_ID: ${{ secrets.MSSTORE_CLIENT_ID }}
- CLIENT_SECRET: ${{ secrets.MSSTORE_CLIENT_SECRET }}
- run: |
- $ErrorActionPreference = "Stop"
- msstore reconfigure --tenantId $env:TENANT_ID --sellerId $env:SELLER_ID `
- --clientId $env:CLIENT_ID --clientSecret $env:CLIENT_SECRET
- if ($LASTEXITCODE -ne 0) { throw "msstore could not sign in" }
- msstore publish "Concat-$env:VERSION-windows.msixbundle" -id $env:PRODUCT_ID
- if ($LASTEXITCODE -ne 0) { throw "msstore publish failed with $LASTEXITCODE" }
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 21510038..e6c6ae98 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -163,6 +163,10 @@ 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 scope
caught 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 Colour
@@ -546,11 +550,10 @@ flowchart LR
subgraph rel["release.yml"]
check["check: tag = workspace version"]
gate["ci.yml on the tag"]
- build["build-app.yml ref: tag<br/>mac arm + x64 (dmg, notarised), linux x64 + arm<br/>(deb, rpm, AppImage, Arch), win x64 + arm (msi, msix, zip)"]
+ build["build-app.yml ref: tag<br/>mac arm + x64 (dmg, notarised), linux x64 + arm<br/>(deb, rpm, AppImage, Arch), win x64 + arm (setup exe, msi)"]
phones["mobile.yml ref: tag, sign: true<br/>APK signed in its own step; iOS ipa ad-hoc"]
publish["GitHub release: assets, checksums,<br/>manifest.json for self-update,<br/>notes from the commits"]
- store["MS Store, when not a pre-release"]
- check --> gate --> build --> publish --> store
+ check --> gate --> build --> publish
gate --> phones --> publish
end
nix["nix.yml: nix build + ldd check"]
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
index 93a43a9a..455d1d14 100644
--- a/THIRD_PARTY_NOTICES.md
+++ b/THIRD_PARTY_NOTICES.md
@@ -186,6 +186,29 @@ 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 models
Remove background runs three models, none of which ship inside the app
diff --git a/assets/windows/AppxManifest.xml b/assets/windows/AppxManifest.xml
deleted file mode 100644
index 8dd38116..00000000
--- a/assets/windows/AppxManifest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Concat's MSIX manifest, for the Microsoft Store.
-
- build-app.yml fills the {Braced} words in and packs the staged folder
- (the one the .exe and .msi are made of) with this beside it and the
- logos under store/ as Assets. The identity is the one Partner Center
- reserved for the app, read from the repository's variables; see the
- Store job in release.yml. The Store signs the package itself, so it is
- not signed here, and it goes to the Store only - not to the release.
-
- A desktop program in a package: full trust, the files as they are. The
- Store keeps it up to date, so the app's own updater stands down when it
- finds itself installed under WindowsApps (see concat-host's updates.rs).
--->
-<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
- xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
- xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
- IgnorableNamespaces="uap rescap">
- <Identity Name="{IdentityName}"
- Publisher="{Publisher}"
- Version="{Version}"
- ProcessorArchitecture="{Arch}" />
- <Properties>
- <DisplayName>{DisplayName}</DisplayName>
- <PublisherDisplayName>{PublisherDisplayName}</PublisherDisplayName>
- <Logo>Assets\StoreLogo.png</Logo>
- </Properties>
- <Dependencies>
- <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.26100.0" />
- </Dependencies>
- <Resources>
- <Resource Language="en-us" />
- </Resources>
- <Applications>
- <Application Id="Concat" Executable="concat.exe" EntryPoint="Windows.FullTrustApplication">
- <uap:VisualElements DisplayName="{DisplayName}"
- Description="Video editor"
- BackgroundColor="transparent"
- Square150x150Logo="Assets\Square150x150Logo.png"
- Square44x44Logo="Assets\Square44x44Logo.png" />
- </Application>
- </Applications>
- <Capabilities>
- <rescap:Capability Name="runFullTrust" />
- </Capabilities>
-</Package>
diff --git a/assets/windows/store/Square150x150Logo.png b/assets/windows/store/Square150x150Logo.png
deleted file mode 100644
index 25a8e81c..00000000
Binary files a/assets/windows/store/Square150x150Logo.png and /dev/null differ
diff --git a/assets/windows/store/Square44x44Logo.png b/assets/windows/store/Square44x44Logo.png
deleted file mode 100644
index e43dd528..00000000
Binary files a/assets/windows/store/Square44x44Logo.png and /dev/null differ
diff --git a/assets/windows/store/StoreLogo.png b/assets/windows/store/StoreLogo.png
deleted file mode 100644
index f7eab3ba..00000000
Binary files a/assets/windows/store/StoreLogo.png and /dev/null differ
diff --git a/scripts/ci/deps.lock b/scripts/ci/deps.lock
index 6ebd1950..cce6d0f6 100644
--- a/scripts/ci/deps.lock
+++ b/scripts/ci/deps.lock
@@ -52,6 +52,14 @@ 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 e751be8019b7500b100456c915b4b3c339d8d88b81b3aad49796d39f700e7ef3
llvm-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.txt
index d0ff2fc3..f70b5a9a 100644
--- a/scripts/ci/isa-allow.txt
+++ b/scripts/ci/isa-allow.txt
@@ -38,6 +38,15 @@ libonnxruntime.so* any
sherpa-onnx-c-api.dll any
sherpa-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 any
diff --git a/scripts/ci/smoke-windows.ps1 b/scripts/ci/smoke-windows.ps1
index bf053236..6b81e848 100644
--- a/scripts/ci/smoke-windows.ps1
+++ b/scripts/ci/smoke-windows.ps1
@@ -16,9 +16,13 @@
# 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` 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.
+# 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.
#
# 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
@@ -156,6 +160,12 @@ if ($Sde) {
# The emulator's own folder too: it loads its pieces from beside itself.
$path = (Split-Path $sdeExe) + ";" + $bare
Expect-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.lock
index 2a35bfdb..8c95318d 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -1139,6 +1139,7 @@ dependencies = [
"concat-host",
"concat-media",
"concat-project",
+ "concat-render",
"concat-server",
"concat-speech",
"concat-text",
diff --git a/src/crates/concat-host/src/updates.rs b/src/crates/concat-host/src/updates.rs
index 0a00e5e7..c980758c 100644
--- a/src/crates/concat-host/src/updates.rs
+++ b/src/crates/concat-host/src/updates.rs
@@ -240,8 +240,7 @@ impl PackageKind {
pub enum Fixed {
/// A Flatpak: Flatpak keeps it up to date.
Flatpak,
- /// A phone, or the Microsoft Store's package: the store keeps it up
- /// to date.
+ /// A phone: its app store keeps it up to date.
Store,
/// Not installed from any package this knows - a build from the tree,
/// a distribution's own package.
@@ -260,7 +259,6 @@ pub fn installed_as() -> Result<PackageKind, Fixed> {
.ok()
.and_then(|exe| exe.parent().map(Path::to_path_buf));
windows_kind(
- dir.as_deref().is_some_and(in_windows_apps),
dir.as_deref()
.is_some_and(|dir| dir.join("unins000.exe").is_file()),
dir.as_deref().is_some_and(in_program_files),
@@ -280,16 +278,13 @@ pub fn installed_as() -> Result<PackageKind, Fixed> {
}
/// A Windows install, from where the executable is and what sits beside
-/// it. The Store's package lives under WindowsApps, which is itself under
-/// Program Files, and the Store updates it. The setup leaves its
+/// it. The setup leaves its
/// uninstaller beside the program; the .msi leaves none and always
/// installs under Program Files. Anything else - the portable zip, a build
/// from the tree - came from no installer, and an update from here would
/// put a second copy beside it rather than replace it.
-fn windows_kind(store: bool, uninstaller: bool, program_files: bool) -> Result<PackageKind, Fixed> {
- if store {
- Err(Fixed::Store)
- } else if uninstaller {
+fn windows_kind(uninstaller: bool, program_files: bool) -> Result<PackageKind, Fixed> {
+ if uninstaller {
Ok(PackageKind::Setup)
} else if program_files {
Ok(PackageKind::Msi)
@@ -298,13 +293,6 @@ fn windows_kind(store: bool, uninstaller: bool, program_files: bool) -> Result<P
}
}
-/// Whether `dir` is inside a packaged app's folder: Windows installs every
-/// .msix under a `WindowsApps` folder, wherever the volume.
-fn in_windows_apps(dir: &Path) -> bool {
- dir.components()
- .any(|part| part.as_os_str().eq_ignore_ascii_case("WindowsApps"))
-}
-
/// Whether `dir` is under one of Windows' Program Files folders.
fn in_program_files(dir: &Path) -> bool {
["ProgramFiles", "ProgramW6432", "ProgramFiles(x86)"]
@@ -841,24 +829,14 @@ mod tests {
linux_kind(false, false, false, false, false),
Err(Fixed::NotFromPackage)
);
- // The Store's package is the Store's, though it sits under Program
- // Files. The setup's uninstaller wins even under Program Files,
+ // The setup's uninstaller wins even under Program Files,
// where an administrator's run of the setup also puts it; the .msi
// is the Program Files install without one; the portable zip is
// neither.
- assert_eq!(windows_kind(true, false, true), Err(Fixed::Store));
- assert_eq!(windows_kind(false, true, false), Ok(PackageKind::Setup));
- assert_eq!(windows_kind(false, true, true), Ok(PackageKind::Setup));
- assert_eq!(windows_kind(false, false, true), Ok(PackageKind::Msi));
- assert_eq!(
- windows_kind(false, false, false),
- Err(Fixed::NotFromPackage)
- );
- assert!(in_windows_apps(Path::new(
- "C:/Program Files/WindowsApps/Concat_0.2.6.0_x64__abc"
- )));
- assert!(in_windows_apps(Path::new("D:/windowsapps/Concat")));
- assert!(!in_windows_apps(Path::new("C:/Program Files/Concat")));
+ assert_eq!(windows_kind(true, false), Ok(PackageKind::Setup));
+ assert_eq!(windows_kind(true, true), Ok(PackageKind::Setup));
+ assert_eq!(windows_kind(false, true), Ok(PackageKind::Msi));
+ assert_eq!(windows_kind(false, false), Err(Fixed::NotFromPackage));
for kind in [
PackageKind::Dmg,
PackageKind::Setup,
diff --git a/src/crates/concat-render/src/gpu.rs b/src/crates/concat-render/src/gpu.rs
index d8e9cd18..be13a3eb 100644
--- a/src/crates/concat-render/src/gpu.rs
+++ b/src/crates/concat-render/src/gpu.rs
@@ -537,6 +537,84 @@ 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
@@ -738,6 +816,7 @@ 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.rs
index e499673b..10b2cd14 100644
--- a/src/crates/concat-render/src/gpu/tests.rs
+++ b/src/crates/concat-render/src/gpu/tests.rs
@@ -1839,3 +1839,25 @@ 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.toml
index aebe9cc4..18fe32c0 100644
--- a/src/crates/concat/Cargo.toml
+++ b/src/crates/concat/Cargo.toml
@@ -127,6 +127,9 @@ concat-media.workspace = true
concat-project.workspace = true
concat-export.workspace = true
concat-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 = true
concat-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.rs
index c2d08832..16dd1c23 100644
--- a/src/crates/concat/src/gpu.rs
+++ b/src/crates/concat/src/gpu.rs
@@ -55,8 +55,12 @@ 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 {