1// Copyright 2019-2021 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 18ifndef::VK_VERSION_1_1,VK_KHR_external_memory[] 19 * [[VUID-{refpage}-buffer-04086]] 20 If pname:buffer was created with a sharing mode of 21 ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and 22 pname:dstQueueFamilyIndex are not equal, pname:srcQueueFamilyIndex and 23 pname:dstQueueFamilyIndex must: be valid queue families 24endif::VK_VERSION_1_1,VK_KHR_external_memory[] 25ifdef::VK_VERSION_1_1,VK_KHR_external_memory[] 26 * [[VUID-{refpage}-srcQueueFamilyIndex-04087]] 27 If pname:srcQueueFamilyIndex is not equal to pname:dstQueueFamilyIndex, 28 at least one must: not be a special queue family reserved for external 29 memory ownership transfers, as described in 30 <<synchronization-queue-transfers>> 31 * [[VUID-{refpage}-buffer-04088]] 32 If pname:buffer was created with a sharing mode of 33 ename:VK_SHARING_MODE_CONCURRENT, pname:srcQueueFamilyIndex and 34 pname:dstQueueFamilyIndex are not equal, and one of 35 pname:srcQueueFamilyIndex and pname:dstQueueFamilyIndex is one of the 36 special queue family values reserved for external memory transfers, the 37 other must: be ename:VK_QUEUE_FAMILY_IGNORED 38 * [[VUID-{refpage}-buffer-04089]] 39 If pname:buffer was created with a sharing mode of 40 ename:VK_SHARING_MODE_EXCLUSIVE, and pname:srcQueueFamilyIndex and 41 pname:dstQueueFamilyIndex are not equal, pname:srcQueueFamilyIndex and 42 pname:dstQueueFamilyIndex must: both be valid queue families, or one of 43 the special queue family values reserved for external memory transfers, 44 as described in <<synchronization-queue-transfers>> 45endif::VK_VERSION_1_1,VK_KHR_external_memory[] 46// Common Valid Usage 47