From: Jason Ekstrand Date: Tue, 28 Nov 2017 17:28:12 +0000 (-0800) Subject: anv/image: Add a drm_format_mod field X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d19e570e141c66867f463c75fa34f265a9f5c50;p=mesa.git anv/image: Add a drm_format_mod field At the moment, this is always initialized to DRM_FORMAT_MOD_INVALID. Reviewed-by: Dave Airlie Reviewed-by: Chad Versace --- diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index ba932ba47c3..5c63d676d6a 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "anv_private.h" #include "util/debug.h" @@ -527,6 +528,7 @@ anv_image_create(VkDevice _device, image->samples = pCreateInfo->samples; image->usage = pCreateInfo->usage; image->tiling = pCreateInfo->tiling; + image->drm_format_mod = DRM_FORMAT_MOD_INVALID; image->disjoint = pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT_KHR; const struct anv_format *format = anv_get_format(image->vk_format); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index ca3644d61e9..b7bde4b8ce6 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -2345,6 +2345,11 @@ struct anv_image { VkImageUsageFlags usage; /**< Superset of VkImageCreateInfo::usage. */ VkImageTiling tiling; /** VkImageCreateInfo::tiling */ + /** + * DRM format modifier for this image or DRM_FORMAT_MOD_INVALID. + */ + uint64_t drm_format_mod; + VkDeviceSize size; uint32_t alignment;