You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to add proper padding for dynamically sized arrays containing structures? Something like Vec<MyStruct>, so not structures containing dynamically sized arrays as can be seen in the example code. Here's my wgpu 13.1 compute shader program which compiles and runs, but the resulting calculations are wrong. Only first few instances are calculated properly and the rest are initialized to zero, although they should not be zero since that's not how the buffer is being initialized to begin with.
Ideally I would like to directly pad array of cmath Vector3 values to my shader program, with a type signature like this Vec<Vector3<f32>> but even having a wrapper struct that derives ShaderType would be good enough for now.
Hello,
Is there a way to add proper padding for dynamically sized arrays containing structures? Something like
Vec<MyStruct>
, so not structures containing dynamically sized arrays as can be seen in the example code. Here's mywgpu 13.1
compute shader program which compiles and runs, but the resulting calculations are wrong. Only first few instances are calculated properly and the rest are initialized to zero, although they should not be zero since that's not how the buffer is being initialized to begin with.Ideally I would like to directly pad array of cmath Vector3 values to my shader program, with a type signature like this
Vec<Vector3<f32>>
but even having a wrapper struct that derivesShaderType
would be good enough for now.WGSL file:
Rust program:
The text was updated successfully, but these errors were encountered: