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 <robdclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31453>
This commit is contained in:
Craig Stout 2024-08-23 15:07:10 -07:00 committed by Marge Bot
parent 38ba3ea469
commit e2388350f2

View file

@ -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;