summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-11-28 09:28:12 -0800
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commit7d19e570e141c66867f463c75fa34f265a9f5c50 (patch)
treec562c2f76f45d79ce7bb79762bfe0f73b0afeaa9 /src
parent546e747867c91a0738a145ff5bc0825f4afac1a3 (diff)
anv/image: Add a drm_format_mod field
At the moment, this is always initialized to DRM_FORMAT_MOD_INVALID. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-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;