-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
99 lines (93 loc) · 4.18 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SPIR-V Visualizer</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script>
// Debug mode auto loads shader to bypass manual input each reload
const DEBUG=false; // toggle
const DEBUG_FILE="tests/samples/switch.spv";
// Leave so variable is declared
var TEST_SUITE=false;
</script>
</head>
<body onload="loadSpirv('SPIRV-Headers/include/spirv/unified1/')">
<!-- For Testing Only - at top to load first -->
<!--
<script>TEST_SUITE=true;</script>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<link rel="stylesheet" href="lib/qunit/qunit-2.13.0.css">
<script src="lib/qunit/qunit-2.13.0.min.js"></script>
<script src="tests/tests.js"></script>
-->
<div id="mainModuleContainer">
<div id="moduleSettings">
<div id="settings" class="row">
<div id="settingsLeft" class="col">
<div id="collapseAllDiv">
<button id="collapseAll" class="customButton">Collapse All</button>
<br>
<button id="expandAll" class="customButton">Expand All</button>
</div>
<div id="largerTextDiv">
<input type="checkbox" id="largerText" name="largerText">
<label for="largerText">Larger Text</label>
</div>
<div id="opNamesDiv">
<input type="checkbox" id="opNames" name="opNames">
<label for="opNames">Use OpNames</label>
</div>
<div id="insertConstantsDiv">
<input type="checkbox" id="insertConstants" name="insertConstants">
<label for="insertConstants">Insert Constants</label>
</div>
</div>
<div id="settingsRight" class="col">
<button id="copyToClipboard" class="customButton">Copy To Clipboard</button>
<button id="clearAll" class="customButton">Clear All</button>
<input type="file" name="fileSelectorTop" id="fileSelectorTop" class="hide"/>
<label for="fileSelectorTop" class="customButton">Load new SPIR-V file</label>
<div id="fileSelectName"></div>
</div>
</div>
</div>
<div id="moduleData">
<!-- Both these take left side of screen, only one is visiable at a time -->
<textarea class="mainColumn" id="disassembleInputDiv"></textarea>
<div class="mainColumn" id="disassembleDisplayDiv"></div>
<div class="mainColumn" id="dagDiv">
<!-- used when wanting to view debug string text -->
<div id="debugStringDiv"></div>
<!-- Handles drawing and displaying the dag -->
<svg id="dagSvg"></svg>
<!-- On Load instructions - Will be removed from DOM later -->
<div id="preLoad">
Loading and parsing SPIR-V Header files, should be quick!
</div>
<div id="filePrompt">
<h1>SPIR-V Visualizer</h1>
Based on SPIR-V grammar <span id="spirvVersion"></span>
<h2>Select SPIR-V binary file to load</h2>
<input type="file" id="fileSelector">
<h2>OR</h2>
<h2>Paste SPIR-V disassembly on the left (and press enter)</h2>
<br><br><hr>
<h1>How to use</h1>
<img src="doc/instructions_0.png" alt="instructions_0.png">
</div>
</div>
</div>
</div>
<div id="alertBox"></div>
<script src="lib/jquery-3.5.1.min.js"></script>
<script src="lib/d3.v5.min.js"></script>
<script src="lib/d3-dag.min.js"></script>
<script src="source/utils.js"></script>
<script src="source/input.js"></script>
<script src="source/spirv.js"></script>
<script src="source/assembler.js"></script>
<script src="source/main.js"></script>
</body>
</html>