diff --git a/src/panfrost/vulkan/panvk_physical_device.c b/src/panfrost/vulkan/panvk_physical_device.c index 791a9dd0aa7..f27db154c63 100644 --- a/src/panfrost/vulkan/panvk_physical_device.c +++ b/src/panfrost/vulkan/panvk_physical_device.c @@ -107,6 +107,7 @@ get_features(const struct panvk_physical_device *device, .largePoints = true, .textureCompressionETC2 = true, .textureCompressionASTC_LDR = true, + .samplerAnisotropy = true, .shaderUniformBufferArrayDynamicIndexing = true, .shaderSampledImageArrayDynamicIndexing = true, .shaderStorageBufferArrayDynamicIndexing = true, diff --git a/src/panfrost/vulkan/panvk_vX_sampler.c b/src/panfrost/vulkan/panvk_vX_sampler.c index 8be4742deba..57eb39c9f06 100644 --- a/src/panfrost/vulkan/panvk_vX_sampler.c +++ b/src/panfrost/vulkan/panvk_vX_sampler.c @@ -135,6 +135,11 @@ panvk_per_arch(CreateSampler)(VkDevice _device, cfg.border_color_g = border_color.uint32[1]; cfg.border_color_b = border_color.uint32[2]; cfg.border_color_a = border_color.uint32[3]; + + if (pCreateInfo->anisotropyEnable && pCreateInfo->maxAnisotropy > 1) { + cfg.maximum_anisotropy = pCreateInfo->maxAnisotropy; + cfg.lod_algorithm = MALI_LOD_ALGORITHM_ANISOTROPIC; + } } *pSampler = panvk_sampler_to_handle(sampler);