Frontory

Open code, practice, and notes →

Download source with English comments · for reading

WebGPU · 27 Acceptance of the Integrated Particle Experiment

Series contents · Technology map

Stage: Recovery, Measurement, and an Integrated Project · Editable example · Storage ID: webgpu-step-27

Goals and learning outcomes

Prerequisites

Continue using the output and notes from unit 26. Preserve the previous inputs and reference outputs before starting "Acceptance of the Integrated Particle Experiment".

Key concepts and explanations

Separate Components

Separating initial data, kernels, rendering, readback, and UI clarifies error locations. Module contracts include buffer sizes and lifetimes.

Acceptance Evidence

Visible animation alone cannot prove computational correctness. Keep failure-recovery and CPU-comparison results together.

Practice setup

First read the execution-scope guidance on the example screen. The following preparation is for extending the assignment in a separate project. This is a document-guided exercise to implement yourself in a separate localhost or HTTPS project. Check the secure context, navigator.gpu, and adapter request result, and provide an unsupported-environment message. Preserve device.lost handling and resource release.

The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.

Practice tasks

  1. In README.md, tabulate each module's inputs, outputs, and resource ownership.
  2. Run five scenarios: unsupported environment, device loss, resize, N=0, and N=1003.
  3. Export the current settings JSON and CPU-comparison results, then restore them in a new session.

Variables to observe

VariableBaselineChangeExpected change / hypothesis
Starting stateExisting sessionNew session with saved settingsThe same initial data is expected to be reproduced without hidden GPU state.

Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.

Completion criteria

Self-check

  1. What computational errors can remain hidden in apparently normal animation?
  2. Which GPU work need not be created for empty input?

Official references

Linked example and execution scope

Example source · Runtime environments and limits

Runs real WebGPU/WGSL. Requires HTTPS/localhost and a supported adapter; unsupported environments display a reason, and CPU results are not substituted for GPU results.

Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.

Next learning

Previous: Workgroup Size Experiments · Next: Compute and Readback

Open code, practice, and notes →