Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.15k stars 516 forks source link

Wrong layer message in vkCreateSampler() #201

Closed maltekliemann closed 4 years ago

maltekliemann commented 4 years ago

In Texture mapping > Image view and sampler, section Anisotropy device feature, the expected validation layer message is:

validation layer: vkCreateSampler(): The samplerAnisotropy feature is not enabled, so the maxAnisotropy field of the `vkSamplerCreateInfo` structure must be 1.0 but is 16.0

However, "[i]f anisotropyEnable is VK_FALSE, maxAnisotropy is ignored" (Chapter 12 of the specification). So the validation layers should never have raised (see KhronosGroup/Vulkan-Docs#503). As of Vulkan 1.0.65, the validation layers show the correct warning:

validation layer: vkCreateSampler(): Anisotropic sampling feature is not enabled, pCreateInfo->anisotropyEnable must be VK_FALSE. The Vulkan spec states: If the anisotropic sampling feature is not enabled, anisotropyEnable must be VK_FALSE (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSamplerCreateInfo-anisotropyEnable-01070)