Skip to content

Naga generates HLSL that makes DXC crash #7648

@jimblandy

Description

@jimblandy

The HLSL that Naga generates for data97.wgsl (extracted from the Bevy WebGPU demos) in the attached .zip file causes DXC to crash.

$ naga data97.wgsl bad.hlsl
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
     Running `/home/jimb/rust/wgpu/target/debug/naga data97.wgsl bad.hlsl`
$ ~/DirectXShaderCompiler/build/bin/dxc -Wno-parentheses-equality -Zi -Qembed_debug -Od -HV 2018 -T cs_6_7 -E main bad.hlsl 
Error: assert()
File:
(0)
Func:	
Illegal instruction (core dumped)
$ 

naga-crashes-dxc.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: naga back-endOutputs of naga shader conversionlang: HLSLD3D Shading LanguagenagaShader Translatortype: bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions