Skip to content

Commit e684b44

Browse files
committed
update webgpu samples
1 parent 25b3722 commit e684b44

60 files changed

Lines changed: 2063 additions & 136 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

gpu-compute-webgpu-usl-shell.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h1>Compute handoff</h1>
3737
</div>
3838
</aside>
3939
<div class="stage-meta">
40-
<p>Compute writes the vertex stream; render consumes it in the same command buffer without readback.</p>
40+
<p>Compute uses per-dispatch constants to write the vertex stream; render consumes it without readback.</p>
4141
<div id="status">GPU: loading sample</div>
4242
</div>
4343
</section>

gpu-compute-webgpu-usl.data

328 Bytes
Binary file not shown.

gpu-compute-webgpu-usl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctypehtml><html lang=en><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1"name=viewport><link href=data:, rel=icon><link href="gallery.css?v=7"rel=stylesheet><title>Compute handoff · GPU + USL</title></head><body class=sample-page data-c-source=sources/compute.c data-usl-source=sources/compute.usl data-wgsl-source=sources/compute.wgsl><header class=sample-head><a class=back-link href=index.html><span></span> Sample index</a><div class=sample-heading><p>Compute / storage buffer</p><h1>Compute handoff</h1></div><div class=runtime-badge><i></i> WebGPU live</div></header><main class=sample-workbench><section aria-label="Live WebGPU output"class=stage><canvas id=canvas oncontextmenu=event.preventDefault()></canvas><aside aria-label="Debug metrics"class=debug-overlay><button class=debug-toggle type=button aria-expanded=true><span>Debug</span> <svg aria-hidden=true viewBox="0 0 16 16"><path d="m4 6 4 4 4-4"/></svg></button><div class=debug-metrics aria-live=off><b data-debug=fps>-- FPS</b> <span data-debug=frame>-- ms frame</span> <span data-debug=canvas>-- × -- px</span></div></aside><div class=stage-meta><p>Compute writes the vertex stream; render consumes it in the same command buffer without readback.</p><div id=status>GPU: loading sample</div></div></section><section aria-label=Source class=source-panel><div class=source-toolbar><div class=source-tabs aria-label="Source language"role=tablist><button aria-controls=source-code aria-selected=true data-source=c id=tab-c role=tab>GPU C</button> <button aria-controls=source-code aria-selected=false data-source=usl id=tab-usl role=tab>USL</button> <button aria-controls=source-code aria-selected=false data-source=wgsl id=tab-wgsl role=tab>Generated WGSL</button></div><button class=copy-button type=button>Copy</button></div><pre aria-labelledby=tab-c id=source-code role=tabpanel tabindex=0><span aria-hidden=true class=line-numbers></span><code>Loading source…</code></pre></section></main><script src="sample.js?v=10"defer></script><script>var Module={locateFile:(e,l)=>`${l}${e}?v=10`}</script><template id=runtime-script><script src=gpu-compute-webgpu-usl.js async></script></template><script>const runtimeTemplate=document.querySelector("#runtime-script"),runtimeSource=runtimeTemplate.content.querySelector("script").getAttribute("src"),runtime=document.createElement("script");runtime.src=`${runtimeSource}?v=10`,runtime.async=!0,document.body.appendChild(runtime)</script></body></html>
1+
<!doctypehtml><html lang=en><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1"name=viewport><link href=data:, rel=icon><link href="gallery.css?v=7"rel=stylesheet><title>Compute handoff · GPU + USL</title></head><body class=sample-page data-c-source=sources/compute.c data-usl-source=sources/compute.usl data-wgsl-source=sources/compute.wgsl><header class=sample-head><a class=back-link href=index.html><span></span> Sample index</a><div class=sample-heading><p>Compute / storage buffer</p><h1>Compute handoff</h1></div><div class=runtime-badge><i></i> WebGPU live</div></header><main class=sample-workbench><section aria-label="Live WebGPU output"class=stage><canvas id=canvas oncontextmenu=event.preventDefault()></canvas><aside aria-label="Debug metrics"class=debug-overlay><button class=debug-toggle type=button aria-expanded=true><span>Debug</span> <svg aria-hidden=true viewBox="0 0 16 16"><path d="m4 6 4 4 4-4"/></svg></button><div class=debug-metrics aria-live=off><b data-debug=fps>-- FPS</b> <span data-debug=frame>-- ms frame</span> <span data-debug=canvas>-- × -- px</span></div></aside><div class=stage-meta><p>Compute uses per-dispatch constants to write the vertex stream; render consumes it without readback.</p><div id=status>GPU: loading sample</div></div></section><section aria-label=Source class=source-panel><div class=source-toolbar><div class=source-tabs aria-label="Source language"role=tablist><button aria-controls=source-code aria-selected=true data-source=c id=tab-c role=tab>GPU C</button> <button aria-controls=source-code aria-selected=false data-source=usl id=tab-usl role=tab>USL</button> <button aria-controls=source-code aria-selected=false data-source=wgsl id=tab-wgsl role=tab>Generated WGSL</button></div><button class=copy-button type=button>Copy</button></div><pre aria-labelledby=tab-c id=source-code role=tabpanel tabindex=0><span aria-hidden=true class=line-numbers></span><code>Loading source…</code></pre></section></main><script src="sample.js?v=10"defer></script><script>var Module={locateFile:(e,l)=>`${l}${e}?v=10`}</script><template id=runtime-script><script src=gpu-compute-webgpu-usl.js async></script></template><script>const runtimeTemplate=document.querySelector("#runtime-script"),runtimeSource=runtimeTemplate.content.querySelector("script").getAttribute("src"),runtime=document.createElement("script");runtime.src=`${runtimeSource}?v=10`,runtime.async=!0,document.body.appendChild(runtime)</script></body></html>

gpu-compute-webgpu-usl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpu-compute-webgpu-usl.wasm

27.2 KB
Binary file not shown.

gpu-indexed-depth-webgpu-usl-shell.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h1>Indexed depth</h1>
3737
</div>
3838
</aside>
3939
<div class="stage-meta">
40-
<p>One indexed draw validates the depth texture, pipeline, attachment, and occlusion path.</p>
40+
<p>Indexed depth, occlusion, barriers, and sampled-depth visualization in two render passes.</p>
4141
<div id="status">GPU: loading sample</div>
4242
</div>
4343
</section>

gpu-indexed-depth-webgpu-usl.data

4.8 KB
Binary file not shown.

gpu-indexed-depth-webgpu-usl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctypehtml><html lang=en><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1"name=viewport><link href=data:, rel=icon><link href="gallery.css?v=7"rel=stylesheet><title>Indexed depth · GPU + USL</title></head><body class=sample-page data-c-source=sources/indexed-depth.c data-usl-source=sources/indexed-depth.usl data-wgsl-source=sources/indexed-depth.wgsl><header class=sample-head><a class=back-link href=index.html><span></span> Sample index</a><div class=sample-heading><p>Render / index + depth</p><h1>Indexed depth</h1></div><div class=runtime-badge><i></i> WebGPU live</div></header><main class=sample-workbench><section aria-label="Live WebGPU output"class=stage><canvas id=canvas oncontextmenu=event.preventDefault()></canvas><aside aria-label="Debug metrics"class=debug-overlay><button class=debug-toggle type=button aria-expanded=true><span>Debug</span> <svg aria-hidden=true viewBox="0 0 16 16"><path d="m4 6 4 4 4-4"/></svg></button><div class=debug-metrics aria-live=off><b data-debug=fps>-- FPS</b> <span data-debug=frame>-- ms frame</span> <span data-debug=canvas>-- × -- px</span></div></aside><div class=stage-meta><p>One indexed draw validates the depth texture, pipeline, attachment, and occlusion path.</p><div id=status>GPU: loading sample</div></div></section><section aria-label=Source class=source-panel><div class=source-toolbar><div class=source-tabs aria-label="Source language"role=tablist><button aria-controls=source-code aria-selected=true data-source=c id=tab-c role=tab>GPU C</button> <button aria-controls=source-code aria-selected=false data-source=usl id=tab-usl role=tab>USL</button> <button aria-controls=source-code aria-selected=false data-source=wgsl id=tab-wgsl role=tab>Generated WGSL</button></div><button class=copy-button type=button>Copy</button></div><pre aria-labelledby=tab-c id=source-code role=tabpanel tabindex=0><span aria-hidden=true class=line-numbers></span><code>Loading source…</code></pre></section></main><script src="sample.js?v=10"defer></script><script>var Module={locateFile:(e,l)=>`${l}${e}?v=10`}</script><template id=runtime-script><script src=gpu-indexed-depth-webgpu-usl.js async></script></template><script>const runtimeTemplate=document.querySelector("#runtime-script"),runtimeSource=runtimeTemplate.content.querySelector("script").getAttribute("src"),runtime=document.createElement("script");runtime.src=`${runtimeSource}?v=10`,runtime.async=!0,document.body.appendChild(runtime)</script></body></html>
1+
<!doctypehtml><html lang=en><head><meta charset=utf-8><meta content="width=device-width,initial-scale=1"name=viewport><link href=data:, rel=icon><link href="gallery.css?v=7"rel=stylesheet><title>Indexed depth · GPU + USL</title></head><body class=sample-page data-c-source=sources/indexed-depth.c data-usl-source=sources/indexed-depth.usl data-wgsl-source=sources/indexed-depth.wgsl><header class=sample-head><a class=back-link href=index.html><span></span> Sample index</a><div class=sample-heading><p>Render / index + depth</p><h1>Indexed depth</h1></div><div class=runtime-badge><i></i> WebGPU live</div></header><main class=sample-workbench><section aria-label="Live WebGPU output"class=stage><canvas id=canvas oncontextmenu=event.preventDefault()></canvas><aside aria-label="Debug metrics"class=debug-overlay><button class=debug-toggle type=button aria-expanded=true><span>Debug</span> <svg aria-hidden=true viewBox="0 0 16 16"><path d="m4 6 4 4 4-4"/></svg></button><div class=debug-metrics aria-live=off><b data-debug=fps>-- FPS</b> <span data-debug=frame>-- ms frame</span> <span data-debug=canvas>-- × -- px</span></div></aside><div class=stage-meta><p>Indexed depth, occlusion, barriers, and sampled-depth visualization in two render passes.</p><div id=status>GPU: loading sample</div></div></section><section aria-label=Source class=source-panel><div class=source-toolbar><div class=source-tabs aria-label="Source language"role=tablist><button aria-controls=source-code aria-selected=true data-source=c id=tab-c role=tab>GPU C</button> <button aria-controls=source-code aria-selected=false data-source=usl id=tab-usl role=tab>USL</button> <button aria-controls=source-code aria-selected=false data-source=wgsl id=tab-wgsl role=tab>Generated WGSL</button></div><button class=copy-button type=button>Copy</button></div><pre aria-labelledby=tab-c id=source-code role=tabpanel tabindex=0><span aria-hidden=true class=line-numbers></span><code>Loading source…</code></pre></section></main><script src="sample.js?v=10"defer></script><script>var Module={locateFile:(e,l)=>`${l}${e}?v=10`}</script><template id=runtime-script><script src=gpu-indexed-depth-webgpu-usl.js async></script></template><script>const runtimeTemplate=document.querySelector("#runtime-script"),runtimeSource=runtimeTemplate.content.querySelector("script").getAttribute("src"),runtime=document.createElement("script");runtime.src=`${runtimeSource}?v=10`,runtime.async=!0,document.body.appendChild(runtime)</script></body></html>

gpu-indexed-depth-webgpu-usl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpu-indexed-depth-webgpu-usl.wasm

34.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)