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>
This commit is contained in:
Mary Guillemard 2024-06-26 09:41:43 +02:00 committed by Marge Bot
parent 8b8eb7f3f4
commit 111088a6db
2 changed files with 6 additions and 0 deletions

View file

@ -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,

View file

@ -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);