summaryrefslogtreecommitdiff
path: root/vkpipeline_db.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2019-03-14 15:28:30 -0500
committerJason Ekstrand <jason.ekstrand@intel.com>2019-03-15 11:12:12 -0500
commit91375d17bdbc6461464d2fd8269fd8255a1fa6dc (patch)
tree7c10daf2b43e8342dc632e2119b29da022142e5c /vkpipeline_db.cpp
parentac9223e0ea4f108da4b7ce90ca00d9fb38370aa8 (diff)
Use version 2 of the loader/layer interface
Reviewed-by: Samuel Pitoiset samuel.pitoiset@gmail.com
Diffstat (limited to 'vkpipeline_db.cpp')
-rw-r--r--vkpipeline_db.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/vkpipeline_db.cpp b/vkpipeline_db.cpp
index 9a6262d..9d618f4 100644
--- a/vkpipeline_db.cpp
+++ b/vkpipeline_db.cpp
@@ -1010,9 +1010,9 @@ vkpipeline_db_CreateComputePipelines(
return result;
}
-VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI_CALL
+static PFN_vkVoidFunction
vkpipeline_db_GetDeviceProcAddr(VkDevice device, const char *pName);
-VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI_CALL
+static PFN_vkVoidFunction
vkpipeline_db_GetInstanceProcAddr(VkInstance instance, const char *pName);
#define FUNC(name) (void *)vkpipeline_db_##name
@@ -1048,7 +1048,7 @@ static const struct {
#undef FUNC
-VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI_CALL
+static PFN_vkVoidFunction
vkpipeline_db_GetDeviceProcAddr(
VkDevice device,
const char *pName)
@@ -1062,7 +1062,7 @@ vkpipeline_db_GetDeviceProcAddr(
return device_dispatch[GetKey(device)].GetDeviceProcAddr(device, pName);
}
-VK_LAYER_EXPORT PFN_vkVoidFunction VKAPI_CALL
+static PFN_vkVoidFunction
vkpipeline_db_GetInstanceProcAddr(
VkInstance instance,
const char *pName)
@@ -1075,3 +1075,17 @@ vkpipeline_db_GetInstanceProcAddr(
lock_guard_t l(global_lock);
return instance_dispatch[GetKey(instance)].GetInstanceProcAddr(instance, pName);
}
+
+VK_LAYER_EXPORT VkResult VKAPI_CALL
+vkpipeline_db_NegotiateLoaderLayerInterfaceVersion(
+ VkNegotiateLayerInterface *pVersionStruct)
+{
+ if (pVersionStruct->loaderLayerInterfaceVersion > 2)
+ pVersionStruct->loaderLayerInterfaceVersion = 2;
+
+ pVersionStruct->pfnGetInstanceProcAddr = vkpipeline_db_GetInstanceProcAddr;
+ pVersionStruct->pfnGetDeviceProcAddr = vkpipeline_db_GetDeviceProcAddr;
+ pVersionStruct->pfnGetPhysicalDeviceProcAddr = NULL;
+
+ return VK_SUCCESS;
+}