From e2388350f2d5b3aaa5f004c9f97b120a76666d3e Mon Sep 17 00:00:00 2001 From: Craig Stout Date: Fri, 23 Aug 2024 15:07:10 -0700 Subject: [PATCH] tu: add OS guards to drm_format_mod vk_image.h has these guards, and any non-{Linux}/{BSD} compile would hit this issue. The alternative is just to remove the OS-specific guards in vk_image.h, since the modifier is just 64-bit opaque number and theoretically can work on any OS, though the non-Linux spec language is lacking. Acked-by: Rob Clark Part-of: --- src/freedreno/vulkan/tu_image.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/freedreno/vulkan/tu_image.cc b/src/freedreno/vulkan/tu_image.cc index d72b5a59549..072a8183bab 100644 --- a/src/freedreno/vulkan/tu_image.cc +++ b/src/freedreno/vulkan/tu_image.cc @@ -474,7 +474,9 @@ tu_image_update_layout(struct tu_device *device, struct tu_image *image, uint64_t modifier, const VkSubresourceLayout *plane_layouts) { enum a6xx_tile_mode tile_mode = TILE6_3; +#if DETECT_OS_LINUX || DETECT_OS_BSD image->vk.drm_format_mod = modifier; +#endif if (modifier == DRM_FORMAT_MOD_LINEAR) { image->force_linear_tile = true;