@kirknock/node-openxr-dawn 0.3.3 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +28 -1
  2. package/dawn.node +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -27,10 +27,37 @@ const dawn = require('@kirknock/node-openxr-dawn'); // { create, globals, xr }
27
27
  | Repository | https://dawn.googlesource.com/dawn |
28
28
  | Branch | `main` (first in Chromium release branch `chromium/8144`) |
29
29
  | Commit | [`0a17724d8378360d9c2235d87a5d6e19a6b6b262`](https://dawn.googlesource.com/dawn/+/0a17724d8378360d9c2235d87a5d6e19a6b6b262) (2026-11-04) |
30
- | Patches | `third_party/dawn/patches/0001-openxr-swapchain-interop.patch` |
30
+ | Patches | `third_party/dawn/patches/0001-openxr-swapchain-interop.patch`, `0002-tier1-storage-formats-without-feature.patch`, `0003-wgsl-step-as-select.patch` |
31
31
 
32
32
  The commit is pinned in `third_party/dawn/COMMIT`; update this table when it changes.
33
33
 
34
+ ### What the patches change
35
+
36
+ - **0001, OpenXR swapchain interop:** the Vulkan backend can create its instance
37
+ and device through `XR_KHR_vulkan_enable2`, and wrap OpenXR swapchain
38
+ `VkImage`s as WebGPU textures.
39
+ - **0002, the storage formats of `texture-formats-tier1` without the feature:**
40
+ Dawn offers `texture-formats-tier1` only when the GPU supports every format
41
+ it covers, including rendering and blending the snorm formats. Without the
42
+ feature, none of its formats can be a storage texture, so `r8unorm` storage
43
+ textures fail even on GPUs that support them. Mesa's lavapipe, for one,
44
+ supports every format as a storage image but can't blend snorm formats.
45
+ With this patch, the Vulkan backend accepts each of these formats as a
46
+ read-only or write-only storage texture when the GPU reports
47
+ `shaderStorageImageExtendedFormats` and `STORAGE_IMAGE` support for it.
48
+ The device's features stay as Dawn reports them, so `texture-formats-tier1`
49
+ is still missing on such GPUs. Dawn now accepts those textures, where a
50
+ browser's WebGPU would report a validation error. Babylon.js's IBL shadows
51
+ need this: they write their voxel grid to an `r8unorm` 3D storage texture
52
+ without checking for the feature.
53
+ - **0003, `step()` as WGSL defines it:** WGSL's `step(edge, x)` is 1 if
54
+ `edge <= x`, else 0, so a NaN `x` gives 0, as on D3D and Metal. Tint turned
55
+ it into SPIR-V's GLSL `Step` ("0 if `x < edge`"), which gives 1 for NaN.
56
+ Tint's SPIR-V builtin polyfill now lowers it to `select(0, 1, edge <= x)`,
57
+ identical for every other value. Babylon.js's SSAO2 shader computes with NaN
58
+ where nothing is drawn, and on Mesa's lavapipe the old `Step` turned the
59
+ empty background black.
60
+
34
61
  ## Building
35
62
 
36
63
  ```bash
package/dawn.node CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirknock/node-openxr-dawn",
3
- "version": "0.3.3",
3
+ "version": "0.3.6",
4
4
  "description": "Patched dawn.node for Linux x64 (glibc): WebGPU rendering into OpenXR swapchain images. Built by scripts/build-dawn-node.sh.",
5
5
  "keywords": [
6
6
  "webgpu",