Vulkan图像视图功能标志



我得到这个验证消息

If a VkSampler created with magFilter or minFilter equal to VK_FILTER_LINEAR and compareEnable equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view's format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT

但我不知道如何设置图像视图格式功能。有什么想法吗?

消息告诉您正在使用线性采样器(magFilter或minFilter为VK_FILTER_linear(从格式不具有VK_format_FEATURE_AMPLED_image_FILTER_LINKER_BIT功能的图像视图中采样。

有两种方法可以解决这个问题:

  1. 使用不同的采样器。如果不需要线性滤波,可以使用点采样器。

  2. 使用不同的图像视图格式。如果你需要线性过滤,你可以使用支持它的格式

最新更新