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

Allow non struct buffers in wgsl #2451

Merged
merged 2 commits into from
Feb 5, 2022
Merged

Conversation

IcanDivideBy0
Copy link
Contributor

Thanks to gfx-rs/naga@75692d3, it is now possible to use arrays top level components of a shader, this PR integrates the latest changes from naga to wgpu.

So far, it seems to work fine, but i'm still having an issue: when using the arrayLength builtin function on such an array (runtime sized), i have the following error:

thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_compute_pipeline
      note: label = `Particles pipeline`
    Internal error: module is not validated properly: array length expression

', /home/samuel/Workspace/wgpu/wgpu/src/backend/direct.rs:2273:5

I've tried to inspect the generated spirv but i'm not really familiar with this, any help appreciated.

@IcanDivideBy0 IcanDivideBy0 marked this pull request as draft February 4, 2022 08:26
@IcanDivideBy0 IcanDivideBy0 force-pushed the array_buffer branch 2 times, most recently from 15af97a to 1e89d3e Compare February 4, 2022 09:19
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@IcanDivideBy0 IcanDivideBy0 marked this pull request as ready for review February 5, 2022 10:54
@IcanDivideBy0
Copy link
Contributor Author

gfx-rs/naga#1717 definitely fixed the issue with arrayLength!

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.

2 participants