1/*------------------------------------------------------------------------ 2 * Vulkan Conformance Tests 3 * ------------------------ 4 * 5 * Copyright (c) 2016 The Khronos Group Inc. 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 *//*! 20 * \file 21 * \brief Object creation utilities 22 *//*--------------------------------------------------------------------*/ 23 24#include "vktFragmentOperationsMakeUtil.hpp" 25#include "vkTypeUtil.hpp" 26#include "vkPrograms.hpp" 27#include "vkQueryUtil.hpp" 28#include "vkCmdUtil.hpp" 29#include <vector> 30 31namespace vkt 32{ 33namespace FragmentOperations 34{ 35using namespace vk; 36using de::MovePtr; 37 38Move<VkPipeline> makeComputePipeline (const DeviceInterface& vk, 39 const VkDevice device, 40 const VkPipelineLayout pipelineLayout, 41 const VkShaderModule shaderModule, 42 const VkSpecializationInfo* specInfo) 43{ 44 const VkPipelineShaderStageCreateInfo shaderStageInfo = 45 { 46 VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, // VkStructureType sType; 47 DE_NULL, // const void* pNext; 48 (VkPipelineShaderStageCreateFlags)0, // VkPipelineShaderStageCreateFlags flags; 49 VK_SHADER_STAGE_COMPUTE_BIT, // VkShaderStageFlagBits stage; 50 shaderModule, // VkShaderModule module; 51 "main", // const char* pName; 52 specInfo, // const VkSpecializationInfo* pSpecializationInfo; 53 }; 54 const VkComputePipelineCreateInfo pipelineInfo = 55 { 56 VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, // VkStructureType sType; 57 DE_NULL, // const void* pNext; 58 (VkPipelineCreateFlags)0, // VkPipelineCreateFlags flags; 59 shaderStageInfo, // VkPipelineShaderStageCreateInfo stage; 60 pipelineLayout, // VkPipelineLayout layout; 61 DE_NULL, // VkPipeline basePipelineHandle; 62 0, // deInt32 basePipelineIndex; 63 }; 64 return createComputePipeline(vk, device, DE_NULL , &pipelineInfo); 65} 66 67} // FragmentOperations 68} // vkt 69