aboutsummaryrefslogtreecommitdiff
path: root/loader/wsi.c
AgeCommit message (Collapse)Author
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-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
2016-12-13loader: Removed some unnecessary code.Mark Young
Now that all WSI paths need the ICD structs, I can get rid of a code path no longer used. Change-Id: Ib5073cd2074fcd66453dae5b6c89870c81f7f958
2016-12-13Allocate for real ICD surfaces for the VK_KHR_display extensionPiers Daniell
This was done for all the other WSI extensions, just not VK_KHR_display
2016-12-01loader: Modify conversion of real_icd_surfacesMark Young
This is the more appropriate way to cast the real_icd_surfaces values than downcasting the pointer. This is based off of Jamie Madill's changes. Change-Id: If63fb95994a92199d65fd3297bb092564446af97
2016-12-01loader: Fix cast warning in wsi.cJamie Madill
In 32-bits, this was downcasting a VkSurfaceKHR and comparing it with NULL. Since VkSurfaceKHR is defined as a uint64_t, it's better to cast the NULL to a VkSurfaceKHR to avoid a warning.
2016-11-21build: loader: Fix warnings for 32-bit linuxKarl Schultz
Change-Id: Ied7668aa7edeef01675dd4f358916d3e8bc07b27
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-11-02loader: Fix icd reference in WSI codeMark Young
Piers Daniell (Nvidia) found a nasty bug where the loader code was incorrectly incrementing through the ICDs as if the list was an array. This may fix some multi-GPU issues he has found. Change-Id: I42dd4a153c3226ac36b82f4cda8ad21bea8b2f66
2016-11-01loader: Call ICD for CreateDisplayPlaneSurfaceKHRMark Young
Add vkCreateDisplayPlaneSurfaceKHR to the functions that can call down to an ICD and let it create the KHR_surface object. Change-Id: I32dd88868c25149a903304f23bdf3a720cdd99af
2016-10-17loader: Fix vkDestroySurfaceKHR call on NULL surfMark Young
Thanks to Derrick Owens @ AMD for catching this bug which can cause a null-ptr dereference while running Khronos conformance test dEQP-VK.wsi.win32.surface.destroy_null_handle. Change-Id: I104a890cd23615458566ec71e072e21c76e989cb
2016-10-12loader: gh1026- Fix compiler warningsMark Young
Fixed the compiler fixes encountered in the loader. Change-Id: I4b3bb34b2d7e2231ccae61c684029af337d7c25e
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-01loader: gh888 Add KHR/EXT extensions in vulkan.hMark Young
Add the KHR_display_swapchain device extension to the loader and the core_validation layers. This fulfills the work required in JIRA LOAD-7 and gh 90. Add debug_marker to the extension list. Change-Id: I1fb70e5d44bc8c1f70fd6d1cfbd106a155081b25
2016-08-31loader: Fixed some types and commentsMark Lobodzinski
Change-Id: I66a5745a948c6677895950fdd48395afd5152ad7
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-14loader: return ext not present when applicableJeremy Hayes
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-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: Fix some typos from the recent WSI checkins: broke waylandJon Ashburn
Change-Id: Ie25aaf462498eae7fcc31784015e22376e31a70a
2016-03-24loader: Convert fprintf() calls to loader_log()Ian Elliott
2016-03-24layers: WSI functions should not work unless enabled.Ian Elliott
The WSI extension functions are special. They are statically exported from the loader. This means that an application can directly link against them, and not have to call a vkGet*ProcAddr function. However, the application is still reponsible for for enabling the appropriate WSI extension. An application was observed that called the WSI functions without enabling the appropriate extensions. It worked. When that application was run with the validation layers, it crashed. A change was made to the layer to make sure that an error was always logged. It was decided that the loader should change so that the terminator functions not work (and print a brief message) if an application calls the function without enabling its extension. This is done in the terminator so that the validation layer can be called, which should log a good error message; and yet still done here in case the application is never tried with validation turned on.
2016-03-08loader: gllvl #50, Add support for the WSI extension KHR_displayJon Ashburn
Change-Id: I8d5ecc7500beba3042a6b9147b2f3fd3055b3b1d
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: GH PR17, Fix typo in commentMun, Gwan-gyeong
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-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-10Remove Khronos confidential clause from license text.Karl Schultz
2016-02-03loader:Update copyright and apply clang-format (no logic changes)Jon Ashburn
2016-01-25Win32: Get 32-bit Windows build workingMark Young
Also includes changes to allow simultaneous 32-bit and 64-bit Windows builds.
2016-01-11misc: Move to Vulkan header version 0.222Jon Ashburn
2015-12-29loader: Version 217 WSI changes.Ian Elliott
2015-12-11wsi: Make WSI cases more consistent, fail if not set correctlyMark Lobodzinski
Filled in build details for Mir, Wayland, etc.
2015-12-01loader: Fix WSI compilation error if not XCBJon Ashburn
2015-12-01loader: Add terminator functions for Create*SurfaceKHR functionsJon Ashburn
These need to call down the chain for layer intercept. Also remove DestroySurfaceKHR from ICD table.
2015-12-01loader: Convert vkDestroySurfaceKHR() to have a terminator.Ian Elliott
2015-12-01wsi: Moved definition of CreateXxxSurface extension to CMakefileMark Lobodzinski
Removed component-specific definitions
2015-12-01loader: Fix typo in wsi fileMark Lobodzinski