summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/Makefile.am3
-rw-r--r--src/intel/vulkan/anv_device.c3
-rw-r--r--src/intel/vulkan/anv_private.h1
-rw-r--r--src/intel/vulkan/anv_wsi.c2
-rw-r--r--src/intel/vulkan/anv_wsi_x11.c8
5 files changed, 12 insertions, 5 deletions
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index 4197b0e77c7..93f2ceb00f1 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -68,6 +68,7 @@ AM_CPPFLAGS += \
endif
AM_CPPFLAGS += \
+ $(LIBDRM_CFLAGS) \
$(INTEL_CFLAGS) \
$(VALGRIND_CFLAGS) \
$(DEFINES)
@@ -93,7 +94,7 @@ VULKAN_SOURCES = \
$(VULKAN_GENERATED_FILES) \
$(VULKAN_FILES)
-VULKAN_LIB_DEPS =
+VULKAN_LIB_DEPS = $(LIBDRM_LIBS)
if HAVE_PLATFORM_X11
AM_CPPFLAGS += \
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index cae5feff948..dd2a1ea34ad 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -202,7 +202,7 @@ anv_physical_device_init(struct anv_physical_device *device,
isl_device_init(&device->isl_dev, &device->info, swizzled);
- close(fd);
+ device->local_fd = fd;
return VK_SUCCESS;
fail:
@@ -215,6 +215,7 @@ anv_physical_device_finish(struct anv_physical_device *device)
{
anv_finish_wsi(device);
ralloc_free(device->compiler);
+ close(device->local_fd);
}
static const VkExtensionProperties global_extensions[] = {
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index da1ca29f64c..82e283171ef 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -532,6 +532,7 @@ struct anv_physical_device {
uint8_t uuid[VK_UUID_SIZE];
struct wsi_device wsi_device;
+ int local_fd;
};
struct anv_instance {
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 3a366988de8..a69a741723b 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -94,7 +94,7 @@ VkResult anv_GetPhysicalDeviceSurfaceSupportKHR(
return iface->get_support(surface, &device->wsi_device,
&device->instance->alloc,
- queueFamilyIndex, pSupported);
+ queueFamilyIndex, device->local_fd, pSupported);
}
VkResult anv_GetPhysicalDeviceSurfaceCapabilitiesKHR(
diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index 60bc568ab0c..30425096a99 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -41,7 +41,9 @@ VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
return wsi_get_physical_device_xcb_presentation_support(
&device->wsi_device,
&device->instance->alloc,
- queueFamilyIndex, connection, visual_id);
+ queueFamilyIndex,
+ device->local_fd,
+ connection, visual_id);
}
VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR(
@@ -55,7 +57,9 @@ VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR(
return wsi_get_physical_device_xcb_presentation_support(
&device->wsi_device,
&device->instance->alloc,
- queueFamilyIndex, XGetXCBConnection(dpy), visualID);
+ queueFamilyIndex,
+ device->local_fd,
+ XGetXCBConnection(dpy), visualID);
}
VkResult anv_CreateXcbSurfaceKHR(