diff options
author | Mary Guillemard <mary.guillemard@collabora.com> | 2024-06-26 09:41:43 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-06-26 16:33:41 +0000 |
commit | 111088a6dbf3b4a6791249d4452efc9e9829426f (patch) | |
tree | 1e0c84489e316307334fbf7ac979f9087a359264 /src/panfrost | |
parent | 8b8eb7f3f4930f05239397f2b6a2f917b8f5b5b3 (diff) |
panvk: Implement and advertise anisotropy support
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/vulkan/panvk_physical_device.c | 1 | ||||
-rw-r--r-- | src/panfrost/vulkan/panvk_vX_sampler.c | 5 |
2 files changed, 6 insertions, 0 deletions
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); |