OrderAttribute
Description
- Derived from
-
Attribute abstract
Controls the order of fields in constant buffers structures and in stage input / output structures.
When GPU code is generated, the fields of a structure are sorted in descending order by the element count of their base type (i.e. the element type for arrays) and then in ascending order by their declaration name:
Additionally, the Order may be used to group structure fields: then the default sorting (see above) is applied separately to each group and the groups are output in ascending order. This can be used to fine-tune data alignment in order to achieve better packing. Fields without an Order belong to an implicit group which is always output last.