summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/vulkan/anv_image.c2
-rw-r--r--src/intel/vulkan/anv_private.h5
2 files changed, 7 insertions, 0 deletions
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 <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
+#include <drm_fourcc.h>
#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;