Update to Vulkan 1.1.75 (#220)

This commit is contained in:
Markus Tavenrath 2018-05-17 16:09:55 +02:00 committed by GitHub
parent 437f800444
commit dddd845304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 105 additions and 11 deletions

@ -1 +1 @@
Subproject commit c51545d33f4fd791dc4109d0d338e79b572f6286 Subproject commit e665b9e6910e54caf754ad1e83aaa500d1de44f3

View File

@ -2778,7 +2778,7 @@ void VulkanHppGenerator::readTypeStructMember(tinyxml2::XMLElement const* elemen
if (child->ToText()) if (child->ToText())
{ {
std::string value = trim(child->Value()); std::string value = trim(child->Value());
assert((value == "const") || (value == "struct")); assert((value == "const") || (value == "struct") || value == "const struct");
member.type = value + " "; member.type = value + " ";
child = child->NextSibling(); child = child->NextSibling();
assert(child); assert(child);
@ -2876,7 +2876,8 @@ void VulkanHppGenerator::sortDependencies()
if (depIt->dependencies.find(it->name) != depIt->dependencies.end()) if (depIt->dependencies.find(it->name) != depIt->dependencies.end())
{ {
// we only have just one case, for now! // we only have just one case, for now!
assert((it->category == DependencyData::Category::HANDLE) && (depIt->category == DependencyData::Category::STRUCT)); assert((it->category == DependencyData::Category::HANDLE) && (depIt->category == DependencyData::Category::STRUCT)
|| (it->category == DependencyData::Category::STRUCT) && (depIt->category == DependencyData::Category::STRUCT));
it->forwardDependencies.insert(*dit); it->forwardDependencies.insert(*dit);
it->dependencies.erase(*dit); it->dependencies.erase(*dit);
found = true; found = true;
@ -4682,6 +4683,8 @@ void VulkanHppGenerator::writeTypeStruct(std::ostream & os, DependencyData const
if (it->second.members[i].type == "StructureType") if (it->second.members[i].type == "StructureType")
{ {
assert((i == 0) && (it->second.members[i].name == "sType")); assert((i == 0) && (it->second.members[i].name == "sType"));
if (!it->second.members[i].values.empty())
{
assert(!it->second.members[i].values.empty()); assert(!it->second.members[i].values.empty());
auto nameIt = m_nameMap.find(it->second.members[i].values); auto nameIt = m_nameMap.find(it->second.members[i].values);
assert(nameIt != m_nameMap.end()); assert(nameIt != m_nameMap.end());
@ -4691,6 +4694,11 @@ void VulkanHppGenerator::writeTypeStruct(std::ostream & os, DependencyData const
<< " public:" << std::endl; << " public:" << std::endl;
} }
else else
{
os << " StructureType sType;" << std::endl;
}
}
else
{ {
os << " " << it->second.members[i].type << " " << it->second.members[i].name; os << " " << it->second.members[i].type << " " << it->second.members[i].name;
if (it->second.members[i].name == "pNext") if (it->second.members[i].name == "pNext")

View File

@ -36,7 +36,7 @@
# include <cassert> # include <cassert>
# define VULKAN_HPP_ASSERT assert # define VULKAN_HPP_ASSERT assert
#endif #endif
static_assert( VK_HEADER_VERSION == 74 , "Wrong VK_HEADER_VERSION!" ); static_assert( VK_HEADER_VERSION == 75 , "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default. // 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 VULKAN_HPP_TYPESAFE_CONVERSION // To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
@ -38511,6 +38511,92 @@ public:
#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/
struct BaseOutStructure
{
BaseOutStructure( )
{
}
BaseOutStructure( VkBaseOutStructure const & rhs )
{
memcpy( this, &rhs, sizeof( BaseOutStructure ) );
}
BaseOutStructure& operator=( VkBaseOutStructure const & rhs )
{
memcpy( this, &rhs, sizeof( BaseOutStructure ) );
return *this;
}
BaseOutStructure& setPNext( struct BaseOutStructure* pNext_ )
{
pNext = pNext_;
return *this;
}
operator const VkBaseOutStructure&() const
{
return *reinterpret_cast<const VkBaseOutStructure*>(this);
}
bool operator==( BaseOutStructure const& rhs ) const
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext );
}
bool operator!=( BaseOutStructure const& rhs ) const
{
return !operator==( rhs );
}
StructureType sType;
struct BaseOutStructure* pNext = nullptr;
};
static_assert( sizeof( BaseOutStructure ) == sizeof( VkBaseOutStructure ), "struct and wrapper have different size!" );
struct BaseInStructure
{
BaseInStructure( )
{
}
BaseInStructure( VkBaseInStructure const & rhs )
{
memcpy( this, &rhs, sizeof( BaseInStructure ) );
}
BaseInStructure& operator=( VkBaseInStructure const & rhs )
{
memcpy( this, &rhs, sizeof( BaseInStructure ) );
return *this;
}
BaseInStructure& setPNext( const struct BaseInStructure* pNext_ )
{
pNext = pNext_;
return *this;
}
operator const VkBaseInStructure&() const
{
return *reinterpret_cast<const VkBaseInStructure*>(this);
}
bool operator==( BaseInStructure const& rhs ) const
{
return ( sType == rhs.sType )
&& ( pNext == rhs.pNext );
}
bool operator!=( BaseInStructure const& rhs ) const
{
return !operator==( rhs );
}
StructureType sType;
const struct BaseInStructure* pNext = nullptr;
};
static_assert( sizeof( BaseInStructure ) == sizeof( VkBaseInStructure ), "struct and wrapper have different size!" );
template <> struct isStructureChainValid<PresentInfoKHR, DisplayPresentInfoKHR>{ enum { value = true }; }; template <> struct isStructureChainValid<PresentInfoKHR, DisplayPresentInfoKHR>{ enum { value = true }; };
template <> struct isStructureChainValid<ImageCreateInfo, DedicatedAllocationImageCreateInfoNV>{ enum { value = true }; }; template <> struct isStructureChainValid<ImageCreateInfo, DedicatedAllocationImageCreateInfoNV>{ enum { value = true }; };
template <> struct isStructureChainValid<BufferCreateInfo, DedicatedAllocationBufferCreateInfoNV>{ enum { value = true }; }; template <> struct isStructureChainValid<BufferCreateInfo, DedicatedAllocationBufferCreateInfoNV>{ enum { value = true }; };