aboutsummaryrefslogtreecommitdiff
path: root/loader/trampoline.c
AgeCommit message (Collapse)Author
2016-05-16loader: deprecate device layersJon Ashburn
Change-Id: I43c279e36368bf1ef9a2f446007e34366bfff777
2016-04-21loader: fix LX475Jeremy Hayes
Silently ignore VK_NULL_HANDLE in DestroyInstance/Device. Change-Id: I96305088db75932b6f3f824852db9c72b8352120
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: dont free and reallocate physical devicesJeannot Breton
Change-Id: I68ac2681b7c4923213c65dc720f54d81a36c99ef
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: Trampoline vkEnumeratePhysDev should use layer-returned physDev countPiers Daniell
Modify the trampoline vkEnumeratePhysicalDevices() implementation to enumerate the number of physical devices based on what the top-most layer reports and not what the terminator_EnumeratePhysicalDevices counted. This allows intermediate layers to modify the physical device count. Change-Id: Ifd5c3c8c4db53cf97b976feefe18de7cfef47e35
2016-03-25loader: Fix bugs found in code review.Ian Elliott
2016-03-25loader: Setup temporary callback for vkDestroyInstanceIan Elliott
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-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-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-14loader: add support for standard_validation layer enabled from env varJon Ashburn
Also fix memory corruption issue with the original std_validation patch.
2016-02-14loader: Add feature standard-validation layer from applicationJon Ashburn
Adds a validation layer grouping VK_LAYER_LUNARG_standard_validation, which is the set of validation layers in a fixed order. This only adds support for enumerating the meta layer and enabling it explicitly from the app. Environment variable enablement of this layer is not yet added.
2016-02-14loader: rerun clang-format on some filesJon Ashburn
2016-02-10Remove Khronos confidential clause from license text.Karl Schultz
2016-02-08loader: Null-terminated string checksMark Lobodzinski
2016-02-04loader: GL120, move critical section to cover loader_get_icd_and_deviceAndrzej Kotlowski
2016-02-03loader: Fix bug on pass by value for created_instanceJon Ashburn
2016-02-03loader:Update copyright and apply clang-format (no logic changes)Jon Ashburn
2016-01-27loader: Fix createInstance to pass pAllocator downJon Ashburn
Also fix bug where createDevice failure removes logical device from icd struct
2016-01-25loader: Disable using CreateInstance allocation callbacksJon Ashburn
Workaround for cts to work.
2016-01-20vktrace: Get partially working again with the new loader/layer interfaceJon Ashburn
2016-01-20loader: remove resolved TODOsCourtney Goeltzenleuchter
2016-01-20loader: implement new layer init methodCourtney Goeltzenleuchter
New layer init method requires the construction of Link information for CreateInstance and CreateDevice that is accessible to layers via the CreateInfo.pNext pointer. The layer can then use the Get*ProcAddr from the Link structure to initialize their dispatch table if the call down the chain returns successfully. This removes the need to do special initialization work at Get*ProcAddr time. Layer Get*ProcAddr now return their internal function pointers regardless of the value of instance or device. Only need to have valid instance & device when looking up extensions or when passing the request down the chain. This mechanism allows us to remove object wrapping used by the loader previously. Also simplifies the dispatch table setup. Conflicts: layers/device_limits.cpp layers/draw_state.cpp loader/loader.c loader/trampoline.c
2016-01-18loader: Return the loader created instance rather than from the instance chainJon Ashburn
Fix's issue with layers that wrap instance.
2016-01-14loader: Fix bad memory ref and CreateInstance fail don't write ouptutJon Ashburn
Gitlab #58 CreateInstance shouldn't update output parameter on failure.
2016-01-14loader: Fix so unwrapped instance gets used for layer instance extension ↵Jon Ashburn
dispatch Conflicts: loader/trampoline.c
2016-01-12loader: Fix so unwrapped instance gets used for layer instance extension ↵Jon Ashburn
dispatch
2016-01-11misc: Move to Vulkan header version 0.222Jon Ashburn
2016-01-07misc: make sure host memory alignment is a power of twoJon Ashburn
Use sizeof(int) as a default generally. Is that reasonable?
2015-12-31misc: rename startXXX to firstXXX and add firstXXX param to setviewport/scissorJon Ashburn
Header file changes going to 213 version
2015-12-17debug_report: rename object type and error bitsCourtney Goeltzenleuchter
Conflicts: demos/tri.c layers/device_limits.cpp layers/draw_state.cpp layers/image.cpp layers/mem_tracker.cpp layers/param_checker.cpp layers/vk_layer_logging.h loader/debug_report.c tests/layer_validation_tests.cpp
2015-12-17loader: use callbacks from CreateInstanceCourtney Goeltzenleuchter
If an application links a VkDebugReportCreateInfo structure to the InstanceCreateInfo structure the loader will log the callback for the duration of the CreateInstance call. This allows the app to catch any loader issues detected at CreateInstance time.
2015-12-17loader: utils for managing debug report eventsCourtney Goeltzenleuchter
Now need to create & destroy callbacks as part of vkCreateInstance, so refactor debug_report entries into API function and work function that can be used from the loader. Conflicts: loader/debug_report.c
2015-12-17misc: Update copyright statementsCourtney Goeltzenleuchter
2015-12-10loader: Convert ext list helper functions to generic formJon Ashburn
This allows future changes where the device and instance ext lists are different types.
2015-12-01loader: Started porting loader to new WSI (GIPA missing).Ian Elliott
2015-11-20loader: Don't use ICD's VkDevice after it has been destroyedJon Ashburn
LX # 201 Conflicts: loader/trampoline.c
2015-11-12bug 15120: rename vkCmdPushConstants "values" to "pValues"Chia-I Wu
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15120
2015-11-06bug 15068: Use hardfp calling convention on Android for 32-bit ARM targetsChia-I Wu
Update python scripts. s/(VKAPI \*/(VKAPI_PTR */g s/void VKAPI\b/VKAPI_ATTR void VKAPI_CALL/g s/VkResult VKAPI\b/VKAPI_ATTR VkResult VKAPI_CALL/g s/PFN_vkVoidFunction VKAPI\b/VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL/g s/void\* VKAPI\b/VKAPI_ATTR void* VKAPI_CALL/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15068
2015-11-04misc: Update author informationCourtney Goeltzenleuchter
Author information was added to any file with the standard license text. Authors were added that added/changed >= 3% of the lines of a file.
2015-11-04misc: switch copyright to ValveCourtney Goeltzenleuchter