aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.h
AgeCommit message (Collapse)Author
2018-01-19loader: Fix static library initializationLenny Komow
Fix the loader's global initialization being skipped when the loader is built as a static library on windows Change-Id: I492f87104fb3bf32aed3c7d251dee2caeb4f00ba
2018-01-16loader: Clean up mutexes on destructionLenny Komow
Change-Id: I7d1524da9167a576420c109ebbce8ebb5121cad0
2018-01-09loader: Add pre-instance functions for layersLenny Komow
Allow implicit layers (not explicit) to intercept calls before an instance has been created. Change-Id: I41f5bb0f5a6314fbab8003ebe71059dd04afc860
2017-07-17loader: Do not enumerate extensions from disabled implicit layersJean-Francois Roy
This patch adds a check to vkEnumerateInstanceExtensionProperties to omit extensions provided by disabled implicit layers. Per section 31.2 (1.0.51), "When pLayerName parameter is NULL, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned." Arguably, implicit layers that have been disabled are not "implicitly enabled".
2017-06-29loader: Add validation for apiVersionMark Young
Add a check to determine if the API version being requested can be handled by the loader. If it can't, then we return incompatible driver. If we can, we continue along our merry way. An addendum is that we also bumped the Loader/ICD interface version. This was requested by Nvidia so that the ICDs know that we pay attention to the version in the loader. If they don't see the new Loader/ICD interface version, they will handle the failing on all non-1.0 API requests. Change-Id: Icb7dd45e754c9f6a6c8186198333bacc68077b93
2017-05-09loader: Fix layer Enumerate bugMark Young
This fixes a bug found by Timothee Besset regarding calling vkEnumerateDeviceLayerProperties when no layers are present. This resulted in a negative number being filled into a uint32_t which caused an invalid number of layers to be returned. Now that we have meta-layers implemented instead of hard-coded, I created two lists: an application provided list of layers, and an expanded list of layers (where meta-layers are broken up into their component layers). The former is used when working with the enumerate calls, but the later is used internally for final layer activation. Change-Id: If723fdfb5acb1dc57923282d2c641c582870ad1c
2017-05-09loader: Meta-layer supportMark Young
Integrate Lenny and my changes for Meta-layers. Includes adding initial JSON file for standard_validation. Change-Id: Ibc1da464fad4949e14e171dbc7dd9990621e1081
2017-03-16loader: Fix vkEnumeratePhysicalDeviceGroupsKHXMark Young
vkEnumeratePhysicalDeviceGroupsKHX was not properly generating the physical device information or groups. Several changes resolve most of the issue, however, I'm still seeing issues when certain layers enabled. Change-Id: Id8d4553da25491a3d0a97e8d44e21340b41bc09c
2017-03-08spelling: Fix spelling errorsMark Young
Fix some spelling errors (caught by VS2017 spelling extension) and a few floating func defs that are no longer valid. Change-Id: Ifd9394227dfe3b3255c27429dadaf405433232d2
2017-03-01vulkan: update to header 1.0.42Mark Young
Updated all necessary files to 1.0.42. This includes the various headers as well as the loader, and the parameter validation, object tracking, and threading layers. Additionally, bump all layer JSON files to 1.0.42. Also, in this change: - Enable loader extension automation so that the loader now generates all extension entry-points automatically during build to reduce likelihood of missing a critical piece on header update. - Enable layer dispatch table extension automation for the same reason. - Fixes from Mark Lobodzinski and Tony Barbour to resolve crash in loader when working with Intel's Windows driver due to GetInstanceProcAddr getting called on inappropriate command names. Change-Id: Ic18d3fac2e145c386c0192031deb5089c91a00d8
2017-02-16loader: Remove image layer from standard_validationMark Lobodzinski
Change-Id: I54a1c0580034c2676defd1408699201568ffaf6f
2017-01-26repo: Clang-format LVL source files using GoogleMark Lobodzinski
Switch clang-format standard from the LLVM style to the Google style for more consistency. Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
2017-01-26repo: Clang-format c/cpp/h LVL files using LLVMMark Lobodzinski
Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
2017-01-24loader: Update the loader to 1.0.39Mark Young
Add new extensions for 1.0.39. Also, updated layers to include minimal set of functionality for 1.0.39 extensions. Extensions include: - VK_KHR_get_physical_device_properties2 - VK_KHR_shader_draw_parameters - VK_EXT_direct_mode_display - VK_EXT_display_surface_counter - VK_EXT_display_control Also, redo the LoaderAndLayerIf document. Change-Id: I10412086da7a798afe832a3892e18f606259b5af
2017-01-12loader: Modify EnumPhysDev functionsMark Young
Modify the loader's trampoline and terminator vkEnumeratePhysicalDevice functions to utilize helper functions. Also, fix the failure in CTS. Change-Id: Id9356fffd42f878c660ac8ee831e7527cce608bd
2016-12-22loader: Update term phys devices dynamicallyLenny Komow
Change-Id: Ib474a7af431746d9e820e188681d2a9310e94a0d
2016-12-22loader: Update tramp phys devices dynamicallyLenny Komow
Change-Id: I693598b5c9f72ecee10661e3af9420941b2bd67c
2016-12-12loader: Add support for 1.0.35 extensionMark Young
Add support for the NVX_device_generated_commands. This was necessary since it exposes one instance command (which takes a VkPhysicalDevice). Change-Id: I1da4c24ca0d385a6485581f55a1b19aa7ea51d24
2016-11-14loader: gh1120/gh1134 - Object wrapping issuesMark Young
First issue was that we needed to override vkGetDeviceProcAddr. Instead of allowing this to always go directly to the ICD, we needed to intercept a few commands because they require a loader trampoline and terminator call. Most commands still return a pointer directly to ICD command. GH1120 - Unwrap both the physical device handles and the KHR_surface handles in the loader during both the trampoline and terminator calls for DebugMarker commands. This has to be done since the values given to an application are the loader trampoline versions, and the values given to the last layer is the loader terminator versions. GH1134 - We were passing down the wrong device object to the ICD functions when querying the ICD command function address and comparing it in the override functions. Thanks to Baldur (Mr. Renderdoc) for discovering this, testing my fixes, and resolving several bugs. Change-Id: I7618d71ffee6c53d9842758210a9261f6b3a1797
2016-11-03loader: Rename icd and physical device varsMark Young
Clean up the names of the icd and physical device structs, lists, and variables used throughout the loader. Before, it was hard to tell where the item was to be used appropriately. Now, the names include a hint as to where they are expected to be allocated, freed, and used. Also, fixed a bug where we were using a trampoline item in a terminator function, which caused issues. Thanks to Piers @ Nvidia for discovering this. Change-Id: If98628a5496e9f645eff94b73e80ae7f8408f7b4
2016-09-20loader: More changes for gh181Mark Young
With Piers' fix, another path was broke because we still needed to intercept the call before it went to the ICD. Now, with his change and this change, all paths work. Also, clean up some code based on comments from Ian and Courtney reviews. Finally, update docs to indicate behavior of new loader 3 interface with ICDs. Change-Id: I2d3f962baffb21c1edeb93b132ffad40f298c8e7
2016-09-19loader: Fixes for ICD vk{Create|Destroy}SurfaceKHRPiers Daniell
Need to keep VkIcdSurface private to the loader. The definition may conflict with some redefinitions of VK_DEFINE_NON_DISPATCHABLE_HANDLE and it's not necessary to make public anyway. Change-Id: I30e166f0ecce2fd3ea36c745dc073b705973d75f
2016-09-19loader: gh181 use ICD for SurfaceKHRMark Young
Use the ICD to create and destroy VkSurfaceKHR objects instead of just performing the work in the ICD. This only occurs if the ICD exports the appropriate entry-points, and exposes version 3 of the loader/icd interface. Change-Id: I5e7bf9506318823c57ad75cf19d3f53fdfa6451e
2016-09-08loader: Remove extension enable checksMark Young
Apparently, the intent of Vulkan is to have the loader do no run-time checking in each of the functions as to whether or not the extension is enabled. This should only be done in the validation layers. This resolves the crash Jeff was seeing in the Nvidia driver when using the new extension. Change-Id: Ic90db0bde062d6b2511954abb8677f9f20bb4285
2016-09-08loader: Add checks for usage of wsi extensionsMark Young
The loader really should validate that the WSI extensions are enabled before being called. Additionally, I needed to add more checks for the KHR_display_swapchain extension in the parameter_validation and object_tracker layers. Change-Id: I3d07d46baf551be6f5f07e5374d6c683e3f52e7e
2016-09-07loader: Cleanup 1.0.25 extension workMark Young
Remove adding extensions from being exported from loader by default. Add in logic to only export entry points if extensions are enabled. Change-Id: I56e0c673925869e0d4482ee401ea19e43a05267f
2016-09-02loader: Rename DevExt to dev_extMark Young
Make a quick change to conform a structure element to the coding standard. Change-Id: Icbf168b1ab451dcc4847a0c2c17d0cb40c0197b8
2016-08-31loader: Fixed some types and commentsMark Lobodzinski
Change-Id: I66a5745a948c6677895950fdd48395afd5152ad7
2016-08-31loader: Add support for NV instance extensionMark Lobodzinski
Added vkGetPhysicalDeviceExternalImageFormat API from the VK_NV_external_memory_capabilities extension to the loader. Change-Id: Ib87df7bae333d7944a4e181556bc2f99e1e19416
2016-08-19loader: Fix CTS failures in simulate_oom tests.Mark Young
The simulate_oom tests continue the trend of testing what happens when the user-provided allocators fail. It validates two things: 1) That the loader returns the proper error message when this occurs. 2) That the loader cleans up any allocated items prior to returning. Change-Id: Ic80ff4345e1f3524d5e11ce787b10c391a37d760
2016-07-06loader: Remove device_limits layerMark Lobodzinski
Change-Id: I2660be2eb099ab6300b78e364991ca23f0abf26d
2016-06-30loader: GH370 - re-enable allocator usageMark Young
This reverts commit 5876cc2b7563f909c8ac8cb49f51f7ef715877f8. This adds the previous fixes as well as additional fixes if Implicit layers aren't present. This is not a case that gets tested on Windows as most SDK installs have at least 1 Implicit layer (RenderDoc). This change passes an individual run on Jenkins Linux system. Change-Id: I466cc54b72946e2a9f6477bd4c3d4e4e72eb9579
2016-06-30Revert "loader: GH370 - re-enable allocator usage"Mark Young
This reverts commit 0860f9dbac51b241a9690d23b53db14f307b0181.
2016-06-29loader: GH370 - re-enable allocator usageMark Young
Re-enable reverted changes done in commit d6f491b88eaf11f6953c02638d079f6a76806658. But also include fixes for the Linux and Windows release runs. Change-Id: I7644bb305faab068b3229eb9c1d8a67b052af165
2016-06-30Revert "loader: GH370 - re-enable allocator usage"Chris Forbes
This reverts commit aa32dbbf147d86257a0c9e091258e0ea2be5a013. This is broken in both debug and release 64bit linux.
2016-06-29loader: GH370 - re-enable allocator usageMark Young
Re-enable the allocator usage in the loader. Also, fix several memory leaks. The leaks were especially noticeable during the Vulkan conformance object_management.alloc_callback_fail.instance and object_management.alloc_callback_fail.device tests because the tests were designed to intentionally fail the Alloc calls. This change now fully passes the Vulkan CTS object_management.alloc_callback_fail tests when the loader uses application-provided Allocators. Change-Id: I03f2a09bc33259442e02c917a34d78f8937808d8
2016-06-06layers: Move debug action enums from vk_layer.hMark Lobodzinski
Moved debug-report related items from vk_layer.h. Enums are now in vk_layer_logging.h and DbgFunctionNode has been moved into a new loader header file vk_loader_layer.h. Change-Id: I6031146ba474ff01ca039da44ad5d42d054383a3
2016-05-16loader: deprecate device layersJon Ashburn
Change-Id: I43c279e36368bf1ef9a2f446007e34366bfff777
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-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: 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-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: vk{Create|Destroy}Instance can have multiple tmp callbacksIan Elliott
During code review of the Android version of the temporary debug_report callbacks code, it was decided to allow an array of VkDebugReportCallbackCreateInfoEXT structs to be passed to vkCreateInstance(). This code implements that, using some new utility functions in order to help keep the code clean.
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: Fix loader_unwrap_physical_device() to cast to correct typePiers Daniell
The trampoline loader_unwrap_physical_device() utility function was casting the VkPhysicalDevice parameter to (loader_physical_device*) instead of (loader_physical_device_tramp*). It worked previously because it just so happened that the phys_dev member was in the same location in both structs. Change-Id: I3bee175df8b64b44ef2e440f7e43603ca0617da2
2016-03-25loader: Fix bugs found in code review.Ian Elliott