Skip to content

Instantly share code, notes, and snippets.

View Wumpf's full-sized avatar

Andreas Reich Wumpf

View GitHub Profile

Wgpu degenerification performance report

TL;DR:

  • Compile times are 13-16% shorter if you have several backends (always on Windows), slight but consistent improvements if you use only a single one (default on Mac)
  • Runtime performance of compute passes gets worse by 10-30% (with a 40% worse outlier for a lot of dispatches in a single pass)
  • Runtime performance of render passes sometimes 17-34% better and sometimes 10% worse 🤷
  • Stuck doc-gen issue is fixed!
  • wgpu-info Windows binary size goes down, Mac binary sizes goes up unless you add more backends

@Wumpf
Wumpf / index.html
Last active October 23, 2023 11:23
Repro case for shader crash on Linux Chrome Intel
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Compiling & linking a large shader</title>
<script src="main.js" type="module"></script>
<script id="vertexShader" type="x-shader/x-vertex">#version 300 es
@Wumpf
Wumpf / prefix_sum.wgsl
Created August 6, 2023 07:17
Prefix sum poor fix
@group(0) @binding(0)
var<storage, read> numbers_input: array<u32>;
@group(0) @binding(1)
var<storage, read_write> numbers_output: array<u32>;
var<workgroup> shared_atomic: array<atomic<u32>, 64>;
var<workgroup> shared_workgroup_memory: array<u32, 64>;
@Wumpf
Wumpf / gist:4a7bf26971e8cac434ee994a246f4a7e
Last active October 2, 2021 12:47
ffmpeg cheatsheet for pic->vid
H264, 25fps:
."C:\Users\andre\ffmpeg.exe" -i %d.png -c:v libx264 -pix_fmt yuv420p output.mp4
H264, 60fps:
."C:\Users\andre\ffmpeg.exe" -framerate 60 -i screenshot%d.png -r 60 -c:v libx264 -pix_fmt yuv420p output.mp4
H265 (windows can't play it!)
."C:\Users\andre\ffmpeg.exe" -i %d.png -c:v libx265 -pix_fmt yuv420p output.mp4
@Wumpf
Wumpf / cfd.md
Last active August 11, 2024 10:51
Notes on CFD