Repository navigation
Expand file tree
/
Copy pathwebgpu-test.html
More file actions
140 lines (123 loc) · 4.39 KB
/
Copy pathwebgpu-test.html
File metadata and controls
140 lines (123 loc) · 4.39 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebGPU Foundation Test - Ailly</title>
<link rel="stylesheet" href="/src/style.css">
<style>
body {
padding: 2rem;
min-height: 100vh;
}
.test-container {
max-width: 1200px;
margin: 0 auto;
}
.test-header {
text-align: center;
margin-bottom: 3rem;
}
.test-header h1 {
font-family: var(--font-display);
font-size: var(--text-5xl);
background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 1rem;
}
.test-actions {
display: flex;
gap: 1rem;
justify-content: center;
margin-bottom: 2rem;
flex-wrap: wrap;
}
.test-section {
background: var(--glass-bg);
border: 1px solid var(--glass-border);
border-radius: var(--radius-xl);
padding: var(--space-6);
margin-bottom: var(--space-6);
backdrop-filter: blur(16px);
}
.test-section h2 {
font-family: var(--font-display);
font-size: var(--text-2xl);
color: var(--color-text-primary);
margin-bottom: var(--space-4);
}
.test-result {
padding: var(--space-4);
border-radius: var(--radius-md);
margin-top: var(--space-3);
font-family: 'Courier New', monospace;
font-size: var(--text-sm);
}
.test-result.success {
background: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.3);
color: #10b981;
}
.test-result.error {
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.3);
color: #ef4444;
}
.test-result.info {
background: rgba(59, 130, 246, 0.1);
border: 1px solid rgba(59, 130, 246, 0.3);
color: #3b82f6;
}
pre {
background: rgba(0, 0, 0, 0.3);
padding: var(--space-3);
border-radius: var(--radius-md);
overflow-x: auto;
margin-top: var(--space-2);
}
.loading {
display: inline-block;
width: 1rem;
height: 1rem;
border: 2px solid var(--glass-border);
border-top-color: var(--color-primary);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 0.5rem;
}
</style>
</head>
<body>
<div class="animated-bg" aria-hidden="true">
<div class="gradient-orb gradient-orb-1"></div>
<div class="gradient-orb gradient-orb-2"></div>
</div>
<div class="test-container">
<div class="test-header">
<h1>🔧 WebGPU Foundation Test</h1>
<p class="text-body-large">Testing Ailly's WebGPU initialization and capabilities</p>
</div>
<div class="test-actions">
<button class="btn btn-primary" id="run-tests">Run All Tests</button>
<button class="btn btn-secondary" id="test-init">Test Initialization</button>
<button class="btn btn-secondary" id="test-device">Test Device Access</button>
<button class="btn btn-secondary" id="test-compute">Test Compute Shader</button>
<button class="btn btn-secondary" id="clear-results">Clear Results</button>
</div>
<!-- Test Results -->
<div class="test-section" id="test-results">
<h2>Test Results</h2>
<div id="results-container">
<p class="text-body" style="color: var(--color-text-secondary);">
Click "Run All Tests" to begin testing the WebGPU foundation.
</p>
</div>
</div>
<!-- WebGPU Diagnostics Panel -->
<div id="diagnostics-container"></div>
</div>
<script type="module" src="/src/webgpu-test.ts"></script>
</body>
</html>