Skip to content

Instantly share code, notes, and snippets.

@ErichDonGubler
Last active April 9, 2025 22:19
Show Gist options
  • Save ErichDonGubler/a18524d827950b64d98c51caf26fc0d3 to your computer and use it in GitHub Desktop.
Save ErichDonGubler/a18524d827950b64d98c51caf26fc0d3 to your computer and use it in GitHub Desktop.
Analysis of `webgpu-apps`' current blockers
# README: Use [Nushell] to run this script, like so:
#
# ```
# nu ./analyze-webgpu-apps-blockers.nu
# ```
#
# This will regenerate or create `summary-rendered.nu` in the CWD.
#
# [Nushell]: https://www.nushell.sh/
const OPEN_STATUSES = [UNCONFIRMED NEW ASSIGNED REOPENED]
def query [
--cache-dir: directory | null = null,
] {
print --stderr "Getting broken page bug reports blocking `webgpu-apps`…"
let bugs = cache --dir $cache_dir --query-name "webgpu-apps-blockers" {
query-bugs {
resolution: '---'
component: 'Graphics: WebGPU'
f1: blocked
o1: casesubstring
v1: "1849916" # webgpu-apps
bug_status: $OPEN_STATUSES
}
}
print --stderr "Querying info about broken pages' individual blockers…"
let bugs_by_blocker_id = $bugs
| insert deps_flattened { $in.depends_on }
| flatten deps_flattened
| group-by --to-table deps_flattened
| sort-by deps_flattened
| rename --column { deps_flattened: dependency items: blocks }
| sort-by --reverse { $in.blocks | length }
| update blocks { select id summary }
let blocker_ids = ($bugs_by_blocker_id | get dependency)
let blockers_by_id = cache --dir $cache_dir --query-name "webgpu-apps-blockers-blockers" {
query-bugs { id: $blocker_ids }
}
| select id summary status assigned_to_detail.nick
print --stderr "Analyzing relationships between broken pages and their blockers…"
let blockers_by_id = $blockers_by_id
| select id summary status "assigned_to_detail.nick"
| reduce --fold {} {|entry, acc|
$acc | insert ($entry.id | into string) { $entry | reject id }
}
let blocking_relationships = $bugs_by_blocker_id
| update dependency {
let id = $in
let entry = $blockers_by_id | get $id
{
id: $id
...$entry
}
}
| flatten --all dependency
let bugs_with_no_open_blockers = $bugs
| filter {|bug|
$bug.depends_on | all {|id|
let status = $blockers_by_id | get ($id | into string) | get status
$status not-in $OPEN_STATUSES
}
}
| update id { into string }
| select id priority severity summary product component status assigned_to_detail.nick
| sort-by { get priority | priority-ordinal } { get severity | severity-ordinal }
let bug_ids_with_no_open_blockers = $bugs_with_no_open_blockers | get id
let blockers = $blocking_relationships | where status in $OPEN_STATUSES
{
blockers: $blockers
bugs_with_no_open_blockers: $bugs_with_no_open_blockers
}
}
# Reports blockers on Firefox's # [`webgpu-apps`] issue tracking in `./summary-rendered.md`.
#
# [`webgpu-apps`]: https://bugzilla.mozilla.org/show_bug.cgi?id=webgpu-apps
export def main [
--blockers-limit: int = 10,
# How many rows to populate in the unresolved blockers table.
--cache-dir: directory | null = null,
# Cache responses to a single directory. WARNING: _very_ basic (and error-prone)
] {
let report_start_datetime = cache --dir $cache_dir --query-name "current-time" {
date now | date to-timezone '+0000'
}
let queried = query --cache-dir $cache_dir
let merge_id_and_summary = {|entry|
$entry
# NOTE: work around `|`s needing escape in Markdown tables
| update summary { str replace '|' '\|' }
| insert bug {
$"[Bug ($in.id) - ($in.summary)]\(https://bugzilla.mozilla.org/show_bug.cgi?id=($in.id)\)"
}
| move --first bug
| reject id
| reject summary
| rename --column { "assigned_to_detail.nick": "assignee" }
}
let blockers = $queried
| get blockers
| update blocks { length }
| each $merge_id_and_summary
let blockers = if $blockers_limit > 0 {
$blockers | first $blockers_limit
} else {
$blockers
}
let bugs_with_no_open_blockers = $queried
| get bugs_with_no_open_blockers
| each $merge_id_and_summary
| move priority severity --first
let report_path = "./summary-rendered.md"
print --stderr $"Rendering to `($report_path)`…"
let rendered = [
$"Queried and rendered on ($report_start_datetime | format date '%+')"
"## Top blockers"
($blockers | to md --pretty)
"## Bugs with no open blockers"
($bugs_with_no_open_blockers | to md --pretty)
] | str join "\n\n" | $"($in)\n"
$rendered o> $report_path
}
def query-bugs [
bug_search_criteria,
] {
let query_params = ($bug_search_criteria | url build-query)
http get $"https:/bugzilla.mozilla.org/rest/bug?($query_params)" | get bugs
}
export def cache [
f: closure,
--dir: directory | null = null,
--query-name: string | null = null,
] {
let cache_path = if ($dir != null) and ($query_name != null) {
[$dir $"($query_name).json"] | path join
} else {
null
}
if ($cache_path != null) and ($cache_path | path exists) {
return (open $cache_path)
}
let output = do $f
if $cache_path != null {
mkdir ($cache_path | path dirname)
$output | save $cache_path
}
$output
}
def priority-ordinal []: string -> int {
let priority = $in
let parsed = $priority | parse "P{num}"
if ($parsed | is-not-empty) {
$parsed | first
} else {
match $priority {
"N/A" => 10,
"---" => 11,
}
}
}
def severity-ordinal []: string -> int {
let sev = $in
let parsed = $sev | parse "S{num}"
if ($parsed | is-not-empty) {
$parsed | first
} else {
match $sev {
"N/A" => 10,
"---" => 11,
}
}
}

Queried and rendered on 2025-03-04T03:30:48.711137+00:00

Top blockers

bug status assignee blocks
Bug 1829879 - Implement automatic type conversion and Abstract{Int,Float} for WGSL ASSIGNED jimb 31
Bug 1921454 - [meta] Support all GPUImageCopyExternalImageSource variants ASSIGNED ErichDonGubler 5
Bug 1913424 - Support dynamic indexing of by-value matrices and arrays in WGSL ASSIGNED jimb 3
Bug 1827116 - External texture API missing in WebGPU (GPUDevice.importExternalTexture, GPUExternalTexture, texture_external) ASSIGNED teoxoy 3
Bug 1937126 - WGSL: Can't use consts declared inside a fn for array sizes NEW nobody 1
Bug 1937100 - Content stutters from CommandEncoder and ComputePipeline DOM object destruction in `Marching Cubes example from official WebGPU samples NEW nobody 1
Bug 1922098 - HTMLVideoElement is not supported as a GPUImageCopyExternalImageSource NEW nobody 1
Bug 1916464 - Support the readonly_and_readwrite_storage_textures WGSL language extension NEW nobody 1
Bug 1911502 - WebGPU Unleashed's Transparency example renders incorrectly NEW nobody 1
Bug 1911499 - WebGPU Unleashed's Radix Sorting playground fails NEW nobody 1

Bugs with no open blockers

priority severity bug product component status assignee
P3 S3 Bug 1878319 - WebGPU demo (https://web-gpu-particles.vercel.app/) doesnt draw anything on the screen Core Graphics: WebGPU NEW nobody
P3 S3 Bug 1909504 - Proton Scribe stability problems Core Graphics: WebGPU NEW nobody
P3 -- Bug 1830763 - [meta] Ensure that WebGPU Fundamentals works Core Graphics: WebGPU NEW nobody
P3 -- Bug 1831125 - [meta] Ensure that Rerun web app works against WebGPU Core Graphics: WebGPU NEW nobody
P3 -- Bug 1864343 - [meta] Ensure that ermine.ai works Core Graphics: WebGPU NEW nobody
P3 -- Bug 1877150 - JS demo using BigInt calculates different values when using JS vs WebGPU Core Graphics: WebGPU NEW nobody
-- S3 Bug 1866068 - WebGPU unity demos don't run properly Core Graphics: WebGPU NEW nobody
-- S3 Bug 1911500 - WebGPU Unleashed's Stencil playground fails with Unable to clear non-present/read-only stencil Core Graphics: WebGPU NEW nobody
-- S3 Bug 1916145 - [WebGPU] Unreal Engine demo compiled to the web at https://lyra.tiwsamples.com/ does not load Core Graphics: WebGPU NEW nobody
-- S3 Bug 1929158 - [WebGPU] Super Mario Galaxy does not work in noclip.website Core Graphics: WebGPU NEW nobody
-- S3 Bug 1930005 - Odd tearing on rotation with mouse in WebGPU Implicit Isosurface Raycaster Core Graphics: WebGPU NEW nobody
-- S3 Bug 1933645 - https://www.fxhash.xyz/generative/slug/adroste doesnt work in Nightly Core Graphics: WebGPU NEW nobody
-- S3 Bug 1937648 - Landing page with a halo demo from Svader fails to render halos Core Graphics: WebGPU NEW nobody
-- S3 Bug 1939841 - [WebGPU] https://company-named.com/dev/prototypes/2024/11-16-shade-webgpu/ doesnt work in Firefox Core Graphics: WebGPU NEW nobody
-- S3 Bug 1941600 - When WebGPU is enabled, the DOOM gallery experience flashes black on macOS Core Graphics: WebGPU NEW nobody
-- S3 Bug 1941976 - [WebGPU] Demo at https://yuu6883.github.io////WebGPUDemo/?cloth doesnt run on my Win11x64+AMD iGPU machine Core Graphics: WebGPU NEW nobody
-- S3 Bug 1941978 - [WebGPU] we use 2x more GPU compared to Chrome on https://martinlaxenaire.github.io/gpu-curtains/examples/compute-blur/ (100%use Vs 50%use) Core Graphics: WebGPU NEW nobody
-- S3 Bug 1941980 - [WebGPU] Nightly is 1000x slower than Chrome on https://vanity-eth.modez.pro/ Core Graphics: WebGPU NEW nobody
-- S3 Bug 1947823 - Some Sokol WebGPU demos have wildly misplaced vertex geometry on macOS Core Graphics: WebGPU NEW nobody
-- S3 Bug 1951216 - [WebGPU] Demo at https://ivanludvig.dev/image-palette-webgpu/ shows only black colors for "Wu" algorithm Core Graphics: WebGPU NEW nobody
@ErichDonGubler
Copy link
Author

ErichDonGubler commented Feb 27, 2025

Known issues:

  • Bug: It's not easy to distinguish between done blockers and ones still pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment