1*8975f5c5SAndroid Build Coastguard Worker // 2*8975f5c5SAndroid Build Coastguard Worker // Copyright 2021 The ANGLE Project Authors. All rights reserved. 3*8975f5c5SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 4*8975f5c5SAndroid Build Coastguard Worker // found in the LICENSE file. 5*8975f5c5SAndroid Build Coastguard Worker // 6*8975f5c5SAndroid Build Coastguard Worker // CLSamplerVk.h: Defines the class interface for CLSamplerVk, implementing CLSamplerImpl. 7*8975f5c5SAndroid Build Coastguard Worker 8*8975f5c5SAndroid Build Coastguard Worker #ifndef LIBANGLE_RENDERER_VULKAN_CLSAMPLERVK_H_ 9*8975f5c5SAndroid Build Coastguard Worker #define LIBANGLE_RENDERER_VULKAN_CLSAMPLERVK_H_ 10*8975f5c5SAndroid Build Coastguard Worker 11*8975f5c5SAndroid Build Coastguard Worker #include "clspv/Sampler.h" 12*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/CLSamplerImpl.h" 13*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/vulkan/cl_types.h" 14*8975f5c5SAndroid Build Coastguard Worker #include "libANGLE/renderer/vulkan/vk_cache_utils.h" 15*8975f5c5SAndroid Build Coastguard Worker #include "vulkan/vulkan_core.h" 16*8975f5c5SAndroid Build Coastguard Worker 17*8975f5c5SAndroid Build Coastguard Worker namespace rx 18*8975f5c5SAndroid Build Coastguard Worker { 19*8975f5c5SAndroid Build Coastguard Worker 20*8975f5c5SAndroid Build Coastguard Worker class CLSamplerVk : public CLSamplerImpl 21*8975f5c5SAndroid Build Coastguard Worker { 22*8975f5c5SAndroid Build Coastguard Worker public: 23*8975f5c5SAndroid Build Coastguard Worker CLSamplerVk(const cl::Sampler &sampler); 24*8975f5c5SAndroid Build Coastguard Worker ~CLSamplerVk() override; 25*8975f5c5SAndroid Build Coastguard Worker getSamplerHelper()26*8975f5c5SAndroid Build Coastguard Worker vk::SamplerHelper &getSamplerHelper() { return mSamplerHelper; } getSamplerHelperNormalized()27*8975f5c5SAndroid Build Coastguard Worker vk::SamplerHelper &getSamplerHelperNormalized() { return mSamplerHelperNormalized; } 28*8975f5c5SAndroid Build Coastguard Worker angle::Result create(); 29*8975f5c5SAndroid Build Coastguard Worker angle::Result createNormalized(); 30*8975f5c5SAndroid Build Coastguard Worker 31*8975f5c5SAndroid Build Coastguard Worker VkSamplerAddressMode getVkAddressMode(); 32*8975f5c5SAndroid Build Coastguard Worker VkFilter getVkFilter(); 33*8975f5c5SAndroid Build Coastguard Worker VkSamplerMipmapMode getVkMipmapMode(); 34*8975f5c5SAndroid Build Coastguard Worker uint32_t getSamplerMask(); 35*8975f5c5SAndroid Build Coastguard Worker 36*8975f5c5SAndroid Build Coastguard Worker private: 37*8975f5c5SAndroid Build Coastguard Worker CLContextVk *mContext; 38*8975f5c5SAndroid Build Coastguard Worker vk::Renderer *mRenderer; 39*8975f5c5SAndroid Build Coastguard Worker 40*8975f5c5SAndroid Build Coastguard Worker vk::SamplerHelper mSamplerHelper; 41*8975f5c5SAndroid Build Coastguard Worker vk::SamplerHelper mSamplerHelperNormalized; 42*8975f5c5SAndroid Build Coastguard Worker VkSamplerCreateInfo mDefaultSamplerCreateInfo; 43*8975f5c5SAndroid Build Coastguard Worker }; 44*8975f5c5SAndroid Build Coastguard Worker 45*8975f5c5SAndroid Build Coastguard Worker } // namespace rx 46*8975f5c5SAndroid Build Coastguard Worker 47*8975f5c5SAndroid Build Coastguard Worker #endif // LIBANGLE_RENDERER_VULKAN_CLSAMPLERVK_H_ 48