[Mesa-dev] [PATCH 10/16] vulkan/wsi: Add drm_modifier member to wsi_image
Jason Ekstrand
jason at jlekstrand.net
Fri Feb 9 23:43:26 UTC 2018
From: Daniel Stone <daniels at collabora.com>
Not yet used anywhere.
Signed-off-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/vulkan/Makefile.am | 1 +
src/vulkan/wsi/meson.build | 2 +-
src/vulkan/wsi/wsi_common.c | 3 +++
src/vulkan/wsi/wsi_common_private.h | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
index 037436c..4fdaedf 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -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 \
diff --git a/src/vulkan/wsi/meson.build b/src/vulkan/wsi/meson.build
index bd0fd3c..66ccc83 100644
--- a/src/vulkan/wsi/meson.build
+++ b/src/vulkan/wsi/meson.build
@@ -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,
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index 268a59a..9d65bbb 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -22,6 +22,7 @@
*/
#include "wsi_common_private.h"
+#include "drm_fourcc.h"
#include "util/macros.h"
#include "vk_util.h"
@@ -289,6 +290,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;
@@ -492,6 +494,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;
diff --git a/src/vulkan/wsi/wsi_common_private.h b/src/vulkan/wsi/wsi_common_private.h
index c5002ec..781e846 100644
--- a/src/vulkan/wsi/wsi_common_private.h
+++ b/src/vulkan/wsi/wsi_common_private.h
@@ -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];
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list