anv/image: Add a drm_format_mod field
At the moment, this is always initialized to DRM_FORMAT_MOD_INVALID. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Chad Versace <chadversary@chromium.org>
This commit is contained in:
parent
546e747867
commit
7d19e570e1
|
@ -27,6 +27,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#include <drm_fourcc.h>
|
||||||
|
|
||||||
#include "anv_private.h"
|
#include "anv_private.h"
|
||||||
#include "util/debug.h"
|
#include "util/debug.h"
|
||||||
|
@ -527,6 +528,7 @@ anv_image_create(VkDevice _device,
|
||||||
image->samples = pCreateInfo->samples;
|
image->samples = pCreateInfo->samples;
|
||||||
image->usage = pCreateInfo->usage;
|
image->usage = pCreateInfo->usage;
|
||||||
image->tiling = pCreateInfo->tiling;
|
image->tiling = pCreateInfo->tiling;
|
||||||
|
image->drm_format_mod = DRM_FORMAT_MOD_INVALID;
|
||||||
image->disjoint = pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT_KHR;
|
image->disjoint = pCreateInfo->flags & VK_IMAGE_CREATE_DISJOINT_BIT_KHR;
|
||||||
|
|
||||||
const struct anv_format *format = anv_get_format(image->vk_format);
|
const struct anv_format *format = anv_get_format(image->vk_format);
|
||||||
|
|
|
@ -2345,6 +2345,11 @@ struct anv_image {
|
||||||
VkImageUsageFlags usage; /**< Superset of VkImageCreateInfo::usage. */
|
VkImageUsageFlags usage; /**< Superset of VkImageCreateInfo::usage. */
|
||||||
VkImageTiling tiling; /** VkImageCreateInfo::tiling */
|
VkImageTiling tiling; /** VkImageCreateInfo::tiling */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DRM format modifier for this image or DRM_FORMAT_MOD_INVALID.
|
||||||
|
*/
|
||||||
|
uint64_t drm_format_mod;
|
||||||
|
|
||||||
VkDeviceSize size;
|
VkDeviceSize size;
|
||||||
uint32_t alignment;
|
uint32_t alignment;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue