From Vulkan spec for VkDrmFormatModifierProperties2EXT:
"drmFormatModifierTilingFeatures is a bitmask of VkFormatFeatureFlagBits
that are supported by any image created with format and drmFormatModifier."
"The returned drmFormatModifierTilingFeatures must contain at least one bit."
"Therefore, if the returned drmFormatModifier is DRM_FORMAT_MOD_LINEAR,
then drmFormatModifierPlaneCount must equal the format planecount, and
drmFormatModifierTilingFeatures must be identical to the
VkFormatProperties2::linearTilingFeatures returned in the same pNext chain."
Relevant tests: dEQP-VK.drm_format_modifiers.*
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15032>
vk_outarray_append(&out, mod_props) {
mod_props->drmFormatModifier = DRM_FORMAT_MOD_LINEAR;
mod_props->drmFormatModifierPlaneCount = 1;
+ mod_props->drmFormatModifierTilingFeatures =
+ pFormatProperties->formatProperties.linearTilingFeatures;
}
}
vk_outarray_append(&out, mod_props) {
mod_props->drmFormatModifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
mod_props->drmFormatModifierPlaneCount = 1;
+ mod_props->drmFormatModifierTilingFeatures =
+ pFormatProperties->formatProperties.optimalTilingFeatures;
}
}
}