Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jun 11, 2024
1 parent 7225c6e commit 0e343ba
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

This script makes it easier to debug WebGPU apps.

note: this script is a work in progress. Pass encoder checking
is barely implemented.
note: this script is a work in progress.

You can use it in your own projects via a script OR, you can
[use it as an extension](https://github.com/greggman/webgpu-dev-extension).
Expand All @@ -22,11 +21,12 @@ to use this script version.
This is in contrast to normal WebGPU where errors are returned asynchronously
and so the command that caused the error is long forgotten.

* It adds errors to command encoders and pass encoders
* It adds errors to command encoders and pass encoders (these throw)

In normal WebGPU, command encoders and pass encoders often do not report errors.
Rather, they record the error, make the encoder as *invalid*, and then only report
the error when the encoder is ended/finished. This can make it hard to find errors.
Rather, they record the error, mark the encoder as *invalid*, and then only report
the error when the encoder is ended/finished. This can make it hard to find errors
as they might have happened hundreds or thousands of calls ago.

With this script, many of these types of errors will be generated immediately.

Expand All @@ -51,6 +51,12 @@ or
import 'https://greggman.github.io/webgpu-debug-helper/dist/0.x/webgpu-debug-helper.js';
```

or

```html
<script type="module" src="https://greggman.github.io/webgpu-debug-helper/dist/0.x/webgpu-debug-helper.js" crossorigin>
```
There is nothing else to do. The webgpu-debug-helper will wrap the WebGPU API and
start generating error messages.
Expand Down

0 comments on commit 0e343ba

Please sign in to comment.