summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/vulkan/tu_formats.c15
-rw-r--r--src/freedreno/vulkan/tu_image.c11
2 files changed, 14 insertions, 12 deletions
diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c
index a0a18c1728d..1f5dfc4a232 100644
--- a/src/freedreno/vulkan/tu_formats.c
+++ b/src/freedreno/vulkan/tu_formats.c
@@ -786,20 +786,21 @@ tu_GetPhysicalDeviceFormatProperties2(
tu_physical_device_get_format_properties(
physical_device, format, &pFormatProperties->formatProperties);
- struct wsi_format_modifier_properties_list *list =
- vk_find_struct(pFormatProperties->pNext, WSI_FORMAT_MODIFIER_PROPERTIES_LIST_MESA);
+ VkDrmFormatModifierPropertiesListEXT *list =
+ vk_find_struct(pFormatProperties->pNext, DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT);
if (list) {
- VK_OUTARRAY_MAKE(out, list->modifier_properties, &list->modifier_count);
+ VK_OUTARRAY_MAKE(out, list->pDrmFormatModifierProperties,
+ &list->drmFormatModifierCount);
vk_outarray_append(&out, mod_props) {
- mod_props->modifier = DRM_FORMAT_MOD_LINEAR;
- mod_props->modifier_plane_count = 1;
+ mod_props->drmFormatModifier = DRM_FORMAT_MOD_LINEAR;
+ mod_props->drmFormatModifierPlaneCount = 1;
}
/* TODO: any cases where this should be disabled? */
vk_outarray_append(&out, mod_props) {
- mod_props->modifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
- mod_props->modifier_plane_count = 1;
+ mod_props->drmFormatModifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
+ mod_props->drmFormatModifierPlaneCount = 1;
}
}
}
diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 83e0d9e9b2a..1f4c454299d 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -346,14 +346,15 @@ tu_CreateImage(VkDevice device,
pAllocator, pImage);
#endif
- const struct wsi_image_create_info *wsi_info =
- vk_find_struct_const(pCreateInfo->pNext, WSI_IMAGE_CREATE_INFO_MESA);
uint64_t modifier = DRM_FORMAT_MOD_INVALID;
+ if (pCreateInfo->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
+ const VkImageDrmFormatModifierListCreateInfoEXT *mod_info =
+ vk_find_struct_const(pCreateInfo->pNext,
+ IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT);
- if (wsi_info) {
modifier = DRM_FORMAT_MOD_LINEAR;
- for (unsigned i = 0; i < wsi_info->modifier_count; i++) {
- if (wsi_info->modifiers[i] == DRM_FORMAT_MOD_QCOM_COMPRESSED)
+ for (unsigned i = 0; i < mod_info->drmFormatModifierCount; i++) {
+ if (mod_info->pDrmFormatModifiers[i] == DRM_FORMAT_MOD_QCOM_COMPRESSED)
modifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
}
}