From 9349625d60ff8a2476e062ba4038cd81ee2394e2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 1 Dec 2015 13:58:25 -0800 Subject: vk/0.210.0: Rework VkInstanceCreateInfo --- include/vulkan/vulkan.h | 16 ++++++++-------- src/vulkan/anv_device.c | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 08559da94c2..b10c751ad4a 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1078,11 +1078,11 @@ typedef void (VKAPI_PTR *PFN_vkFreeFunction)( typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); -typedef struct { +typedef struct VkApplicationInfo { VkStructureType sType; const void* pNext; - const char* pAppName; - uint32_t appVersion; + const char* pApplicationName; + uint32_t applicationVersion; const char* pEngineName; uint32_t engineVersion; uint32_t apiVersion; @@ -1098,12 +1098,12 @@ typedef struct VkInstanceCreateInfo { VkStructureType sType; const void* pNext; VkInstanceCreateFlags flags; - const VkApplicationInfo* pAppInfo; + const VkApplicationInfo* pApplicationInfo; const VkAllocCallbacks* pAllocCb; - uint32_t layerCount; - const char*const* ppEnabledLayerNames; - uint32_t extensionCount; - const char*const* ppEnabledExtensionNames; + uint32_t enabledLayerNameCount; + const char* const* ppEnabledLayerNames; + uint32_t enabledExtensionNameCount; + const char* const* ppEnabledExtensionNames; } VkInstanceCreateInfo; typedef struct VkPhysicalDeviceFeatures { diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index c3dcd9f56cc..852792db413 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -194,10 +194,10 @@ VkResult anv_CreateInstance( assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO); - if (pCreateInfo->pAppInfo->apiVersion != VK_MAKE_VERSION(0, 170, 2)) + if (pCreateInfo->pApplicationInfo->apiVersion != VK_MAKE_VERSION(0, 170, 2)) return vk_error(VK_ERROR_INCOMPATIBLE_DRIVER); - for (uint32_t i = 0; i < pCreateInfo->extensionCount; i++) { + for (uint32_t i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) { bool found = false; for (uint32_t j = 0; j < ARRAY_SIZE(global_extensions); j++) { if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], @@ -223,7 +223,7 @@ VkResult anv_CreateInstance( instance->pAllocUserData = alloc_callbacks->pUserData; instance->pfnAlloc = alloc_callbacks->pfnAlloc; instance->pfnFree = alloc_callbacks->pfnFree; - instance->apiVersion = pCreateInfo->pAppInfo->apiVersion; + instance->apiVersion = pCreateInfo->pApplicationInfo->apiVersion; instance->physicalDeviceCount = -1; _mesa_locale_init(); -- cgit v1.2.3