If anisotropyEnable is VK_TRUE, maxAnisotropy must be between 1.0 and VkPhysicalDeviceLimits::maxSamplerAnisotropy`, inclusive
So it should either be maxSamplerAnisotropy = properties.limits.maxSamplerAnisotropy (assuming 16.0f is the maximum), or you check during physical device selection if 16.0f is available. The former makes a lot more sense to me, but I wasn't sure which one you would prefer.
In Texture mapping > Image view and sampler, you're using a fixed
maxSamplerAnisotropy = 16.0f
. But VUID-VkSamplerCreateInfo-anisotropyEnable-01071 of Vulkan 1.2 states:So it should either be
maxSamplerAnisotropy = properties.limits.maxSamplerAnisotropy
(assuming16.0f
is the maximum), or you check during physical device selection if16.0f
is available. The former makes a lot more sense to me, but I wasn't sure which one you would prefer.