Use CMakes built in ability to define compiler definitions to targets so that
the loader_cmake_config.h file is made redundant. This simplifies the build
process by removing the configure_file and including it. Note that this
commit is a part of a series of commits and not intended to work by itself.
The loader ICD ordering could be random on Linux based on using readdir
to find ICD manifest files. This can result in random behaviors as
applications that select only the first device can switch which device is
used. To resolve this, we now sort based on device type and then
internally to the types based on PCI bus information.
This also introduces a VK_LOADER_DEFAULT_DEVICE environment variable
that can be used to force a specific PCI device. This environment variable
is actually a duplicate of the MESA_VK_DEVICE_SELECT variable, which is
also looked for if the loader environment variable is not found.
Note, that at least one ICD must support it for the extension to be used at all.
So we only do the sorting if one ICD supports it.
Fixes part of #657
This flag was recently enabled by default in Chrome and ANGLE
and other projects inherit these build settings. Explicitly
dsiable this warning until it is enabled in the non-GN build.
Change-Id: I8f353f8abc3f7857481ff9cc774aff3618eaf35a
- Update known-good
- Generate source
- Fix version parsing in FindVulkanHeaders.cmake
- Add to VK_ENABLE_BETA_EXTENSIONS to GN build to pick up beta
VkObjectType values
Change-Id: Ied4e4e71017e48d344b1c9cacf037ae989aceec9
Causes Chromium to pick up ANGLE's build of Vulkan-Loader instead of the
system one, with the caveat that the gn build of Vulkan-Loader doesn't
support VK_KHR_xlib_surface which Chromium depends on.
This change can be re-introduced once Chromium switches to
VK_KHR_xcb_surface.
This reverts commit 8308d6744d.
This is the Linux way. Previously, a copy step was added to copy
libvulkan.so to libvulkan.so.1. However, that only runs if everything
is built and not when a specific target is built.
There is no need for libvulkan.so on Linux, so this change makes the
libvulkan target directly generate libvulkan.so.1 and removes the copy
step.
Fuchsia (fuchsia.dev) builds with GN and uses a loader service to load
the ICD into the application's address space.
ANGLE builds have been verified.
Reemoves unused variable is_icd.
GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.
Bug: chromium:1052560
On Linux the standard name to use the Vulkan loader is libvulkan.so.1,
so we add a copy step to the GN build that copies libvulkan.so to
libvulkan.so.1.
Also ran `gn format` on BUILD.gn
Add vulkan-1.def as a source file for windows GN build and rename
windows target to "vulkan-1" so that functions are correclty
exported for GetProcAddress() lookup.
Fixes#292
ANGLE is failing to locate validation layers on some platforms because
it cannot access VK_ICD_FILENAMES and VK_LAYER_PATH. This ensures that
these variables will always be picked up.
Add support for GN, Google's meta-build system for Ninja:
https://gn.googlesource.com/gn/
Pull BUILD.gn and script dependencies from
https://chromium.googlesource.com/angle/angle
Add build_overrides for this project to enable both standalone and
component builds using GN
Add GN configuration to Travis CI