1 #ifndef _VKBARRIERUTIL_HPP 2 #define _VKBARRIERUTIL_HPP 3 /*------------------------------------------------------------------------- 4 * Vulkan CTS Framework 5 * -------------------- 6 * 7 * Copyright (c) 2018 The Khronos Group Inc. 8 * Copyright (c) 2018 Google Inc. 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 * 22 *//*! 23 * \file 24 * \brief Utility for generating barriers 25 *//*--------------------------------------------------------------------*/ 26 27 #include "vkDefs.hpp" 28 29 namespace vk 30 { 31 32 VkBufferMemoryBarrier makeBufferMemoryBarrier (const VkAccessFlags srcAccessMask, 33 const VkAccessFlags dstAccessMask, 34 const VkBuffer buffer, 35 const VkDeviceSize offset, 36 const VkDeviceSize bufferSizeBytes); 37 38 39 VkImageMemoryBarrier makeImageMemoryBarrier (const VkAccessFlags srcAccessMask, 40 const VkAccessFlags dstAccessMask, 41 const VkImageLayout oldLayout, 42 const VkImageLayout newLayout, 43 const VkImage image, 44 const VkImageSubresourceRange subresourceRange, 45 const deUint32 srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, 46 const deUint32 destQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED); 47 48 VkMemoryBarrier makeMemoryBarrier (const VkAccessFlags srcAccessMask, 49 const VkAccessFlags dstAccessMask); 50 51 } // vk 52 53 #endif // _VKBARRIERUTIL_HPP 54