Skip to content

Should array stride be a property of the type? #1502

@kvark

Description

@kvark

This is a follow-up to #1447.
There are 3 properties that define the layout of host-shared data: [[size]], [[align]], and [[stride]]. It is inconsistent for the spec that the first two are decorations on the fields of structures, while the [[stride]] is a decoration on the type itself.
If there is a strong reason for this inconsistency, we should at least express it here and keep a record of it. Otherwise, let's consider aligning the stride with the sibling decorations, and put it on fields of structs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions