Skip to content

[Debug Info] Work graph node input/output objects have no usable debug info #8758

Description

@hbystuff

Version: dxcompiler.dll 1.9(5402-0d3ee6b5)(1.9.0.5402) - 1.9.0.5402 (0d3ee6b55-dirty)

work_graph_repros.zip

dxc -T lib_6_8 -Zi -Qembed_debug -Od -Fc <name>.ll <name>.hlsl

(a) Node object parameters get no debug info at all

Every node object parameter is absent from the emitted metadata. No
DILocalVariable, no dbg.value. Only ordinary locals and system values
survive.

repro node object parameter emitted DILocalVariables
24-DispatchNodeInputRecord.hlsl DispatchNodeInputRecord<MyRecord> input DTid, idx, val
25-GroupNodeInputRecords.hlsl GroupNodeInputRecords<MyRecord> input groupIndex, count, record
26-ThreadNodeInputRecord.hlsl ThreadNodeInputRecord<MyRecord> input rec
27-EmptyNodeInput.hlsl EmptyNodeInput input_records groupIndex, recordCount
28-NodeOutput.hlsl NodeOutput<MyOutputRecord> output val, outputRec
29-NodeOutputArray.hlsl NodeOutputArray<MyOutputRecord> outputs selector, outputRec
30-EmptyNodeOutput.hlsl EmptyNodeOutput output val

The node object parameter is missing from the right column in every row. Rows
28-30 also drop their input record parameter.

(b) Record handle locals get a zeroinitializer and an empty type

GroupNodeOutputRecords<T> and ThreadNodeOutputRecords<T> locals do get a
DILocalVariable, but it carries no information:

; 31-GroupNodeOutputRecords.ll
call void @llvm.dbg.value(metadata %"struct.GroupNodeOutputRecords<MyOutputRecord>" zeroinitializer, i64 0, metadata !65, metadata !54)   ; var:"outputRec" !DIExpression()

!65 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "outputRec", scope: !6, file: !1, line: 21, type: !66)
!66 = !DICompositeType(tag: DW_TAG_structure_type, name: "GroupNodeOutputRecords<MyOutputRecord>", file: !1, line: 21, size: 32, align: 32, elements: !2, templateParams: !67)
; 32-ThreadNodeOutputRecords.ll
call void @llvm.dbg.value(metadata %"struct.ThreadNodeOutputRecords<MyOutputRecord>" zeroinitializer, i64 0, metadata !67, metadata !53)   ; var:"outputRec" !DIExpression()

!68 = !DICompositeType(tag: DW_TAG_structure_type, name: "ThreadNodeOutputRecords<MyOutputRecord>", file: !1, line: 20, size: 32, align: 32, elements: !2, templateParams: !69)

The value is a constant zeroinitializer and elements: !2 is the empty tuple.
The handle reports as 0 and the type exposes no members. The shader writes
outputRec.Get(0).result immediately afterwards.

Expected

A DILocalVariable for each node input/output parameter, with a location that
reaches the underlying record. The record payload type is already present in
templateParams:. At minimum it should be reachable and its fields addressable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug, regression, crashneeds-triageAwaiting triage

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions