Skip to content

FXC D3DCompile error 0x80004005/X3500 #8334

@NyxCode

Description

@NyxCode

Description
After noticing that timestamps seem to be somewhat borked on vulkan, I wanted to try out the DX12 backend.
However, a pretty trivial histogram compute shader stopped compiling with a weird error.
I reduced the shader down as much as I could. The error changed slightly during that, but I believe this is the root cause.

Repro steps
The reduced shader in question:

@group(0) @binding(0) var<uniform> i: u32;

@compute @workgroup_size(1)
fn f() {
    var b: vec2<u32>;
    b[i] = 0u;
}

Expected vs observed behavior
The shader should compile. Or not compile, but at least independently of what backend is used (the reduced shader above compiles fine on the vulkan backend).
The resulting error:

[2025-10-12T07:13:25Z ERROR wgpu::backend::wgpu_core] Shader translation error for stage ShaderStages(COMPUTE): FXC D3DCompile error (Unspecified error (0x80004005)): {HOME}\count1.wgsl(16,5-25): error X3500: array reference cannot be used as an l-value; not natively addressable

[2025-10-12T07:13:25Z ERROR wgpu::backend::wgpu_core] Please report it to https://github.com/gfx-rs/wgpu
[2025-10-12T07:13:25Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default

thread 'main' panicked at {HOME}\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wgpu-27.0.1\src\backend\wgpu_core.rs:1516:26:
wgpu error: Validation Error

Caused by:
  In Device::create_compute_pipeline
    Internal error: FXC D3DCompile error (Unspecified error (0x80004005)): {PATH}\count1.wgsl(16,5-25): error X3500: array reference cannot be used as an l-value; not natively addressable

Platform

AdapterInfo {
    name: "AMD Radeon RX 5700 XT",
    vendor: 4098,
    device: 29471,
    device_type: DiscreteGpu,
    driver: "32.0.21025.10016",
    driver_info: "",
    backend: Dx12,
}

Windows 11 Home Version 10.0.26100 Build 26100

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions