On 11 August 2016 at 23:26, Kevin Strasser <[email protected]> wrote: > Some applications continue to use the Xlib client library and expect that > VK_KHR_xlib_surface will be available in the driver. Service these > applications by converting the Display pointer to xcb_connection_t and use > the existing xcb code in the driver. > > Signed-off-by: Kevin Strasser <[email protected]> > Cc: Jason Ekstrand <[email protected]> > --- > src/intel/vulkan/Makefile.am | 7 ++-- > src/intel/vulkan/anv_device.c | 6 +++ > src/intel/vulkan/anv_wsi_x11.c | 87 > ++++++++++++++++++++++++++++++++++++------ > 3 files changed, 86 insertions(+), 14 deletions(-) > > diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am > index fe7371e..73db8f5 100644 > --- a/src/intel/vulkan/Makefile.am > +++ b/src/intel/vulkan/Makefile.am > @@ -85,7 +85,8 @@ VULKAN_LIB_DEPS = > if HAVE_PLATFORM_X11 > AM_CPPFLAGS += \ > $(XCB_DRI3_CFLAGS) \ > - -DVK_USE_PLATFORM_XCB_KHR > + -DVK_USE_PLATFORM_XCB_KHR \ > + -DVK_USE_PLATFORM_XLIB_KHR > > VULKAN_SOURCES += $(VULKAN_WSI_X11_FILES) > VULKAN_LIB_DEPS += $(XCB_DRI3_LIBS) > @@ -145,7 +146,7 @@ EXTRA_DIST = \ > dev_icd.json.in \ > intel_icd.json > > -libvulkan_intel_la_LIBADD = $(VULKAN_LIB_DEPS) > +libvulkan_intel_la_LIBADD = $(VULKAN_LIB_DEPS) -lX11-xcb > > libvulkan_intel_la_LDFLAGS = \ > -shared \ > @@ -168,7 +169,7 @@ dev_icd.json : dev_icd.json.in > > # Libvulkan with dummy gem. Used for unit tests. > libvulkan_test_la_SOURCES = $(VULKAN_GEM_STUB_FILES) > -libvulkan_test_la_LIBADD = $(VULKAN_LIB_DEPS) > +libvulkan_test_la_LIBADD = $(VULKAN_LIB_DEPS) -lX11-xcb > For both libraries we should really be using the respective FOO_CFLAGS/LIBS variables similar to the XCB_DRI3 ones, over the hardcoded -lX11-xcb. Then again our configure.ac is a bit messy on the Xlib/xcb topic, so if you feel overwhelmed just keep it as is - I'll sort it out at a later stage. In either case - please fold the -l flag into the VULKAN_LIB_DEPS variable.
Regardless of the CFLAGS/LIBS suggestion, but with the VULKAN_LIB_DEPS one Reviewed-by: Emil Velikov <[email protected]> > include $(top_srcdir)/install-lib-links.mk > > diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c > index aae925d..3546682 100644 > --- a/src/intel/vulkan/anv_device.c > +++ b/src/intel/vulkan/anv_device.c > @@ -182,6 +182,12 @@ static const VkExtensionProperties global_extensions[] = > { > .specVersion = 5, > }, > #endif > +#ifdef VK_USE_PLATFORM_XLIB_KHR > + { > + .extensionName = VK_KHR_XLIB_SURFACE_EXTENSION_NAME, > + .specVersion = 5, Thanks for _not_ using the VK_KHR_XLIB_SURFACE_SPEC_VERSION macro. The header defines version 6 for both Xlib and XCB yet we implement v5. Regards, Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
