Skip to content

feat(deno): Add DXC env var to Deno; use DXC in cts_runner#9177

Merged
andyleiserson merged 4 commits intogfx-rs:trunkfrom
andyleiserson:jj-push-zkzw
Mar 10, 2026
Merged

feat(deno): Add DXC env var to Deno; use DXC in cts_runner#9177
andyleiserson merged 4 commits intogfx-rs:trunkfrom
andyleiserson:jj-push-zkzw

Conversation

@andyleiserson
Copy link
Copy Markdown
Contributor

@andyleiserson andyleiserson commented Mar 9, 2026

Add the environment variable DENO_WEBGPU_DX12_COMPILER to configure the DX12 shader compiler in Deno. Use it to select DXC in cts_runner.

Also syncs a few other env vars from ci.yml to cts.yml.

Connections
Fixes #9105.

Testing
Passes the currently enabled CTS tests, with one exception, filed as #9179.

Squash or Rebase? Rebase (after squashing fixup commit)

@andyleiserson andyleiserson force-pushed the jj-push-zkzw branch 3 times, most recently from 7b75a1a to 4fa5959 Compare March 9, 2026 19:20
@andyleiserson andyleiserson changed the title Use DXC in cts_runner feat(deno): Add DENO_WEBGPU_DX12_COMPILER env var Mar 9, 2026
@andyleiserson andyleiserson marked this pull request as ready for review March 9, 2026 19:23
Comment on lines +195 to +196
shader_compiler: dx12_compiler
.unwrap_or(wgpu_types::Dx12Compiler::Fxc),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crowlKats I left the default alone since changing it raises a question of how to ensure DXC is available (link statically vs. require that the library is available at runtime), but it probably should be changed to DXC at some point. Let me know if you'd like to me change it in this PR or open a Deno issue for this.

(Actually I see that as of #8882 there is a new option Dx12Compiler::Auto that uses DXC if linked or available at runtime, else falls back to FXC. Maybe we should switch to that?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Deno's minimum Windows version is Windows 10, version 1709 (link):

NOTE: Deno requires Windows 10 version 1709, or Windows Server 2016 version 1709 and up, due to requiring IsWow64Process2.

…which means DXC should be present in all installations, because DXC was first introduced with version 1703 (link). IOW, Deno should have no need or want for FXC (modulo bugs from earlier versions of DXC, I guess).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that so far, all existing releases have been via the Windows SDKs or PIX tools.

The DXC dll needs to be shipped by applications.

webgpu:api,validation,texture,rg11b10ufloat_renderable:*

webgpu:shader,execution,expression,call,builtin,atan2:f16:*
fails-if(dx12) webgpu:shader,execution,expression,call,builtin,atan2:f16:*
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #9179 for this.

Copy link
Copy Markdown
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nothing blocking. I have some nits that I'm sure will be resolved before merging, but aren't important enough to block. 🙂


I used Conventional Comments in this review! I hope they help with clarity and tone.

Comment on lines +195 to +196
shader_compiler: dx12_compiler
.unwrap_or(wgpu_types::Dx12Compiler::Fxc),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Deno's minimum Windows version is Windows 10, version 1709 (link):

NOTE: Deno requires Windows 10 version 1709, or Windows Server 2016 version 1709 and up, due to requiring IsWow64Process2.

…which means DXC should be present in all installations, because DXC was first introduced with version 1703 (link). IOW, Deno should have no need or want for FXC (modulo bugs from earlier versions of DXC, I guess).

@ErichDonGubler
Copy link
Copy Markdown
Member

ErichDonGubler commented Mar 9, 2026

nitpick: The PR title communicates that the env. var. is added, but not consumed by the CTS runner in CI.

suggestion: Rename PR/eventual squash-and-merge commit title to be: feat(deno): use DX12 for CTS tests via new `DENO_WEBGPU_DX12_COMPILER` env var

nitpick: A separate commit for migrating the CTS runner to DXC would have been nice (i.e., starting with DENO_WEBGPU_DX12_COMPILER=fxc in cts.yml), but I doubt this will be reverted, so 🤷🏻‍♂️ whatevs.

@andyleiserson andyleiserson changed the title feat(deno): Add DENO_WEBGPU_DX12_COMPILER env var feat(deno): Add DXC env var to Deno; use DXC in cts_runner Mar 10, 2026
- Use the env var to select DXC in cts_runner
- Sync a few other env vars from `ci.yml`
@andyleiserson andyleiserson merged commit d540c45 into gfx-rs:trunk Mar 10, 2026
55 checks passed
@andyleiserson andyleiserson deleted the jj-push-zkzw branch March 10, 2026 23:57
@ErichDonGubler ErichDonGubler added type: enhancement New feature or request area: cts Issues stemming from the WebGPU Conformance Test Suite area: deno Deno bindings to wgpu labels Mar 16, 2026
@ErichDonGubler ErichDonGubler self-assigned this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cts Issues stemming from the WebGPU Conformance Test Suite area: deno Deno bindings to wgpu type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failures in CTS tests using primitive_index on DX12 with FXC

3 participants