Skip to content

Typo of register -> registers crashes DXC with segfault #6599

@Nielsbishere

Description

@Nielsbishere

Description
The typo of Texture2D<float> _myGlobal : registers(t0, space0); instead of Texture2D<float> _myGlobal : register(t0, space0); crashes DXC internally.

Steps to Reproduce
https://godbolt.org/z/7od613jTo

#line 1 "Generated header file"
#line 1 "..StartGroup..ComputeShaderObject"
Texture2D<float> _myGlobal : registers(t0, space0);

RWTexture2D<float4> _output : register(u0, space0);

[numthreads(16, 16, 1)]
void main(int2 id : SV_DispatchThreadID) {

 int2 dims;
 _output.GetDimensions(dims.x, dims.y);

 if (any(id >= dims))
  return;

 _output[id] = float4(float2(id) / dims, 0, 1);
}

technique {
 pass {
  compute = main;
 }
}

Actual Behavior
Should give a compile error.

Environment

  • DXC version: Latest release
  • Host Operating System: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crash

    Type

    No type

    Projects

    Status

    Triaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions