42 static VkFilter vkMinFilterModes[] = {
47 static VkFilter vkMagFilterModes[] = {
56 createInfo.
pNext =
nullptr;
58 createInfo.
magFilter = vkMagFilterModes[
static_cast<int>(samplerState.
filter())];
59 createInfo.
minFilter = vkMinFilterModes[
static_cast<int>(samplerState.
filter())];
77 createInfo.
maxLod = !useMipMaps ? 0.0f : 10000.0f;
88 if (!ycbcrConversion) {
93 conversionInfo.
pNext =
nullptr;
96 createInfo.
pNext = &conversionInfo;
127 ycbcrConversion->
unref();
134void GrVkSampler::freeGPUData()
const {
137 if (fYcbcrConversion) {
138 fYcbcrConversion->
unref();
146 return {samplerState.
asKey(
true),
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(IFACE, X)
#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
uint32_t asKey(bool anisoIsOrthogonal) const
constexpr MipmapMode mipmapMode() const
constexpr WrapMode wrapModeY() const
bool supportsYcbcrConversion() const
float maxSamplerAnisotropy() const
const GrVkCaps & vkCaps() const
const skgpu::VulkanInterface * vkInterface() const
GrVkResourceProvider & resourceProvider()
GrVkSamplerYcbcrConversion * findOrCreateCompatibleSamplerYcbcrConversion(const skgpu::VulkanYcbcrConversionInfo &ycbcrInfo)
VkSamplerYcbcrConversion ycbcrConversion() const
static SK_END_REQUIRE_DENSE Key GenerateKey(const skgpu::VulkanYcbcrConversionInfo &ycbcrInfo)
VkSampler sampler() const
static GrVkSampler * Create(GrVkGpu *gpu, GrSamplerState, const skgpu::VulkanYcbcrConversionInfo &)
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
@ VK_SAMPLER_MIPMAP_MODE_NEAREST
@ VK_SAMPLER_MIPMAP_MODE_LINEAR
VkFlags VkFormatFeatureFlags
@ VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
@ VK_SAMPLER_ADDRESS_MODE_REPEAT
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
@ VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
@ VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO
@ VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO