KhronosGroup / SPIRV-Visualizer

Client side only Javascript to visualize a SPIR-V Module binary
https://www.khronos.org/spir/visualizer/
Apache License 2.0
31 stars 5 forks source link

d3-dag dagStratify not properly handling structs members sharing same type #1

Closed sfricke-samsung closed 2 years ago

sfricke-samsung commented 3 years ago

The following SPIR-V

%8 = OpTypeFloat 32
%9 = OpTypeVector %8 3
%173 = OpTypeStruct %9 %8 %9 %8

Where the TypeFloat is shared betweent he struct and the vector

This is creating a dagData of

id: 125
parentIds: (4) [83, 82, 83, 82]
text: (5) ["%173 = OpTypeStruct", "%9", "%8", "%9", "%8"]

id: 83
parentIds: [82]
text: (3) ["%9 = OpTypeVector", "%8", "3"]

id: 82
parentIds: []
text: (2) ["%8 = OpTypeFloat", "32"]

it will produce dead nodes with

data: undefined
id: "82[]125[]1"

in it, need to find way to fix