blob: 6bab12791685be7c7456b4feec9375720ca76e77 [file] [log] [blame]
Greg Daniel48cf2682016-02-22 09:11:32 -05001/*
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
17class GrNonInstancedVertices;
18class GrPipeline;
19class GrPrimitiveProcessor;
20class GrVkGpu;
21class GrVkRenderPass;
22
23class GrVkPipeline : public GrVkResource {
24public:
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,
32 VkPipelineLayout layout);
33
34 VkPipeline pipeline() const { return fPipeline; }
35
36private:
37 GrVkPipeline(VkPipeline pipeline) : INHERITED(), fPipeline(pipeline) {}
38
39 GrVkPipeline(const GrVkPipeline&);
40 GrVkPipeline& operator=(const GrVkPipeline&);
41
42 void freeGPUData(const GrVkGpu* gpu) const override;
43
44 VkPipeline fPipeline;
45
46 typedef GrVkResource INHERITED;
47};
48
49#endif