1 // 2 // Copyright 2016 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // SamplerVk.h: 7 // Defines the class interface for SamplerVk, implementing SamplerImpl. 8 // 9 10 #ifndef LIBANGLE_RENDERER_VULKAN_SAMPLERVK_H_ 11 #define LIBANGLE_RENDERER_VULKAN_SAMPLERVK_H_ 12 13 #include "libANGLE/renderer/SamplerImpl.h" 14 #include "libANGLE/renderer/vulkan/ContextVk.h" 15 #include "libANGLE/renderer/vulkan/vk_helpers.h" 16 17 namespace rx 18 { 19 20 class SamplerVk : public SamplerImpl 21 { 22 public: 23 SamplerVk(const gl::SamplerState &state); 24 ~SamplerVk() override; 25 26 void onDestroy(const gl::Context *context) override; 27 angle::Result syncState(const gl::Context *context, const bool dirty) override; 28 getSampler()29 const vk::SamplerHelper &getSampler() const 30 { 31 ASSERT(mSampler.valid()); 32 return mSampler.get(); 33 } 34 35 private: 36 vk::SamplerBinding mSampler; 37 }; 38 39 } // namespace rx 40 41 #endif // LIBANGLE_RENDERER_VULKAN_SAMPLERVK_H_ 42