From: Mark Young Date: Wed, 29 Mar 2017 19:39:27 +0000 (-0600) Subject: loader: Fix loader and layer negotiation X-Git-Tag: upstream/1.1.92~1351 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e04c6f0054eccf28f26245255eb05685a7c11ba;p=platform%2Fupstream%2FVulkan-Tools.git loader: Fix loader and layer negotiation Resolve missing struct sType as well as extern of vkNegotiateLoaderAndLayerInterface as a C function. Finally, bump up the JSON file version so it looks for the negotiate function. Change-Id: I7fd4784fce6cbd0c303f7b2bb354542e4b16b1df --- diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h index 4a502a3..5458ff2 100644 --- a/include/vulkan/vk_layer.h +++ b/include/vulkan/vk_layer.h @@ -132,3 +132,12 @@ typedef struct { } u; } VkLayerDeviceCreateInfo; +#ifdef __cplusplus +extern "C" { +#endif + +VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); + +#ifdef __cplusplus +} +#endif diff --git a/layers/linux/VkLayer_core_validation.json b/layers/linux/VkLayer_core_validation.json index 8788bda..7e36eca 100644 --- a/layers/linux/VkLayer_core_validation.json +++ b/layers/linux/VkLayer_core_validation.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_core_validation", "type": "GLOBAL", diff --git a/layers/linux/VkLayer_object_tracker.json b/layers/linux/VkLayer_object_tracker.json index f4c88a4..db0bae9 100644 --- a/layers/linux/VkLayer_object_tracker.json +++ b/layers/linux/VkLayer_object_tracker.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_object_tracker", "type": "GLOBAL", diff --git a/layers/linux/VkLayer_parameter_validation.json b/layers/linux/VkLayer_parameter_validation.json index cd5d40e..0b6cd34 100644 --- a/layers/linux/VkLayer_parameter_validation.json +++ b/layers/linux/VkLayer_parameter_validation.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_parameter_validation", "type": "GLOBAL", diff --git a/layers/linux/VkLayer_swapchain.json b/layers/linux/VkLayer_swapchain.json index 41cdc64..2d62dd8 100644 --- a/layers/linux/VkLayer_swapchain.json +++ b/layers/linux/VkLayer_swapchain.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_swapchain", "type": "GLOBAL", diff --git a/layers/linux/VkLayer_threading.json b/layers/linux/VkLayer_threading.json index 8d4b590..b7701a9 100644 --- a/layers/linux/VkLayer_threading.json +++ b/layers/linux/VkLayer_threading.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_GOOGLE_threading", "type": "GLOBAL", diff --git a/layers/linux/VkLayer_unique_objects.json b/layers/linux/VkLayer_unique_objects.json index 368766b..11be2a3 100644 --- a/layers/linux/VkLayer_unique_objects.json +++ b/layers/linux/VkLayer_unique_objects.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_GOOGLE_unique_objects", "type": "GLOBAL", diff --git a/layers/windows/VkLayer_core_validation.json b/layers/windows/VkLayer_core_validation.json index 37e57a5..012cb59 100644 --- a/layers/windows/VkLayer_core_validation.json +++ b/layers/windows/VkLayer_core_validation.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_core_validation", "type": "GLOBAL", diff --git a/layers/windows/VkLayer_object_tracker.json b/layers/windows/VkLayer_object_tracker.json index fc8dfd2..888fc01 100644 --- a/layers/windows/VkLayer_object_tracker.json +++ b/layers/windows/VkLayer_object_tracker.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_object_tracker", "type": "GLOBAL", diff --git a/layers/windows/VkLayer_parameter_validation.json b/layers/windows/VkLayer_parameter_validation.json index 21bcb03..5b841d2 100644 --- a/layers/windows/VkLayer_parameter_validation.json +++ b/layers/windows/VkLayer_parameter_validation.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_parameter_validation", "type": "GLOBAL", diff --git a/layers/windows/VkLayer_swapchain.json b/layers/windows/VkLayer_swapchain.json index 34e1fde..1c2a40e 100644 --- a/layers/windows/VkLayer_swapchain.json +++ b/layers/windows/VkLayer_swapchain.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_LUNARG_swapchain", "type": "GLOBAL", diff --git a/layers/windows/VkLayer_threading.json b/layers/windows/VkLayer_threading.json index 7e531a0..616f94f 100644 --- a/layers/windows/VkLayer_threading.json +++ b/layers/windows/VkLayer_threading.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_GOOGLE_threading", "type": "GLOBAL", diff --git a/layers/windows/VkLayer_unique_objects.json b/layers/windows/VkLayer_unique_objects.json index 319a48c..96fdfab 100644 --- a/layers/windows/VkLayer_unique_objects.json +++ b/layers/windows/VkLayer_unique_objects.json @@ -1,5 +1,5 @@ { - "file_format_version" : "1.0.0", + "file_format_version" : "1.1.0", "layer" : { "name": "VK_LAYER_GOOGLE_unique_objects", "type": "GLOBAL", diff --git a/loader/loader.c b/loader/loader.c index 4a47c75..634395e 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -3786,8 +3786,7 @@ VkResult loader_enable_instance_layers(struct loader_instance *inst, const VkIns bool loader_get_layer_interface_version(PFN_vkNegotiateLoaderLayerInterfaceVersion fp_negotiate_layer_version, VkNegotiateLayerInterface *interface_struct) { memset(interface_struct, 0, sizeof(VkNegotiateLayerInterface)); - - // Base assumption is that all layers are version 1 at least. + interface_struct->sType = LAYER_NEGOTIATE_INTERFACE_STRUCT; interface_struct->loaderLayerInterfaceVersion = 1; if (fp_negotiate_layer_version != NULL) {