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
Some graphics APIs like WebGPU require dynamic uniform offsets to be a multiple of 256. shader-types has a type named DymamicOffsetMember that helps with this, but it creates trailing padding bytes which interacts poorly with crates like bytemuck.
Would it make sense for glsl-layout to have a type like this? If it can calculate and add manual trailing padding to the AsStd140 version of the type, that would help avoid unspecified padding bytes.
The text was updated successfully, but these errors were encountered:
You mean that you have a struct where fields are uniform blocks, and you want to copy it into GPU buffer, right?
That feature could be implemented, sure, but I can't give you any ETA.
The easier way would be using crate safe-bytes. It allows reading bytes of structs with padding safely.
Some graphics APIs like WebGPU require dynamic uniform offsets to be a multiple of 256. shader-types has a type named DymamicOffsetMember that helps with this, but it creates trailing padding bytes which interacts poorly with crates like bytemuck.
Would it make sense for glsl-layout to have a type like this? If it can calculate and add manual trailing padding to the
AsStd140
version of the type, that would help avoid unspecified padding bytes.The text was updated successfully, but these errors were encountered: