这是indexloc提供的服务,不要输入任何密码
Skip to content

enhancement: uniform buffer can use standard layout #4973

@dneto0

Description

@dneto0

Currently uniform buffers have more restrictive layout constraints than storage buffers.
13.4.1 Alignment and Size says that for uniform buffers, array strides must be a multiple of 16, and structs must be aligned to 16 bytes or greater.

These constraints come from:

This is a legacy hardware requirement that is not needed on more modern hardware.

It would be nice to eliminate those special round-up-to-16 alignment requirements for uniform buffers: use the same rules in uniform buffer as for storage buffer.

See also scalar block layout which goes even further, in that the alignment requirement for a vector is lowered to the alignment requirement of its component type. See #4040

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions