mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-23 12:40:05 +00:00
Updated version check to new VK_HEADER_VERSION, incompatible with version 1.0.5 and before
This commit is contained in:
parent
ab89b93948
commit
976a980afa
@ -1126,7 +1126,7 @@ void readTypeBitmask(tinyxml2::XMLElement * element, VkData & vkData)
|
||||
void readTypeDefine( tinyxml2::XMLElement * element, VkData & vkData )
|
||||
{
|
||||
tinyxml2::XMLElement * child = element->FirstChildElement();
|
||||
if (child && (strcmp(child->GetText(), "VK_API_VERSION") == 0))
|
||||
if (child && (strcmp(child->GetText(), "VK_HEADER_VERSION") == 0))
|
||||
{
|
||||
vkData.version = element->LastChild()->ToText()->Value();
|
||||
}
|
||||
@ -2782,7 +2782,7 @@ void writeTypes(std::ofstream & ofs, VkData const& vkData, std::map<std::string,
|
||||
|
||||
void writeVersionCheck(std::ofstream & ofs, std::string const& version)
|
||||
{
|
||||
ofs << "static_assert( VK_MAKE_VERSION" << version << " == VK_API_VERSION, \"Wrong VK_API_VERSION!\" );" << std::endl
|
||||
ofs << "static_assert( VK_HEADER_VERSION == " << version << " , \"Wrong VK_HEADER_VERSION!\" );" << std::endl
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
# include <vector>
|
||||
#endif /*VKCPP_ENHANCED_MODE*/
|
||||
|
||||
static_assert( VK_MAKE_VERSION(1, 0, 5) == VK_API_VERSION, "Wrong VK_API_VERSION!" );
|
||||
static_assert( VK_HEADER_VERSION == 8 , "Wrong VK_HEADER_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
|
||||
@ -5323,7 +5323,8 @@ namespace vk
|
||||
enum class Filter
|
||||
{
|
||||
eNearest = VK_FILTER_NEAREST,
|
||||
eLinear = VK_FILTER_LINEAR
|
||||
eLinear = VK_FILTER_LINEAR,
|
||||
eCubicIMG = VK_FILTER_CUBIC_IMG
|
||||
};
|
||||
|
||||
enum class SamplerMipmapMode
|
||||
@ -12974,7 +12975,8 @@ namespace vk
|
||||
eDepthStencilAttachment = VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT,
|
||||
eBlitSrc = VK_FORMAT_FEATURE_BLIT_SRC_BIT,
|
||||
eBlitDst = VK_FORMAT_FEATURE_BLIT_DST_BIT,
|
||||
eSampledImageFilterLinear = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
|
||||
eSampledImageFilterLinear = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT,
|
||||
eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG
|
||||
};
|
||||
|
||||
typedef Flags<FormatFeatureFlagBits, VkFormatFeatureFlags> FormatFeatureFlags;
|
||||
@ -23207,6 +23209,7 @@ namespace vk
|
||||
{
|
||||
case Filter::eNearest: return "Nearest";
|
||||
case Filter::eLinear: return "Linear";
|
||||
case Filter::eCubicIMG: return "CubicIMG";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
@ -24041,6 +24044,7 @@ namespace vk
|
||||
case FormatFeatureFlagBits::eBlitSrc: return "BlitSrc";
|
||||
case FormatFeatureFlagBits::eBlitDst: return "BlitDst";
|
||||
case FormatFeatureFlagBits::eSampledImageFilterLinear: return "SampledImageFilterLinear";
|
||||
case FormatFeatureFlagBits::eSampledImageFilterCubicIMG: return "SampledImageFilterCubicIMG";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
@ -24062,6 +24066,7 @@ namespace vk
|
||||
if (value & FormatFeatureFlagBits::eBlitSrc) result += "BlitSrc | ";
|
||||
if (value & FormatFeatureFlagBits::eBlitDst) result += "BlitDst | ";
|
||||
if (value & FormatFeatureFlagBits::eSampledImageFilterLinear) result += "SampledImageFilterLinear | ";
|
||||
if (value & FormatFeatureFlagBits::eSampledImageFilterCubicIMG) result += "SampledImageFilterCubicIMG | ";
|
||||
return result.substr(0, result.size() - 3);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user