vulkan/wsi: Add drm_modifier member to wsi_image
authorDaniel Stone <daniels@collabora.com>
Fri, 9 Feb 2018 23:43:26 +0000 (15:43 -0800)
committerDaniel Stone <daniels@collabora.com>
Wed, 21 Feb 2018 22:37:10 +0000 (22:37 +0000)
Not yet used anywhere.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/vulkan/Makefile.am
src/vulkan/wsi/meson.build
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common_private.h

index 037436c1cd7dd9c24dd886ab9238c162d4007597..4fdaedf38c174f652e3b92ca4ec42cf9daa28e42 100644 (file)
@@ -36,6 +36,7 @@ libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES)
 AM_CPPFLAGS = \
        $(DEFINES) \
        -I$(top_srcdir)/include \
+       -I$(top_srcdir)/include/drm-uapi \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/vulkan/util \
        -I$(top_srcdir)/src/gallium/auxiliary \
index bd0fd3cc53e2cb6bbddfd214cecdef2f5ac4441d..66ccc8316ec625fc4afaf9499a2e57aa5f03cbba 100644 (file)
@@ -60,7 +60,7 @@ endif
 libvulkan_wsi = static_library(
   'vulkan_wsi',
   files_vulkan_wsi,
-  include_directories : [inc_common, inc_vulkan_util],
+  include_directories : [inc_common, inc_vulkan_util, inc_drm_uapi],
   dependencies : [vulkan_wsi_deps, dep_libdrm],
   c_args : [c_vis_args, vulkan_wsi_args],
   build_by_default : false,
index f257eb08755c1d68ee09ba8b8aac998fde08b942..c235128e562d0f429da7419fa576bcf54997063b 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "wsi_common_private.h"
+#include "drm_fourcc.h"
 #include "util/macros.h"
 #include "vk_util.h"
 
@@ -291,6 +292,7 @@ wsi_create_native_image(const struct wsi_swapchain *chain,
    if (result != VK_SUCCESS)
       goto fail;
 
+   image->drm_modifier = DRM_FORMAT_MOD_INVALID;
    image->num_planes = 1;
    image->sizes[0] = reqs.size;
    image->row_pitches[0] = image_layout.rowPitch;
@@ -494,6 +496,7 @@ wsi_create_prime_image(const struct wsi_swapchain *chain,
    if (result != VK_SUCCESS)
       goto fail;
 
+   image->drm_modifier = DRM_FORMAT_MOD_LINEAR;
    image->num_planes = 1;
    image->sizes[0] = linear_size;
    image->row_pitches[0] = linear_stride;
index c5002ec8ecaab6d4b5ed6d77fa4e48db9e84b1b4..781e84635f9d779db52f8d4b4c70044227e426e0 100644 (file)
@@ -35,6 +35,7 @@ struct wsi_image {
       VkCommandBuffer *blit_cmd_buffers;
    } prime;
 
+   uint64_t drm_modifier;
    int num_planes;
    uint32_t sizes[4];
    uint32_t offsets[4];