Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slang-RHI/WGPU: Invalid bind group layout entry used #5612

Closed
aleino-nv opened this issue Nov 20, 2024 · 2 comments · Fixed by #5731
Closed

Slang-RHI/WGPU: Invalid bind group layout entry used #5612

aleino-nv opened this issue Nov 20, 2024 · 2 comments · Fixed by #5731
Assignees
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.

Comments

@aleino-nv
Copy link
Collaborator

Affected tests:

  • tests/bugs/buffer-swizzle-store.slang

Example output:

WGPU error: BindGroupLayoutEntry had none of buffer, sampler, texture, storageTexture, or externalTexture set
 - While validating entries[0]
 - While validating [BindGroupLayoutDescriptor]
 - While calling [Device].CreateBindGroupLayout([BindGroupLayoutDescriptor]).
@bmillsNV bmillsNV added this to the Q4 2024 (Fall) milestone Nov 21, 2024
@bmillsNV bmillsNV added the goal:forward looking Feature needed at a later date, not connected to a specific use case. label Nov 21, 2024
@aleino-nv
Copy link
Collaborator Author

I found that Slang-RHI is leaving the 'access' field of WGPUStorageTextureBindingLayout undefined:
https://github.com/shader-slang/slang-rhi/blob/539322d79c1af13bbc5624a333b65a9e856a13a4/src/wgpu/wgpu-shader-object-layout.cpp#L183

The WebGPU spec contains a table, according to which read-write storage texture access is only allowed for r32uint, r32sint and r32float formats.

https://www.w3.org/TR/webgpu/#plain-color-formats

aleino-nv added a commit to aleino-nv/slang that referenced this issue Dec 3, 2024
aleino-nv added a commit to aleino-nv/slang that referenced this issue Dec 3, 2024
@aleino-nv
Copy link
Collaborator Author

Here is a PR that adds an explanation for WGPU, and adds a similar test that uses a structured buffer instead of a storage texture:
#5731

@csyonghe Do you think that's enough to close this issue?
There are lots of things we could do to improve slang-test/render-test/Slang-RHI, but I'd like to have a chat and discuss those options first.

aleino-nv added a commit that referenced this issue Dec 4, 2024
* Add buffer swizzle store test using structured buffers

This helps to address #5612

* WGPU: Add explanation for tests/bugs/buffer-swizzle-store.slang

This closes #5612.

* Manual formatting fix

* format code

---------

Co-authored-by: slangbot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants