1 #ifndef DALI_GRAPHICS_VULKAN_PIPELINE
2 #define DALI_GRAPHICS_VULKAN_PIPELINE
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/graphics/vulkan/vulkan-types.h>
23 #include <dali/graphics/vulkan/vulkan-shader.h>
32 class Pipeline : public VkManaged
37 * Creates immutable Pipeline object ( verified resources for tracking )
42 static Handle<Pipeline> New( Graphics& graphics, const vk::GraphicsPipelineCreateInfo& info );
56 void SetViewport( float x, float y, float width, float height );
59 * Attaches A shader module to the particular stage of pipeline
64 bool SetShader( ShaderRef shader, Shader::Type stage );
71 void SetVertexInputState(std::vector<vk::VertexInputAttributeDescription> attrDesc,
72 std::vector<vk::VertexInputBindingDescription> bindingDesc);
77 * @param restartEnable
79 void SetInputAssemblyState( vk::PrimitiveTopology topology, bool restartEnable );
88 Pipeline( Graphics& graphics, const vk::GraphicsPipelineCreateInfo& info );
93 * Returns Vulkan VkPipeline object associated with Pipeline
96 vk::Pipeline GetVkPipeline() const;
99 * Returns Vulkan VkPipelineLayout object associated with Pipeline
102 vk::PipelineLayout GetVkPipelineLayout() const;
104 bool OnDestroy() override;
108 std::unique_ptr<Impl> mImpl;
111 using PipelineRef = Handle<Pipeline>;
113 } // Namespace Vulkan
115 } // Namespace Graphics
119 #endif // DALI_GRAPHICS_VULKAN_PIPELINE