@zenfg/inspector 0.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +74 -0
- package/dist/FrameGraphInspector.d.ts +153 -0
- package/dist/FrameGraphInspector.d.ts.map +1 -0
- package/dist/FrameGraphInspector.js +580 -0
- package/dist/FrameGraphInspector.js.map +1 -0
- package/dist/debugCaptureModel.d.ts +166 -0
- package/dist/debugCaptureModel.d.ts.map +1 -0
- package/dist/debugCaptureModel.js +364 -0
- package/dist/debugCaptureModel.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/panelAliasAnalysis.d.ts +20 -0
- package/dist/panelAliasAnalysis.d.ts.map +1 -0
- package/dist/panelAliasAnalysis.js +113 -0
- package/dist/panelAliasAnalysis.js.map +1 -0
- package/dist/panelCytoscapeGraphRenderer.d.ts +71 -0
- package/dist/panelCytoscapeGraphRenderer.d.ts.map +1 -0
- package/dist/panelCytoscapeGraphRenderer.js +559 -0
- package/dist/panelCytoscapeGraphRenderer.js.map +1 -0
- package/dist/panelDiagnosticsView.d.ts +22 -0
- package/dist/panelDiagnosticsView.d.ts.map +1 -0
- package/dist/panelDiagnosticsView.js +123 -0
- package/dist/panelDiagnosticsView.js.map +1 -0
- package/dist/panelDomHelpers.d.ts +26 -0
- package/dist/panelDomHelpers.d.ts.map +1 -0
- package/dist/panelDomHelpers.js +129 -0
- package/dist/panelDomHelpers.js.map +1 -0
- package/dist/panelGraphLayout.d.ts +28 -0
- package/dist/panelGraphLayout.d.ts.map +1 -0
- package/dist/panelGraphLayout.js +223 -0
- package/dist/panelGraphLayout.js.map +1 -0
- package/dist/panelGraphRenderer.d.ts +20 -0
- package/dist/panelGraphRenderer.d.ts.map +1 -0
- package/dist/panelGraphRenderer.js +2 -0
- package/dist/panelGraphRenderer.js.map +1 -0
- package/dist/panelGraphScene.d.ts +98 -0
- package/dist/panelGraphScene.d.ts.map +1 -0
- package/dist/panelGraphScene.js +559 -0
- package/dist/panelGraphScene.js.map +1 -0
- package/dist/panelGraphView.d.ts +9 -0
- package/dist/panelGraphView.d.ts.map +1 -0
- package/dist/panelGraphView.js +88 -0
- package/dist/panelGraphView.js.map +1 -0
- package/dist/panelGraphVisuals.d.ts +38 -0
- package/dist/panelGraphVisuals.d.ts.map +1 -0
- package/dist/panelGraphVisuals.js +330 -0
- package/dist/panelGraphVisuals.js.map +1 -0
- package/dist/panelIcons.d.ts +4 -0
- package/dist/panelIcons.d.ts.map +1 -0
- package/dist/panelIcons.js +43 -0
- package/dist/panelIcons.js.map +1 -0
- package/dist/panelInspectorView.d.ts +33 -0
- package/dist/panelInspectorView.d.ts.map +1 -0
- package/dist/panelInspectorView.js +357 -0
- package/dist/panelInspectorView.js.map +1 -0
- package/dist/panelMemoryView.d.ts +21 -0
- package/dist/panelMemoryView.d.ts.map +1 -0
- package/dist/panelMemoryView.js +134 -0
- package/dist/panelMemoryView.js.map +1 -0
- package/dist/panelPassesView.d.ts +31 -0
- package/dist/panelPassesView.d.ts.map +1 -0
- package/dist/panelPassesView.js +183 -0
- package/dist/panelPassesView.js.map +1 -0
- package/dist/panelResourcesView.d.ts +19 -0
- package/dist/panelResourcesView.d.ts.map +1 -0
- package/dist/panelResourcesView.js +89 -0
- package/dist/panelResourcesView.js.map +1 -0
- package/dist/panelSelection.d.ts +5 -0
- package/dist/panelSelection.d.ts.map +1 -0
- package/dist/panelSelection.js +88 -0
- package/dist/panelSelection.js.map +1 -0
- package/dist/panelTypes.d.ts +40 -0
- package/dist/panelTypes.d.ts.map +1 -0
- package/dist/panelTypes.js +2 -0
- package/dist/panelTypes.js.map +1 -0
- package/dist/panelVisualTheme.d.ts +76 -0
- package/dist/panelVisualTheme.d.ts.map +1 -0
- package/dist/panelVisualTheme.js +39 -0
- package/dist/panelVisualTheme.js.map +1 -0
- package/dist/panelWorkbenchHelpers.d.ts +34 -0
- package/dist/panelWorkbenchHelpers.d.ts.map +1 -0
- package/dist/panelWorkbenchHelpers.js +162 -0
- package/dist/panelWorkbenchHelpers.js.map +1 -0
- package/dist/panelWorkbenchView.d.ts +77 -0
- package/dist/panelWorkbenchView.d.ts.map +1 -0
- package/dist/panelWorkbenchView.js +409 -0
- package/dist/panelWorkbenchView.js.map +1 -0
- package/dist/query.d.ts +11 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +21 -0
- package/dist/query.js.map +1 -0
- package/dist/styles.d.ts +8 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +1073 -0
- package/dist/styles.js.map +1 -0
- package/package.json +29 -0
- package/src/FrameGraphInspector.ts +632 -0
- package/src/debugCaptureModel.ts +583 -0
- package/src/index.ts +21 -0
- package/src/panelAliasAnalysis.ts +164 -0
- package/src/panelCytoscapeGraphRenderer.ts +617 -0
- package/src/panelDiagnosticsView.ts +160 -0
- package/src/panelDomHelpers.ts +151 -0
- package/src/panelGraphLayout.ts +281 -0
- package/src/panelGraphRenderer.ts +21 -0
- package/src/panelGraphScene.ts +787 -0
- package/src/panelGraphView.ts +108 -0
- package/src/panelGraphVisuals.ts +364 -0
- package/src/panelIcons.ts +56 -0
- package/src/panelInspectorView.ts +377 -0
- package/src/panelMemoryView.ts +154 -0
- package/src/panelPassesView.ts +222 -0
- package/src/panelResourcesView.ts +115 -0
- package/src/panelSelection.ts +99 -0
- package/src/panelTypes.ts +28 -0
- package/src/panelVisualTheme.ts +39 -0
- package/src/panelWorkbenchHelpers.ts +216 -0
- package/src/panelWorkbenchView.ts +465 -0
- package/src/query.ts +22 -0
- package/src/styles.ts +1076 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelGraphVisuals.js","sourceRoot":"","sources":["../src/panelGraphVisuals.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,k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AU,CACf,GAAW,EACX,KAAa,EACb,KAAa,EACb,SAAqD;IAErD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3D,CAAC;AAED,SAAS,SAAS,CACd,IAAY,EACZ,MAA0D;IAE1D,OAAO;QACH,QAAQ,EAAE,oBAAoB,IAAI,IAAI;QACtC,KAAK,EAAE,EAAE,kBAAkB,EAAE,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;KAC5E,CAAC;AACN,CAAC;AAED,SAAS,kBAAkB,CAAC,eAAuB;IAC/C,MAAM,QAAQ,GAAG,cAAc,CAAC;IAChC,OAAO;QACH,kBAAkB,EAAE,eAAe;QACnC,oBAAoB,EAAE,IAAI;QAC1B,cAAc,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM;QAC/C,cAAc,EAAE,GAAG;QACnB,SAAS,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QACvC,4BAA4B,EAAE,SAAS;QACvC,WAAW,EAAE,OAAO;QACpB,YAAY,EAAE,MAAM;QACpB,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,aAAa;QAC5B,oBAAoB,EAAE,MAAM;QAC5B,eAAe,EAAE,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,YAAY,GAAG,CAAC;QACrE,eAAe,EAAE,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,YAAY,GAAG,CAAC;QACrE,aAAa,EAAE,QAAQ,CAAC,oBAAoB;QAC5C,OAAO,EAAE,kBAAkB,CAAC,IAAI;QAChC,aAAa,EAAE,GAAG;KACrB,CAAC;AACN,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\n\nimport type { GraphScene, GraphSceneEdge, GraphSceneNode } from './panelGraphScene.ts';\nimport { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\n\nexport { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\n\n\nexport const GRAPH_GEOMETRY = {\n fitPadding: 28,\n baseFontSize: 13,\n overviewFontThreshold: 9,\n minimumZoomedFontSize: 5,\n groupTitleInset: 8,\n groupTitleLineHeight: 1.2,\n groupPadding: 32,\n elkGroupPadding: { top: 46, right: 24, bottom: 24, left: 24 },\n edgeCornerRadius: 6,\n} as const;\n\nconst ENDPOINT_EDGE_DISTANCES = 'endpoints' as unknown as cytoscape.Css.Edge['edge-distances'];\nconst EDGE_SEGMENT_RADII = `${GRAPH_GEOMETRY.edgeCornerRadius}px` as unknown as cytoscape.Css.Edge['segment-radii'];\n\nexport type GraphLegendEntry = {\n readonly key: string;\n readonly label: string;\n readonly color: string;\n readonly shape: 'box' | 'ellipse' | 'group' | 'line';\n readonly lineStyle?: 'solid' | 'dotted' | 'dashed';\n readonly hollowArrow?: boolean;\n};\n\nconst NODE_LEGEND_ENTRIES = {\n render: nodeLegend('render', 'Render', GRAPH_VISUAL_THEME.render.stroke),\n compute: nodeLegend('compute', 'Compute', GRAPH_VISUAL_THEME.compute.stroke),\n copy: nodeLegend('copy', 'Copy', GRAPH_VISUAL_THEME.copy.stroke),\n 'clear-buffer': nodeLegend('clear', 'Clear', GRAPH_VISUAL_THEME.clear.stroke),\n command: nodeLegend('command', 'Command', GRAPH_VISUAL_THEME.command.stroke),\n 'external-submission': nodeLegend('external', 'External', GRAPH_VISUAL_THEME.external.stroke),\n} as const;\n\nexport function createGraphLegend(scene: GraphScene): readonly GraphLegendEntry[] {\n const entries: GraphLegendEntry[] = [];\n const passKinds = new Set(scene.nodes.flatMap((node) => node.kind === 'pass' || node.kind === 'culled-pass'\n ? [node.passKind]\n : []));\n for (const kind of ['render', 'compute', 'copy', 'clear-buffer', 'command', 'external-submission'] as const) {\n if (passKinds.has(kind)) entries.push(NODE_LEGEND_ENTRIES[kind]);\n }\n if (scene.nodes.some((node) => node.kind === 'group')) {\n entries.push({ key: 'group', label: 'Group', color: GRAPH_VISUAL_THEME.group.stroke, shape: 'group' });\n }\n if (scene.nodes.some((node) => node.kind === 'resource' && node.resourceKind === 'texture')) {\n entries.push({ key: 'texture', label: 'Texture', color: GRAPH_VISUAL_THEME.texture.stroke, shape: 'ellipse' });\n }\n if (scene.nodes.some((node) => node.kind === 'resource' && node.resourceKind === 'buffer')) {\n entries.push({ key: 'buffer', label: 'Buffer', color: GRAPH_VISUAL_THEME.buffer.stroke, shape: 'ellipse' });\n }\n if (scene.nodes.some((node) => node.kind === 'culled-pass')) {\n entries.push({\n key: 'culled',\n label: 'Culled',\n color: GRAPH_VISUAL_THEME.culled.stroke,\n shape: 'box',\n lineStyle: 'dashed',\n });\n }\n if (scene.edges.some((edge) => edge.kind === 'dependency' && edge.dependencyKind === 'value')) {\n entries.push(edgeLegend('value', 'Value', GRAPH_VISUAL_THEME.dependency.value, 'solid'));\n }\n if (scene.edges.some((edge) => edge.kind === 'dependency' && edge.dependencyKind === 'ordering')) {\n entries.push({\n ...edgeLegend('ordering', 'Order', GRAPH_VISUAL_THEME.dependency.ordering, 'dotted'),\n hollowArrow: true,\n });\n }\n if (scene.edges.some((edge) => edge.kind === 'access' && edge.accessMode === 'read')) {\n entries.push(edgeLegend('read', 'Read', GRAPH_VISUAL_THEME.access.read, 'solid'));\n }\n if (scene.edges.some((edge) => edge.kind === 'access' && edge.accessMode === 'write')) {\n entries.push(edgeLegend('write', 'Write', GRAPH_VISUAL_THEME.access.write, 'solid'));\n }\n return entries;\n}\n\nexport function createGraphStyles(): cytoscape.StylesheetJson {\n const theme = GRAPH_VISUAL_THEME;\n return [\n {\n selector: 'node',\n style: {\n 'shape': 'round-rectangle',\n 'width': 'data(width)',\n 'height': 'data(height)',\n 'label': 'data(displayLabel)',\n 'text-wrap': 'wrap',\n 'text-max-width': '160px',\n 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',\n 'font-size': GRAPH_GEOMETRY.baseFontSize,\n 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,\n 'color': theme.text,\n 'background-color': theme.surfaceRaised,\n 'border-color': theme.group.stroke,\n 'border-width': 1.25,\n 'text-valign': 'center',\n 'text-halign': 'center',\n 'overlay-opacity': 0,\n 'underlay-opacity': 0,\n },\n },\n passStyle('render', theme.render),\n passStyle('compute', theme.compute),\n passStyle('copy', theme.copy),\n passStyle('clear-buffer', theme.clear),\n passStyle('command', theme.command),\n {\n selector: 'node[passKind = \"external-submission\"]',\n style: {\n 'background-color': theme.external.fill,\n 'border-color': theme.external.stroke,\n 'border-style': 'double',\n 'border-width': 3,\n },\n },\n {\n selector: 'node[kind = \"culled-pass\"]',\n style: {\n 'background-color': theme.culled.fill,\n 'border-color': theme.culled.stroke,\n 'color': theme.muted,\n 'border-style': 'dashed',\n 'opacity': 0.72,\n },\n },\n {\n selector: 'node[kind = \"resource\"][resourceKind = \"texture\"]',\n style: {\n 'shape': 'ellipse',\n 'background-color': theme.texture.fill,\n 'border-color': theme.texture.stroke,\n },\n },\n {\n selector: 'node[kind = \"resource\"][resourceKind = \"buffer\"]',\n style: {\n 'shape': 'ellipse',\n 'background-color': theme.buffer.fill,\n 'border-color': theme.buffer.stroke,\n },\n },\n {\n selector: 'node[kind = \"group\"]',\n style: {\n 'text-max-width': (element: cytoscape.SingularElementArgument) => `${element.data('labelMaxWidth') as number}px`,\n },\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 1]',\n style: {\n 'background-color': theme.group.fill,\n 'border-color': theme.group.stroke,\n 'border-width': 2,\n 'color': theme.text,\n },\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 0]',\n style: expandedGroupStyle(theme.group.fill),\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 0][depthBand = 1]',\n style: { 'background-color': theme.group.alternateFill },\n },\n {\n selector: 'edge',\n style: {\n 'width': 1.5,\n 'line-color': theme.dependency.value,\n 'line-opacity': 0.82,\n 'target-arrow-color': theme.dependency.value,\n 'target-arrow-shape': 'triangle',\n 'target-arrow-fill': 'filled',\n 'arrow-scale': 0.8,\n 'curve-style': 'straight',\n 'label': 'data(displayLabel)',\n 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',\r\n 'font-size': 10,\n 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,\n 'color': theme.text,\n 'text-background-color': theme.canvas,\n 'text-background-opacity': 0.82,\n 'text-background-padding': '2px',\n 'text-rotation': 'autorotate',\n 'overlay-opacity': 0,\n 'underlay-opacity': 0,\n },\n },\n {\n selector: 'edge[dependencyKind = \"ordering\"]',\n style: {\n 'line-color': theme.dependency.ordering,\n 'target-arrow-color': theme.dependency.ordering,\n 'line-style': 'dotted',\n 'target-arrow-fill': 'hollow',\n 'line-opacity': 0.72,\n },\n },\n {\n selector: 'edge[accessMode = \"read\"]',\n style: {\n 'line-color': theme.access.read,\n 'target-arrow-color': theme.access.read,\n },\n },\n {\n selector: 'edge[accessMode = \"write\"]',\n style: {\n 'line-color': theme.access.write,\n 'target-arrow-color': theme.access.write,\n },\n },\n {\n selector: 'edge[dashed = 1]',\n style: { 'line-style': 'dashed', 'line-opacity': 0.46, 'opacity': 0.58 },\n },\n {\n selector: 'edge.elk-route',\n style: {\n 'source-endpoint': 'data(sourceEndpoint)',\n 'target-endpoint': 'data(targetEndpoint)',\n 'edge-distances': ENDPOINT_EDGE_DISTANCES,\n },\n },\n {\n selector: 'edge.elk-segments',\n style: {\n 'curve-style': 'round-segments',\n 'segment-distances': 'data(segmentDistances)',\n 'segment-weights': 'data(segmentWeights)',\n 'segment-radii': EDGE_SEGMENT_RADII,\n },\n },\n {\n selector: 'node.semantic-hover',\n style: {\n 'border-color': theme.hover,\n 'border-width': 2,\n 'z-index': 15,\n },\n },\n {\n selector: 'edge.semantic-hover',\n style: {\n 'line-color': theme.hover,\n 'target-arrow-color': theme.hover,\n 'line-opacity': 1,\n 'width': 2.5,\n 'z-index': 15,\n },\n },\n {\n selector: 'node.semantic-selected',\n style: {\n 'border-color': theme.selected,\n 'border-width': 3,\n 'underlay-color': theme.selected,\n 'underlay-padding': 5,\n 'underlay-opacity': 0.18,\n 'opacity': 1,\n 'z-index': 20,\n },\n },\n {\n selector: 'edge.semantic-selected',\n style: {\n 'line-color': theme.selected,\n 'target-arrow-color': theme.selected,\n 'line-opacity': 1,\n 'width': 3,\n 'z-index': 20,\n },\n },\n ];\n}\n\nexport function nodeDimensions(node: GraphSceneNode): { readonly width: number; readonly height: number } {\n switch (node.kind) {\n case 'pass':\n return { width: 184, height: node.label.includes('\\n') ? 62 : 48 };\n case 'culled-pass':\n return { width: 184, height: 64 };\n case 'resource':\n return { width: 166, height: node.label.includes('\\n') ? 58 : 46 };\n case 'group':\n return node.collapsed ? { width: 224, height: 68 } : { width: 120, height: 80 };\n }\n}\n\nexport function graphLayoutGeometryKey(scene: GraphScene): string {\n return JSON.stringify({\n topology: scene.topologyKey,\n dimensions: scene.nodes.map((node) => {\n const dimensions = nodeDimensions(node);\n return [node.id, dimensions.width, dimensions.height];\n }),\n });\n}\n\nexport function graphEdgeDisplayLabel(edge: GraphSceneEdge): string {\n return edge.kind === 'access' ? '' : edge.label ?? '';\n}\n\nexport function expandedGroupLabelMaxWidth(outerWidth: number): number {\n return Math.max(80, Math.floor(outerWidth - GRAPH_GEOMETRY.groupTitleInset * 2));\n}\n\nexport function isOverviewGraphScale(zoom: number): boolean {\n return GRAPH_GEOMETRY.baseFontSize * zoom < GRAPH_GEOMETRY.overviewFontThreshold;\n}\n\nfunction nodeLegend(key: string, label: string, color: string): GraphLegendEntry {\n return { key, label, color, shape: 'box' };\n}\n\nfunction edgeLegend(\n key: string,\n label: string,\n color: string,\n lineStyle: NonNullable<GraphLegendEntry['lineStyle']>,\n): GraphLegendEntry {\n return { key, label, color, shape: 'line', lineStyle };\n}\n\nfunction passStyle(\n kind: string,\n colors: { readonly stroke: string; readonly fill: string },\n): cytoscape.StylesheetStyle {\n return {\n selector: `node[passKind = \"${kind}\"]`,\n style: { 'background-color': colors.fill, 'border-color': colors.stroke },\n };\n}\n\nfunction expandedGroupStyle(backgroundColor: string): cytoscape.Css.Node {\n const geometry = GRAPH_GEOMETRY;\n return {\n 'background-color': backgroundColor,\n 'background-opacity': 0.34,\n 'border-color': GRAPH_VISUAL_THEME.group.stroke,\n 'border-width': 1.5,\n 'padding': `${geometry.groupPadding}px`,\n 'compound-sizing-wrt-labels': 'include',\n 'min-width': '120px',\n 'min-height': '80px',\n 'text-valign': 'top-inside',\n 'text-halign': 'left-inside',\n 'text-justification': 'left',\n 'text-margin-x': geometry.groupTitleInset - geometry.groupPadding * 2,\n 'text-margin-y': geometry.groupTitleInset - geometry.groupPadding * 2,\n 'line-height': geometry.groupTitleLineHeight,\n 'color': GRAPH_VISUAL_THEME.text,\n 'font-weight': 600,\n };\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type PanelIconName = 'capture' | 'check' | 'close' | 'copy' | 'empty' | 'error' | 'fit' | 'inspector' | 'spinner' | 'waiting';
|
|
2
|
+
export declare function createPanelIcon(name: PanelIconName): SVGSVGElement;
|
|
3
|
+
export declare function setPanelButtonContent(button: HTMLButtonElement, icon: PanelIconName, label: string): void;
|
|
4
|
+
//# sourceMappingURL=panelIcons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelIcons.d.ts","sourceRoot":"","sources":["../src/panelIcons.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACtB,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,KAAK,GACL,WAAW,GACX,SAAS,GACT,SAAS,CAAC;AAqBb,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,CAoBlE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAEzG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const ICON_PATHS = {
|
|
2
|
+
capture: [
|
|
3
|
+
'M6 2.5H2.5V6',
|
|
4
|
+
'M10 2.5h3.5V6',
|
|
5
|
+
'M6 13.5H2.5V10',
|
|
6
|
+
'M10 13.5h3.5V10',
|
|
7
|
+
'M8 6.25a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5',
|
|
8
|
+
],
|
|
9
|
+
check: ['M3 8.2 6.3 11.5 13 4.8'],
|
|
10
|
+
close: ['M4 4l8 8', 'M12 4l-8 8'],
|
|
11
|
+
copy: ['M5.5 4h7.5v9H5.5z', 'M3 11V2.5h7.5'],
|
|
12
|
+
empty: ['M3 3h10v10H3z', 'M5.5 8h5'],
|
|
13
|
+
error: ['M8 2.5l5.5 10H2.5z', 'M8 6v3', 'M8 11.2v.1'],
|
|
14
|
+
fit: ['M6 2.5H2.5V6', 'M10 2.5h3.5V6', 'M6 13.5H2.5V10', 'M10 13.5h3.5V10'],
|
|
15
|
+
inspector: ['M2.5 3h11v10h-11z', 'M9.5 3v10'],
|
|
16
|
+
spinner: ['M13 8a5 5 0 1 1-2-4'],
|
|
17
|
+
waiting: ['M5.5 5v6', 'M10.5 5v6'],
|
|
18
|
+
};
|
|
19
|
+
export function createPanelIcon(name) {
|
|
20
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
21
|
+
svg.classList.add('zenfg-inspector-control-icon');
|
|
22
|
+
svg.dataset.icon = name;
|
|
23
|
+
svg.setAttribute('viewBox', '0 0 16 16');
|
|
24
|
+
svg.setAttribute('width', '14');
|
|
25
|
+
svg.setAttribute('height', '14');
|
|
26
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
27
|
+
svg.setAttribute('focusable', 'false');
|
|
28
|
+
for (const data of ICON_PATHS[name]) {
|
|
29
|
+
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
30
|
+
path.setAttribute('d', data);
|
|
31
|
+
path.setAttribute('fill', 'none');
|
|
32
|
+
path.setAttribute('stroke', 'currentColor');
|
|
33
|
+
path.setAttribute('stroke-linecap', 'round');
|
|
34
|
+
path.setAttribute('stroke-linejoin', 'round');
|
|
35
|
+
path.setAttribute('stroke-width', '1.4');
|
|
36
|
+
svg.appendChild(path);
|
|
37
|
+
}
|
|
38
|
+
return svg;
|
|
39
|
+
}
|
|
40
|
+
export function setPanelButtonContent(button, icon, label) {
|
|
41
|
+
button.replaceChildren(createPanelIcon(icon), document.createTextNode(label));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=panelIcons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelIcons.js","sourceRoot":"","sources":["../src/panelIcons.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,GAA6C;IAC5D,OAAO,EAAE;QACR,cAAc;QACd,eAAe;QACf,gBAAgB;QAChB,iBAAiB;QACjB,qDAAqD;KACrD;IACD,KAAK,EAAE,CAAC,wBAAwB,CAAC;IACjC,KAAK,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAC5C,KAAK,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC;IACpC,KAAK,EAAE,CAAC,oBAAoB,EAAE,QAAQ,EAAE,YAAY,CAAC;IACrD,GAAG,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,CAAC;IAC3E,SAAS,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAC7C,OAAO,EAAE,CAAC,qBAAqB,CAAC;IAChC,OAAO,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;CAClC,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAmB;IAClD,MAAM,GAAG,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;IAC1E,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAClD,GAAG,CAAC,OAAO,CAAC,IAAI,GAAG,I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\t| 'spinner'\n\t| 'waiting';\n\nconst ICON_PATHS: Record<PanelIconName, readonly string[]> = {\n\tcapture: [\n\t\t'M6 2.5H2.5V6',\n\t\t'M10 2.5h3.5V6',\n\t\t'M6 13.5H2.5V10',\n\t\t'M10 13.5h3.5V10',\n\t\t'M8 6.25a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5',\n\t],\n\tcheck: ['M3 8.2 6.3 11.5 13 4.8'],\n\tclose: ['M4 4l8 8', 'M12 4l-8 8'],\n\tcopy: ['M5.5 4h7.5v9H5.5z', 'M3 11V2.5h7.5'],\n\tempty: ['M3 3h10v10H3z', 'M5.5 8h5'],\n\terror: ['M8 2.5l5.5 10H2.5z', 'M8 6v3', 'M8 11.2v.1'],\n\tfit: ['M6 2.5H2.5V6', 'M10 2.5h3.5V6', 'M6 13.5H2.5V10', 'M10 13.5h3.5V10'],\n\tinspector: ['M2.5 3h11v10h-11z', 'M9.5 3v10'],\n\tspinner: ['M13 8a5 5 0 1 1-2-4'],\n\twaiting: ['M5.5 5v6', 'M10.5 5v6'],\n};\n\nexport function createPanelIcon(name: PanelIconName): SVGSVGElement {\n\tconst svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\tsvg.classList.add('zenfg-inspector-control-icon');\n\tsvg.dataset.icon = name;\n\tsvg.setAttribute('viewBox', '0 0 16 16');\n\tsvg.setAttribute('width', '14');\n\tsvg.setAttribute('height', '14');\n\tsvg.setAttribute('aria-hidden', 'true');\n\tsvg.setAttribute('focusable', 'false');\n\tfor (const data of ICON_PATHS[name]) {\n\t\tconst path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n\t\tpath.setAttribute('d', data);\n\t\tpath.setAttribute('fill', 'none');\n\t\tpath.setAttribute('stroke', 'currentColor');\n\t\tpath.setAttribute('stroke-linecap', 'round');\n\t\tpath.setAttribute('stroke-linejoin', 'round');\n\t\tpath.setAttribute('stroke-width', '1.4');\n\t\tsvg.appendChild(path);\n\t}\n\treturn svg;\n}\n\nexport function setPanelButtonContent(button: HTMLButtonElement, icon: PanelIconName, label: string): void {\n\tbutton.replaceChildren(createPanelIcon(icon), document.createTextNode(label));\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';
|
|
2
|
+
import type { Selection } from './panelTypes.ts';
|
|
3
|
+
import { type WorkbenchCallbacks } from './panelWorkbenchHelpers.ts';
|
|
4
|
+
export declare class InspectorView {
|
|
5
|
+
private readonly callbacks;
|
|
6
|
+
private readonly onOpenChange;
|
|
7
|
+
readonly root: HTMLElement;
|
|
8
|
+
private readonly title;
|
|
9
|
+
private readonly tabList;
|
|
10
|
+
private readonly content;
|
|
11
|
+
private readonly tabs;
|
|
12
|
+
private snapshot;
|
|
13
|
+
private selected;
|
|
14
|
+
private activeTab;
|
|
15
|
+
private open;
|
|
16
|
+
constructor(callbacks: WorkbenchCallbacks, onOpenChange: (open: boolean) => void, idPrefix: string);
|
|
17
|
+
setSnapshot(snapshot: FrameGraphDebugViewModel): void;
|
|
18
|
+
setSelection(selected: Selection | undefined, reveal?: boolean): void;
|
|
19
|
+
setOpen(open: boolean): void;
|
|
20
|
+
get isOpen(): boolean;
|
|
21
|
+
private updateOpenState;
|
|
22
|
+
private render;
|
|
23
|
+
private selectionTitle;
|
|
24
|
+
private createSummary;
|
|
25
|
+
private createRelations;
|
|
26
|
+
private accessRelations;
|
|
27
|
+
private resourceRelations;
|
|
28
|
+
private relationGroup;
|
|
29
|
+
private summary;
|
|
30
|
+
private accessNodeLabel;
|
|
31
|
+
private accessNodeSelection;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=panelInspectorView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelInspectorView.d.ts","sourceRoot":"","sources":["../src/panelInspectorView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGX,wBAAwB,EACxB,MAAM,wBAAwB,CAAC;AAIhC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from "./panelDomHelpers.js";
|
|
2
|
+
import { createPanelIcon } from "./panelIcons.js";
|
|
3
|
+
import { resolveSelectedDetail } from "./panelSelection.js";
|
|
4
|
+
import { createRelationButton, formatEstimatedBytes, formatResourceDescriptor, groupPath, resourceLabel, } from "./panelWorkbenchHelpers.js";
|
|
5
|
+
export class InspectorView {
|
|
6
|
+
callbacks;
|
|
7
|
+
onOpenChange;
|
|
8
|
+
root = document.createElement('aside');
|
|
9
|
+
title = document.createElement('strong');
|
|
10
|
+
tabList = document.createElement('div');
|
|
11
|
+
content = document.createElement('div');
|
|
12
|
+
tabs = new Map();
|
|
13
|
+
snapshot;
|
|
14
|
+
selected;
|
|
15
|
+
activeTab = 'summary';
|
|
16
|
+
open = true;
|
|
17
|
+
constructor(callbacks, onOpenChange, idPrefix) {
|
|
18
|
+
this.callbacks = callbacks;
|
|
19
|
+
this.onOpenChange = onOpenChange;
|
|
20
|
+
this.root.className = 'zenfg-inspector-inspector';
|
|
21
|
+
this.root.setAttribute('aria-label', 'Selection inspector');
|
|
22
|
+
const header = document.createElement('header');
|
|
23
|
+
this.title.textContent = 'Inspector';
|
|
24
|
+
const close = document.createElement('button');
|
|
25
|
+
close.type = 'button';
|
|
26
|
+
close.className = 'zenfg-inspector-inspector-close';
|
|
27
|
+
close.appendChild(createPanelIcon('close'));
|
|
28
|
+
close.title = 'Close inspector';
|
|
29
|
+
close.setAttribute('aria-label', 'Close inspector');
|
|
30
|
+
close.addEventListener('click', () => this.setOpen(false));
|
|
31
|
+
header.append(this.title, close);
|
|
32
|
+
this.tabList.className = 'zenfg-inspector-inspector-tabs';
|
|
33
|
+
this.tabList.setAttribute('role', 'tablist');
|
|
34
|
+
this.tabList.setAttribute('aria-label', 'Inspector views');
|
|
35
|
+
for (const [tab, label] of [['summary', 'Summary'], ['relations', 'Relations'], ['raw', 'Raw']]) {
|
|
36
|
+
const button = document.createElement('button');
|
|
37
|
+
button.type = 'button';
|
|
38
|
+
button.id = `${idPrefix}-inspector-${tab}-tab`;
|
|
39
|
+
button.textContent = label;
|
|
40
|
+
button.setAttribute('role', 'tab');
|
|
41
|
+
button.setAttribute('aria-controls', `${idPrefix}-inspector-panel`);
|
|
42
|
+
button.addEventListener('click', () => {
|
|
43
|
+
this.activeTab = tab;
|
|
44
|
+
this.render();
|
|
45
|
+
});
|
|
46
|
+
this.tabs.set(tab, button);
|
|
47
|
+
this.tabList.appendChild(button);
|
|
48
|
+
}
|
|
49
|
+
this.content.id = `${idPrefix}-inspector-panel`;
|
|
50
|
+
this.content.className = 'zenfg-inspector-inspector-content';
|
|
51
|
+
this.content.setAttribute('role', 'tabpanel');
|
|
52
|
+
this.root.append(header, this.tabList, this.content);
|
|
53
|
+
this.updateOpenState();
|
|
54
|
+
this.render();
|
|
55
|
+
}
|
|
56
|
+
setSnapshot(snapshot) {
|
|
57
|
+
this.snapshot = snapshot;
|
|
58
|
+
this.render();
|
|
59
|
+
}
|
|
60
|
+
setSelection(selected, reveal = true) {
|
|
61
|
+
this.selected = selected;
|
|
62
|
+
if (selected && reveal)
|
|
63
|
+
this.setOpen(true);
|
|
64
|
+
this.render();
|
|
65
|
+
}
|
|
66
|
+
setOpen(open) {
|
|
67
|
+
if (this.open === open)
|
|
68
|
+
return;
|
|
69
|
+
this.open = open;
|
|
70
|
+
this.updateOpenState();
|
|
71
|
+
this.onOpenChange(open);
|
|
72
|
+
}
|
|
73
|
+
get isOpen() {
|
|
74
|
+
return this.open;
|
|
75
|
+
}
|
|
76
|
+
updateOpenState() {
|
|
77
|
+
this.root.hidden = !this.open;
|
|
78
|
+
this.root.classList.toggle('open', this.open);
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
for (const [tab, button] of this.tabs) {
|
|
82
|
+
const active = tab === this.activeTab;
|
|
83
|
+
button.classList.toggle('active', active);
|
|
84
|
+
button.setAttribute('aria-selected', active ? 'true' : 'false');
|
|
85
|
+
if (active)
|
|
86
|
+
this.content.setAttribute('aria-labelledby', button.id);
|
|
87
|
+
}
|
|
88
|
+
const snapshot = this.snapshot;
|
|
89
|
+
const selected = this.selected;
|
|
90
|
+
this.content.replaceChildren();
|
|
91
|
+
if (!snapshot || !selected) {
|
|
92
|
+
this.title.textContent = 'Inspector';
|
|
93
|
+
const empty = document.createElement('p');
|
|
94
|
+
empty.className = 'zenfg-inspector-muted';
|
|
95
|
+
empty.textContent = 'Select a pass, group, resource, allocation, root, culled node, or segment.';
|
|
96
|
+
this.content.appendChild(empty);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.title.textContent = this.selectionTitle(snapshot, selected);
|
|
100
|
+
if (this.activeTab === 'raw') {
|
|
101
|
+
const raw = document.createElement('pre');
|
|
102
|
+
raw.className = 'zenfg-inspector-raw-detail';
|
|
103
|
+
raw.textContent = JSON.stringify(resolveSelectedDetail(snapshot, selected), null, 2);
|
|
104
|
+
this.content.appendChild(raw);
|
|
105
|
+
}
|
|
106
|
+
else if (this.activeTab === 'relations') {
|
|
107
|
+
this.content.appendChild(this.createRelations(snapshot, selected));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.content.appendChild(this.createSummary(snapshot, selected));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
selectionTitle(snapshot, selection) {
|
|
114
|
+
switch (selection.kind) {
|
|
115
|
+
case 'node': {
|
|
116
|
+
const node = snapshot.nodeById.get(selection.id);
|
|
117
|
+
return node ? labelNode(node) : `Pass #${selection.id}`;
|
|
118
|
+
}
|
|
119
|
+
case 'group': return snapshot.groupByPathKey.get(selection.pathKey)?.label ?? 'Group';
|
|
120
|
+
case 'resource': {
|
|
121
|
+
const resource = snapshot.resourceById.get(selection.id);
|
|
122
|
+
return resource ? labelResource(resource) : `Resource #${selection.id}`;
|
|
123
|
+
}
|
|
124
|
+
case 'allocation': return `Allocation #${selection.id}`;
|
|
125
|
+
case 'root': return `Retention root #${selection.index}`;
|
|
126
|
+
case 'culled': return `Culled node #${selection.index}`;
|
|
127
|
+
case 'segment': return `Segment #${selection.index}`;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
createSummary(snapshot, selection) {
|
|
131
|
+
switch (selection.kind) {
|
|
132
|
+
case 'node': {
|
|
133
|
+
const node = snapshot.nodeById.get(selection.id);
|
|
134
|
+
if (!node)
|
|
135
|
+
return this.summary([]);
|
|
136
|
+
const segment = snapshot.segmentByNodeId.get(node.id);
|
|
137
|
+
return this.summary([
|
|
138
|
+
['Kind', node.kind],
|
|
139
|
+
['Order', String(node.order)],
|
|
140
|
+
['Group', groupPath(snapshot, node.debugGroupId)],
|
|
141
|
+
['Segment', segment ? `#${segment.index} ${segment.kind}` : '-'],
|
|
142
|
+
['GPU', node.kind === 'external-submission' ? 'Opaque' : node.gpuDurationMicros === undefined ? 'Not timed' : `${(node.gpuDurationMicros / 1000).toFixed(3)} ms`],
|
|
143
|
+
['Accesses', `${node.reads.length} reads · ${node.writes.length} writes`],
|
|
144
|
+
['Side effect', node.sideEffect ? 'yes' : 'no'],
|
|
145
|
+
]);
|
|
146
|
+
}
|
|
147
|
+
case 'group': {
|
|
148
|
+
const group = snapshot.groupByPathKey.get(selection.pathKey);
|
|
149
|
+
if (!group)
|
|
150
|
+
return this.summary([]);
|
|
151
|
+
return this.summary([
|
|
152
|
+
['Path', group.path.join(' / ')],
|
|
153
|
+
['Retained', String(group.summary.retainedNodeCount)],
|
|
154
|
+
['Culled', String(group.summary.culledNodeCount)],
|
|
155
|
+
['GPU coverage', `${group.summary.timedNodeCount}/${group.summary.timingEligibleNodeCount}`],
|
|
156
|
+
['GPU work', `${(group.summary.gpuWorkDurationMicros / 1000).toFixed(3)} ms`],
|
|
157
|
+
['Allocations', String(group.summary.physicalAllocationCount)],
|
|
158
|
+
['Segments', String(group.summary.executionSegmentCount)],
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
case 'resource': {
|
|
162
|
+
const resource = snapshot.resourceById.get(selection.id);
|
|
163
|
+
if (!resource)
|
|
164
|
+
return this.summary([]);
|
|
165
|
+
return this.summary([
|
|
166
|
+
['Kind / origin', `${resource.kind} · ${resource.origin}`],
|
|
167
|
+
['Group', groupPath(snapshot, resource.debugGroupId)],
|
|
168
|
+
['Descriptor', formatResourceDescriptor(resource)],
|
|
169
|
+
['Estimated', formatEstimatedBytes(resource.estimatedByteSize)],
|
|
170
|
+
['Lifetime', resource.lifetime ? `${resource.lifetime.firstUse}–${resource.lifetime.lastUse}` : '-'],
|
|
171
|
+
['Allocation', resource.physicalResourceId === undefined ? '-' : `#${resource.physicalResourceId}`],
|
|
172
|
+
['Usage', resource.usageFlags.join(', ') || '-'],
|
|
173
|
+
]);
|
|
174
|
+
}
|
|
175
|
+
case 'allocation': {
|
|
176
|
+
const allocation = snapshot.allocationById.get(selection.id);
|
|
177
|
+
if (!allocation)
|
|
178
|
+
return this.summary([]);
|
|
179
|
+
return this.summary([
|
|
180
|
+
['Kind', allocation.kind],
|
|
181
|
+
['Compatibility class', String(allocation.compatibilityClassId)],
|
|
182
|
+
['Estimated', formatEstimatedBytes(allocation.estimatedByteSize)],
|
|
183
|
+
['Logical resources', String(allocation.resourceIds.length)],
|
|
184
|
+
['Alias', allocation.resourceIds.length > 1 ? `yes · ×${allocation.resourceIds.length}` : 'single'],
|
|
185
|
+
]);
|
|
186
|
+
}
|
|
187
|
+
case 'root': {
|
|
188
|
+
const root = snapshot.roots[selection.index];
|
|
189
|
+
return this.summary(root ? [
|
|
190
|
+
['Reason', root.reason],
|
|
191
|
+
['Node', root.nodeId === undefined ? '-' : `#${root.nodeId}`],
|
|
192
|
+
['Resource', root.resource ? labelResource(root.resource) : '-'],
|
|
193
|
+
] : []);
|
|
194
|
+
}
|
|
195
|
+
case 'culled': {
|
|
196
|
+
const culled = snapshot.culledNodes[selection.index];
|
|
197
|
+
return this.summary(culled ? [
|
|
198
|
+
['Node', labelNode(culled.node)],
|
|
199
|
+
['Kind', culled.node.kind],
|
|
200
|
+
['Group', groupPath(snapshot, culled.node.debugGroupId)],
|
|
201
|
+
['Reason', culled.reason],
|
|
202
|
+
['Accesses', `${culled.node.reads.length} reads · ${culled.node.writes.length} writes`],
|
|
203
|
+
] : []);
|
|
204
|
+
}
|
|
205
|
+
case 'segment': {
|
|
206
|
+
const segment = snapshot.segmentByIndex.get(selection.index);
|
|
207
|
+
return this.summary(segment ? [
|
|
208
|
+
['Kind', segment.kind === 'frame-graph' ? 'FrameGraph command segment' : 'Opaque interval'],
|
|
209
|
+
['Nodes', String(segment.nodeIds.length)],
|
|
210
|
+
['Meaning', segment.kind === 'external-submission'
|
|
211
|
+
? 'Boundary around external work; not an actual third-party submission count.'
|
|
212
|
+
: 'Contiguous FrameGraph-encoded command work.'],
|
|
213
|
+
] : []);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
createRelations(snapshot, selection) {
|
|
218
|
+
const host = document.createElement('div');
|
|
219
|
+
host.className = 'zenfg-inspector-inspector-relations';
|
|
220
|
+
switch (selection.kind) {
|
|
221
|
+
case 'node': {
|
|
222
|
+
const node = snapshot.nodeById.get(selection.id);
|
|
223
|
+
if (node) {
|
|
224
|
+
host.append(this.accessRelations('Reads', node.reads), this.accessRelations('Writes', node.writes));
|
|
225
|
+
const segment = snapshot.segmentByNodeId.get(node.id);
|
|
226
|
+
if (segment)
|
|
227
|
+
host.appendChild(this.relationGroup('Segment', [
|
|
228
|
+
[`#${segment.index} ${segment.kind}`, { kind: 'segment', index: segment.index }],
|
|
229
|
+
]));
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
case 'group': {
|
|
234
|
+
const group = snapshot.groupByPathKey.get(selection.pathKey);
|
|
235
|
+
if (group) {
|
|
236
|
+
host.append(this.resourceRelations('Inputs', group.summary.inputResources), this.resourceRelations('Outputs', group.summary.outputResources));
|
|
237
|
+
}
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
case 'resource': {
|
|
241
|
+
const resource = snapshot.resourceById.get(selection.id);
|
|
242
|
+
const accesses = snapshot.accessesByResourceId.get(selection.id) ?? [];
|
|
243
|
+
const passRelations = [];
|
|
244
|
+
for (const access of accesses) {
|
|
245
|
+
const nodeSelection = this.accessNodeSelection(snapshot, access.nodeId);
|
|
246
|
+
if (nodeSelection)
|
|
247
|
+
passRelations.push([
|
|
248
|
+
`${access.mode} · ${this.accessNodeLabel(snapshot, access.nodeId)} · ${access.access}`,
|
|
249
|
+
nodeSelection,
|
|
250
|
+
]);
|
|
251
|
+
}
|
|
252
|
+
host.appendChild(this.relationGroup('Pass accesses', passRelations));
|
|
253
|
+
if (resource?.physicalResourceId !== undefined)
|
|
254
|
+
host.appendChild(this.relationGroup('Allocation', [
|
|
255
|
+
[`#${resource.physicalResourceId}`, { kind: 'allocation', id: resource.physicalResourceId }],
|
|
256
|
+
]));
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
case 'allocation': {
|
|
260
|
+
const allocation = snapshot.allocationById.get(selection.id);
|
|
261
|
+
if (allocation)
|
|
262
|
+
host.appendChild(this.relationGroup('Logical resources', allocation.resourceIds.map((id) => [
|
|
263
|
+
resourceLabel(snapshot, id), { kind: 'resource', id },
|
|
264
|
+
])));
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
case 'root': {
|
|
268
|
+
const root = snapshot.roots[selection.index];
|
|
269
|
+
const relations = [];
|
|
270
|
+
if (root?.nodeId !== undefined && snapshot.nodeById.has(root.nodeId))
|
|
271
|
+
relations.push([
|
|
272
|
+
this.accessNodeLabel(snapshot, root.nodeId), { kind: 'node', id: root.nodeId },
|
|
273
|
+
]);
|
|
274
|
+
if (root?.resource)
|
|
275
|
+
relations.push([labelResource(root.resource), { kind: 'resource', id: root.resource.id }]);
|
|
276
|
+
host.appendChild(this.relationGroup('Retained object', relations));
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
case 'culled': {
|
|
280
|
+
const culled = snapshot.culledNodes[selection.index];
|
|
281
|
+
if (culled)
|
|
282
|
+
host.append(this.accessRelations('Reads', culled.node.reads), this.accessRelations('Writes', culled.node.writes));
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
case 'segment': {
|
|
286
|
+
const segment = snapshot.segmentByIndex.get(selection.index);
|
|
287
|
+
if (segment)
|
|
288
|
+
host.appendChild(this.relationGroup('Passes', segment.nodeIds.flatMap((id) => {
|
|
289
|
+
const node = snapshot.nodeById.get(id);
|
|
290
|
+
return node ? [[labelNode(node), { kind: 'node', id }]] : [];
|
|
291
|
+
})));
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
if (host.childElementCount === 0) {
|
|
296
|
+
const empty = document.createElement('p');
|
|
297
|
+
empty.className = 'zenfg-inspector-muted';
|
|
298
|
+
empty.textContent = 'No related objects.';
|
|
299
|
+
host.appendChild(empty);
|
|
300
|
+
}
|
|
301
|
+
return host;
|
|
302
|
+
}
|
|
303
|
+
accessRelations(title, accesses) {
|
|
304
|
+
return this.relationGroup(title, accesses.map((access) => [
|
|
305
|
+
`${labelResource(access.resource)} · ${access.access}${access.mode === 'write' ? ` · ${access.contents}` : ''}`,
|
|
306
|
+
{ kind: 'resource', id: access.resource.id },
|
|
307
|
+
]));
|
|
308
|
+
}
|
|
309
|
+
resourceRelations(title, resources) {
|
|
310
|
+
return this.relationGroup(title, resources.map((resource) => [
|
|
311
|
+
labelResource(resource), { kind: 'resource', id: resource.id },
|
|
312
|
+
]));
|
|
313
|
+
}
|
|
314
|
+
relationGroup(title, relations) {
|
|
315
|
+
const section = document.createElement('section');
|
|
316
|
+
const heading = document.createElement('h3');
|
|
317
|
+
heading.textContent = `${title} ${relations.length}`;
|
|
318
|
+
section.appendChild(heading);
|
|
319
|
+
for (const [label, selection] of relations) {
|
|
320
|
+
section.appendChild(createRelationButton(label, selection, this.callbacks.onSelect));
|
|
321
|
+
}
|
|
322
|
+
if (relations.length === 0) {
|
|
323
|
+
const empty = document.createElement('span');
|
|
324
|
+
empty.className = 'zenfg-inspector-muted';
|
|
325
|
+
empty.textContent = 'None';
|
|
326
|
+
section.appendChild(empty);
|
|
327
|
+
}
|
|
328
|
+
return section;
|
|
329
|
+
}
|
|
330
|
+
summary(rows) {
|
|
331
|
+
const summary = document.createElement('dl');
|
|
332
|
+
summary.className = 'zenfg-inspector-inspector-summary';
|
|
333
|
+
for (const [label, value] of rows) {
|
|
334
|
+
const term = document.createElement('dt');
|
|
335
|
+
term.textContent = label;
|
|
336
|
+
const description = document.createElement('dd');
|
|
337
|
+
description.textContent = value;
|
|
338
|
+
description.title = value;
|
|
339
|
+
summary.append(term, description);
|
|
340
|
+
}
|
|
341
|
+
return summary;
|
|
342
|
+
}
|
|
343
|
+
accessNodeLabel(snapshot, nodeId) {
|
|
344
|
+
const node = snapshot.nodeById.get(nodeId);
|
|
345
|
+
if (node)
|
|
346
|
+
return labelNode(node);
|
|
347
|
+
const culled = snapshot.culledNodes.find((candidate) => candidate.node.id === nodeId);
|
|
348
|
+
return culled ? `${labelNode(culled.node)} (culled)` : `node-${nodeId}`;
|
|
349
|
+
}
|
|
350
|
+
accessNodeSelection(snapshot, nodeId) {
|
|
351
|
+
if (snapshot.nodeById.has(nodeId))
|
|
352
|
+
return { kind: 'node', id: nodeId };
|
|
353
|
+
const index = snapshot.culledNodes.findIndex((candidate) => candidate.node.id === nodeId);
|
|
354
|
+
return index < 0 ? undefined : { kind: 'culled', index };
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=panelInspectorView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelInspectorView.js","sourceRoot":"","sources":["../src/panelInspectorView.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB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CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;QAC1F,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC1D,CAAC;CACD","sourcesContent":["import type {\n\tFrameGraphDebugAccess,\n\tFrameGraphDebugResourceRef,\n\tFrameGraphDebugViewModel,\n} from './debugCaptureModel.ts';\nimport { labelNode, labelResource } from './panelDomHelpers.ts';\nimport { createPanelIcon } from './panelIcons.ts';\nimport { resolveSelectedDetail } from './panelSelection.ts';\nimport type { InspectorTab, Selection } from './panelTypes.ts';\nimport {\n\tcreateRelationButton,\n\tformatEstimatedBytes,\n\tformatResourceDescriptor,\n\tgroupPath,\n\tresourceLabel,\n\ttype WorkbenchCallbacks,\n} from './panelWorkbenchHelpers.ts';\n\nexport class InspectorView {\n\treadonly root = document.createElement('aside');\n\tprivate readonly title = document.createElement('strong');\n\tprivate readonly tabList = document.createElement('div');\n\tprivate readonly content = document.createElement('div');\n\tprivate readonly tabs = new Map<InspectorTab, HTMLButtonElement>();\n\tprivate snapshot: FrameGraphDebugViewModel | undefined;\n\tprivate selected: Selection | undefined;\n\tprivate activeTab: InspectorTab = 'summary';\n\tprivate open = true;\n\n\tconstructor(\n\t\tprivate readonly callbacks: WorkbenchCallbacks,\n\t\tprivate readonly onOpenChange: (open: boolean) => void,\n\t\tidPrefix: string,\n\t) {\n\t\tthis.root.className = 'zenfg-inspector-inspector';\n\t\tthis.root.setAttribute('aria-label', 'Selection inspector');\n\t\tconst header = document.createElement('header');\n\t\tthis.title.textContent = 'Inspector';\n\t\tconst close = document.createElement('button');\n\t\tclose.type = 'button';\n\t\tclose.className = 'zenfg-inspector-inspector-close';\n\t\tclose.appendChild(createPanelIcon('close'));\r\n\t\tclose.title = 'Close inspector';\n\t\tclose.setAttribute('aria-label', 'Close inspector');\n\t\tclose.addEventListener('click', () => this.setOpen(false));\n\t\theader.append(this.title, close);\n\n\t\tthis.tabList.className = 'zenfg-inspector-inspector-tabs';\n\t\tthis.tabList.setAttribute('role', 'tablist');\n\t\tthis.tabList.setAttribute('aria-label', 'Inspector views');\n\t\tfor (const [tab, label] of [['summary', 'Summary'], ['relations', 'Relations'], ['raw', 'Raw']] as const) {\n\t\t\tconst button = document.createElement('button');\n\t\t\tbutton.type = 'button';\n\t\t\tbutton.id = `${idPrefix}-inspector-${tab}-tab`;\n\t\t\tbutton.textContent = label;\n\t\t\tbutton.setAttribute('role', 'tab');\n\t\t\tbutton.setAttribute('aria-controls', `${idPrefix}-inspector-panel`);\n\t\t\tbutton.addEventListener('click', () => {\n\t\t\t\tthis.activeTab = tab;\n\t\t\t\tthis.render();\n\t\t\t});\n\t\t\tthis.tabs.set(tab, button);\n\t\t\tthis.tabList.appendChild(button);\n\t\t}\n\t\tthis.content.id = `${idPrefix}-inspector-panel`;\n\t\tthis.content.className = 'zenfg-inspector-inspector-content';\n\t\tthis.content.setAttribute('role', 'tabpanel');\n\t\tthis.root.append(header, this.tabList, this.content);\n\t\tthis.updateOpenState();\n\t\tthis.render();\n\t}\n\n\tsetSnapshot(snapshot: FrameGraphDebugViewModel): void {\n\t\tthis.snapshot = snapshot;\n\t\tthis.render();\n\t}\n\n\tsetSelection(selected: Selection | undefined, reveal = true): void {\n\t\tthis.selected = selected;\n\t\tif (selected && reveal) this.setOpen(true);\n\t\tthis.render();\n\t}\n\n\tsetOpen(open: boolean): void {\n\t\tif (this.open === open) return;\n\t\tthis.open = open;\n\t\tthis.updateOpenState();\n\t\tthis.onOpenChange(open);\n\t}\n\n\tget isOpen(): boolean {\n\t\treturn this.open;\n\t}\n\n\tprivate updateOpenState(): void {\n\t\tthis.root.hidden = !this.open;\n\t\tthis.root.classList.toggle('open', this.open);\n\t}\n\n\tprivate render(): void {\n\t\tfor (const [tab, button] of this.tabs) {\n\t\t\tconst active = tab === this.activeTab;\n\t\t\tbutton.classList.toggle('active', active);\n\t\t\tbutton.setAttribute('aria-selected', active ? 'true' : 'false');\n\t\t\tif (active) this.content.setAttribute('aria-labelledby', button.id);\n\t\t}\n\t\tconst snapshot = this.snapshot;\n\t\tconst selected = this.selected;\n\t\tthis.content.replaceChildren();\n\t\tif (!snapshot || !selected) {\n\t\t\tthis.title.textContent = 'Inspector';\n\t\t\tconst empty = document.createElement('p');\n\t\t\tempty.className = 'zenfg-inspector-muted';\n\t\t\tempty.textContent = 'Select a pass, group, resource, allocation, root, culled node, or segment.';\n\t\t\tthis.content.appendChild(empty);\n\t\t\treturn;\n\t\t}\n\t\tthis.title.textContent = this.selectionTitle(snapshot, selected);\n\t\tif (this.activeTab === 'raw') {\n\t\t\tconst raw = document.createElement('pre');\n\t\t\traw.className = 'zenfg-inspector-raw-detail';\n\t\t\traw.textContent = JSON.stringify(resolveSelectedDetail(snapshot, selected), null, 2);\n\t\t\tthis.content.appendChild(raw);\n\t\t} else if (this.activeTab === 'relations') {\n\t\t\tthis.content.appendChild(this.createRelations(snapshot, selected));\n\t\t} else {\n\t\t\tthis.content.appendChild(this.createSummary(snapshot, selected));\n\t\t}\n\t}\n\n\tprivate selectionTitle(snapshot: FrameGraphDebugViewModel, selection: Selection): string {\n\t\tswitch (selection.kind) {\n\t\t\tcase 'node': {\n\t\t\t\tconst node = snapshot.nodeById.get(selection.id);\n\t\t\t\treturn node ? labelNode(node) : `Pass #${selection.id}`;\n\t\t\t}\n\t\t\tcase 'group': return snapshot.groupByPathKey.get(selection.pathKey)?.label ?? 'Group';\n\t\t\tcase 'resource': {\n\t\t\t\tconst resource = snapshot.resourceById.get(selection.id);\n\t\t\t\treturn resource ? labelResource(resource) : `Resource #${selection.id}`;\n\t\t\t}\n\t\t\tcase 'allocation': return `Allocation #${selection.id}`;\n\t\t\tcase 'root': return `Retention root #${selection.index}`;\n\t\t\tcase 'culled': return `Culled node #${selection.index}`;\n\t\t\tcase 'segment': return `Segment #${selection.index}`;\n\t\t}\n\t}\n\n\tprivate createSummary(snapshot: FrameGraphDebugViewModel, selection: Selection): HTMLElement {\n\t\tswitch (selection.kind) {\n\t\t\tcase 'node': {\n\t\t\t\tconst node = snapshot.nodeById.get(selection.id);\n\t\t\t\tif (!node) return this.summary([]);\n\t\t\t\tconst segment = snapshot.segmentByNodeId.get(node.id);\n\t\t\t\treturn this.summary([\n\t\t\t\t\t['Kind', node.kind],\n\t\t\t\t\t['Order', String(node.order)],\n\t\t\t\t\t['Group', groupPath(snapshot, node.debugGroupId)],\n\t\t\t\t\t['Segment', segment ? `#${segment.index} ${segment.kind}` : '-'],\n\t\t\t\t\t['GPU', node.kind === 'external-submission' ? 'Opaque' : node.gpuDurationMicros === undefined ? 'Not timed' : `${(node.gpuDurationMicros / 1000).toFixed(3)} ms`],\n\t\t\t\t\t['Accesses', `${node.reads.length} reads · ${node.writes.length} writes`],\n\t\t\t\t\t['Side effect', node.sideEffect ? 'yes' : 'no'],\n\t\t\t\t]);\n\t\t\t}\n\t\t\tcase 'group': {\n\t\t\t\tconst group = snapshot.groupByPathKey.get(selection.pathKey);\n\t\t\t\tif (!group) return this.summary([]);\n\t\t\t\treturn this.summary([\n\t\t\t\t\t['Path', group.path.join(' / ')],\n\t\t\t\t\t['Retained', String(group.summary.retainedNodeCount)],\n\t\t\t\t\t['Culled', String(group.summary.culledNodeCount)],\n\t\t\t\t\t['GPU coverage', `${group.summary.timedNodeCount}/${group.summary.timingEligibleNodeCount}`],\n\t\t\t\t\t['GPU work', `${(group.summary.gpuWorkDurationMicros / 1000).toFixed(3)} ms`],\n\t\t\t\t\t['Allocations', String(group.summary.physicalAllocationCount)],\n\t\t\t\t\t['Segments', String(group.summary.executionSegmentCount)],\n\t\t\t\t]);\n\t\t\t}\n\t\t\tcase 'resource': {\n\t\t\t\tconst resource = snapshot.resourceById.get(selection.id);\n\t\t\t\tif (!resource) return this.summary([]);\n\t\t\t\treturn this.summary([\n\t\t\t\t\t['Kind / origin', `${resource.kind} · ${resource.origin}`],\n\t\t\t\t\t['Group', groupPath(snapshot, resource.debugGroupId)],\n\t\t\t\t\t['Descriptor', formatResourceDescriptor(resource)],\n\t\t\t\t\t['Estimated', formatEstimatedBytes(resource.estimatedByteSize)],\n\t\t\t\t\t['Lifetime', resource.lifetime ? `${resource.lifetime.firstUse}–${resource.lifetime.lastUse}` : '-'],\n\t\t\t\t\t['Allocation', resource.physicalResourceId === undefined ? '-' : `#${resource.physicalResourceId}`],\n\t\t\t\t\t['Usage', resource.usageFlags.join(', ') || '-'],\n\t\t\t\t]);\n\t\t\t}\n\t\t\tcase 'allocation': {\n\t\t\t\tconst allocation = snapshot.allocationById.get(selection.id);\n\t\t\t\tif (!allocation) return this.summary([]);\n\t\t\t\treturn this.summary([\n\t\t\t\t\t['Kind', allocation.kind],\n\t\t\t\t\t['Compatibility class', String(allocation.compatibilityClassId)],\n\t\t\t\t\t['Estimated', formatEstimatedBytes(allocation.estimatedByteSize)],\n\t\t\t\t\t['Logical resources', String(allocation.resourceIds.length)],\n\t\t\t\t\t['Alias', allocation.resourceIds.length > 1 ? `yes · ×${allocation.resourceIds.length}` : 'single'],\n\t\t\t\t]);\n\t\t\t}\n\t\t\tcase 'root': {\n\t\t\t\tconst root = snapshot.roots[selection.index];\n\t\t\t\treturn this.summary(root ? [\n\t\t\t\t\t['Reason', root.reason],\n\t\t\t\t\t['Node', root.nodeId === undefined ? '-' : `#${root.nodeId}`],\n\t\t\t\t\t['Resource', root.resource ? labelResource(root.resource) : '-'],\n\t\t\t\t] : []);\n\t\t\t}\n\t\t\tcase 'culled': {\n\t\t\t\tconst culled = snapshot.culledNodes[selection.index];\n\t\t\t\treturn this.summary(culled ? [\n\t\t\t\t\t['Node', labelNode(culled.node)],\n\t\t\t\t\t['Kind', culled.node.kind],\n\t\t\t\t\t['Group', groupPath(snapshot, culled.node.debugGroupId)],\n\t\t\t\t\t['Reason', culled.reason],\n\t\t\t\t\t['Accesses', `${culled.node.reads.length} reads · ${culled.node.writes.length} writes`],\n\t\t\t\t] : []);\n\t\t\t}\n\t\t\tcase 'segment': {\n\t\t\t\tconst segment = snapshot.segmentByIndex.get(selection.index);\n\t\t\t\treturn this.summary(segment ? [\n\t\t\t\t\t['Kind', segment.kind === 'frame-graph' ? 'FrameGraph command segment' : 'Opaque interval'],\n\t\t\t\t\t['Nodes', String(segment.nodeIds.length)],\n\t\t\t\t\t['Meaning', segment.kind === 'external-submission'\n\t\t\t\t\t\t? 'Boundary around external work; not an actual third-party submission count.'\n\t\t\t\t\t\t: 'Contiguous FrameGraph-encoded command work.'],\n\t\t\t\t] : []);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate createRelations(snapshot: FrameGraphDebugViewModel, selection: Selection): HTMLElement {\n\t\tconst host = document.createElement('div');\n\t\thost.className = 'zenfg-inspector-inspector-relations';\n\t\tswitch (selection.kind) {\n\t\t\tcase 'node': {\n\t\t\t\tconst node = snapshot.nodeById.get(selection.id);\n\t\t\t\tif (node) {\n\t\t\t\t\thost.append(\n\t\t\t\t\t\tthis.accessRelations('Reads', node.reads),\n\t\t\t\t\t\tthis.accessRelations('Writes', node.writes),\n\t\t\t\t\t);\n\t\t\t\t\tconst segment = snapshot.segmentByNodeId.get(node.id);\n\t\t\t\t\tif (segment) host.appendChild(this.relationGroup('Segment', [\n\t\t\t\t\t\t[`#${segment.index} ${segment.kind}`, { kind: 'segment', index: segment.index }],\n\t\t\t\t\t]));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'group': {\n\t\t\t\tconst group = snapshot.groupByPathKey.get(selection.pathKey);\n\t\t\t\tif (group) {\n\t\t\t\t\thost.append(\n\t\t\t\t\t\tthis.resourceRelations('Inputs', group.summary.inputResources),\n\t\t\t\t\t\tthis.resourceRelations('Outputs', group.summary.outputResources),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'resource': {\n\t\t\t\tconst resource = snapshot.resourceById.get(selection.id);\n\t\t\t\tconst accesses = snapshot.accessesByResourceId.get(selection.id) ?? [];\n\t\t\t\tconst passRelations: Array<readonly [string, Selection]> = [];\n\t\t\t\tfor (const access of accesses) {\n\t\t\t\t\tconst nodeSelection = this.accessNodeSelection(snapshot, access.nodeId);\n\t\t\t\t\tif (nodeSelection) passRelations.push([\n\t\t\t\t\t\t`${access.mode} · ${this.accessNodeLabel(snapshot, access.nodeId)} · ${access.access}`,\n\t\t\t\t\t\tnodeSelection,\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t\thost.appendChild(this.relationGroup('Pass accesses', passRelations));\n\t\t\t\tif (resource?.physicalResourceId !== undefined) host.appendChild(this.relationGroup('Allocation', [\n\t\t\t\t\t[`#${resource.physicalResourceId}`, { kind: 'allocation', id: resource.physicalResourceId }],\n\t\t\t\t]));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'allocation': {\n\t\t\t\tconst allocation = snapshot.allocationById.get(selection.id);\n\t\t\t\tif (allocation) host.appendChild(this.relationGroup('Logical resources', allocation.resourceIds.map((id) => [\n\t\t\t\t\tresourceLabel(snapshot, id), { kind: 'resource', id },\n\t\t\t\t])));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'root': {\n\t\t\t\tconst root = snapshot.roots[selection.index];\n\t\t\t\tconst relations: Array<readonly [string, Selection]> = [];\n\t\t\t\tif (root?.nodeId !== undefined && snapshot.nodeById.has(root.nodeId)) relations.push([\n\t\t\t\t\tthis.accessNodeLabel(snapshot, root.nodeId), { kind: 'node', id: root.nodeId },\n\t\t\t\t]);\n\t\t\t\tif (root?.resource) relations.push([labelResource(root.resource), { kind: 'resource', id: root.resource.id }]);\n\t\t\t\thost.appendChild(this.relationGroup('Retained object', relations));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'culled': {\n\t\t\t\tconst culled = snapshot.culledNodes[selection.index];\n\t\t\t\tif (culled) host.append(\n\t\t\t\t\tthis.accessRelations('Reads', culled.node.reads),\n\t\t\t\t\tthis.accessRelations('Writes', culled.node.writes),\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'segment': {\n\t\t\t\tconst segment = snapshot.segmentByIndex.get(selection.index);\n\t\t\t\tif (segment) host.appendChild(this.relationGroup('Passes', segment.nodeIds.flatMap((id) => {\n\t\t\t\t\tconst node = snapshot.nodeById.get(id);\n\t\t\t\t\treturn node ? [[labelNode(node), { kind: 'node', id }] as const] : [];\n\t\t\t\t})));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (host.childElementCount === 0) {\n\t\t\tconst empty = document.createElement('p');\n\t\t\tempty.className = 'zenfg-inspector-muted';\n\t\t\tempty.textContent = 'No related objects.';\n\t\t\thost.appendChild(empty);\n\t\t}\n\t\treturn host;\n\t}\n\n\tprivate accessRelations(title: string, accesses: readonly FrameGraphDebugAccess[]): HTMLElement {\n\t\treturn this.relationGroup(title, accesses.map((access) => [\n\t\t\t`${labelResource(access.resource)} · ${access.access}${access.mode === 'write' ? ` · ${access.contents}` : ''}`,\n\t\t\t{ kind: 'resource', id: access.resource.id },\n\t\t]));\n\t}\n\n\tprivate resourceRelations(title: string, resources: readonly FrameGraphDebugResourceRef[]): HTMLElement {\n\t\treturn this.relationGroup(title, resources.map((resource) => [\n\t\t\tlabelResource(resource), { kind: 'resource', id: resource.id },\n\t\t]));\n\t}\n\n\tprivate relationGroup(title: string, relations: readonly (readonly [string, Selection])[]): HTMLElement {\n\t\tconst section = document.createElement('section');\n\t\tconst heading = document.createElement('h3');\n\t\theading.textContent = `${title} ${relations.length}`;\n\t\tsection.appendChild(heading);\n\t\tfor (const [label, selection] of relations) {\n\t\t\tsection.appendChild(createRelationButton(label, selection, this.callbacks.onSelect));\n\t\t}\n\t\tif (relations.length === 0) {\n\t\t\tconst empty = document.createElement('span');\n\t\t\tempty.className = 'zenfg-inspector-muted';\n\t\t\tempty.textContent = 'None';\n\t\t\tsection.appendChild(empty);\n\t\t}\n\t\treturn section;\n\t}\n\n\tprivate summary(rows: readonly (readonly [string, string])[]): HTMLElement {\n\t\tconst summary = document.createElement('dl');\n\t\tsummary.className = 'zenfg-inspector-inspector-summary';\n\t\tfor (const [label, value] of rows) {\n\t\t\tconst term = document.createElement('dt');\n\t\t\tterm.textContent = label;\n\t\t\tconst description = document.createElement('dd');\n\t\t\tdescription.textContent = value;\n\t\t\tdescription.title = value;\n\t\t\tsummary.append(term, description);\n\t\t}\n\t\treturn summary;\n\t}\n\n\tprivate accessNodeLabel(snapshot: FrameGraphDebugViewModel, nodeId: string): string {\n\t\tconst node = snapshot.nodeById.get(nodeId);\n\t\tif (node) return labelNode(node);\n\t\tconst culled = snapshot.culledNodes.find((candidate) => candidate.node.id === nodeId);\n\t\treturn culled ? `${labelNode(culled.node)} (culled)` : `node-${nodeId}`;\n\t}\n\n\tprivate accessNodeSelection(snapshot: FrameGraphDebugViewModel, nodeId: string): Selection | undefined {\n\t\tif (snapshot.nodeById.has(nodeId)) return { kind: 'node', id: nodeId };\n\t\tconst index = snapshot.culledNodes.findIndex((candidate) => candidate.node.id === nodeId);\n\t\treturn index < 0 ? undefined : { kind: 'culled', index };\n\t}\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';
|
|
2
|
+
import type { Selection } from './panelTypes.ts';
|
|
3
|
+
import { type WorkbenchCallbacks } from './panelWorkbenchHelpers.ts';
|
|
4
|
+
export declare class MemoryView {
|
|
5
|
+
private readonly callbacks;
|
|
6
|
+
readonly root: HTMLElement;
|
|
7
|
+
private readonly metrics;
|
|
8
|
+
private readonly scroller;
|
|
9
|
+
private readonly timeline;
|
|
10
|
+
private readonly rows;
|
|
11
|
+
private snapshot;
|
|
12
|
+
private selected;
|
|
13
|
+
constructor(callbacks: WorkbenchCallbacks, idPrefix: string);
|
|
14
|
+
setSnapshot(snapshot: FrameGraphDebugViewModel): void;
|
|
15
|
+
setSelection(selected: Selection | undefined): void;
|
|
16
|
+
private render;
|
|
17
|
+
private createMetric;
|
|
18
|
+
private createAxis;
|
|
19
|
+
private createResourceRow;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=panelMemoryView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelMemoryView.d.ts","sourceRoot":"","sources":["../src/panelMemoryView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGhG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAIN,KAAK,kBAAkB,EAEvB,MAAM,4BAA4B,CAAC;AAEpC,qBAAa,UAAU;IASV,OAAO,CAAC,QAAQ,CAAC,SAAS;IARtC,QAAQ,CAAC,IAAI,cAAqC;IAClD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAC1D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAC1D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoC;IACzD,OAAO,CAAC,QAAQ,CAAuC;IACvD,OAAO,CAAC,QAAQ,CAAwB;gBAEX,SAAS,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM;IAW5E,WAAW,CAAC,QAAQ,EAAE,wBAAwB,GAAG,IAAI;IAKrD,YAAY,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAKnD,OAAO,CAAC,MAAM;IAkDd,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,UAAU;IAyBlB,OAAO,CAAC,iBAAiB;CA0BzB"}
|