Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrVkPipeline_DEFINED |
| 9 | #define GrVkPipeline_DEFINED |
| 10 | |
| 11 | #include "GrTypes.h" |
| 12 | |
| 13 | #include "GrVkResource.h" |
| 14 | |
| 15 | #include "vulkan/vulkan.h" |
| 16 | |
| 17 | class GrNonInstancedVertices; |
| 18 | class GrPipeline; |
| 19 | class GrPrimitiveProcessor; |
| 20 | class GrVkGpu; |
| 21 | class GrVkRenderPass; |
| 22 | |
| 23 | class GrVkPipeline : public GrVkResource { |
| 24 | public: |
| 25 | static GrVkPipeline* Create(GrVkGpu* gpu, |
| 26 | const GrPipeline& pipeline, |
| 27 | const GrPrimitiveProcessor& primProc, |
| 28 | VkPipelineShaderStageCreateInfo* shaderStageInfo, |
| 29 | int shaderStageCount, |
| 30 | GrPrimitiveType primitiveType, |
| 31 | const GrVkRenderPass& renderPass, |
jvanverth | 03509ea | 2016-03-02 13:19:47 -0800 | [diff] [blame^] | 32 | VkPipelineLayout layout, |
| 33 | VkPipelineCache cache); |
Greg Daniel | 164a9f0 | 2016-02-22 09:56:40 -0500 | [diff] [blame] | 34 | |
| 35 | VkPipeline pipeline() const { return fPipeline; } |
| 36 | |
| 37 | private: |
| 38 | GrVkPipeline(VkPipeline pipeline) : INHERITED(), fPipeline(pipeline) {} |
| 39 | |
| 40 | GrVkPipeline(const GrVkPipeline&); |
| 41 | GrVkPipeline& operator=(const GrVkPipeline&); |
| 42 | |
| 43 | void freeGPUData(const GrVkGpu* gpu) const override; |
| 44 | |
| 45 | VkPipeline fPipeline; |
| 46 | |
| 47 | typedef GrVkResource INHERITED; |
| 48 | }; |
| 49 | |
| 50 | #endif |