mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
comp: Fix build when VK_USE_PLATFORM_XLIB_XRANDR_EXT is not defined
This commit is contained in:
parent
358cde31b7
commit
682f41a37c
|
@ -45,6 +45,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "os/os_time.h"
|
#include "os/os_time.h"
|
||||||
|
|
||||||
|
@ -540,6 +541,7 @@ compositor_check_vulkan_caps(struct comp_compositor *c)
|
||||||
|
|
||||||
bool nvidia_tests_passed = false;
|
bool nvidia_tests_passed = false;
|
||||||
|
|
||||||
|
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||||
VkPhysicalDeviceProperties physical_device_properties;
|
VkPhysicalDeviceProperties physical_device_properties;
|
||||||
temp_vk.vkGetPhysicalDeviceProperties(temp_vk.physical_device,
|
temp_vk.vkGetPhysicalDeviceProperties(temp_vk.physical_device,
|
||||||
&physical_device_properties);
|
&physical_device_properties);
|
||||||
|
@ -598,6 +600,7 @@ compositor_check_vulkan_caps(struct comp_compositor *c)
|
||||||
|
|
||||||
free(display_props);
|
free(display_props);
|
||||||
}
|
}
|
||||||
|
#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||||
|
|
||||||
if (nvidia_tests_passed) {
|
if (nvidia_tests_passed) {
|
||||||
c->settings.window_type = WINDOW_DIRECT_NVIDIA;
|
c->settings.window_type = WINDOW_DIRECT_NVIDIA;
|
||||||
|
@ -697,7 +700,13 @@ compositor_init_window_post_vulkan(struct comp_compositor *c)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||||
return compositor_try_window(c, comp_window_direct_create(c));
|
return compositor_try_window(c, comp_window_direct_create(c));
|
||||||
|
#else
|
||||||
|
assert(false &&
|
||||||
|
"NVIDIA direct mode depends on the xlib/xrandr direct mode.");
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue