1// Copyright 2019-2023 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5// Common Valid Usage
6// Common to VkBufferMemoryBarrier* structs
7  * [[VUID-{refpage}-offset-01187]]
8    pname:offset must: be less than the size of pname:buffer
9  * [[VUID-{refpage}-size-01188]]
10    If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:size must: be
11    greater than `0`
12  * [[VUID-{refpage}-size-01189]]
13    If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:size must: be
14    less than or equal to than the size of pname:buffer minus pname:offset
15  * [[VUID-{refpage}-buffer-01931]]
16    If pname:buffer is non-sparse then it must: be bound completely and
17    contiguously to a single sname:VkDeviceMemory object
18  * [[VUID-{refpage}-buffer-09095]]
19    If pname:buffer was created with a sharing mode of
20    ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and
21    pname:dstQueueFamilyIndex are not equal, pname:srcQueueFamilyIndex must:
22    be
23ifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
24    ename:VK_QUEUE_FAMILY_EXTERNAL,
25ifdef::VK_EXT_queue_family_foreign[]
26    ename:VK_QUEUE_FAMILY_FOREIGN_EXT,
27endif::VK_EXT_queue_family_foreign[]
28    or
29endif::VK_VERSION_1_1,VK_KHR_external_memory[]
30    a valid queue family
31  * [[VUID-{refpage}-buffer-09096]]
32    If pname:buffer was created with a sharing mode of
33    ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and
34    pname:dstQueueFamilyIndex are not equal, pname:dstQueueFamilyIndex must:
35    be
36ifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
37    ename:VK_QUEUE_FAMILY_EXTERNAL,
38ifdef::VK_EXT_queue_family_foreign[]
39    ename:VK_QUEUE_FAMILY_FOREIGN_EXT,
40endif::VK_EXT_queue_family_foreign[]
41    or
42endif::VK_VERSION_1_1,VK_KHR_external_memory[]
43    a valid queue family
44ifdef::VK_VERSION_1_1,VK_KHR_external_memory[]
45  * [[VUID-{refpage}-srcQueueFamilyIndex-04087]]
46    If pname:srcQueueFamilyIndex is not equal to pname:dstQueueFamilyIndex,
47    at least one of pname:srcQueueFamilyIndex or pname:dstQueueFamilyIndex
48    must: not be ename:VK_QUEUE_FAMILY_EXTERNAL
49ifdef::VK_EXT_queue_family_foreign[]
50    or ename:VK_QUEUE_FAMILY_FOREIGN_EXT
51endif::VK_EXT_queue_family_foreign[]
52  * [[VUID-{refpage}-None-09097]]
53    {empty}
54ifdef::VK_VERSION_1_1,VK_KHR_external_memory[If]
55ifdef::VK_KHR_external_memory[]
56    the apiext:VK_KHR_external_memory extension is not enabled,
57endif::VK_KHR_external_memory[]
58ifdef::VK_VERSION_1_1+VK_KHR_external_memory[and]
59ifdef::VK_VERSION_1_1[]
60    the value of slink:VkApplicationInfo::pname:apiVersion used to create
61    the slink:VkInstance is not greater than or equal to Version 1.1,
62endif::VK_VERSION_1_1[]
63    pname:srcQueueFamilyIndex must: not be ename:VK_QUEUE_FAMILY_EXTERNAL
64  * [[VUID-{refpage}-None-09098]]
65    {empty}
66ifdef::VK_VERSION_1_1,VK_KHR_external_memory[If]
67ifdef::VK_KHR_external_memory[]
68    the apiext:VK_KHR_external_memory extension is not enabled,
69endif::VK_KHR_external_memory[]
70ifdef::VK_VERSION_1_1+VK_KHR_external_memory[and]
71ifdef::VK_VERSION_1_1[]
72    the value of slink:VkApplicationInfo::pname:apiVersion used to create
73    the slink:VkInstance is not greater than or equal to Version 1.1,
74endif::VK_VERSION_1_1[]
75    pname:dstQueueFamilyIndex must: not be ename:VK_QUEUE_FAMILY_EXTERNAL
76ifdef::VK_EXT_queue_family_foreign[]
77  * [[VUID-{refpage}-srcQueueFamilyIndex-09099]]
78    If the apiext:VK_EXT_queue_family_foreign extension is not enabled
79    pname:srcQueueFamilyIndex must: not be ename:VK_QUEUE_FAMILY_FOREIGN_EXT
80  * [[VUID-{refpage}-dstQueueFamilyIndex-09100]]
81    If the apiext:VK_EXT_queue_family_foreign extension is not enabled
82    pname:dstQueueFamilyIndex must: not be ename:VK_QUEUE_FAMILY_FOREIGN_EXT
83endif::VK_EXT_queue_family_foreign[]
84endif::VK_VERSION_1_1,VK_KHR_external_memory[]
85// Common Valid Usage
86