diff options
author | David Neto <dneto@google.com> | 2022-09-16 21:51:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 21:51:48 +0300 |
commit | 91c29a197f20e58dfc436e1d9f28bef5a9ba9c4c (patch) | |
tree | d68e42c8501a77a943c820f0097a6bedf037c006 | |
parent | 0c4ce11b4a90723fddd03b547a39f26ad05561de (diff) |
spirv-val: Fix comment for checking extended alignments (#4937)
* getBaseAlignment with roundUp true is called the "extended"
by the Vulka spec.
* roundUp also affects matrix alignment, not just struct and array
-rw-r--r-- | source/val/validate_decorations.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/val/validate_decorations.cpp b/source/val/validate_decorations.cpp index c5764ac12..75058501e 100644 --- a/source/val/validate_decorations.cpp +++ b/source/val/validate_decorations.cpp @@ -179,8 +179,9 @@ uint32_t align(uint32_t x, uint32_t alignment) { } // Returns base alignment of struct member. If |roundUp| is true, also -// ensure that structs and arrays are aligned at least to a multiple of 16 -// bytes. +// ensure that structs, arrays, and matrices are aligned at least to a +// multiple of 16 bytes. (That is, when roundUp is true, this function +// returns the *extended* alignment as it's called by the Vulkan spec.) uint32_t getBaseAlignment(uint32_t member_id, bool roundUp, const LayoutConstraints& inherited, MemberConstraints& constraints, |