vulkan: Update from header 0.138.2 to 0.170.2

Change-Id: I011e1f27d025730d448ee5cfefc6701300b455c2
(cherry picked from commit 6761b6067555557599e8c30096614642a5223646)
diff --git a/vulkan/api/templates/vulkan_h.tmpl b/vulkan/api/templates/vulkan_h.tmpl
index 6747147..2dee541 100644
--- a/vulkan/api/templates/vulkan_h.tmpl
+++ b/vulkan/api/templates/vulkan_h.tmpl
@@ -53,10 +53,16 @@
 #define VK_API_VERSION \
     VK_MAKE_VERSION({{Global "VERSION_MAJOR"}}, {{Global "VERSION_MINOR"}}, {{Global "VERSION_PATCH"}})

+#if defined(__cplusplus) && (_MSC_VER >= 1800 || __cplusplus >= 201103L)
+    #define VK_NULL_HANDLE nullptr
+#else
+    #define VK_NULL_HANDLE 0
+#endif

 #define VK_DEFINE_HANDLE(obj) typedef struct obj##_T* obj;

 #if defined(__cplusplus)
-#if (_MSC_VER >= 1800 || __cplusplus >= 201103L)
+#if ((defined(_MSC_VER) && _MSC_VER >= 1800 || __cplusplus >= 201103L)
 // The bool operator only works if there are no implicit conversions from an obj to
 // a bool-compatible type, which can then be used to unintentionally violate type safety.
 // C++11 and above supports the "explicit" keyword on conversion operators to stop this
@@ -65,13 +71,18 @@
 //     if (obj) vkDestroy(obj);
 #define VK_NONDISP_HANDLE_OPERATOR_BOOL() \
     explicit operator bool() const { return handle != 0; }
+#define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+    explicit obj(uint64_t x) : handle(x) { } \
+    obj(decltype(nullptr)) : handle(0) { }
 #else
 #define VK_NONDISP_HANDLE_OPERATOR_BOOL()
+#define VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj) \
+    obj(uint64_t x) : handle(x) { }
 #endif
 #define VK_DEFINE_NONDISP_HANDLE(obj)                                              \
     struct obj {                                                                   \
         obj() : handle(0) { }                                                      \
-        obj(uint64_t x) : handle(x) { }                                            \
+        VK_NONDISP_HANDLE_CONSTRUCTOR_FROM_UINT64(obj)                             \
         obj& operator=(uint64_t x) {                                               \
             handle = x;                                                            \
             return *this;                                                          \
@@ -87,11 +98,13 @@
     typedef struct obj##_T { uint64_t handle; } obj;
 #endif

-#define VK_LOD_CLAMP_NONE       MAX_FLOAT
-#define VK_LAST_MIP_LEVEL       UINT32_MAX
-#define VK_LAST_ARRAY_SLICE     UINT32_MAX
-#define VK_WHOLE_SIZE           UINT64_MAX
-#define VK_ATTACHMENT_UNUSED    UINT32_MAX
+#define VK_LOD_CLAMP_NONE         1000.0f
+#define VK_REMAINING_MIP_LEVELS   (~0U)
+#define VK_REMAINING_ARRAY_LAYERS (~0U)
+#define VK_WHOLE_SIZE             (~0ULL)
+#define VK_ATTACHMENT_UNUSED      (~0U)
+define VK_QUEUE_FAMILY_IGNORED    (~0U)
+define VK_SUBPASS_EXTERNAL        (~0U)
 {{range $d := $.Definitions}}
   {{if HasPrefix $d.Name "VK_"}}#define {{$d.Name}}  {{$d.Expression}}{{end}}
 {{end}}