Skip to content

fix(rust): psychoscript-gpu accepts a device that caps max_non_sampler_bindings (0.1.1) - #105

Merged
kommander merged 1 commit into
devfrom
gpu-bindings
Nov 27, 2026
Merged

kommander merged 1 commit into
devfrom
gpu-bindings

Conversation

@kommander

Copy link
Copy Markdown
Contributor

check_device now compares only the WebGPU limits, so it ignores max_non_sampler_bindings.

  • That limit is wgpu's own, not WebGPU's. device_limits() inherits wgpu's default of 1,000,000 for it.
  • A host may cap it on a device it shares: Rune desktop caps it at 65,536 to keep its D3D12 descriptor heap small.
  • psychoscript-gpu refused such a device, so its GPU canvases showed their placeholder.

psychoscript-gpu 0.1.1. device_limits() is unchanged.

Checked on macOS:

  • fmt;
  • clippy -D warnings for macOS, iOS, iOS Simulator, both Android targets and wasm32;
  • psychoscript-gpu's tests on Metal: 43 passed, including all 53 GPU fixtures and the new a_device_with_fewer_non_sampler_bindings_is_one, which fails without the fix;
  • psychoscript-mobile's tests: all GPU suites pass.

…r_bindings

check_device compares the WebGPU limits only: max_non_sampler_bindings is wgpu's own (device_limits has wgpu's
default, 1,000,000), and a host may cap it on a device it shares (Rune: 65,536, its D3D12 descriptor heap), which
programs never see. Such a device was refused, so its GPU canvases showed their placeholder. psychoscript-gpu 0.1.1.
@kommander
kommander merged commit f6b504e into dev Nov 27, 2026
1 check passed
@kommander
kommander deleted the gpu-bindings branch November 27, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant