Skip to content

add explicit #[gpu_repr(storage)] attribute to #[derive(GpuLayout)] #18

@RayMarch

Description

@RayMarch

Right now, the WGSL storage layout is the default layout applied to structs when #[derive(GpuLayout)] is used.
For consistency, and to allow maybe adding a #[gpu_repr(uniform)] in the future, the following changes need to be made:

  • rename TypeLayoutRules::Wgsl to TypeLayoutRules::Storage
  • rename TypeLayoutRules to shame::mem::Repr
  • add a shame::mem::Repr argument to conversions from the ir::Type family to TypeLayout
  • add a #[gpu_repr(storage)] attribute similar to the existing #[gpu_repr(packed)] to #[derive(GpuLayout)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions