Add VK_ATTACHMENT_UNUSED to vulkan wrapper.
authorMika Isojärvi <misojarvi@google.com>
Fri, 7 Aug 2015 23:58:38 +0000 (16:58 -0700)
committerMika Isojärvi <misojarvi@google.com>
Fri, 7 Aug 2015 23:58:38 +0000 (16:58 -0700)
Change-Id: I3d494e4723c48f9d9db58068ad1e734e5c2512cd

external/vulkancts/framework/vulkan/vkBasicTypes.inl
external/vulkancts/gen_framework.py

index 61f9f84..c6af3bf 100644 (file)
@@ -10,6 +10,7 @@ enum { VK_MAX_MEMORY_HEAPS                    = 16                                                    };
 enum { VK_MAX_DESCRIPTION                      = 256                                                   };
 enum { VK_FALSE                                                = 0                                                             };
 enum { VK_TRUE                                         = 1                                                             };
+enum { VK_ATTACHMENT_UNUSED                    = (~0u)                                                 };
 
 VK_DEFINE_HANDLE                       (VkInstance,                                    HANDLE_TYPE_INSTANCE);
 VK_DEFINE_HANDLE                       (VkPhysicalDevice,                              HANDLE_TYPE_PHYSICAL_DEVICE);
index add9e72..269b9c6 100644 (file)
@@ -77,6 +77,7 @@ DEFINITIONS                   = [
        "VK_MAX_DESCRIPTION",
        "VK_FALSE",
        "VK_TRUE",
+       "VK_ATTACHMENT_UNUSED"
 ]
 
 class Handle:
@@ -209,7 +210,12 @@ def parsePreprocDefinedValue (src, name):
        definition = re.search(r'#\s*define\s+' + name + r'\s+([^\n]+)\n', src)
        if definition is None:
                raise Exception("No such definition: %s" % name)
-       return definition.group(1).strip()
+       value = definition.group(1).strip()
+
+       if value == "UINT32_MAX":
+               value = "(~0u)"
+
+       return value
 
 def parseEnum (name, src):
        keyValuePtrn    = '(' + IDENT_PTRN + r')\s*=\s*([^\s,}]+)\s*[,}]'