blob: a5c14ee4b2cc8e130553316cc27db5fd9b2a78b1 [file] [log] [blame]
egdaniel12c75632016-09-19 13:39:34 -07001/*
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 GrVkCopyPipeline_DEFINED
9#define GrVkCopyPipeline_DEFINED
10
11#include "GrVkPipeline.h"
12
13class GrVkCopyPipeline : public GrVkPipeline {
14public:
15 // We expect the passed in renderPass to be stored on the GrVkResourceProvider and not a local
16 // object of the client.
17 static GrVkCopyPipeline* Create(GrVkGpu* gpu,
18 VkPipelineShaderStageCreateInfo* shaderStageInfo,
19 VkPipelineLayout pipelineLayout,
20 int numSamples,
21 const GrVkRenderPass& renderPass,
22 VkPipelineCache cache);
23
24 bool isCompatible(const GrVkRenderPass& rp) const;
25
26#ifdef SK_TRACE_VK_RESOURCES
27 void dumpInfo() const override {
28 SkDebugf("GrVkCopyPipeline: %d (%d refs)\n", fPipeline, this->getRefCnt());
29 }
30#endif
31
32private:
33 GrVkCopyPipeline(VkPipeline pipeline, const GrVkRenderPass* renderPass)
34 : INHERITED(pipeline)
35 , fRenderPass(renderPass) {
36 }
37
38 const GrVkRenderPass* fRenderPass;
39
40 typedef GrVkPipeline INHERITED;
41};
42
43#endif