vk/0.210.0: Rework VkInstanceCreateInfo
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 1 Dec 2015 21:58:25 +0000 (13:58 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 3 Dec 2015 21:43:53 +0000 (13:43 -0800)
include/vulkan/vulkan.h
src/vulkan/anv_device.c

index 08559da94c287c0382d5c2b068b575c2ce816316..b10c751ad4a63be2c94ee4e1ee1bcadf4462c1f0 100644 (file)
@@ -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 {
index c3dcd9f56ccabb5def015d6f6257d97c78b67344..852792db413e79b924e02f496fd25c9304a0dc13 100644 (file)
@@ -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();