blob: d3212cbc538dec45596f3b75c223251896c8d547 [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 GrVkSampler_DEFINED
9#define GrVkSampler_DEFINED
10
11#include "GrVkResource.h"
12
13#include "vulkan/vulkan.h"
14
15class GrTextureAccess;
16class GrVkGpu;
17
18
19class GrVkSampler : public GrVkResource {
20public:
21 static GrVkSampler* Create(const GrVkGpu* gpu, const GrTextureAccess& textureAccess);
22
23 VkSampler sampler() const { return fSampler; }
24
25private:
26 GrVkSampler(VkSampler sampler) : INHERITED(), fSampler(sampler) {}
27
28 void freeGPUData(const GrVkGpu* gpu) const override;
29
30 VkSampler fSampler;
31
32 typedef GrVkResource INHERITED;
33};
34
35#endif