41 {
42 static VkFilter vkMinFilterModes[] = {
46 };
47 static VkFilter vkMagFilterModes[] = {
51 };
52
56 createInfo.
pNext =
nullptr;
58 createInfo.
magFilter = vkMagFilterModes[
static_cast<int>(samplerState.
filter())];
59 createInfo.
minFilter = vkMinFilterModes[
static_cast<int>(samplerState.
filter())];
70
71
72
73
74
77 createInfo.
maxLod = !useMipMaps ? 0.0f : 10000.0f;
80
85
86 ycbcrConversion =
88 if (!ycbcrConversion) {
89 return nullptr;
90 }
91
93 conversionInfo.
pNext =
nullptr;
95
96 createInfo.
pNext = &conversionInfo;
97
103
104
105
106
107
109 }
113 }
114
115
121 }
122
127 ycbcrConversion->
unref();
128 return nullptr;
129 }
130
132}
static VkSamplerMipmapMode mipmap_mode_to_vk_sampler_mipmap_mode(GrSamplerState::MipmapMode mm)
static VkSamplerAddressMode wrap_mode_to_vk_sampler_address(GrSamplerState::WrapMode wrapMode)
#define GR_VK_CALL_RESULT(GPU, RESULT, X)
static constexpr bool SkToBool(const T &x)
constexpr skgpu::Mipmapped mipmapped() const
constexpr WrapMode wrapModeX() const
constexpr Filter filter() const
constexpr MipmapMode mipmapMode() const
constexpr WrapMode wrapModeY() const
bool supportsYcbcrConversion() const
float maxSamplerAnisotropy() const
const GrVkCaps & vkCaps() const
GrVkResourceProvider & resourceProvider()
GrVkSamplerYcbcrConversion * findOrCreateCompatibleSamplerYcbcrConversion(const skgpu::VulkanYcbcrConversionInfo &ycbcrInfo)
VkSamplerYcbcrConversion ycbcrConversion() const
VkSampler sampler() const
static SK_END_REQUIRE_DENSE Key GenerateKey(GrSamplerState, const skgpu::VulkanYcbcrConversionInfo &)
FlutterSemanticsFlag flags
static float min(float r, float g, float b)
static vk::UniqueSampler CreateSampler(const vk::Device &device, const SamplerDescriptor &desc, const std::shared_ptr< YUVConversionVK > &yuv_conversion)
VkBool32 unnormalizedCoordinates
VkSamplerAddressMode addressModeU
VkBool32 anisotropyEnable
VkBorderColor borderColor
VkSamplerMipmapMode mipmapMode
VkSamplerAddressMode addressModeW
VkSamplerCreateFlags flags
VkSamplerAddressMode addressModeV
VkSamplerYcbcrConversion conversion
VkFormatFeatureFlags fFormatFeatures
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
@ VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT
@ VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK
VkFlags VkFormatFeatureFlags
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
@ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO
@ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO