summaryrefslogtreecommitdiff
path: root/chapters/commonvalidity/copy_memoryimage_to_imagememory_common.adoc
blob: b1f892fff523e5c0ff7949737ad47ed26f224a3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2022-2023 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

// Common Valid Usage
// Common to vk*Copy*ToImage* commands
// This relies on an additional attribute {imageparam} set by the command
// which includes this file, specifying the name of the source or
// destination image.
// Additionally, it relies on the {imagesubresource} attribute to specify the
// field in pRegions corresponding to {imageparam}
// Finally, it relies on the {imageoffset} and {imageextents} attributes to
// specify the fields in pRegions corresponding to the offset and extent of the
// copy.

  * [[VUID-{refpage}-{imageparam}-09109]]
    If pname:{imageparam} is sparse then all memory ranges accessed by the
    copy command must: be bound as described in
    <<sparsememory-resource-binding, Binding Resource Memory>>
  * [[VUID-{refpage}-{imageparam}-09111]]
ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
    If the stencil aspect of pname:{imageparam} is accessed, and
    pname:{imageparam} was not created with
    <<VkImageStencilUsageCreateInfo,separate stencil usage>>,
endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
    pname:{imageparam} must: have been created with
    ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT set in
    slink:VkImageCreateInfo::pname:usage
ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
  * [[VUID-{refpage}-{imageparam}-09112]]
    If the stencil aspect of pname:{imageparam} is accessed, and
    pname:{imageparam} was created with
    <<VkImageStencilUsageCreateInfo,separate stencil usage>>,
    pname:{imageparam} must: have been created with
    ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT set in
    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage
  * [[VUID-{refpage}-{imageparam}-09113]]
    If non-stencil aspects of pname:{imageparam} are accessed,
    pname:{imageparam} must: have been created with
    ename:VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT set in
    slink:VkImageCreateInfo::pname:usage
endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
  * [[VUID-{refpage}-{imageoffset}-09114]]
    If pname:flags contains ename:VK_HOST_IMAGE_COPY_MEMCPY_EXT, the
    pname:x, pname:y, and pname:z members of the pname:{imageoffset} member
    of each element of pname:pRegions must: be `0`
  * [[VUID-{refpage}-{imageparam}-09115]]
    If pname:flags contains ename:VK_HOST_IMAGE_COPY_MEMCPY_EXT, the
    pname:{imageextent} member of each element of pname:pRegions must: equal
    the extents of pname:{imageparam} identified by pname:{imagesubresource}
// Common Valid Usage