1// Copyright 2020-2023 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5// Common Valid Usage
6// Common to commands copying from images to buffers, or buffers to images
7// This relies on the following additional attributes set by the command which
8// includes this file:
9//
10//  - {imageparam}, specifying the name of the source or destination image,
11//  - {bufferrowlength}, either "bufferRowLength" or "memoryRowLength" based on
12//    whether the non-image copy target is a buffer or host memory,
13//  - {bufferimageheight}, either "bufferImageHeight" or "memoryImageHeight"
14//    similarly,
15
16  * [[VUID-{refpage}-{bufferrowlength}-09106]]
17    For each element of pname:pRegions, pname:{bufferrowlength} must: be a
18    multiple of the <<formats-compatibility-classes,texel block extent
19    width>> of the elink:VkFormat of pname:{imageparam}
20  * [[VUID-{refpage}-{bufferimageheight}-09107]]
21    For each element of pname:pRegions, pname:{bufferimageheight} must: be a
22    multiple of the <<formats-compatibility-classes,texel block extent
23    height>> of the elink:VkFormat of pname:{imageparam}
24  * [[VUID-{refpage}-{bufferrowlength}-09108]]
25    For each element of pname:pRegions, pname:{bufferrowlength} divided by
26    the <<formats-compatibility-classes,texel block extent width>> and then
27    multiplied by the texel block size of pname:{imageparam} must: be less
28    than or equal to [eq]#2^31^-1#
29// Common Valid Usage
30