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
This commit is contained in:
David Neto 2022-09-16 14:51:48 -04:00 committed by GitHub
parent 0c4ce11b4a
commit 91c29a197f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,8 +179,9 @@ uint32_t align(uint32_t x, uint32_t alignment) {
} }
// Returns base alignment of struct member. If |roundUp| is true, also // 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 // ensure that structs, arrays, and matrices are aligned at least to a
// bytes. // 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, uint32_t getBaseAlignment(uint32_t member_id, bool roundUp,
const LayoutConstraints& inherited, const LayoutConstraints& inherited,
MemberConstraints& constraints, MemberConstraints& constraints,