Mesa (main): turnip: Set drmFormatModifierTilingFeatures
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Feb 28 23:32:23 UTC 2022
Module: Mesa
Branch: main
Commit: 95fabff8dea94eb8dfb49871034df8fc390d0e68
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=95fabff8dea94eb8dfb49871034df8fc390d0e68
Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date: Tue Feb 15 17:08:14 2022 +0200
turnip: Set drmFormatModifierTilingFeatures
>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 at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15032>
---
src/freedreno/vulkan/tu_formats.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c
index 4ebc8ebcd5e..536bff0a57f 100644
--- a/src/freedreno/vulkan/tu_formats.c
+++ b/src/freedreno/vulkan/tu_formats.c
@@ -317,6 +317,8 @@ tu_GetPhysicalDeviceFormatProperties2(
vk_outarray_append(&out, mod_props) {
mod_props->drmFormatModifier = DRM_FORMAT_MOD_LINEAR;
mod_props->drmFormatModifierPlaneCount = 1;
+ mod_props->drmFormatModifierTilingFeatures =
+ pFormatProperties->formatProperties.linearTilingFeatures;
}
}
@@ -327,6 +329,8 @@ tu_GetPhysicalDeviceFormatProperties2(
vk_outarray_append(&out, mod_props) {
mod_props->drmFormatModifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
mod_props->drmFormatModifierPlaneCount = 1;
+ mod_props->drmFormatModifierTilingFeatures =
+ pFormatProperties->formatProperties.optimalTilingFeatures;
}
}
}
More information about the mesa-commit
mailing list