diff --git a/VkCppGenerator.cpp b/VkCppGenerator.cpp index dc1ba69..54274e6 100644 --- a/VkCppGenerator.cpp +++ b/VkCppGenerator.cpp @@ -603,6 +603,7 @@ std::map getVectorParameters(CommandData const& commandData) } assert( (lenParameters[i] != ~0) || (commandData.arguments[i].len == "dataSize/4") + || (commandData.arguments[i].len == "latexmath:[$dataSize \\over 4$]") || (commandData.arguments[i].len == "null-terminated") || (commandData.arguments[i].len == "pAllocateInfo->descriptorSetCount") || (commandData.arguments[i].len == "pAllocateInfo->commandBufferCount")); @@ -944,7 +945,8 @@ void readExtensionRequire(tinyxml2::XMLElement * element, std::string const& pro if (child->Attribute("extends")) { assert(enums.find(getEnumName(child->Attribute("extends"))) != enums.end()); - enums[getEnumName(child->Attribute("extends"))].addEnum(child->Attribute("name"), tag); + assert(!!child->Attribute("offset") ^ !!child->Attribute("value")); // either offset or value has to be defined; no both of them! + enums[getEnumName(child->Attribute("extends"))].addEnum(child->Attribute("name"), child->Attribute("offset") ? tag : "" ); } } else @@ -1467,7 +1469,8 @@ void writeCall(std::ofstream & ofs, std::string const& name, size_t templateInde { countIndices.insert(std::make_pair(it->second, it->first)); } - if ((vectorParameters.size() == 1) && (commandData.arguments[vectorParameters.begin()->first].len == "dataSize/4")) + if ((vectorParameters.size() == 1) + && ((commandData.arguments[vectorParameters.begin()->first].len == "dataSize/4") || (commandData.arguments[vectorParameters.begin()->first].len == "latexmath:[$dataSize \\over 4$]"))) { assert(commandData.arguments[3].name == "dataSize"); countIndices.insert(std::make_pair(3, vectorParameters.begin()->first)); @@ -1601,7 +1604,8 @@ void writeFunctionHeader(std::ofstream & ofs, std::string const& indentation, st { skippedArguments.insert(it->second); } - if ((vectorParameters.size() == 1) && (commandData.arguments[vectorParameters.begin()->first].len == "dataSize/4")) + if ((vectorParameters.size() == 1) + && ((commandData.arguments[vectorParameters.begin()->first].len == "dataSize/4") || (commandData.arguments[vectorParameters.begin()->first].len == "latexmath:[$dataSize \\over 4$]"))) { assert(commandData.arguments[3].name == "dataSize"); skippedArguments.insert(3); diff --git a/vulkan/vk_cpp.h b/vulkan/vk_cpp.h index 6047c7e..0c97def 100644 --- a/vulkan/vk_cpp.h +++ b/vulkan/vk_cpp.h @@ -37,7 +37,7 @@ # include #endif /*VKCPP_ENHANCED_MODE*/ -static_assert( VK_MAKE_VERSION(1, 0, 3) == VK_API_VERSION, "Wrong VK_API_VERSION!" ); +static_assert( VK_MAKE_VERSION(1, 0, 4) == VK_API_VERSION, "Wrong VK_API_VERSION!" ); // 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default. // To enable this feature on 32-bit platforms please define VK_CPP_TYPESAFE_CONVERSION @@ -6174,7 +6174,7 @@ namespace vk eMirSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR, eAndroidSurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR, eWin32SurfaceCreateInfoKHR = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, - eDebugReportCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT + eDebugReportCallbackCreateInfoEXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT }; class ApplicationInfo @@ -23790,7 +23790,7 @@ namespace vk case StructureType::eMirSurfaceCreateInfoKHR: return "MirSurfaceCreateInfoKHR"; case StructureType::eAndroidSurfaceCreateInfoKHR: return "AndroidSurfaceCreateInfoKHR"; case StructureType::eWin32SurfaceCreateInfoKHR: return "Win32SurfaceCreateInfoKHR"; - case StructureType::eDebugReportCreateInfoEXT: return "DebugReportCreateInfoEXT"; + case StructureType::eDebugReportCallbackCreateInfoEXT: return "DebugReportCallbackCreateInfoEXT"; default: return "unknown"; } }