Merge "Remove EGL gles1.rgb565_window from mustpass" am: 7bff163e7f am: 8d0d1e55f9
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / fragment_ops / vktFragmentOperationsMakeUtil.hpp
1 #ifndef _VKTFRAGMENTOPERATIONSMAKEUTIL_HPP
2 #define _VKTFRAGMENTOPERATIONSMAKEUTIL_HPP
3 /*------------------------------------------------------------------------
4  * Vulkan Conformance Tests
5  * ------------------------
6  *
7  * Copyright (c) 2016 The Khronos Group Inc.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  *//*!
22  * \file
23  * \brief Object creation utilities
24  *//*--------------------------------------------------------------------*/
25
26 #include "vkDefs.hpp"
27 #include "vkRef.hpp"
28 #include "vkRefUtil.hpp"
29 #include "vkMemUtil.hpp"
30 #include "deUniquePtr.hpp"
31 #include "tcuVector.hpp"
32
33 namespace vkt
34 {
35 namespace FragmentOperations
36 {
37
38 vk::VkBufferCreateInfo                  makeBufferCreateInfo    (const vk::VkDeviceSize bufferSize, const vk::VkBufferUsageFlags usage);
39 vk::Move<vk::VkDescriptorSet>   makeDescriptorSet               (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkDescriptorPool descriptorPool, const vk::VkDescriptorSetLayout setLayout);
40 vk::Move<vk::VkPipelineLayout>  makePipelineLayout              (const vk::DeviceInterface& vk, const vk::VkDevice device);
41 vk::Move<vk::VkPipelineLayout>  makePipelineLayout              (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkDescriptorSetLayout descriptorSetLayout);
42 vk::Move<vk::VkPipeline>                makeComputePipeline             (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkPipelineLayout pipelineLayout, const vk::VkShaderModule shaderModule, const vk::VkSpecializationInfo* specInfo);
43 vk::Move<vk::VkFramebuffer>             makeFramebuffer                 (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkRenderPass renderPass, const deUint32 attachmentCount, const vk::VkImageView* pAttachments, const deUint32 width, const deUint32 height, const deUint32 layers = 1u);
44 vk::Move<vk::VkImageView>               makeImageView                   (const vk::DeviceInterface& vk, const vk::VkDevice vkDevice, const vk::VkImage image, const vk::VkImageViewType viewType, const vk::VkFormat format, const vk::VkImageSubresourceRange subresourceRange);
45 vk::VkBufferMemoryBarrier               makeBufferMemoryBarrier (const vk::VkAccessFlags srcAccessMask, const vk::VkAccessFlags dstAccessMask, const vk::VkBuffer buffer, const vk::VkDeviceSize offset, const vk::VkDeviceSize bufferSizeBytes);
46 vk::VkImageMemoryBarrier                makeImageMemoryBarrier  (const vk::VkAccessFlags srcAccessMask, const vk::VkAccessFlags dstAccessMask, const vk::VkImageLayout oldLayout, const vk::VkImageLayout newLayout, const vk::VkImage image, const vk::VkImageSubresourceRange subresourceRange);
47 de::MovePtr<vk::Allocation>             bindImage                               (const vk::DeviceInterface& vk, const vk::VkDevice device, vk::Allocator& allocator, const vk::VkImage image, const vk::MemoryRequirement requirement);
48 de::MovePtr<vk::Allocation>             bindBuffer                              (const vk::DeviceInterface& vk, const vk::VkDevice device, vk::Allocator& allocator, const vk::VkBuffer buffer, const vk::MemoryRequirement requirement);
49 void                                                    beginCommandBuffer              (const vk::DeviceInterface& vk, const vk::VkCommandBuffer commandBuffer);
50 void                                                    submitCommandsAndWait   (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkQueue queue, const vk::VkCommandBuffer commandBuffer);
51
52 inline vk::Move<vk::VkBuffer> makeBuffer (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkBufferCreateInfo& createInfo)
53 {
54         return createBuffer(vk, device, &createInfo);
55 }
56
57 inline vk::Move<vk::VkImage> makeImage (const vk::DeviceInterface& vk, const vk::VkDevice device, const vk::VkImageCreateInfo& createInfo)
58 {
59         return createImage(vk, device, &createInfo);
60 }
61
62 } // FragmentOperations
63 } // vkt
64
65 #endif // _VKTFRAGMENTOPERATIONSMAKEUTIL_HPP