[ganesh][dawn] Account for padding when allocating a uniform buffer

Dawn enforces that buffers holding host-shareable data are sized to
account for any padding that may be inserted to account for alignment
and layout requirements.

The Dawn backend now allocates uniform buffers to accommodate any
trailing bytes as required by WGSL's "RequiredAlignOf" rules for the
uniform address space.

Change-Id: I6cdaa55f4140f7f432cc6a7e184c7bd26f01ca4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/613021
Commit-Queue: Arman Uguray <armansito@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
1 file changed