Summary
A community user (@nikolas_beckel) got a Perry @perryts/webgpu program building and running on Windows x64 (with AI assistance, zero Rust experience). It opens a window and wgpu presents ~15 frames successfully, but the rendered frames never show up in the window — it stays gray. Several patches were needed along the way to get that far. This issue tracks debugging the Windows path so it works out of the box.
Environment
- Platform: Windows x64
- Package:
@perryts/webgpu (unless noted)
- Backends in play: wgpu d3d12 / vulkan / gl
Findings / patches the user had to apply
-
Manifest lib name mismatch. The manifest "windows" lib is declared as libperry_ext_webgpu.a, but on Windows it actually builds as perry_ext_webgpu.lib. The manifest/link logic should resolve the platform-correct name.
-
Missing Windows link libs. Windows link needs d3dcompiler + opengl32, otherwise LNK2019 unresolved externals on wgl* / D3DCompile (pulled in by wgpu's d3d12/gl backends).
-
request_adapter ignores the surface. request_adapter uses compatible_surface: None, which makes surfaceConfigure fail on d3d12/vulkan ("queue family" error). Picking the adapter against the surface fixed it.
-
textureCreateView(tex) without a descriptor crashes in read_string. Passing all args explicitly worked around it — suggests Perry may be passing garbage for omitted/optional args on win64 (calling-convention / default-arg lowering bug?).
-
Frames present but never display (main wall). After the above, wgpu presents 15 frames fine, but they never appear in the window — it stays gray. Likely a surface present / swapchain / window-compositing issue on Windows.
Suspected Perry-side bugs (vs. just wgpu usage)
- Item 4 strongly smells like a Perry codegen/ABI issue: omitted optional args producing garbage on win64. Worth reproducing in isolation (a function with a trailing optional/object param called with the arg omitted).
- Item 1 is a manifest/link-name resolution bug specific to Windows.
Tasks
Credit
Reported by @nikolas_beckel on X. Thanks for the detailed write-up and patches!
Summary
A community user (@nikolas_beckel) got a Perry
@perryts/webgpuprogram building and running on Windows x64 (with AI assistance, zero Rust experience). It opens a window and wgpu presents ~15 frames successfully, but the rendered frames never show up in the window — it stays gray. Several patches were needed along the way to get that far. This issue tracks debugging the Windows path so it works out of the box.Environment
@perryts/webgpu(unless noted)Findings / patches the user had to apply
Manifest lib name mismatch. The manifest "windows" lib is declared as
libperry_ext_webgpu.a, but on Windows it actually builds asperry_ext_webgpu.lib. The manifest/link logic should resolve the platform-correct name.Missing Windows link libs. Windows link needs
d3dcompiler+opengl32, otherwiseLNK2019unresolved externals onwgl*/D3DCompile(pulled in by wgpu's d3d12/gl backends).request_adapterignores the surface.request_adapterusescompatible_surface: None, which makessurfaceConfigurefail on d3d12/vulkan ("queue family" error). Picking the adapter against the surface fixed it.textureCreateView(tex)without a descriptor crashes inread_string. Passing all args explicitly worked around it — suggests Perry may be passing garbage for omitted/optional args on win64 (calling-convention / default-arg lowering bug?).Frames present but never display (main wall). After the above, wgpu presents 15 frames fine, but they never appear in the window — it stays gray. Likely a surface present / swapchain / window-compositing issue on Windows.
Suspected Perry-side bugs (vs. just wgpu usage)
Tasks
lib*.avs*.lib) for Windows.d3dcompiler+opengl32to the Windows link line for the webgpu ext (and audit other exts that pull wgpu backends).request_adapterpasscompatible_surfaceso d3d12/vulkansurfaceConfiguresucceeds.textureCreateViewomitted-arg crash — minimal repro of omitted optional args on win64; fix in codegen if confirmed.Credit
Reported by @nikolas_beckel on X. Thanks for the detailed write-up and patches!