aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.c
AgeCommit message (Collapse)Author
2016-06-14loader: Fix GH607 by adding proper array supportMark Young
JSON spec does not allow objects of the same name at the same level. But, that's what we used to allow with "layer" definitions. Update new file version to 1.0.1, add "layers" array object, and add multiple "layer" definition warning. Change-Id: I040f07897c689800364d243daf3c247f1b3cace7
2016-05-17loader: Treat GLOBAL layers same as INSTANCE layersJon Ashburn
Also change validation layers type to be GLOBAL so they work with old loaders prior to device layer deprecation. Change-Id: I32788cb7788c8ad840ced15236c5ed792edfbbff
2016-05-16loader: reduce message level if GDPA of a layer is not foundJon Ashburn
Change-Id: Ic4dd99015f5f3a07a6657f196fde89181d66c0f6
2016-05-16loader: deprecate device layersJon Ashburn
Change-Id: I43c279e36368bf1ef9a2f446007e34366bfff777
2016-05-09loader: lvlgh204, Fix calls to secure_getenv on glibc < 2.17Jon Ashburn
Change-Id: I2f98d8de343cf3f6a30fdc223b37201b32571e99
2016-04-28loader: Add compile-time option for layer search paths.Jamie Madill
This enables programatically specifying search directories for the layer JSON files. This makes deploying and running compiled layers in local and automated testing with multiple configurations a much simpler process. Change-Id: I0904ef230d020004d8d71cbe265e83cdb6120db8
2016-04-28Revert "loader: Remove the default directory paths for ICDs and layers"Jamie Madill
This reverts commit b1e6b564616c40062b81d0b8b90e8689dd9aea11. Change-Id: I9e6bfad81369912c85c3122d6d36093c3c148454
2016-04-28loader: don't remove loader structs from CreateInfo for ICDJon Ashburn
pNext/sType extension structs that are unknown to a component must be ignored by those components (layers, loader, ICDs). Loader was stripping off the pNext structs it added to DeviceCreateInfo and InstanceCreateInfo. Remove this stripping as the loader passes needed info to layers and ICDs via this. Change-Id: I49f169660474cffba276afac0c224e1b74eaa4bc
2016-04-25loader: ghlvl#180 Support a ICD interface version negotiationJon Ashburn
Change-Id: I2e5c3717dd7fa86992f617bcc0f93de8ba60759e
2016-04-20loader: ghlvl 361, Simplify library resource handlingJon Ashburn
Layer and ICD libraries are opened and closed as needed. No ref counting, no knowledge of if a library contains multiple layers or ICDs. Change-Id: Ie88b671cd1671187a42d3d838d20e3af1afc67cc
2016-04-19misc: Update licenses to Apache 2.0Jon Ashburn
Change-Id: Id447f4c8c53d33f9192940bdd3ae727b7b738a97
2016-04-15Revert "loader: Temp workaround to add WSI surface extensions enumerated."Jon Ashburn
This reverts commit 884065fcd89540dca9a710389641bf1c39cedce0.
2016-04-15Revert "loader: temp workaround for advertising linux wsi surface extensions"Jon Ashburn
This reverts commit 23b248d32c943c136589e679e1fcc3444488d906.
2016-04-15loader: Remove the default directory paths for ICDs and layersJon Ashburn
These are not needed since rely on OSes library loader to figure out default path. Change-Id: Ide5eec4ed4301c51de7dc9171f7e040deb1878e7
2016-04-15loader: Run clang-formatJon Ashburn
Last several commits to loader weren't run through it. Change-Id: I512b2df75c7831ee6433e4c60c6664db85184584
2016-04-14loader: Added some missing function entry points to loader_icd_init_entrys.Petros Bantolas
KHR_surface, KHR_display extension functions were not exposed properly. Specifically, added LOOKUP_GIPA entries for: * GetPhysicalDeviceDisplayPropertiesKHR * GetDisplayModePropertiesKHR * CreateDisplayPlaneSurfaceKHR * GetPhysicalDeviceDisplayPlanePropertiesKHR * GetDisplayPlaneSupportedDisplaysKHR * CreateDisplayModeKHR * GetDisplayPlaneCapabilitiesKHR * DestroySurfaceKHR Added missing function declaration DestroySurfaceKHR in loader_icd struct. Checking if KHR_surface extension is enabled before proceeding in the terminator_CreateDisplayPlaneSurfaceKHR definition. Change-Id: I0599efddedc5064859ae1f4e52bdbbf8788d5c12
2016-04-08loader: ghlvl #66, Ensure std_validationadvertises underlying layer extensionsJon Ashburn
Change-Id: If6b6b24fdf02b960c83148bd002114941eb1adc6
2016-04-07loader: Fix the std_validation version to really be loader's built versionJon Ashburn
Change-Id: I2ff3b6dab4209b152f487649db011cdfa7c8975b
2016-04-07loader: Preserve order during layer list expansionChris Forbes
As requested by Jon -- instead of appending the expanded layers, insert them in place of the meta layer. Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-04-07loader: Don't scribble on caller memory in CreateInstance,CreateDeviceChris Forbes
expand_... / unexpand_... scribbled on both the CreateInfo struct and the list of layer strings, and then unscribbled them on the way back out. This is a lousy thing to do, and just blows up if the memory isn't writable (which it needn't be, given the API takes ptrs to const). Instead, copy the *CreateInfo into a shadow struct on the stack, and be careful in expand_layer_names never to scribble on the caller's layer names array. V2: slight tweak (missed initializer) Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-04-07loader: temp workaround for advertising linux wsi surface extensionsJon Ashburn
Change-Id: I9a03c6ea16abe9e362ef81ee87ac217b8b3c6c92
2016-04-06loader: Fix regression with ↵Piers Daniell
dEQP-VK.api.object_management.alloc_callback_fail.device When the loader vkCreateDevice trampoline code calls down to vkCreateDevice don't update the dev->device field with a bogus device handle. Change-Id: I703acb5283650ab0013483bda0f478da9b46e3ea
2016-04-05loader: Temp workaround to add WSI surface extensions enumerated.Jon Ashburn
Change-Id: Ibb9ffa80bbb71d15296e39730f48f33c23bd331a
2016-04-04loader: ghlvl #204, Use __secure_getenv if secure_getenv is unavailableJon Ashburn
Also add group id check to getenv suid check in loader. Change-Id: Icbc08258498f893ee5fce144c043bdc6bd8e5423
2016-04-01loader: report implicit instance extensionsJeremy Hayes
GL74: vkEnumerateInstanceExtensionProperties should report implicit instance extensions when pLayerName is NULL or an implicit layer name. Change-Id: Iba7664a168e146c4b862468b6255cdc752cc8c77
2016-04-01loader: Fix createDev treminator to init the logicalDevs ICD devJon Ashburn
Last commit on physDev detanglement was incompatible with the fix to simplify the chaining loader_device_info. Change-Id: I0468178bcffb114a9bf3038c773cf1912ad5ac72
2016-04-01loader: Remove trampoline/terminator dependency in vkEnumeratePhysicalDevicesPiers Daniell
There was a dependency between the trampoline vkEnumeratePhysicalDevices and the terminator vkEnumeratePhysicalDevices via the loader_instance.phys_devs_term array which may break layers that manipulate the enumerated VkPhysicalDevice list. This dependency assumed the devices in loader_instance.phys_devs_term and loader_instance.phys_devs were in the same order and that it could assume the index of one corresponding to the same VkPhysicalDevice of the other. Breaking this dependency allows layers to modify or reorder the VkPhysicalDevice list by intercepting the vkEnumeratePhysicalDevices function without causing the loader to crash. In general, there should never be a dependency between the trampoline code and the terminator code because it has the potential to break unknown layers between them. Conflicts: loader/loader.c loader/trampoline.c Change-Id: Iafefd6e8b7dd58d398a76533f957123242c01b56
2016-04-01loader: Add device callback to set dispatchable objectJon Ashburn
Change-Id: I5ca8f532e777e2cb0facf8fe5bab4c82409f8d37
2016-04-01loader: Remove the device_info in the layer chain structureJon Ashburn
Simplifies code, the loader device structure is passed down from trampoline code to terminator code via the pDevice parameter. It doesn't need to be added to this pCreatInfo pNext list structure. Layers which modifiy pDevice whould do it on the way up the chain not going down the chain. Change-Id: Ibf7e4ffdc1a36f52b1a99389dcab25d572655aec
2016-04-01loader: Add instance callback to set dispatchable objectsJon Ashburn
Change-Id: I73b8b6edfee491c53216b730c99a7ea34ade3b4e
2016-04-01loader: Remove the instance_info in the layer chain structureJon Ashburn
Simplifies code, the loader instance structure is already passed down from trampoline code to terminator code via the pInstance parameter. It doesn't need to be added to this pCreatInfo pNext list structure. Layers which modifiy pInstance whould do it on the way up the chain not going down the chain. Change-Id: I59581b94871c094995787808cf5ae2955ad0191a
2016-03-25loader: ghlvl#79, Fix to not report unsupported WSI surface extensions on LinuxJon Ashburn
Also fix issue where loader would advertise support for these extensions even if the ICD or layers doesn't support it. Now ICD must report surface extensions for the loader to report them. And on Linux if loader support for a given surface extension (eg Mir) is compiled out then loader doesn't report it. Change-Id: I51e302a32f5431f4893a3795ff31be60e9263f43
2016-03-24loader: ghlvl 116 Fix CreateDevice to use the proper ICDs PhysDevJon Ashburn
This is needed for querying extensoins from the ICD. Change-Id: I5655d33d15bf0ea6de506f81821a30dd81ca3d5a
2016-03-22misc: Update to header version 1.0.6Jon Ashburn
Change-Id: Idf7a9d40278b796e16effa54e9b60668d275b8ec
2016-03-11loader: make sure createDevice uses ICDs physicalDeviceJon Ashburn
Trampoline CreateDevice was using the terminator's physicalDevice instead of the ICDs. Change-Id: Ifdc6497fe4130e1ac1440b225401e65600b2a999
2016-03-08loader: Fix issue passing wrong instance if layer wraps instancesJon Ashburn
Change-Id: Iafd0f7dc3e4a911b165d3df1dadddf4d45fbef10
2016-03-08loader: gllvl #50, Add support for the WSI extension KHR_displayJon Ashburn
Change-Id: I8d5ecc7500beba3042a6b9147b2f3fd3055b3b1d
2016-03-08loader: VulkanTools PR 13 Resolve ...XlibPresentationSupportKHRKarl Schultz
Change-Id: I1177e20b657ab00f41e9e4eb6f9ac997f7be459e
2016-03-04loader: gllavl#46 add check for device extensionsJeremy Hayes
Make GetInstanceProcAddr check layers for device extensions. Change-Id: Ib23c5d42d11be415e9a6acd3b8427d0e474087a5
2016-03-02loader: ghlvl 33, ghlvl 34 Fix aliasing of VkPhysicalDeviceJon Ashburn
This fixes problems with not selecting the proper PhysicalDevice within the loader if multiple PhysicalDevices are enumerated by the loader. Fix involves wrapping the VkPhysicalDevice object in both trampoline code and terminator code. Also get rid of the ICD device_extension_cache. It is now always queried from ICD whenever needed.
2016-02-29loader: refactor EnumerateDevice*Properties terminate/trampoline codeJon Ashburn
Should be no functional change. Restructure so the terminator functions don't contain trampoline code.
2016-02-26loader: Better delineate trampoline and terminator functionsJon Ashburn
No functional changes! Trampoline functions have the Vulkan API function name and are in trampoline.c. Terminator functions have terminator_<Vulkan API name> (omitting the "vk"). Instance extension trampoline and terminator functions are in together in the same file for the extension.
2016-02-24loader: Fix MSVS warningsKarl Schultz
Apply branch 'fix-warnings' of https://github.com/null77/Vulkan-LoaderAndValidationLayers into null77-fix-warnings
2016-02-22loader: Fix Wayland supportJason Ekstrand
All that was needed was to fix some misplaced braces, fix a couple of copy+paste problems from Mir, and add a lookup function. Getting Mir support working should be pretty easy. Conflicts: layers/swapchain.cpp
2016-02-19loader: Fix standard_validation enumeration on instance chainJon Ashburn
Fixed regression and still handle no layers found case.
2016-02-18loader: Environment variable override got broken with recent changeJon Ashburn
This fixes that Conflicts: update_external_sources.bat
2016-02-18loader: Add a ICD and layer search path for loader to discover JSON filesJon Ashburn
path is $HOME/.local/share/vulkan/*
2016-02-15loader: Add better checks for malformed disable_environment in layer JSON fileJon Ashburn
2016-02-14loader: check for null pointers in loader_add_layer_property_metaDavid Pinedo
Fixes vulkaninfo when only RT is installed and there are no layers installed.
2016-02-14loader: For dev ext trampoline error code, add error loggingJon Ashburn