diff options
| author | Tony Barbour <tony@LunarG.com> | 2015-06-24 16:06:58 -0600 |
|---|---|---|
| committer | Tony Barbour <tony@LunarG.com> | 2015-06-25 15:17:05 -0600 |
| commit | ecf1b2ba983f3b19aae99608064a2a3762860556 (patch) | |
| tree | 50987e481bb165732f7c53c40533f0b1fa59f00b /layers/basic.cpp | |
| parent | 46c90248a677f09c2124aa45614113cf09f2cf08 (diff) | |
| download | usermoji-ecf1b2ba983f3b19aae99608064a2a3762860556.tar.xz | |
vulkan.h: V108 -- Static Types, Bug# 13919
Diffstat (limited to 'layers/basic.cpp')
| -rw-r--r-- | layers/basic.cpp | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/layers/basic.cpp b/layers/basic.cpp index 59ec08d4..990f6697 100644 --- a/layers/basic.cpp +++ b/layers/basic.cpp @@ -61,41 +61,26 @@ static const VkExtensionProperties basicExts[BASIC_LAYER_EXT_ARRAY_SIZE] = { } }; -VK_LAYER_EXPORT VkResult VKAPI vkGetGlobalExtensionInfo( - VkExtensionInfoType infoType, +VK_LAYER_EXPORT VkResult VKAPI vkGetGlobalExtensionProperties( uint32_t extensionIndex, - size_t* pDataSize, - void* pData) + VkExtensionProperties* pData) { /* This entrypoint is NOT going to init it's own dispatch table since loader calls here early */ uint32_t *count; - if (pDataSize == NULL) - return VK_ERROR_INVALID_POINTER; - - switch (infoType) { - case VK_EXTENSION_INFO_TYPE_COUNT: - *pDataSize = sizeof(uint32_t); - if (pData == NULL) - return VK_SUCCESS; - count = (uint32_t *) pData; - *count = BASIC_LAYER_EXT_ARRAY_SIZE; - break; - case VK_EXTENSION_INFO_TYPE_PROPERTIES: - *pDataSize = sizeof(VkExtensionProperties); - if (pData == NULL) - return VK_SUCCESS; - if (extensionIndex >= BASIC_LAYER_EXT_ARRAY_SIZE) - return VK_ERROR_INVALID_VALUE; - memcpy((VkExtensionProperties *) pData, &basicExts[extensionIndex], sizeof(VkExtensionProperties)); - break; - default: - return VK_ERROR_INVALID_VALUE; - }; + if (extensionIndex >= BASIC_LAYER_EXT_ARRAY_SIZE) + return VK_ERROR_INVALID_VALUE; + memcpy((VkExtensionProperties *) pData, &basicExts[extensionIndex], sizeof(VkExtensionProperties)); return VK_SUCCESS; } +VK_LAYER_EXPORT VkResult VKAPI vkGetGlobalExtensionCount(uint32_t* pCount) +{ + *pCount = BASIC_LAYER_EXT_ARRAY_SIZE; + return VK_SUCCESS; +} + VK_LAYER_EXPORT VkResult VKAPI vkEnumeratePhysicalDevices( VkInstance instance, uint32_t* pPhysicalDeviceCount, @@ -181,8 +166,10 @@ VK_LAYER_EXPORT void * VKAPI vkGetInstanceProcAddr(VkInstance instance, const ch return (void *) vkDestroyInstance; if (!strcmp("vkEnumeratePhysicalDevices", pName)) return (void*) vkEnumeratePhysicalDevices; - if (!strcmp("vkGetGlobalExtensionInfo", pName)) - return (void*) vkGetGlobalExtensionInfo; + if (!strcmp("vkGetGlobalExtensionCount", pName)) + return (void*) vkGetGlobalExtensionCount; + if (!strcmp("vkGetGlobalExtensionProperties", pName)) + return (void*) vkGetGlobalExtensionProperties; if (!strcmp("vkCreateDevice", pName)) return (void *) vkCreateDevice; else |
