Skip to content

Conversation

@kvark
Copy link
Member

@kvark kvark commented Mar 23, 2024

Connections
Port of gfx-rs/naga#2372
Fixes #4556 for SPV-out

Description
See #4556

Testing
Changes are in "binding-buffer-arrays.wgsl"

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@kvark kvark requested a review from a team March 23, 2024 18:57
@teoxoy teoxoy merged commit 5bab673 into gfx-rs:trunk Apr 2, 2024
@kvark kvark deleted the spv-array-length branch April 3, 2024 07:10
jimblandy added a commit to jimblandy/wgpu that referenced this pull request Sep 27, 2024
Require `T` to be a struct in `binding_array<T, ...>`; do not permit
arrays.

In gfx-rs#5428, the validator was changed to accept binding array types that
the SPIR-V backend couldn't properly emit. Specifically, the validator
was changed to accept `binding_array<array<T>>`, but the SPIR-V
backend wasn't changed to wrap the binding array elements in a SPIR-V
struct type, as Vulkan requires. So the type would be accepted by the
validator, and then rejected by the backend.
jimblandy added a commit that referenced this pull request Sep 28, 2024
Require `T` to be a struct in `binding_array<T, ...>`; do not permit
arrays.

In #5428, the validator was changed to accept binding array types that
the SPIR-V backend couldn't properly emit. Specifically, the validator
was changed to accept `binding_array<array<T>>`, but the SPIR-V
backend wasn't changed to wrap the binding array elements in a SPIR-V
struct type, as Vulkan requires. So the type would be accepted by the
validator, and then rejected by the backend.
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.

[spv-out] Cannot use arrayLength() on a runtime-sized array contained within a binding_array

2 participants