From: Charles Giessen Date: Mon, 21 Oct 2019 20:43:47 +0000 (-0600) Subject: vulkaninfo: reduced spurious warnings for msvc X-Git-Tag: upstream/1.2.179~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af519f9685398cbb1eeb0d0bf0e400dade80871f;p=platform%2Fupstream%2FVulkan-Tools.git vulkaninfo: reduced spurious warnings for msvc This commit removes several spurious wanings msvc would display, like implicit conversions for VkBool32 to bool and several signed/unsigned comparisons. Change-Id: Id485c044575105ec52fd49f9f0c5881674841a8e --- diff --git a/scripts/vulkaninfo_generator.py b/scripts/vulkaninfo_generator.py index eda3ec6..aabfac9 100644 --- a/scripts/vulkaninfo_generator.py +++ b/scripts/vulkaninfo_generator.py @@ -552,8 +552,8 @@ def PrintStructure(struct, structure_names, gen): out += " p.PrintElement(obj." + v.name + "[i]);\n" out += " }\n p.ArrayEnd();\n" elif v.typeID == "VkBool32": - out += " p.PrintKeyBool(\"" + v.name + "\", obj." + \ - v.name + ", " + str(max_key_len) + ");\n" + out += " p.PrintKeyBool(\"" + v.name + "\", static_cast(obj." + \ + v.name + "), " + str(max_key_len) + ");\n" elif v.typeID == "VkDeviceSize": out += " p.PrintKeyValue(\"" + v.name + "\", to_hex_str(p, obj." + \ v.name + "), " + str(max_key_len) + ");\n" diff --git a/vulkaninfo/generated/vulkaninfo.hpp b/vulkaninfo/generated/vulkaninfo.hpp index 8e44bd3..e433865 100644 --- a/vulkaninfo/generated/vulkaninfo.hpp +++ b/vulkaninfo/generated/vulkaninfo.hpp @@ -71,7 +71,7 @@ static const char *VkColorSpaceKHRString(VkColorSpaceKHR value) { default: return "UNKNOWN_VkColorSpaceKHR"; } } -void DumpVkColorSpaceKHR(Printer &p, std::string name, VkColorSpaceKHR value, int width = 0) { +void DumpVkColorSpaceKHR(Printer &p, std::string name, VkColorSpaceKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -96,7 +96,7 @@ static const char *VkDriverIdKHRString(VkDriverIdKHR value) { default: return "UNKNOWN_VkDriverIdKHR"; } } -void DumpVkDriverIdKHR(Printer &p, std::string name, VkDriverIdKHR value, int width = 0) { +void DumpVkDriverIdKHR(Printer &p, std::string name, VkDriverIdKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -350,7 +350,7 @@ static const char *VkFormatString(VkFormat value) { default: return "UNKNOWN_VkFormat"; } } -void DumpVkFormat(Printer &p, std::string name, VkFormat value, int width = 0) { +void DumpVkFormat(Printer &p, std::string name, VkFormat value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -366,7 +366,7 @@ static const char *VkImageTilingString(VkImageTiling value) { default: return "UNKNOWN_VkImageTiling"; } } -void DumpVkImageTiling(Printer &p, std::string name, VkImageTiling value, int width = 0) { +void DumpVkImageTiling(Printer &p, std::string name, VkImageTiling value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -384,7 +384,7 @@ static const char *VkPhysicalDeviceTypeString(VkPhysicalDeviceType value) { default: return "UNKNOWN_VkPhysicalDeviceType"; } } -void DumpVkPhysicalDeviceType(Printer &p, std::string name, VkPhysicalDeviceType value, int width = 0) { +void DumpVkPhysicalDeviceType(Printer &p, std::string name, VkPhysicalDeviceType value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -399,7 +399,7 @@ static const char *VkPointClippingBehaviorString(VkPointClippingBehavior value) default: return "UNKNOWN_VkPointClippingBehavior"; } } -void DumpVkPointClippingBehavior(Printer &p, std::string name, VkPointClippingBehavior value, int width = 0) { +void DumpVkPointClippingBehavior(Printer &p, std::string name, VkPointClippingBehavior value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -418,7 +418,7 @@ static const char *VkPresentModeKHRString(VkPresentModeKHR value) { default: return "UNKNOWN_VkPresentModeKHR"; } } -void DumpVkPresentModeKHR(Printer &p, std::string name, VkPresentModeKHR value, int width = 0) { +void DumpVkPresentModeKHR(Printer &p, std::string name, VkPresentModeKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -463,7 +463,7 @@ static const char *VkResultString(VkResult value) { default: return "UNKNOWN_VkResult"; } } -void DumpVkResult(Printer &p, std::string name, VkResult value, int width = 0) { +void DumpVkResult(Printer &p, std::string name, VkResult value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -479,7 +479,7 @@ static const char *VkShaderFloatControlsIndependenceKHRString(VkShaderFloatContr default: return "UNKNOWN_VkShaderFloatControlsIndependenceKHR"; } } -void DumpVkShaderFloatControlsIndependenceKHR(Printer &p, std::string name, VkShaderFloatControlsIndependenceKHR value, int width = 0) { +void DumpVkShaderFloatControlsIndependenceKHR(Printer &p, std::string name, VkShaderFloatControlsIndependenceKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value, width); return; @@ -487,45 +487,45 @@ void DumpVkShaderFloatControlsIndependenceKHR(Printer &p, std::string name, VkSh p.PrintKeyValue(name, VkShaderFloatControlsIndependenceKHRString(value), width); } } -void DumpVkCompositeAlphaFlagsKHR(Printer &p, std::string name, VkCompositeAlphaFlagBitsKHR value, int width = 0) { +void DumpVkCompositeAlphaFlagsKHR(Printer &p, std::string name, VkCompositeAlphaFlagBitsKHR value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("COMPOSITE_ALPHA_OPAQUE_BIT_KHR"); if (2 & value) p.SetAsType().PrintElement("COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"); if (4 & value) p.SetAsType().PrintElement("COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"); if (8 & value) p.SetAsType().PrintElement("COMPOSITE_ALPHA_INHERIT_BIT_KHR"); } -void DumpVkCompositeAlphaFlagsKHR(Printer &p, std::string name, VkCompositeAlphaFlagsKHR value, int width = 0) { +void DumpVkCompositeAlphaFlagsKHR(Printer &p, std::string name, VkCompositeAlphaFlagsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkCompositeAlphaFlagsKHR(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkCompositeAlphaFlagBitsKHR(Printer &p, std::string name, VkCompositeAlphaFlagBitsKHR value, int width = 0) { +void DumpVkCompositeAlphaFlagBitsKHR(Printer &p, std::string name, VkCompositeAlphaFlagBitsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkCompositeAlphaFlagsKHR(p, name, value, width); p.ObjectEnd(); } -void DumpVkDeviceGroupPresentModeFlagsKHR(Printer &p, std::string name, VkDeviceGroupPresentModeFlagBitsKHR value, int width = 0) { +void DumpVkDeviceGroupPresentModeFlagsKHR(Printer &p, std::string name, VkDeviceGroupPresentModeFlagBitsKHR value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR"); if (2 & value) p.SetAsType().PrintElement("DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR"); if (4 & value) p.SetAsType().PrintElement("DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR"); if (8 & value) p.SetAsType().PrintElement("DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR"); } -void DumpVkDeviceGroupPresentModeFlagsKHR(Printer &p, std::string name, VkDeviceGroupPresentModeFlagsKHR value, int width = 0) { +void DumpVkDeviceGroupPresentModeFlagsKHR(Printer &p, std::string name, VkDeviceGroupPresentModeFlagsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkDeviceGroupPresentModeFlagsKHR(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkDeviceGroupPresentModeFlagBitsKHR(Printer &p, std::string name, VkDeviceGroupPresentModeFlagBitsKHR value, int width = 0) { +void DumpVkDeviceGroupPresentModeFlagBitsKHR(Printer &p, std::string name, VkDeviceGroupPresentModeFlagBitsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkDeviceGroupPresentModeFlagsKHR(p, name, value, width); p.ObjectEnd(); } -void DumpVkFormatFeatureFlags(Printer &p, std::string name, VkFormatFeatureFlagBits value, int width = 0) { +void DumpVkFormatFeatureFlags(Printer &p, std::string name, VkFormatFeatureFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("FORMAT_FEATURE_SAMPLED_IMAGE_BIT"); if (2 & value) p.SetAsType().PrintElement("FORMAT_FEATURE_STORAGE_IMAGE_BIT"); @@ -553,19 +553,19 @@ void DumpVkFormatFeatureFlags(Printer &p, std::string name, VkFormatFeatureFlagB if (65536 & value) p.SetAsType().PrintElement("FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT"); if (16777216 & value) p.SetAsType().PrintElement("FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT"); } -void DumpVkFormatFeatureFlags(Printer &p, std::string name, VkFormatFeatureFlags value, int width = 0) { +void DumpVkFormatFeatureFlags(Printer &p, std::string name, VkFormatFeatureFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkFormatFeatureFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkFormatFeatureFlagBits(Printer &p, std::string name, VkFormatFeatureFlagBits value, int width = 0) { +void DumpVkFormatFeatureFlagBits(Printer &p, std::string name, VkFormatFeatureFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkFormatFeatureFlags(p, name, value, width); p.ObjectEnd(); } -void DumpVkImageUsageFlags(Printer &p, std::string name, VkImageUsageFlagBits value, int width = 0) { +void DumpVkImageUsageFlags(Printer &p, std::string name, VkImageUsageFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("IMAGE_USAGE_TRANSFER_SRC_BIT"); if (2 & value) p.SetAsType().PrintElement("IMAGE_USAGE_TRANSFER_DST_BIT"); @@ -578,36 +578,36 @@ void DumpVkImageUsageFlags(Printer &p, std::string name, VkImageUsageFlagBits va if (256 & value) p.SetAsType().PrintElement("IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV"); if (512 & value) p.SetAsType().PrintElement("IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT"); } -void DumpVkImageUsageFlags(Printer &p, std::string name, VkImageUsageFlags value, int width = 0) { +void DumpVkImageUsageFlags(Printer &p, std::string name, VkImageUsageFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkImageUsageFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkImageUsageFlagBits(Printer &p, std::string name, VkImageUsageFlagBits value, int width = 0) { +void DumpVkImageUsageFlagBits(Printer &p, std::string name, VkImageUsageFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkImageUsageFlags(p, name, value, width); p.ObjectEnd(); } -void DumpVkMemoryHeapFlags(Printer &p, std::string name, VkMemoryHeapFlagBits value, int width = 0) { +void DumpVkMemoryHeapFlags(Printer &p, std::string name, VkMemoryHeapFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("MEMORY_HEAP_DEVICE_LOCAL_BIT"); if (2 & value) p.SetAsType().PrintElement("MEMORY_HEAP_MULTI_INSTANCE_BIT"); } -void DumpVkMemoryHeapFlags(Printer &p, std::string name, VkMemoryHeapFlags value, int width = 0) { +void DumpVkMemoryHeapFlags(Printer &p, std::string name, VkMemoryHeapFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkMemoryHeapFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkMemoryHeapFlagBits(Printer &p, std::string name, VkMemoryHeapFlagBits value, int width = 0) { +void DumpVkMemoryHeapFlagBits(Printer &p, std::string name, VkMemoryHeapFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkMemoryHeapFlags(p, name, value, width); p.ObjectEnd(); } -void DumpVkMemoryPropertyFlags(Printer &p, std::string name, VkMemoryPropertyFlagBits value, int width = 0) { +void DumpVkMemoryPropertyFlags(Printer &p, std::string name, VkMemoryPropertyFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("MEMORY_PROPERTY_DEVICE_LOCAL_BIT"); if (2 & value) p.SetAsType().PrintElement("MEMORY_PROPERTY_HOST_VISIBLE_BIT"); @@ -618,19 +618,19 @@ void DumpVkMemoryPropertyFlags(Printer &p, std::string name, VkMemoryPropertyFla if (64 & value) p.SetAsType().PrintElement("MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD"); if (128 & value) p.SetAsType().PrintElement("MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD"); } -void DumpVkMemoryPropertyFlags(Printer &p, std::string name, VkMemoryPropertyFlags value, int width = 0) { +void DumpVkMemoryPropertyFlags(Printer &p, std::string name, VkMemoryPropertyFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkMemoryPropertyFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkMemoryPropertyFlagBits(Printer &p, std::string name, VkMemoryPropertyFlagBits value, int width = 0) { +void DumpVkMemoryPropertyFlagBits(Printer &p, std::string name, VkMemoryPropertyFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkMemoryPropertyFlags(p, name, value, width); p.ObjectEnd(); } -std::string VkQueueFlagsString(VkQueueFlags value, int width = 0) { +std::string VkQueueFlagsString(VkQueueFlags value, size_t width = 0) { std::string out; bool is_first = true; if (1 & value) { @@ -655,7 +655,7 @@ std::string VkQueueFlagsString(VkQueueFlags value, int width = 0) { } return out; } -void DumpVkResolveModeFlagsKHR(Printer &p, std::string name, VkResolveModeFlagBitsKHR value, int width = 0) { +void DumpVkResolveModeFlagsKHR(Printer &p, std::string name, VkResolveModeFlagBitsKHR value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (0 & value) p.SetAsType().PrintElement("RESOLVE_MODE_NONE_KHR"); if (1 & value) p.SetAsType().PrintElement("RESOLVE_MODE_SAMPLE_ZERO_BIT_KHR"); @@ -663,19 +663,19 @@ void DumpVkResolveModeFlagsKHR(Printer &p, std::string name, VkResolveModeFlagBi if (4 & value) p.SetAsType().PrintElement("RESOLVE_MODE_MIN_BIT_KHR"); if (8 & value) p.SetAsType().PrintElement("RESOLVE_MODE_MAX_BIT_KHR"); } -void DumpVkResolveModeFlagsKHR(Printer &p, std::string name, VkResolveModeFlagsKHR value, int width = 0) { +void DumpVkResolveModeFlagsKHR(Printer &p, std::string name, VkResolveModeFlagsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkResolveModeFlagsKHR(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkResolveModeFlagBitsKHR(Printer &p, std::string name, VkResolveModeFlagBitsKHR value, int width = 0) { +void DumpVkResolveModeFlagBitsKHR(Printer &p, std::string name, VkResolveModeFlagBitsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkResolveModeFlagsKHR(p, name, value, width); p.ObjectEnd(); } -void DumpVkSampleCountFlags(Printer &p, std::string name, VkSampleCountFlagBits value, int width = 0) { +void DumpVkSampleCountFlags(Printer &p, std::string name, VkSampleCountFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("SAMPLE_COUNT_1_BIT"); if (2 & value) p.SetAsType().PrintElement("SAMPLE_COUNT_2_BIT"); @@ -685,19 +685,19 @@ void DumpVkSampleCountFlags(Printer &p, std::string name, VkSampleCountFlagBits if (32 & value) p.SetAsType().PrintElement("SAMPLE_COUNT_32_BIT"); if (64 & value) p.SetAsType().PrintElement("SAMPLE_COUNT_64_BIT"); } -void DumpVkSampleCountFlags(Printer &p, std::string name, VkSampleCountFlags value, int width = 0) { +void DumpVkSampleCountFlags(Printer &p, std::string name, VkSampleCountFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkSampleCountFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkSampleCountFlagBits(Printer &p, std::string name, VkSampleCountFlagBits value, int width = 0) { +void DumpVkSampleCountFlagBits(Printer &p, std::string name, VkSampleCountFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkSampleCountFlags(p, name, value, width); p.ObjectEnd(); } -void DumpVkShaderStageFlags(Printer &p, std::string name, VkShaderStageFlagBits value, int width = 0) { +void DumpVkShaderStageFlags(Printer &p, std::string name, VkShaderStageFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("SHADER_STAGE_VERTEX_BIT"); if (2 & value) p.SetAsType().PrintElement("SHADER_STAGE_TESSELLATION_CONTROL_BIT"); @@ -716,19 +716,19 @@ void DumpVkShaderStageFlags(Printer &p, std::string name, VkShaderStageFlagBits if (64 & value) p.SetAsType().PrintElement("SHADER_STAGE_TASK_BIT_NV"); if (128 & value) p.SetAsType().PrintElement("SHADER_STAGE_MESH_BIT_NV"); } -void DumpVkShaderStageFlags(Printer &p, std::string name, VkShaderStageFlags value, int width = 0) { +void DumpVkShaderStageFlags(Printer &p, std::string name, VkShaderStageFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkShaderStageFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkShaderStageFlagBits(Printer &p, std::string name, VkShaderStageFlagBits value, int width = 0) { +void DumpVkShaderStageFlagBits(Printer &p, std::string name, VkShaderStageFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkShaderStageFlags(p, name, value, width); p.ObjectEnd(); } -void DumpVkSubgroupFeatureFlags(Printer &p, std::string name, VkSubgroupFeatureFlagBits value, int width = 0) { +void DumpVkSubgroupFeatureFlags(Printer &p, std::string name, VkSubgroupFeatureFlagBits value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("SUBGROUP_FEATURE_BASIC_BIT"); if (2 & value) p.SetAsType().PrintElement("SUBGROUP_FEATURE_VOTE_BIT"); @@ -740,19 +740,19 @@ void DumpVkSubgroupFeatureFlags(Printer &p, std::string name, VkSubgroupFeatureF if (128 & value) p.SetAsType().PrintElement("SUBGROUP_FEATURE_QUAD_BIT"); if (256 & value) p.SetAsType().PrintElement("SUBGROUP_FEATURE_PARTITIONED_BIT_NV"); } -void DumpVkSubgroupFeatureFlags(Printer &p, std::string name, VkSubgroupFeatureFlags value, int width = 0) { +void DumpVkSubgroupFeatureFlags(Printer &p, std::string name, VkSubgroupFeatureFlags value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkSubgroupFeatureFlags(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkSubgroupFeatureFlagBits(Printer &p, std::string name, VkSubgroupFeatureFlagBits value, int width = 0) { +void DumpVkSubgroupFeatureFlagBits(Printer &p, std::string name, VkSubgroupFeatureFlagBits value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkSubgroupFeatureFlags(p, name, value, width); p.ObjectEnd(); } -void DumpVkSurfaceTransformFlagsKHR(Printer &p, std::string name, VkSurfaceTransformFlagBitsKHR value, int width = 0) { +void DumpVkSurfaceTransformFlagsKHR(Printer &p, std::string name, VkSurfaceTransformFlagBitsKHR value, size_t width = 0) { if (value == 0) p.PrintElement("None"); if (1 & value) p.SetAsType().PrintElement("SURFACE_TRANSFORM_IDENTITY_BIT_KHR"); if (2 & value) p.SetAsType().PrintElement("SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"); @@ -764,13 +764,13 @@ void DumpVkSurfaceTransformFlagsKHR(Printer &p, std::string name, VkSurfaceTrans if (128 & value) p.SetAsType().PrintElement("SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"); if (256 & value) p.SetAsType().PrintElement("SURFACE_TRANSFORM_INHERIT_BIT_KHR"); } -void DumpVkSurfaceTransformFlagsKHR(Printer &p, std::string name, VkSurfaceTransformFlagsKHR value, int width = 0) { +void DumpVkSurfaceTransformFlagsKHR(Printer &p, std::string name, VkSurfaceTransformFlagsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkSurfaceTransformFlagsKHR(p, name, static_cast(value), width); p.ObjectEnd(); } -void DumpVkSurfaceTransformFlagBitsKHR(Printer &p, std::string name, VkSurfaceTransformFlagBitsKHR value, int width = 0) { +void DumpVkSurfaceTransformFlagBitsKHR(Printer &p, std::string name, VkSurfaceTransformFlagBitsKHR value, size_t width = 0) { if (p.Type() == OutputType::json) { p.PrintKeyValue(name, value); return; } p.ObjectStart(name); DumpVkSurfaceTransformFlagsKHR(p, name, value, width); @@ -869,7 +869,7 @@ void DumpVkDrmFormatModifierPropertiesListEXT(Printer &p, std::string name, VkDr p.ObjectStart(name); p.PrintKeyValue("drmFormatModifierCount", obj.drmFormatModifierCount, 52); p.ArrayStart("pDrmFormatModifierProperties", obj.drmFormatModifierCount); - for (uint32_t i = 0; i < obj.drmFormatModifierCount; i++) { + for (int32_t i = 0; i < static_cast(obj.drmFormatModifierCount); i++) { if (obj.pDrmFormatModifierProperties != nullptr) { p.SetElementIndex(i); DumpVkDrmFormatModifierPropertiesEXT(p, "pDrmFormatModifierProperties", obj.pDrmFormatModifierProperties[i]); @@ -901,50 +901,50 @@ void DumpVkLayerProperties(Printer &p, std::string name, VkLayerProperties &obj) } void DumpVkPhysicalDevice16BitStorageFeatures(Printer &p, std::string name, VkPhysicalDevice16BitStorageFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("storageBuffer16BitAccess", obj.storageBuffer16BitAccess, 34); - p.PrintKeyBool("uniformAndStorageBuffer16BitAccess", obj.uniformAndStorageBuffer16BitAccess, 34); - p.PrintKeyBool("storagePushConstant16", obj.storagePushConstant16, 34); - p.PrintKeyBool("storageInputOutput16", obj.storageInputOutput16, 34); + p.PrintKeyBool("storageBuffer16BitAccess", static_cast(obj.storageBuffer16BitAccess), 34); + p.PrintKeyBool("uniformAndStorageBuffer16BitAccess", static_cast(obj.uniformAndStorageBuffer16BitAccess), 34); + p.PrintKeyBool("storagePushConstant16", static_cast(obj.storagePushConstant16), 34); + p.PrintKeyBool("storageInputOutput16", static_cast(obj.storageInputOutput16), 34); p.ObjectEnd(); } void DumpVkPhysicalDevice8BitStorageFeaturesKHR(Printer &p, std::string name, VkPhysicalDevice8BitStorageFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("storageBuffer8BitAccess", obj.storageBuffer8BitAccess, 33); - p.PrintKeyBool("uniformAndStorageBuffer8BitAccess", obj.uniformAndStorageBuffer8BitAccess, 33); - p.PrintKeyBool("storagePushConstant8", obj.storagePushConstant8, 33); + p.PrintKeyBool("storageBuffer8BitAccess", static_cast(obj.storageBuffer8BitAccess), 33); + p.PrintKeyBool("uniformAndStorageBuffer8BitAccess", static_cast(obj.uniformAndStorageBuffer8BitAccess), 33); + p.PrintKeyBool("storagePushConstant8", static_cast(obj.storagePushConstant8), 33); p.ObjectEnd(); } void DumpVkPhysicalDeviceASTCDecodeFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceASTCDecodeFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("decodeModeSharedExponent", obj.decodeModeSharedExponent, 24); + p.PrintKeyBool("decodeModeSharedExponent", static_cast(obj.decodeModeSharedExponent), 24); p.ObjectEnd(); } void DumpVkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("advancedBlendCoherentOperations", obj.advancedBlendCoherentOperations, 31); + p.PrintKeyBool("advancedBlendCoherentOperations", static_cast(obj.advancedBlendCoherentOperations), 31); p.ObjectEnd(); } void DumpVkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT &obj) { p.ObjectStart(name); p.PrintKeyValue("advancedBlendMaxColorAttachments", obj.advancedBlendMaxColorAttachments, 37); - p.PrintKeyBool("advancedBlendIndependentBlend", obj.advancedBlendIndependentBlend, 37); - p.PrintKeyBool("advancedBlendNonPremultipliedSrcColor", obj.advancedBlendNonPremultipliedSrcColor, 37); - p.PrintKeyBool("advancedBlendNonPremultipliedDstColor", obj.advancedBlendNonPremultipliedDstColor, 37); - p.PrintKeyBool("advancedBlendCorrelatedOverlap", obj.advancedBlendCorrelatedOverlap, 37); - p.PrintKeyBool("advancedBlendAllOperations", obj.advancedBlendAllOperations, 37); + p.PrintKeyBool("advancedBlendIndependentBlend", static_cast(obj.advancedBlendIndependentBlend), 37); + p.PrintKeyBool("advancedBlendNonPremultipliedSrcColor", static_cast(obj.advancedBlendNonPremultipliedSrcColor), 37); + p.PrintKeyBool("advancedBlendNonPremultipliedDstColor", static_cast(obj.advancedBlendNonPremultipliedDstColor), 37); + p.PrintKeyBool("advancedBlendCorrelatedOverlap", static_cast(obj.advancedBlendCorrelatedOverlap), 37); + p.PrintKeyBool("advancedBlendAllOperations", static_cast(obj.advancedBlendAllOperations), 37); p.ObjectEnd(); } void DumpVkPhysicalDeviceBufferDeviceAddressFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceBufferDeviceAddressFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("bufferDeviceAddress", obj.bufferDeviceAddress, 32); - p.PrintKeyBool("bufferDeviceAddressCaptureReplay", obj.bufferDeviceAddressCaptureReplay, 32); - p.PrintKeyBool("bufferDeviceAddressMultiDevice", obj.bufferDeviceAddressMultiDevice, 32); + p.PrintKeyBool("bufferDeviceAddress", static_cast(obj.bufferDeviceAddress), 32); + p.PrintKeyBool("bufferDeviceAddressCaptureReplay", static_cast(obj.bufferDeviceAddressCaptureReplay), 32); + p.PrintKeyBool("bufferDeviceAddressMultiDevice", static_cast(obj.bufferDeviceAddressMultiDevice), 32); p.ObjectEnd(); } void DumpVkPhysicalDeviceConditionalRenderingFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceConditionalRenderingFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("conditionalRendering", obj.conditionalRendering, 29); - p.PrintKeyBool("inheritedConditionalRendering", obj.inheritedConditionalRendering, 29); + p.PrintKeyBool("conditionalRendering", static_cast(obj.conditionalRendering), 29); + p.PrintKeyBool("inheritedConditionalRendering", static_cast(obj.inheritedConditionalRendering), 29); p.ObjectEnd(); } void DumpVkPhysicalDeviceConservativeRasterizationPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceConservativeRasterizationPropertiesEXT &obj) { @@ -952,61 +952,61 @@ void DumpVkPhysicalDeviceConservativeRasterizationPropertiesEXT(Printer &p, std: p.PrintKeyValue("primitiveOverestimationSize", obj.primitiveOverestimationSize, 43); p.PrintKeyValue("maxExtraPrimitiveOverestimationSize", obj.maxExtraPrimitiveOverestimationSize, 43); p.PrintKeyValue("extraPrimitiveOverestimationSizeGranularity", obj.extraPrimitiveOverestimationSizeGranularity, 43); - p.PrintKeyBool("primitiveUnderestimation", obj.primitiveUnderestimation, 43); - p.PrintKeyBool("conservativePointAndLineRasterization", obj.conservativePointAndLineRasterization, 43); - p.PrintKeyBool("degenerateTrianglesRasterized", obj.degenerateTrianglesRasterized, 43); - p.PrintKeyBool("degenerateLinesRasterized", obj.degenerateLinesRasterized, 43); - p.PrintKeyBool("fullyCoveredFragmentShaderInputVariable", obj.fullyCoveredFragmentShaderInputVariable, 43); - p.PrintKeyBool("conservativeRasterizationPostDepthCoverage", obj.conservativeRasterizationPostDepthCoverage, 43); + p.PrintKeyBool("primitiveUnderestimation", static_cast(obj.primitiveUnderestimation), 43); + p.PrintKeyBool("conservativePointAndLineRasterization", static_cast(obj.conservativePointAndLineRasterization), 43); + p.PrintKeyBool("degenerateTrianglesRasterized", static_cast(obj.degenerateTrianglesRasterized), 43); + p.PrintKeyBool("degenerateLinesRasterized", static_cast(obj.degenerateLinesRasterized), 43); + p.PrintKeyBool("fullyCoveredFragmentShaderInputVariable", static_cast(obj.fullyCoveredFragmentShaderInputVariable), 43); + p.PrintKeyBool("conservativeRasterizationPostDepthCoverage", static_cast(obj.conservativeRasterizationPostDepthCoverage), 43); p.ObjectEnd(); } void DumpVkPhysicalDeviceDepthClipEnableFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceDepthClipEnableFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("depthClipEnable", obj.depthClipEnable, 15); + p.PrintKeyBool("depthClipEnable", static_cast(obj.depthClipEnable), 15); p.ObjectEnd(); } void DumpVkPhysicalDeviceDepthStencilResolvePropertiesKHR(Printer &p, std::string name, VkPhysicalDeviceDepthStencilResolvePropertiesKHR &obj) { p.ObjectStart(name); DumpVkResolveModeFlagsKHR(p, "supportedDepthResolveModes", obj.supportedDepthResolveModes, 22); DumpVkResolveModeFlagsKHR(p, "supportedStencilResolveModes", obj.supportedStencilResolveModes, 22); - p.PrintKeyBool("independentResolveNone", obj.independentResolveNone, 22); - p.PrintKeyBool("independentResolve", obj.independentResolve, 22); + p.PrintKeyBool("independentResolveNone", static_cast(obj.independentResolveNone), 22); + p.PrintKeyBool("independentResolve", static_cast(obj.independentResolve), 22); p.ObjectEnd(); } void DumpVkPhysicalDeviceDescriptorIndexingFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceDescriptorIndexingFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderInputAttachmentArrayDynamicIndexing", obj.shaderInputAttachmentArrayDynamicIndexing, 50); - p.PrintKeyBool("shaderUniformTexelBufferArrayDynamicIndexing", obj.shaderUniformTexelBufferArrayDynamicIndexing, 50); - p.PrintKeyBool("shaderStorageTexelBufferArrayDynamicIndexing", obj.shaderStorageTexelBufferArrayDynamicIndexing, 50); - p.PrintKeyBool("shaderUniformBufferArrayNonUniformIndexing", obj.shaderUniformBufferArrayNonUniformIndexing, 50); - p.PrintKeyBool("shaderSampledImageArrayNonUniformIndexing", obj.shaderSampledImageArrayNonUniformIndexing, 50); - p.PrintKeyBool("shaderStorageBufferArrayNonUniformIndexing", obj.shaderStorageBufferArrayNonUniformIndexing, 50); - p.PrintKeyBool("shaderStorageImageArrayNonUniformIndexing", obj.shaderStorageImageArrayNonUniformIndexing, 50); - p.PrintKeyBool("shaderInputAttachmentArrayNonUniformIndexing", obj.shaderInputAttachmentArrayNonUniformIndexing, 50); - p.PrintKeyBool("shaderUniformTexelBufferArrayNonUniformIndexing", obj.shaderUniformTexelBufferArrayNonUniformIndexing, 50); - p.PrintKeyBool("shaderStorageTexelBufferArrayNonUniformIndexing", obj.shaderStorageTexelBufferArrayNonUniformIndexing, 50); - p.PrintKeyBool("descriptorBindingUniformBufferUpdateAfterBind", obj.descriptorBindingUniformBufferUpdateAfterBind, 50); - p.PrintKeyBool("descriptorBindingSampledImageUpdateAfterBind", obj.descriptorBindingSampledImageUpdateAfterBind, 50); - p.PrintKeyBool("descriptorBindingStorageImageUpdateAfterBind", obj.descriptorBindingStorageImageUpdateAfterBind, 50); - p.PrintKeyBool("descriptorBindingStorageBufferUpdateAfterBind", obj.descriptorBindingStorageBufferUpdateAfterBind, 50); - p.PrintKeyBool("descriptorBindingUniformTexelBufferUpdateAfterBind", obj.descriptorBindingUniformTexelBufferUpdateAfterBind, 50); - p.PrintKeyBool("descriptorBindingStorageTexelBufferUpdateAfterBind", obj.descriptorBindingStorageTexelBufferUpdateAfterBind, 50); - p.PrintKeyBool("descriptorBindingUpdateUnusedWhilePending", obj.descriptorBindingUpdateUnusedWhilePending, 50); - p.PrintKeyBool("descriptorBindingPartiallyBound", obj.descriptorBindingPartiallyBound, 50); - p.PrintKeyBool("descriptorBindingVariableDescriptorCount", obj.descriptorBindingVariableDescriptorCount, 50); - p.PrintKeyBool("runtimeDescriptorArray", obj.runtimeDescriptorArray, 50); + p.PrintKeyBool("shaderInputAttachmentArrayDynamicIndexing", static_cast(obj.shaderInputAttachmentArrayDynamicIndexing), 50); + p.PrintKeyBool("shaderUniformTexelBufferArrayDynamicIndexing", static_cast(obj.shaderUniformTexelBufferArrayDynamicIndexing), 50); + p.PrintKeyBool("shaderStorageTexelBufferArrayDynamicIndexing", static_cast(obj.shaderStorageTexelBufferArrayDynamicIndexing), 50); + p.PrintKeyBool("shaderUniformBufferArrayNonUniformIndexing", static_cast(obj.shaderUniformBufferArrayNonUniformIndexing), 50); + p.PrintKeyBool("shaderSampledImageArrayNonUniformIndexing", static_cast(obj.shaderSampledImageArrayNonUniformIndexing), 50); + p.PrintKeyBool("shaderStorageBufferArrayNonUniformIndexing", static_cast(obj.shaderStorageBufferArrayNonUniformIndexing), 50); + p.PrintKeyBool("shaderStorageImageArrayNonUniformIndexing", static_cast(obj.shaderStorageImageArrayNonUniformIndexing), 50); + p.PrintKeyBool("shaderInputAttachmentArrayNonUniformIndexing", static_cast(obj.shaderInputAttachmentArrayNonUniformIndexing), 50); + p.PrintKeyBool("shaderUniformTexelBufferArrayNonUniformIndexing", static_cast(obj.shaderUniformTexelBufferArrayNonUniformIndexing), 50); + p.PrintKeyBool("shaderStorageTexelBufferArrayNonUniformIndexing", static_cast(obj.shaderStorageTexelBufferArrayNonUniformIndexing), 50); + p.PrintKeyBool("descriptorBindingUniformBufferUpdateAfterBind", static_cast(obj.descriptorBindingUniformBufferUpdateAfterBind), 50); + p.PrintKeyBool("descriptorBindingSampledImageUpdateAfterBind", static_cast(obj.descriptorBindingSampledImageUpdateAfterBind), 50); + p.PrintKeyBool("descriptorBindingStorageImageUpdateAfterBind", static_cast(obj.descriptorBindingStorageImageUpdateAfterBind), 50); + p.PrintKeyBool("descriptorBindingStorageBufferUpdateAfterBind", static_cast(obj.descriptorBindingStorageBufferUpdateAfterBind), 50); + p.PrintKeyBool("descriptorBindingUniformTexelBufferUpdateAfterBind", static_cast(obj.descriptorBindingUniformTexelBufferUpdateAfterBind), 50); + p.PrintKeyBool("descriptorBindingStorageTexelBufferUpdateAfterBind", static_cast(obj.descriptorBindingStorageTexelBufferUpdateAfterBind), 50); + p.PrintKeyBool("descriptorBindingUpdateUnusedWhilePending", static_cast(obj.descriptorBindingUpdateUnusedWhilePending), 50); + p.PrintKeyBool("descriptorBindingPartiallyBound", static_cast(obj.descriptorBindingPartiallyBound), 50); + p.PrintKeyBool("descriptorBindingVariableDescriptorCount", static_cast(obj.descriptorBindingVariableDescriptorCount), 50); + p.PrintKeyBool("runtimeDescriptorArray", static_cast(obj.runtimeDescriptorArray), 50); p.ObjectEnd(); } void DumpVkPhysicalDeviceDescriptorIndexingPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceDescriptorIndexingPropertiesEXT &obj) { p.ObjectStart(name); p.PrintKeyValue("maxUpdateAfterBindDescriptorsInAllPools", obj.maxUpdateAfterBindDescriptorsInAllPools, 52); - p.PrintKeyBool("shaderUniformBufferArrayNonUniformIndexingNative", obj.shaderUniformBufferArrayNonUniformIndexingNative, 52); - p.PrintKeyBool("shaderSampledImageArrayNonUniformIndexingNative", obj.shaderSampledImageArrayNonUniformIndexingNative, 52); - p.PrintKeyBool("shaderStorageBufferArrayNonUniformIndexingNative", obj.shaderStorageBufferArrayNonUniformIndexingNative, 52); - p.PrintKeyBool("shaderStorageImageArrayNonUniformIndexingNative", obj.shaderStorageImageArrayNonUniformIndexingNative, 52); - p.PrintKeyBool("shaderInputAttachmentArrayNonUniformIndexingNative", obj.shaderInputAttachmentArrayNonUniformIndexingNative, 52); - p.PrintKeyBool("robustBufferAccessUpdateAfterBind", obj.robustBufferAccessUpdateAfterBind, 52); - p.PrintKeyBool("quadDivergentImplicitLod", obj.quadDivergentImplicitLod, 52); + p.PrintKeyBool("shaderUniformBufferArrayNonUniformIndexingNative", static_cast(obj.shaderUniformBufferArrayNonUniformIndexingNative), 52); + p.PrintKeyBool("shaderSampledImageArrayNonUniformIndexingNative", static_cast(obj.shaderSampledImageArrayNonUniformIndexingNative), 52); + p.PrintKeyBool("shaderStorageBufferArrayNonUniformIndexingNative", static_cast(obj.shaderStorageBufferArrayNonUniformIndexingNative), 52); + p.PrintKeyBool("shaderStorageImageArrayNonUniformIndexingNative", static_cast(obj.shaderStorageImageArrayNonUniformIndexingNative), 52); + p.PrintKeyBool("shaderInputAttachmentArrayNonUniformIndexingNative", static_cast(obj.shaderInputAttachmentArrayNonUniformIndexingNative), 52); + p.PrintKeyBool("robustBufferAccessUpdateAfterBind", static_cast(obj.robustBufferAccessUpdateAfterBind), 52); + p.PrintKeyBool("quadDivergentImplicitLod", static_cast(obj.quadDivergentImplicitLod), 52); p.PrintKeyValue("maxPerStageDescriptorUpdateAfterBindSamplers", obj.maxPerStageDescriptorUpdateAfterBindSamplers, 52); p.PrintKeyValue("maxPerStageDescriptorUpdateAfterBindUniformBuffers", obj.maxPerStageDescriptorUpdateAfterBindUniformBuffers, 52); p.PrintKeyValue("maxPerStageDescriptorUpdateAfterBindStorageBuffers", obj.maxPerStageDescriptorUpdateAfterBindStorageBuffers, 52); @@ -1044,108 +1044,108 @@ void DumpVkPhysicalDeviceExternalMemoryHostPropertiesEXT(Printer &p, std::string } void DumpVkPhysicalDeviceFeatures(Printer &p, std::string name, VkPhysicalDeviceFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("robustBufferAccess", obj.robustBufferAccess, 39); - p.PrintKeyBool("fullDrawIndexUint32", obj.fullDrawIndexUint32, 39); - p.PrintKeyBool("imageCubeArray", obj.imageCubeArray, 39); - p.PrintKeyBool("independentBlend", obj.independentBlend, 39); - p.PrintKeyBool("geometryShader", obj.geometryShader, 39); - p.PrintKeyBool("tessellationShader", obj.tessellationShader, 39); - p.PrintKeyBool("sampleRateShading", obj.sampleRateShading, 39); - p.PrintKeyBool("dualSrcBlend", obj.dualSrcBlend, 39); - p.PrintKeyBool("logicOp", obj.logicOp, 39); - p.PrintKeyBool("multiDrawIndirect", obj.multiDrawIndirect, 39); - p.PrintKeyBool("drawIndirectFirstInstance", obj.drawIndirectFirstInstance, 39); - p.PrintKeyBool("depthClamp", obj.depthClamp, 39); - p.PrintKeyBool("depthBiasClamp", obj.depthBiasClamp, 39); - p.PrintKeyBool("fillModeNonSolid", obj.fillModeNonSolid, 39); - p.PrintKeyBool("depthBounds", obj.depthBounds, 39); - p.PrintKeyBool("wideLines", obj.wideLines, 39); - p.PrintKeyBool("largePoints", obj.largePoints, 39); - p.PrintKeyBool("alphaToOne", obj.alphaToOne, 39); - p.PrintKeyBool("multiViewport", obj.multiViewport, 39); - p.PrintKeyBool("samplerAnisotropy", obj.samplerAnisotropy, 39); - p.PrintKeyBool("textureCompressionETC2", obj.textureCompressionETC2, 39); - p.PrintKeyBool("textureCompressionASTC_LDR", obj.textureCompressionASTC_LDR, 39); - p.PrintKeyBool("textureCompressionBC", obj.textureCompressionBC, 39); - p.PrintKeyBool("occlusionQueryPrecise", obj.occlusionQueryPrecise, 39); - p.PrintKeyBool("pipelineStatisticsQuery", obj.pipelineStatisticsQuery, 39); - p.PrintKeyBool("vertexPipelineStoresAndAtomics", obj.vertexPipelineStoresAndAtomics, 39); - p.PrintKeyBool("fragmentStoresAndAtomics", obj.fragmentStoresAndAtomics, 39); - p.PrintKeyBool("shaderTessellationAndGeometryPointSize", obj.shaderTessellationAndGeometryPointSize, 39); - p.PrintKeyBool("shaderImageGatherExtended", obj.shaderImageGatherExtended, 39); - p.PrintKeyBool("shaderStorageImageExtendedFormats", obj.shaderStorageImageExtendedFormats, 39); - p.PrintKeyBool("shaderStorageImageMultisample", obj.shaderStorageImageMultisample, 39); - p.PrintKeyBool("shaderStorageImageReadWithoutFormat", obj.shaderStorageImageReadWithoutFormat, 39); - p.PrintKeyBool("shaderStorageImageWriteWithoutFormat", obj.shaderStorageImageWriteWithoutFormat, 39); - p.PrintKeyBool("shaderUniformBufferArrayDynamicIndexing", obj.shaderUniformBufferArrayDynamicIndexing, 39); - p.PrintKeyBool("shaderSampledImageArrayDynamicIndexing", obj.shaderSampledImageArrayDynamicIndexing, 39); - p.PrintKeyBool("shaderStorageBufferArrayDynamicIndexing", obj.shaderStorageBufferArrayDynamicIndexing, 39); - p.PrintKeyBool("shaderStorageImageArrayDynamicIndexing", obj.shaderStorageImageArrayDynamicIndexing, 39); - p.PrintKeyBool("shaderClipDistance", obj.shaderClipDistance, 39); - p.PrintKeyBool("shaderCullDistance", obj.shaderCullDistance, 39); - p.PrintKeyBool("shaderFloat64", obj.shaderFloat64, 39); - p.PrintKeyBool("shaderInt64", obj.shaderInt64, 39); - p.PrintKeyBool("shaderInt16", obj.shaderInt16, 39); - p.PrintKeyBool("shaderResourceResidency", obj.shaderResourceResidency, 39); - p.PrintKeyBool("shaderResourceMinLod", obj.shaderResourceMinLod, 39); - p.PrintKeyBool("sparseBinding", obj.sparseBinding, 39); - p.PrintKeyBool("sparseResidencyBuffer", obj.sparseResidencyBuffer, 39); - p.PrintKeyBool("sparseResidencyImage2D", obj.sparseResidencyImage2D, 39); - p.PrintKeyBool("sparseResidencyImage3D", obj.sparseResidencyImage3D, 39); - p.PrintKeyBool("sparseResidency2Samples", obj.sparseResidency2Samples, 39); - p.PrintKeyBool("sparseResidency4Samples", obj.sparseResidency4Samples, 39); - p.PrintKeyBool("sparseResidency8Samples", obj.sparseResidency8Samples, 39); - p.PrintKeyBool("sparseResidency16Samples", obj.sparseResidency16Samples, 39); - p.PrintKeyBool("sparseResidencyAliased", obj.sparseResidencyAliased, 39); - p.PrintKeyBool("variableMultisampleRate", obj.variableMultisampleRate, 39); - p.PrintKeyBool("inheritedQueries", obj.inheritedQueries, 39); + p.PrintKeyBool("robustBufferAccess", static_cast(obj.robustBufferAccess), 39); + p.PrintKeyBool("fullDrawIndexUint32", static_cast(obj.fullDrawIndexUint32), 39); + p.PrintKeyBool("imageCubeArray", static_cast(obj.imageCubeArray), 39); + p.PrintKeyBool("independentBlend", static_cast(obj.independentBlend), 39); + p.PrintKeyBool("geometryShader", static_cast(obj.geometryShader), 39); + p.PrintKeyBool("tessellationShader", static_cast(obj.tessellationShader), 39); + p.PrintKeyBool("sampleRateShading", static_cast(obj.sampleRateShading), 39); + p.PrintKeyBool("dualSrcBlend", static_cast(obj.dualSrcBlend), 39); + p.PrintKeyBool("logicOp", static_cast(obj.logicOp), 39); + p.PrintKeyBool("multiDrawIndirect", static_cast(obj.multiDrawIndirect), 39); + p.PrintKeyBool("drawIndirectFirstInstance", static_cast(obj.drawIndirectFirstInstance), 39); + p.PrintKeyBool("depthClamp", static_cast(obj.depthClamp), 39); + p.PrintKeyBool("depthBiasClamp", static_cast(obj.depthBiasClamp), 39); + p.PrintKeyBool("fillModeNonSolid", static_cast(obj.fillModeNonSolid), 39); + p.PrintKeyBool("depthBounds", static_cast(obj.depthBounds), 39); + p.PrintKeyBool("wideLines", static_cast(obj.wideLines), 39); + p.PrintKeyBool("largePoints", static_cast(obj.largePoints), 39); + p.PrintKeyBool("alphaToOne", static_cast(obj.alphaToOne), 39); + p.PrintKeyBool("multiViewport", static_cast(obj.multiViewport), 39); + p.PrintKeyBool("samplerAnisotropy", static_cast(obj.samplerAnisotropy), 39); + p.PrintKeyBool("textureCompressionETC2", static_cast(obj.textureCompressionETC2), 39); + p.PrintKeyBool("textureCompressionASTC_LDR", static_cast(obj.textureCompressionASTC_LDR), 39); + p.PrintKeyBool("textureCompressionBC", static_cast(obj.textureCompressionBC), 39); + p.PrintKeyBool("occlusionQueryPrecise", static_cast(obj.occlusionQueryPrecise), 39); + p.PrintKeyBool("pipelineStatisticsQuery", static_cast(obj.pipelineStatisticsQuery), 39); + p.PrintKeyBool("vertexPipelineStoresAndAtomics", static_cast(obj.vertexPipelineStoresAndAtomics), 39); + p.PrintKeyBool("fragmentStoresAndAtomics", static_cast(obj.fragmentStoresAndAtomics), 39); + p.PrintKeyBool("shaderTessellationAndGeometryPointSize", static_cast(obj.shaderTessellationAndGeometryPointSize), 39); + p.PrintKeyBool("shaderImageGatherExtended", static_cast(obj.shaderImageGatherExtended), 39); + p.PrintKeyBool("shaderStorageImageExtendedFormats", static_cast(obj.shaderStorageImageExtendedFormats), 39); + p.PrintKeyBool("shaderStorageImageMultisample", static_cast(obj.shaderStorageImageMultisample), 39); + p.PrintKeyBool("shaderStorageImageReadWithoutFormat", static_cast(obj.shaderStorageImageReadWithoutFormat), 39); + p.PrintKeyBool("shaderStorageImageWriteWithoutFormat", static_cast(obj.shaderStorageImageWriteWithoutFormat), 39); + p.PrintKeyBool("shaderUniformBufferArrayDynamicIndexing", static_cast(obj.shaderUniformBufferArrayDynamicIndexing), 39); + p.PrintKeyBool("shaderSampledImageArrayDynamicIndexing", static_cast(obj.shaderSampledImageArrayDynamicIndexing), 39); + p.PrintKeyBool("shaderStorageBufferArrayDynamicIndexing", static_cast(obj.shaderStorageBufferArrayDynamicIndexing), 39); + p.PrintKeyBool("shaderStorageImageArrayDynamicIndexing", static_cast(obj.shaderStorageImageArrayDynamicIndexing), 39); + p.PrintKeyBool("shaderClipDistance", static_cast(obj.shaderClipDistance), 39); + p.PrintKeyBool("shaderCullDistance", static_cast(obj.shaderCullDistance), 39); + p.PrintKeyBool("shaderFloat64", static_cast(obj.shaderFloat64), 39); + p.PrintKeyBool("shaderInt64", static_cast(obj.shaderInt64), 39); + p.PrintKeyBool("shaderInt16", static_cast(obj.shaderInt16), 39); + p.PrintKeyBool("shaderResourceResidency", static_cast(obj.shaderResourceResidency), 39); + p.PrintKeyBool("shaderResourceMinLod", static_cast(obj.shaderResourceMinLod), 39); + p.PrintKeyBool("sparseBinding", static_cast(obj.sparseBinding), 39); + p.PrintKeyBool("sparseResidencyBuffer", static_cast(obj.sparseResidencyBuffer), 39); + p.PrintKeyBool("sparseResidencyImage2D", static_cast(obj.sparseResidencyImage2D), 39); + p.PrintKeyBool("sparseResidencyImage3D", static_cast(obj.sparseResidencyImage3D), 39); + p.PrintKeyBool("sparseResidency2Samples", static_cast(obj.sparseResidency2Samples), 39); + p.PrintKeyBool("sparseResidency4Samples", static_cast(obj.sparseResidency4Samples), 39); + p.PrintKeyBool("sparseResidency8Samples", static_cast(obj.sparseResidency8Samples), 39); + p.PrintKeyBool("sparseResidency16Samples", static_cast(obj.sparseResidency16Samples), 39); + p.PrintKeyBool("sparseResidencyAliased", static_cast(obj.sparseResidencyAliased), 39); + p.PrintKeyBool("variableMultisampleRate", static_cast(obj.variableMultisampleRate), 39); + p.PrintKeyBool("inheritedQueries", static_cast(obj.inheritedQueries), 39); p.ObjectEnd(); } void DumpVkPhysicalDeviceFloatControlsPropertiesKHR(Printer &p, std::string name, VkPhysicalDeviceFloatControlsPropertiesKHR &obj) { p.ObjectStart(name); DumpVkShaderFloatControlsIndependenceKHR(p, "denormBehaviorIndependence", obj.denormBehaviorIndependence, 37); DumpVkShaderFloatControlsIndependenceKHR(p, "roundingModeIndependence", obj.roundingModeIndependence, 37); - p.PrintKeyBool("shaderSignedZeroInfNanPreserveFloat16", obj.shaderSignedZeroInfNanPreserveFloat16, 37); - p.PrintKeyBool("shaderSignedZeroInfNanPreserveFloat32", obj.shaderSignedZeroInfNanPreserveFloat32, 37); - p.PrintKeyBool("shaderSignedZeroInfNanPreserveFloat64", obj.shaderSignedZeroInfNanPreserveFloat64, 37); - p.PrintKeyBool("shaderDenormPreserveFloat16", obj.shaderDenormPreserveFloat16, 37); - p.PrintKeyBool("shaderDenormPreserveFloat32", obj.shaderDenormPreserveFloat32, 37); - p.PrintKeyBool("shaderDenormPreserveFloat64", obj.shaderDenormPreserveFloat64, 37); - p.PrintKeyBool("shaderDenormFlushToZeroFloat16", obj.shaderDenormFlushToZeroFloat16, 37); - p.PrintKeyBool("shaderDenormFlushToZeroFloat32", obj.shaderDenormFlushToZeroFloat32, 37); - p.PrintKeyBool("shaderDenormFlushToZeroFloat64", obj.shaderDenormFlushToZeroFloat64, 37); - p.PrintKeyBool("shaderRoundingModeRTEFloat16", obj.shaderRoundingModeRTEFloat16, 37); - p.PrintKeyBool("shaderRoundingModeRTEFloat32", obj.shaderRoundingModeRTEFloat32, 37); - p.PrintKeyBool("shaderRoundingModeRTEFloat64", obj.shaderRoundingModeRTEFloat64, 37); - p.PrintKeyBool("shaderRoundingModeRTZFloat16", obj.shaderRoundingModeRTZFloat16, 37); - p.PrintKeyBool("shaderRoundingModeRTZFloat32", obj.shaderRoundingModeRTZFloat32, 37); - p.PrintKeyBool("shaderRoundingModeRTZFloat64", obj.shaderRoundingModeRTZFloat64, 37); + p.PrintKeyBool("shaderSignedZeroInfNanPreserveFloat16", static_cast(obj.shaderSignedZeroInfNanPreserveFloat16), 37); + p.PrintKeyBool("shaderSignedZeroInfNanPreserveFloat32", static_cast(obj.shaderSignedZeroInfNanPreserveFloat32), 37); + p.PrintKeyBool("shaderSignedZeroInfNanPreserveFloat64", static_cast(obj.shaderSignedZeroInfNanPreserveFloat64), 37); + p.PrintKeyBool("shaderDenormPreserveFloat16", static_cast(obj.shaderDenormPreserveFloat16), 37); + p.PrintKeyBool("shaderDenormPreserveFloat32", static_cast(obj.shaderDenormPreserveFloat32), 37); + p.PrintKeyBool("shaderDenormPreserveFloat64", static_cast(obj.shaderDenormPreserveFloat64), 37); + p.PrintKeyBool("shaderDenormFlushToZeroFloat16", static_cast(obj.shaderDenormFlushToZeroFloat16), 37); + p.PrintKeyBool("shaderDenormFlushToZeroFloat32", static_cast(obj.shaderDenormFlushToZeroFloat32), 37); + p.PrintKeyBool("shaderDenormFlushToZeroFloat64", static_cast(obj.shaderDenormFlushToZeroFloat64), 37); + p.PrintKeyBool("shaderRoundingModeRTEFloat16", static_cast(obj.shaderRoundingModeRTEFloat16), 37); + p.PrintKeyBool("shaderRoundingModeRTEFloat32", static_cast(obj.shaderRoundingModeRTEFloat32), 37); + p.PrintKeyBool("shaderRoundingModeRTEFloat64", static_cast(obj.shaderRoundingModeRTEFloat64), 37); + p.PrintKeyBool("shaderRoundingModeRTZFloat16", static_cast(obj.shaderRoundingModeRTZFloat16), 37); + p.PrintKeyBool("shaderRoundingModeRTZFloat32", static_cast(obj.shaderRoundingModeRTZFloat32), 37); + p.PrintKeyBool("shaderRoundingModeRTZFloat64", static_cast(obj.shaderRoundingModeRTZFloat64), 37); p.ObjectEnd(); } void DumpVkPhysicalDeviceFragmentDensityMapFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceFragmentDensityMapFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("fragmentDensityMap", obj.fragmentDensityMap, 37); - p.PrintKeyBool("fragmentDensityMapDynamic", obj.fragmentDensityMapDynamic, 37); - p.PrintKeyBool("fragmentDensityMapNonSubsampledImages", obj.fragmentDensityMapNonSubsampledImages, 37); + p.PrintKeyBool("fragmentDensityMap", static_cast(obj.fragmentDensityMap), 37); + p.PrintKeyBool("fragmentDensityMapDynamic", static_cast(obj.fragmentDensityMapDynamic), 37); + p.PrintKeyBool("fragmentDensityMapNonSubsampledImages", static_cast(obj.fragmentDensityMapNonSubsampledImages), 37); p.ObjectEnd(); } void DumpVkPhysicalDeviceFragmentDensityMapPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceFragmentDensityMapPropertiesEXT &obj) { p.ObjectStart(name); DumpVkExtent2D(p, "minFragmentDensityTexelSize", obj.minFragmentDensityTexelSize); DumpVkExtent2D(p, "maxFragmentDensityTexelSize", obj.maxFragmentDensityTexelSize); - p.PrintKeyBool("fragmentDensityInvocations", obj.fragmentDensityInvocations, 26); + p.PrintKeyBool("fragmentDensityInvocations", static_cast(obj.fragmentDensityInvocations), 26); p.ObjectEnd(); } void DumpVkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("fragmentShaderSampleInterlock", obj.fragmentShaderSampleInterlock, 34); - p.PrintKeyBool("fragmentShaderPixelInterlock", obj.fragmentShaderPixelInterlock, 34); - p.PrintKeyBool("fragmentShaderShadingRateInterlock", obj.fragmentShaderShadingRateInterlock, 34); + p.PrintKeyBool("fragmentShaderSampleInterlock", static_cast(obj.fragmentShaderSampleInterlock), 34); + p.PrintKeyBool("fragmentShaderPixelInterlock", static_cast(obj.fragmentShaderPixelInterlock), 34); + p.PrintKeyBool("fragmentShaderShadingRateInterlock", static_cast(obj.fragmentShaderShadingRateInterlock), 34); p.ObjectEnd(); } void DumpVkPhysicalDeviceHostQueryResetFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceHostQueryResetFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("hostQueryReset", obj.hostQueryReset, 14); + p.PrintKeyBool("hostQueryReset", static_cast(obj.hostQueryReset), 14); p.ObjectEnd(); } void DumpVkPhysicalDeviceIDProperties(Printer &p, std::string name, VkPhysicalDeviceIDProperties &obj) { @@ -1154,23 +1154,23 @@ void DumpVkPhysicalDeviceIDProperties(Printer &p, std::string name, VkPhysicalDe p.PrintKeyString("driverUUID", to_string_16(obj.driverUUID), 15); if (obj.deviceLUIDValid) p.PrintKeyString("deviceLUID", to_string_8(obj.deviceLUID), 15); p.PrintKeyValue("deviceNodeMask", obj.deviceNodeMask, 15); - p.PrintKeyBool("deviceLUIDValid", obj.deviceLUIDValid, 15); + p.PrintKeyBool("deviceLUIDValid", static_cast(obj.deviceLUIDValid), 15); p.ObjectEnd(); } void DumpVkPhysicalDeviceImagelessFramebufferFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceImagelessFramebufferFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("imagelessFramebuffer", obj.imagelessFramebuffer, 20); + p.PrintKeyBool("imagelessFramebuffer", static_cast(obj.imagelessFramebuffer), 20); p.ObjectEnd(); } void DumpVkPhysicalDeviceIndexTypeUint8FeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceIndexTypeUint8FeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("indexTypeUint8", obj.indexTypeUint8, 14); + p.PrintKeyBool("indexTypeUint8", static_cast(obj.indexTypeUint8), 14); p.ObjectEnd(); } void DumpVkPhysicalDeviceInlineUniformBlockFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceInlineUniformBlockFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("inlineUniformBlock", obj.inlineUniformBlock, 50); - p.PrintKeyBool("descriptorBindingInlineUniformBlockUpdateAfterBind", obj.descriptorBindingInlineUniformBlockUpdateAfterBind, 50); + p.PrintKeyBool("inlineUniformBlock", static_cast(obj.inlineUniformBlock), 50); + p.PrintKeyBool("descriptorBindingInlineUniformBlockUpdateAfterBind", static_cast(obj.descriptorBindingInlineUniformBlockUpdateAfterBind), 50); p.ObjectEnd(); } void DumpVkPhysicalDeviceInlineUniformBlockPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceInlineUniformBlockPropertiesEXT &obj) { @@ -1292,7 +1292,7 @@ void DumpVkPhysicalDeviceLimits(Printer &p, std::string name, VkPhysicalDeviceLi DumpVkSampleCountFlags(p, "sampledImageStencilSampleCounts", obj.sampledImageStencilSampleCounts, 47); DumpVkSampleCountFlags(p, "storageImageSampleCounts", obj.storageImageSampleCounts, 47); p.PrintKeyValue("maxSampleMaskWords", obj.maxSampleMaskWords, 47); - p.PrintKeyBool("timestampComputeAndGraphics", obj.timestampComputeAndGraphics, 47); + p.PrintKeyBool("timestampComputeAndGraphics", static_cast(obj.timestampComputeAndGraphics), 47); p.PrintKeyValue("timestampPeriod", obj.timestampPeriod, 47); p.PrintKeyValue("maxClipDistances", obj.maxClipDistances, 47); p.PrintKeyValue("maxCullDistances", obj.maxCullDistances, 47); @@ -1308,8 +1308,8 @@ void DumpVkPhysicalDeviceLimits(Printer &p, std::string name, VkPhysicalDeviceLi p.ArrayEnd(); p.PrintKeyValue("pointSizeGranularity", obj.pointSizeGranularity, 47); p.PrintKeyValue("lineWidthGranularity", obj.lineWidthGranularity, 47); - p.PrintKeyBool("strictLines", obj.strictLines, 47); - p.PrintKeyBool("standardSampleLocations", obj.standardSampleLocations, 47); + p.PrintKeyBool("strictLines", static_cast(obj.strictLines), 47); + p.PrintKeyBool("standardSampleLocations", static_cast(obj.standardSampleLocations), 47); p.PrintKeyValue("optimalBufferCopyOffsetAlignment", to_hex_str(p, obj.optimalBufferCopyOffsetAlignment), 47); p.PrintKeyValue("optimalBufferCopyRowPitchAlignment", to_hex_str(p, obj.optimalBufferCopyRowPitchAlignment), 47); p.PrintKeyValue("nonCoherentAtomSize", to_hex_str(p, obj.nonCoherentAtomSize), 47); @@ -1317,12 +1317,12 @@ void DumpVkPhysicalDeviceLimits(Printer &p, std::string name, VkPhysicalDeviceLi } void DumpVkPhysicalDeviceLineRasterizationFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceLineRasterizationFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("rectangularLines", obj.rectangularLines, 24); - p.PrintKeyBool("bresenhamLines", obj.bresenhamLines, 24); - p.PrintKeyBool("smoothLines", obj.smoothLines, 24); - p.PrintKeyBool("stippledRectangularLines", obj.stippledRectangularLines, 24); - p.PrintKeyBool("stippledBresenhamLines", obj.stippledBresenhamLines, 24); - p.PrintKeyBool("stippledSmoothLines", obj.stippledSmoothLines, 24); + p.PrintKeyBool("rectangularLines", static_cast(obj.rectangularLines), 24); + p.PrintKeyBool("bresenhamLines", static_cast(obj.bresenhamLines), 24); + p.PrintKeyBool("smoothLines", static_cast(obj.smoothLines), 24); + p.PrintKeyBool("stippledRectangularLines", static_cast(obj.stippledRectangularLines), 24); + p.PrintKeyBool("stippledBresenhamLines", static_cast(obj.stippledBresenhamLines), 24); + p.PrintKeyBool("stippledSmoothLines", static_cast(obj.stippledSmoothLines), 24); p.ObjectEnd(); } void DumpVkPhysicalDeviceLineRasterizationPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceLineRasterizationPropertiesEXT &obj) { @@ -1378,14 +1378,14 @@ void DumpVkPhysicalDeviceMemoryBudgetPropertiesEXT(Printer &p, std::string name, } void DumpVkPhysicalDeviceMemoryPriorityFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceMemoryPriorityFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("memoryPriority", obj.memoryPriority, 14); + p.PrintKeyBool("memoryPriority", static_cast(obj.memoryPriority), 14); p.ObjectEnd(); } void DumpVkPhysicalDeviceMultiviewFeatures(Printer &p, std::string name, VkPhysicalDeviceMultiviewFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("multiview", obj.multiview, 27); - p.PrintKeyBool("multiviewGeometryShader", obj.multiviewGeometryShader, 27); - p.PrintKeyBool("multiviewTessellationShader", obj.multiviewTessellationShader, 27); + p.PrintKeyBool("multiview", static_cast(obj.multiview), 27); + p.PrintKeyBool("multiviewGeometryShader", static_cast(obj.multiviewGeometryShader), 27); + p.PrintKeyBool("multiviewTessellationShader", static_cast(obj.multiviewTessellationShader), 27); p.ObjectEnd(); } void DumpVkPhysicalDeviceMultiviewProperties(Printer &p, std::string name, VkPhysicalDeviceMultiviewProperties &obj) { @@ -1404,18 +1404,18 @@ void DumpVkPhysicalDevicePCIBusInfoPropertiesEXT(Printer &p, std::string name, V } void DumpVkPhysicalDevicePerformanceQueryFeaturesKHR(Printer &p, std::string name, VkPhysicalDevicePerformanceQueryFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("performanceCounterQueryPools", obj.performanceCounterQueryPools, 36); - p.PrintKeyBool("performanceCounterMultipleQueryPools", obj.performanceCounterMultipleQueryPools, 36); + p.PrintKeyBool("performanceCounterQueryPools", static_cast(obj.performanceCounterQueryPools), 36); + p.PrintKeyBool("performanceCounterMultipleQueryPools", static_cast(obj.performanceCounterMultipleQueryPools), 36); p.ObjectEnd(); } void DumpVkPhysicalDevicePerformanceQueryPropertiesKHR(Printer &p, std::string name, VkPhysicalDevicePerformanceQueryPropertiesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("allowCommandBufferQueryCopies", obj.allowCommandBufferQueryCopies, 29); + p.PrintKeyBool("allowCommandBufferQueryCopies", static_cast(obj.allowCommandBufferQueryCopies), 29); p.ObjectEnd(); } void DumpVkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(Printer &p, std::string name, VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("pipelineExecutableInfo", obj.pipelineExecutableInfo, 22); + p.PrintKeyBool("pipelineExecutableInfo", static_cast(obj.pipelineExecutableInfo), 22); p.ObjectEnd(); } void DumpVkPhysicalDevicePointClippingProperties(Printer &p, std::string name, VkPhysicalDevicePointClippingProperties &obj) { @@ -1425,12 +1425,12 @@ void DumpVkPhysicalDevicePointClippingProperties(Printer &p, std::string name, V } void DumpVkPhysicalDeviceProtectedMemoryFeatures(Printer &p, std::string name, VkPhysicalDeviceProtectedMemoryFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("protectedMemory", obj.protectedMemory, 15); + p.PrintKeyBool("protectedMemory", static_cast(obj.protectedMemory), 15); p.ObjectEnd(); } void DumpVkPhysicalDeviceProtectedMemoryProperties(Printer &p, std::string name, VkPhysicalDeviceProtectedMemoryProperties &obj) { p.ObjectStart(name); - p.PrintKeyBool("protectedNoFault", obj.protectedNoFault, 16); + p.PrintKeyBool("protectedNoFault", static_cast(obj.protectedNoFault), 16); p.ObjectEnd(); } void DumpVkPhysicalDevicePushDescriptorPropertiesKHR(Printer &p, std::string name, VkPhysicalDevicePushDescriptorPropertiesKHR &obj) { @@ -1447,61 +1447,61 @@ void DumpVkPhysicalDeviceSampleLocationsPropertiesEXT(Printer &p, std::string na p.PrintElement(obj.sampleLocationCoordinateRange[1]); p.ArrayEnd(); p.PrintKeyValue("sampleLocationSubPixelBits", obj.sampleLocationSubPixelBits, 32); - p.PrintKeyBool("variableSampleLocations", obj.variableSampleLocations, 32); + p.PrintKeyBool("variableSampleLocations", static_cast(obj.variableSampleLocations), 32); p.ObjectEnd(); } void DumpVkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("filterMinmaxSingleComponentFormats", obj.filterMinmaxSingleComponentFormats, 34); - p.PrintKeyBool("filterMinmaxImageComponentMapping", obj.filterMinmaxImageComponentMapping, 34); + p.PrintKeyBool("filterMinmaxSingleComponentFormats", static_cast(obj.filterMinmaxSingleComponentFormats), 34); + p.PrintKeyBool("filterMinmaxImageComponentMapping", static_cast(obj.filterMinmaxImageComponentMapping), 34); p.ObjectEnd(); } void DumpVkPhysicalDeviceSamplerYcbcrConversionFeatures(Printer &p, std::string name, VkPhysicalDeviceSamplerYcbcrConversionFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("samplerYcbcrConversion", obj.samplerYcbcrConversion, 22); + p.PrintKeyBool("samplerYcbcrConversion", static_cast(obj.samplerYcbcrConversion), 22); p.ObjectEnd(); } void DumpVkPhysicalDeviceScalarBlockLayoutFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceScalarBlockLayoutFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("scalarBlockLayout", obj.scalarBlockLayout, 17); + p.PrintKeyBool("scalarBlockLayout", static_cast(obj.scalarBlockLayout), 17); p.ObjectEnd(); } void DumpVkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("separateDepthStencilLayouts", obj.separateDepthStencilLayouts, 27); + p.PrintKeyBool("separateDepthStencilLayouts", static_cast(obj.separateDepthStencilLayouts), 27); p.ObjectEnd(); } void DumpVkPhysicalDeviceShaderAtomicInt64FeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceShaderAtomicInt64FeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderBufferInt64Atomics", obj.shaderBufferInt64Atomics, 24); - p.PrintKeyBool("shaderSharedInt64Atomics", obj.shaderSharedInt64Atomics, 24); + p.PrintKeyBool("shaderBufferInt64Atomics", static_cast(obj.shaderBufferInt64Atomics), 24); + p.PrintKeyBool("shaderSharedInt64Atomics", static_cast(obj.shaderSharedInt64Atomics), 24); p.ObjectEnd(); } void DumpVkPhysicalDeviceShaderClockFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceShaderClockFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderSubgroupClock", obj.shaderSubgroupClock, 19); - p.PrintKeyBool("shaderDeviceClock", obj.shaderDeviceClock, 19); + p.PrintKeyBool("shaderSubgroupClock", static_cast(obj.shaderSubgroupClock), 19); + p.PrintKeyBool("shaderDeviceClock", static_cast(obj.shaderDeviceClock), 19); p.ObjectEnd(); } void DumpVkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderDemoteToHelperInvocation", obj.shaderDemoteToHelperInvocation, 30); + p.PrintKeyBool("shaderDemoteToHelperInvocation", static_cast(obj.shaderDemoteToHelperInvocation), 30); p.ObjectEnd(); } void DumpVkPhysicalDeviceShaderDrawParametersFeatures(Printer &p, std::string name, VkPhysicalDeviceShaderDrawParametersFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderDrawParameters", obj.shaderDrawParameters, 20); + p.PrintKeyBool("shaderDrawParameters", static_cast(obj.shaderDrawParameters), 20); p.ObjectEnd(); } void DumpVkPhysicalDeviceShaderFloat16Int8FeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceShaderFloat16Int8FeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderFloat16", obj.shaderFloat16, 13); - p.PrintKeyBool("shaderInt8", obj.shaderInt8, 13); + p.PrintKeyBool("shaderFloat16", static_cast(obj.shaderFloat16), 13); + p.PrintKeyBool("shaderInt8", static_cast(obj.shaderInt8), 13); p.ObjectEnd(); } void DumpVkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("shaderSubgroupExtendedTypes", obj.shaderSubgroupExtendedTypes, 27); + p.PrintKeyBool("shaderSubgroupExtendedTypes", static_cast(obj.shaderSubgroupExtendedTypes), 27); p.ObjectEnd(); } void DumpVkPhysicalDeviceSparseProperties(Printer &p, std::string name, VkPhysicalDeviceSparseProperties &obj) { @@ -1509,11 +1509,11 @@ void DumpVkPhysicalDeviceSparseProperties(Printer &p, std::string name, VkPhysic p.ObjectStart("sparseProperties"); else p.SetSubHeader().ObjectStart(name); - p.PrintKeyBool("residencyStandard2DBlockShape", obj.residencyStandard2DBlockShape, 40); - p.PrintKeyBool("residencyStandard2DMultisampleBlockShape", obj.residencyStandard2DMultisampleBlockShape, 40); - p.PrintKeyBool("residencyStandard3DBlockShape", obj.residencyStandard3DBlockShape, 40); - p.PrintKeyBool("residencyAlignedMipSize", obj.residencyAlignedMipSize, 40); - p.PrintKeyBool("residencyNonResidentStrict", obj.residencyNonResidentStrict, 40); + p.PrintKeyBool("residencyStandard2DBlockShape", static_cast(obj.residencyStandard2DBlockShape), 40); + p.PrintKeyBool("residencyStandard2DMultisampleBlockShape", static_cast(obj.residencyStandard2DMultisampleBlockShape), 40); + p.PrintKeyBool("residencyStandard3DBlockShape", static_cast(obj.residencyStandard3DBlockShape), 40); + p.PrintKeyBool("residencyAlignedMipSize", static_cast(obj.residencyAlignedMipSize), 40); + p.PrintKeyBool("residencyNonResidentStrict", static_cast(obj.residencyNonResidentStrict), 40); p.ObjectEnd(); } void DumpVkPhysicalDeviceSubgroupProperties(Printer &p, std::string name, VkPhysicalDeviceSubgroupProperties &obj) { @@ -1521,13 +1521,13 @@ void DumpVkPhysicalDeviceSubgroupProperties(Printer &p, std::string name, VkPhys p.PrintKeyValue("subgroupSize", obj.subgroupSize, 25); DumpVkShaderStageFlags(p, "supportedStages", obj.supportedStages, 25); DumpVkSubgroupFeatureFlags(p, "supportedOperations", obj.supportedOperations, 25); - p.PrintKeyBool("quadOperationsInAllStages", obj.quadOperationsInAllStages, 25); + p.PrintKeyBool("quadOperationsInAllStages", static_cast(obj.quadOperationsInAllStages), 25); p.ObjectEnd(); } void DumpVkPhysicalDeviceSubgroupSizeControlFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceSubgroupSizeControlFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("subgroupSizeControl", obj.subgroupSizeControl, 20); - p.PrintKeyBool("computeFullSubgroups", obj.computeFullSubgroups, 20); + p.PrintKeyBool("subgroupSizeControl", static_cast(obj.subgroupSizeControl), 20); + p.PrintKeyBool("computeFullSubgroups", static_cast(obj.computeFullSubgroups), 20); p.ObjectEnd(); } void DumpVkPhysicalDeviceSubgroupSizeControlPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceSubgroupSizeControlPropertiesEXT &obj) { @@ -1540,25 +1540,25 @@ void DumpVkPhysicalDeviceSubgroupSizeControlPropertiesEXT(Printer &p, std::strin } void DumpVkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("texelBufferAlignment", obj.texelBufferAlignment, 20); + p.PrintKeyBool("texelBufferAlignment", static_cast(obj.texelBufferAlignment), 20); p.ObjectEnd(); } void DumpVkPhysicalDeviceTexelBufferAlignmentPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT &obj) { p.ObjectStart(name); p.PrintKeyValue("storageTexelBufferOffsetAlignmentBytes", to_hex_str(p, obj.storageTexelBufferOffsetAlignmentBytes), 44); - p.PrintKeyBool("storageTexelBufferOffsetSingleTexelAlignment", obj.storageTexelBufferOffsetSingleTexelAlignment, 44); + p.PrintKeyBool("storageTexelBufferOffsetSingleTexelAlignment", static_cast(obj.storageTexelBufferOffsetSingleTexelAlignment), 44); p.PrintKeyValue("uniformTexelBufferOffsetAlignmentBytes", to_hex_str(p, obj.uniformTexelBufferOffsetAlignmentBytes), 44); - p.PrintKeyBool("uniformTexelBufferOffsetSingleTexelAlignment", obj.uniformTexelBufferOffsetSingleTexelAlignment, 44); + p.PrintKeyBool("uniformTexelBufferOffsetSingleTexelAlignment", static_cast(obj.uniformTexelBufferOffsetSingleTexelAlignment), 44); p.ObjectEnd(); } void DumpVkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("textureCompressionASTC_HDR", obj.textureCompressionASTC_HDR, 26); + p.PrintKeyBool("textureCompressionASTC_HDR", static_cast(obj.textureCompressionASTC_HDR), 26); p.ObjectEnd(); } void DumpVkPhysicalDeviceTimelineSemaphoreFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceTimelineSemaphoreFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("timelineSemaphore", obj.timelineSemaphore, 17); + p.PrintKeyBool("timelineSemaphore", static_cast(obj.timelineSemaphore), 17); p.ObjectEnd(); } void DumpVkPhysicalDeviceTimelineSemaphorePropertiesKHR(Printer &p, std::string name, VkPhysicalDeviceTimelineSemaphorePropertiesKHR &obj) { @@ -1568,8 +1568,8 @@ void DumpVkPhysicalDeviceTimelineSemaphorePropertiesKHR(Printer &p, std::string } void DumpVkPhysicalDeviceTransformFeedbackFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceTransformFeedbackFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("transformFeedback", obj.transformFeedback, 17); - p.PrintKeyBool("geometryStreams", obj.geometryStreams, 17); + p.PrintKeyBool("transformFeedback", static_cast(obj.transformFeedback), 17); + p.PrintKeyBool("geometryStreams", static_cast(obj.geometryStreams), 17); p.ObjectEnd(); } void DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceTransformFeedbackPropertiesEXT &obj) { @@ -1580,27 +1580,27 @@ void DumpVkPhysicalDeviceTransformFeedbackPropertiesEXT(Printer &p, std::string p.PrintKeyValue("maxTransformFeedbackStreamDataSize", obj.maxTransformFeedbackStreamDataSize, 42); p.PrintKeyValue("maxTransformFeedbackBufferDataSize", obj.maxTransformFeedbackBufferDataSize, 42); p.PrintKeyValue("maxTransformFeedbackBufferDataStride", obj.maxTransformFeedbackBufferDataStride, 42); - p.PrintKeyBool("transformFeedbackQueries", obj.transformFeedbackQueries, 42); - p.PrintKeyBool("transformFeedbackStreamsLinesTriangles", obj.transformFeedbackStreamsLinesTriangles, 42); - p.PrintKeyBool("transformFeedbackRasterizationStreamSelect", obj.transformFeedbackRasterizationStreamSelect, 42); - p.PrintKeyBool("transformFeedbackDraw", obj.transformFeedbackDraw, 42); + p.PrintKeyBool("transformFeedbackQueries", static_cast(obj.transformFeedbackQueries), 42); + p.PrintKeyBool("transformFeedbackStreamsLinesTriangles", static_cast(obj.transformFeedbackStreamsLinesTriangles), 42); + p.PrintKeyBool("transformFeedbackRasterizationStreamSelect", static_cast(obj.transformFeedbackRasterizationStreamSelect), 42); + p.PrintKeyBool("transformFeedbackDraw", static_cast(obj.transformFeedbackDraw), 42); p.ObjectEnd(); } void DumpVkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("uniformBufferStandardLayout", obj.uniformBufferStandardLayout, 27); + p.PrintKeyBool("uniformBufferStandardLayout", static_cast(obj.uniformBufferStandardLayout), 27); p.ObjectEnd(); } void DumpVkPhysicalDeviceVariablePointersFeatures(Printer &p, std::string name, VkPhysicalDeviceVariablePointersFeatures &obj) { p.ObjectStart(name); - p.PrintKeyBool("variablePointersStorageBuffer", obj.variablePointersStorageBuffer, 29); - p.PrintKeyBool("variablePointers", obj.variablePointers, 29); + p.PrintKeyBool("variablePointersStorageBuffer", static_cast(obj.variablePointersStorageBuffer), 29); + p.PrintKeyBool("variablePointers", static_cast(obj.variablePointers), 29); p.ObjectEnd(); } void DumpVkPhysicalDeviceVertexAttributeDivisorFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("vertexAttributeInstanceRateDivisor", obj.vertexAttributeInstanceRateDivisor, 38); - p.PrintKeyBool("vertexAttributeInstanceRateZeroDivisor", obj.vertexAttributeInstanceRateZeroDivisor, 38); + p.PrintKeyBool("vertexAttributeInstanceRateDivisor", static_cast(obj.vertexAttributeInstanceRateDivisor), 38); + p.PrintKeyBool("vertexAttributeInstanceRateZeroDivisor", static_cast(obj.vertexAttributeInstanceRateZeroDivisor), 38); p.ObjectEnd(); } void DumpVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(Printer &p, std::string name, VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &obj) { @@ -1610,14 +1610,14 @@ void DumpVkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(Printer &p, std::st } void DumpVkPhysicalDeviceVulkanMemoryModelFeaturesKHR(Printer &p, std::string name, VkPhysicalDeviceVulkanMemoryModelFeaturesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("vulkanMemoryModel", obj.vulkanMemoryModel, 45); - p.PrintKeyBool("vulkanMemoryModelDeviceScope", obj.vulkanMemoryModelDeviceScope, 45); - p.PrintKeyBool("vulkanMemoryModelAvailabilityVisibilityChains", obj.vulkanMemoryModelAvailabilityVisibilityChains, 45); + p.PrintKeyBool("vulkanMemoryModel", static_cast(obj.vulkanMemoryModel), 45); + p.PrintKeyBool("vulkanMemoryModelDeviceScope", static_cast(obj.vulkanMemoryModelDeviceScope), 45); + p.PrintKeyBool("vulkanMemoryModelAvailabilityVisibilityChains", static_cast(obj.vulkanMemoryModelAvailabilityVisibilityChains), 45); p.ObjectEnd(); } void DumpVkPhysicalDeviceYcbcrImageArraysFeaturesEXT(Printer &p, std::string name, VkPhysicalDeviceYcbcrImageArraysFeaturesEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("ycbcrImageArrays", obj.ycbcrImageArrays, 16); + p.PrintKeyBool("ycbcrImageArrays", static_cast(obj.ycbcrImageArrays), 16); p.ObjectEnd(); } void DumpVkSharedPresentSurfaceCapabilitiesKHR(Printer &p, std::string name, VkSharedPresentSurfaceCapabilitiesKHR &obj) { @@ -1628,7 +1628,7 @@ void DumpVkSharedPresentSurfaceCapabilitiesKHR(Printer &p, std::string name, VkS #ifdef VK_USE_PLATFORM_WIN32_KHR void DumpVkSurfaceCapabilitiesFullScreenExclusiveEXT(Printer &p, std::string name, VkSurfaceCapabilitiesFullScreenExclusiveEXT &obj) { p.ObjectStart(name); - p.PrintKeyBool("fullScreenExclusiveSupported", obj.fullScreenExclusiveSupported, 28); + p.PrintKeyBool("fullScreenExclusiveSupported", static_cast(obj.fullScreenExclusiveSupported), 28); p.ObjectEnd(); } #endif // VK_USE_PLATFORM_WIN32_KHR @@ -1654,7 +1654,7 @@ void DumpVkSurfaceFormatKHR(Printer &p, std::string name, VkSurfaceFormatKHR &ob } void DumpVkSurfaceProtectedCapabilitiesKHR(Printer &p, std::string name, VkSurfaceProtectedCapabilitiesKHR &obj) { p.ObjectStart(name); - p.PrintKeyBool("supportsProtected", obj.supportsProtected, 17); + p.PrintKeyBool("supportsProtected", static_cast(obj.supportsProtected), 17); p.ObjectEnd(); } pNextChainInfos get_chain_infos() { diff --git a/vulkaninfo/outputprinter.h b/vulkaninfo/outputprinter.h index 0707350..53cf751 100644 --- a/vulkaninfo/outputprinter.h +++ b/vulkaninfo/outputprinter.h @@ -208,6 +208,9 @@ class Printer { assert(indents == 0 && "indents must be zero at program end"); }; + Printer(const Printer &) = delete; + const Printer &operator=(const Printer &) = delete; + OutputType Type() { return output_type; } // Custom Formatting @@ -247,12 +250,12 @@ class Printer { void ObjectStart(std::string object_name) { switch (output_type) { case (OutputType::text): { - out << std::string(indents, '\t') << object_name; + out << std::string(static_cast(indents), '\t') << object_name; if (element_index != -1) { out << "[" << element_index << "]"; } out << ":\n"; - int headersize = object_name.size() + 1; + size_t headersize = object_name.size() + 1; if (element_index != -1) { headersize += 1 + std::to_string(element_index).size(); element_index = -1; @@ -261,7 +264,7 @@ class Printer { break; } case (OutputType::html): - out << std::string(indents, '\t'); + out << std::string(static_cast(indents), '\t'); if (set_details_open) { out << "
"; set_details_open = false; @@ -287,7 +290,7 @@ class Printer { } else { is_first_item.top() = false; } - out << std::string(indents, '\t'); + out << std::string(static_cast(indents), '\t'); // Objects with no name are elements in an array of objects if (object_name == "" || element_index != -1) { out << "{\n"; @@ -311,25 +314,25 @@ class Printer { break; case (OutputType::html): - out << std::string(indents, '\t') << "
\n"; + out << std::string(static_cast(indents), '\t') << "\n"; break; case (OutputType::json): - out << "\n" << std::string(indents, '\t') << "}"; + out << "\n" << std::string(static_cast(indents), '\t') << "}"; is_first_item.pop(); break; default: break; } } - void ArrayStart(std::string array_name, int element_count = 0) { + void ArrayStart(std::string array_name, size_t element_count = 0) { switch (output_type) { case (OutputType::text): - out << std::string(indents, '\t') << array_name << ": " + out << std::string(static_cast(indents), '\t') << array_name << ": " << "count = " << element_count << "\n"; PrintHeaderUnderlines(array_name.size() + 1); break; case (OutputType::html): - out << std::string(indents, '\t'); + out << std::string(static_cast(indents), '\t'); if (set_details_open) { out << "
"; set_details_open = false; @@ -344,7 +347,7 @@ class Printer { } else { is_first_item.top() = false; } - out << std::string(indents, '\t') << "\"" << array_name << "\": " + out << std::string(static_cast(indents), '\t') << "\"" << array_name << "\": " << "[\n"; is_first_item.push(true); break; @@ -361,10 +364,10 @@ class Printer { break; case (OutputType::html): - out << std::string(indents, '\t') << "
\n"; + out << std::string(static_cast(indents), '\t') << "\n"; break; case (OutputType::json): - out << "\n" << std::string(indents, '\t') << "]"; + out << "\n" << std::string(static_cast(indents), '\t') << "]"; is_first_item.pop(); break; default: @@ -380,9 +383,9 @@ class Printer { switch (output_type) { case (OutputType::text): if (min_key_width > key.size()) { - out << std::string(indents, '\t') << key << std::string(min_key_width - key.size(), ' '); + out << std::string(static_cast(indents), '\t') << key << std::string(min_key_width - key.size(), ' '); } else { - out << std::string(indents, '\t') << key; + out << std::string(static_cast(indents), '\t') << key; } out << " = " << value; if (value_description != "") { @@ -391,7 +394,7 @@ class Printer { out << "\n"; break; case (OutputType::html): - out << std::string(indents, '\t') << "
" << key; + out << std::string(static_cast(indents), '\t') << "
" << key; if (min_key_width > key.size()) { out << std::string(min_key_width - key.size(), ' '); } @@ -412,7 +415,7 @@ class Printer { } else { is_first_item.top() = false; } - out << std::string(indents, '\t') << "\"" << key << "\": " << value; + out << std::string(static_cast(indents), '\t') << "\"" << key << "\": " << value; default: break; } @@ -453,14 +456,14 @@ class Printer { void PrintElement(T element, std::string value_description = "") { switch (output_type) { case (OutputType::text): - out << std::string(indents, '\t') << element; + out << std::string(static_cast(indents), '\t') << element; if (value_description != "") { out << " (" << value_description << ")"; } out << "\n"; break; case (OutputType::html): - out << std::string(indents, '\t') << "
"; + out << std::string(static_cast(indents), '\t') << "
"; if (set_as_type) { set_as_type = false; out << "" << element << ""; @@ -478,22 +481,22 @@ class Printer { } else { is_first_item.top() = false; } - out << std::string(indents, '\t') << element; + out << std::string(static_cast(indents), '\t') << element; break; default: break; } } - void PrintExtension(std::string ext_name, int revision, size_t min_width = 0) { + void PrintExtension(std::string ext_name, uint32_t revision, int min_width = 0) { switch (output_type) { case (OutputType::text): - out << std::string(indents, '\t') << ext_name << std::string(min_width - ext_name.size(), ' ') + out << std::string(static_cast(indents), '\t') << ext_name << std::string(min_width - ext_name.size(), ' ') << " : extension revision " << revision << "\n"; break; case (OutputType::html): - out << std::string(indents, '\t') << "
" << ext_name << "" - << std::string(min_width - ext_name.size(), ' ') << " : extension revision " << revision - << "
\n"; + out << std::string(static_cast(indents), '\t') << "
" << ext_name + << "" << std::string(min_width - ext_name.size(), ' ') << " : extension revision " + << revision << "
\n"; break; case (OutputType::json): @@ -503,31 +506,19 @@ class Printer { } } void AddNewline() { - switch (output_type) { - case (OutputType::text): - out << "\n"; - break; - default: - break; + if (output_type == OutputType::text) { + out << "\n"; } } void IndentIncrease() { - switch (output_type) { - case (OutputType::text): - indents++; - break; - default: - break; + if (output_type == OutputType::text) { + indents++; } } void IndentDecrease() { - switch (output_type) { - case (OutputType::text): - indents--; - assert(indents >= 0 && "indents cannot go below zero"); - break; - default: - break; + if (output_type == OutputType::text) { + indents--; + assert(indents >= 0 && "indents cannot go below zero"); } } @@ -556,14 +547,14 @@ class Printer { std::stack is_first_item; // utility - void PrintHeaderUnderlines(int length) { + void PrintHeaderUnderlines(size_t length) { assert(indents >= 0 && "indents must not be negative"); - assert(length >= 0 && "length must not be negative"); + assert(length <= 10000 && "length shouldn't be unreasonably large"); if (set_next_header) { - out << std::string(indents, '\t') << std::string(length, '=') << "\n"; + out << std::string(static_cast(indents), '\t') << std::string(length, '=') << "\n"; set_next_header = false; } else if (set_next_subheader) { - out << std::string(indents, '\t') << std::string(length, '-') << "\n"; + out << std::string(static_cast(indents), '\t') << std::string(length, '-') << "\n"; set_next_subheader = false; } } diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 4bc5349..5bac3ba 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -52,9 +52,9 @@ void DumpExtensions(Printer &p, std::string layer_name, std::vector 0) { - max_length = strlen(extensions.at(0).extensionName); + max_length = static_cast(strlen(extensions.at(0).extensionName)); for (auto &ext : extensions) { - int len = strlen(ext.extensionName); + int len = static_cast(strlen(ext.extensionName)); if (len > max_length) max_length = len; } } @@ -132,7 +132,7 @@ void DumpSurfaceFormats(Printer &p, AppInstance &inst, AppSurface &surface) { p.ArrayEnd(); } -void DumpPresentModes(Printer &p, AppInstance &inst, AppSurface &surface) { +void DumpPresentModes(Printer &p, AppSurface &surface) { p.ArrayStart("Present Modes", surface.surf_present_modes.size()); for (auto &mode : surface.surf_present_modes) { p.SetAsType().PrintElement(VkPresentModeKHRString(mode)); @@ -179,7 +179,7 @@ void DumpSurface(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurface &surface DumpSurfaceFormats(p, inst, surface); - DumpPresentModes(p, inst, surface); + DumpPresentModes(p, surface); DumpSurfaceCapabilities(p, inst, gpu, surface); @@ -269,7 +269,7 @@ void DumpGroups(Printer &p, AppInstance &inst) { p.PrintElement(device_out); p.ObjectStart("Can present images from the following devices"); for (uint32_t j = 0; j < group.physicalDeviceCount; j++) { - uint32_t mask = 1 << j; + uint32_t mask = 1U << j; if (group_capabilities.second.presentMask[i] & mask) { if (p.Type() == OutputType::text) p.PrintElement(std::string(group_props[j].deviceName) + " (ID: " + std::to_string(j) + ")"); @@ -343,7 +343,7 @@ void GpuDumpProps(Printer &p, AppGpu &gpu) { p.AddNewline(); } void GpuDumpQueueProps(Printer &p, std::vector &surfaces, AppQueueFamilyProperties &queue) { - p.SetHeader().SetElementIndex(queue.queue_index).ObjectStart("VkQueueFamilyProperties"); + p.SetHeader().SetElementIndex(static_cast(queue.queue_index)).ObjectStart("VkQueueFamilyProperties"); if (p.Type() == OutputType::json) { DumpVkExtent3D(p, "minImageTransferGranularity", queue.props.minImageTransferGranularity); } else { @@ -410,7 +410,7 @@ void GpuDumpMemoryProps(Printer &p, AppGpu &gpu) { std::string mem_size_str = std::to_string(memSize) + " (" + to_hex_str(memSize) + ") (" + mem_size_human_readable + ")"; - p.SetElementIndex(i).ObjectStart("memoryHeaps"); + p.SetElementIndex(static_cast(i)).ObjectStart("memoryHeaps"); if (p.Type() != OutputType::json) { p.PrintKeyValue("size", mem_size_str, 6); p.PrintKeyValue("budget", gpu.heapBudget[i], 6); @@ -426,7 +426,7 @@ void GpuDumpMemoryProps(Printer &p, AppGpu &gpu) { p.ArrayStart("memoryTypes", gpu.memory_props.memoryTypeCount); for (uint32_t i = 0; i < gpu.memory_props.memoryTypeCount; ++i) { - p.SetElementIndex(i).ObjectStart("memoryTypes"); + p.SetElementIndex(static_cast(i)).ObjectStart("memoryTypes"); p.PrintKeyValue("heapIndex", gpu.memory_props.memoryTypes[i].heapIndex, 13); if (p.Type() == OutputType::json) { p.PrintKeyValue("propertyFlags", gpu.memory_props.memoryTypes[i].propertyFlags, 13); @@ -435,7 +435,7 @@ void GpuDumpMemoryProps(Printer &p, AppGpu &gpu) { DumpVkMemoryPropertyFlags(p, "propertyFlags = " + to_hex_str(flags), flags); p.ObjectStart("usable for"); - const uint32_t memtype_bit = 1 << i; + const uint32_t memtype_bit = 1U << i; // only linear and optimal tiling considered for (uint32_t tiling = VK_IMAGE_TILING_OPTIMAL; tiling < gpu.mem_type_res_support.image.size(); ++tiling) { @@ -534,7 +534,7 @@ void GpuDumpFormatProperty(Printer &p, VkFormat fmt, VkFormatProperties prop) { p.ObjectEnd(); } -void GpuDevDump(Printer &p, AppGpu &gpu, pNextChainInfos &chainInfos) { +void GpuDevDump(Printer &p, AppGpu &gpu) { if (p.Type() == OutputType::json) { p.ArrayStart("ArrayOfVkFormatProperties"); } else { @@ -581,7 +581,7 @@ void GpuDevDump(Printer &p, AppGpu &gpu, pNextChainInfos &chainInfos) { } else { for (auto &format : gpu.supported_format_ranges) { if (gpu.FormatRangeSupported(format)) { - for (uint32_t fmt_counter = format.first_format; fmt_counter <= format.last_format; ++fmt_counter) { + for (int32_t fmt_counter = format.first_format; fmt_counter <= format.last_format; ++fmt_counter) { VkFormat fmt = static_cast(fmt_counter); VkFormatProperties props; @@ -608,7 +608,7 @@ void GpuDevDump(Printer &p, AppGpu &gpu, pNextChainInfos &chainInfos) { p.AddNewline(); } -void DumpGpu(Printer &p, AppGpu &gpu, bool show_formats, pNextChainInfos &chainInfos) { +void DumpGpu(Printer &p, AppGpu &gpu, bool show_formats) { if (p.Type() != OutputType::json) { p.ObjectStart("GPU" + std::to_string(gpu.id)); p.IndentDecrease(); @@ -630,7 +630,7 @@ void DumpGpu(Printer &p, AppGpu &gpu, bool show_formats, pNextChainInfos &chainI GpuDumpMemoryProps(p, gpu); GpuDumpFeatures(p, gpu); if (p.Type() != OutputType::text || show_formats) { - GpuDevDump(p, gpu, chainInfos); + GpuDevDump(p, gpu); } if (p.Type() != OutputType::json) { @@ -697,12 +697,13 @@ int main(int argc, char **argv) { #endif uint32_t selected_gpu = 0; + bool show_formats = false; // Combinations of output: html only, html AND json, json only, human readable only for (int i = 1; i < argc; ++i) { if (strncmp("--json", argv[i], 6) == 0 || strcmp(argv[i], "-j") == 0) { if (strlen(argv[i]) > 7 && strncmp("--json=", argv[i], 7) == 0) { - selected_gpu = strtol(argv[i] + 7, nullptr, 10); + selected_gpu = static_cast(strtol(argv[i] + 7, nullptr, 10)); } human_readable_output = false; json_output = true; @@ -789,7 +790,7 @@ int main(int argc, char **argv) { for (auto &gpu : gpus) { if ((p->Type() == OutputType::json && gpu->id == selected_gpu) || p->Type() == OutputType::text || p->Type() == OutputType::html) { - DumpGpu(*p.get(), *gpu.get(), show_formats, pNext_chains); + DumpGpu(*p.get(), *gpu.get(), show_formats); } } if (p->Type() != OutputType::json) { diff --git a/vulkaninfo/vulkaninfo.h b/vulkaninfo/vulkaninfo.h index a88b11c..e9864ca 100644 --- a/vulkaninfo/vulkaninfo.h +++ b/vulkaninfo/vulkaninfo.h @@ -73,7 +73,6 @@ bool human_readable_output = true; bool html_output = false; bool json_output = false; -bool show_formats = false; #ifdef _WIN32 @@ -247,7 +246,7 @@ void freepNextChain(VkStructureHeader *first) { } struct LayerExtensionList { - VkLayerProperties layer_properties; + VkLayerProperties layer_properties{}; std::vector extension_properties; }; @@ -255,10 +254,10 @@ struct AppInstance; struct SurfaceExtension { std::string name; - void (*create_window)(AppInstance &); - VkSurfaceKHR (*create_surface)(AppInstance &); - void (*destroy_window)(AppInstance &); - VkSurfaceKHR surface; + void (*create_window)(AppInstance &) = nullptr; + VkSurfaceKHR (*create_surface)(AppInstance &) = nullptr; + void (*destroy_window)(AppInstance &) = nullptr; + VkSurfaceKHR surface = VK_NULL_HANDLE; VkBool32 supports_present = 0; bool operator==(const SurfaceExtension &other) { @@ -331,7 +330,7 @@ struct AppInstance { #endif AppInstance() { PFN_vkEnumerateInstanceVersion enumerate_instance_version = - (PFN_vkEnumerateInstanceVersion)vkGetInstanceProcAddr(nullptr, "vkEnumerateInstanceVersion"); + reinterpret_cast(vkGetInstanceProcAddr(nullptr, "vkEnumerateInstanceVersion")); if (!enumerate_instance_version) { instance_version = VK_API_VERSION_1_0; @@ -374,6 +373,9 @@ struct AppInstance { ~AppInstance() { vkDestroyInstance(instance, nullptr); } + AppInstance(const AppInstance &) = delete; + const AppInstance &operator=(const AppInstance &) = delete; + bool CheckExtensionEnabled(std::string extension_to_check) { for (auto &extension : inst_extensions) { if (extension_to_check == extension) { @@ -420,7 +422,7 @@ struct AppInstance { } } void AppLoadInstanceCommands() { -#define LOAD_INSTANCE_VK_CMD(cmd) cmd = (PFN_##cmd)vkGetInstanceProcAddr(instance, #cmd) +#define LOAD_INSTANCE_VK_CMD(cmd) cmd = reinterpret_cast(vkGetInstanceProcAddr(instance, #cmd)) LOAD_INSTANCE_VK_CMD(vkGetPhysicalDeviceSurfaceSupportKHR); LOAD_INSTANCE_VK_CMD(vkGetPhysicalDeviceSurfaceCapabilitiesKHR); @@ -912,14 +914,14 @@ class AppSurface { std::vector &sur_extension_pNextChain) : inst(inst), surface_extension(surface_extension) { uint32_t present_mode_count = 0; - VkResult err = + VkResult error = inst.vkGetPhysicalDeviceSurfacePresentModesKHR(phys_device, surface_extension.surface, &present_mode_count, nullptr); - if (err) ERR_EXIT(err); + if (error) ERR_EXIT(error); surf_present_modes.resize(present_mode_count); - err = inst.vkGetPhysicalDeviceSurfacePresentModesKHR(phys_device, surface_extension.surface, &present_mode_count, - surf_present_modes.data()); - if (err) ERR_EXIT(err); + error = inst.vkGetPhysicalDeviceSurfacePresentModesKHR(phys_device, surface_extension.surface, &present_mode_count, + surf_present_modes.data()); + if (error) ERR_EXIT(error); const VkPhysicalDeviceSurfaceInfo2KHR surface_info2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, surface_extension.surface}; @@ -978,6 +980,9 @@ class AppSurface { freepNextChain(static_cast(surface_capabilities2_khr.pNext)); } } + + AppSurface(const AppSurface &) = delete; + const AppSurface &operator=(const AppSurface &) = delete; }; // -------------------- Device Groups ------------------------// @@ -985,7 +990,8 @@ class AppSurface { std::vector GetGroups(AppInstance &inst) { if (inst.CheckExtensionEnabled(VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME)) { PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR = - (PFN_vkEnumeratePhysicalDeviceGroupsKHR)vkGetInstanceProcAddr(inst.instance, "vkEnumeratePhysicalDeviceGroupsKHR"); + reinterpret_cast( + vkGetInstanceProcAddr(inst.instance, "vkEnumeratePhysicalDeviceGroupsKHR")); std::vector groups; uint32_t group_count; @@ -1045,7 +1051,8 @@ std::pair GetGroupCapabilities(AppIns // If the KHR_device_group extension is present, write the capabilities of the logical device into a struct for later // output to user. PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR = - (PFN_vkGetDeviceGroupPresentCapabilitiesKHR)vkGetInstanceProcAddr(inst.instance, "vkGetDeviceGroupPresentCapabilitiesKHR"); + reinterpret_cast( + vkGetInstanceProcAddr(inst.instance, "vkGetDeviceGroupPresentCapabilitiesKHR")); err = vkGetDeviceGroupPresentCapabilitiesKHR(logical_device, &group_capabilities); if (err) ERR_EXIT(err); @@ -1173,9 +1180,7 @@ struct AppGpu { 0, // just pick the first one and hope for the best 1, &queue_priority}; - VkPhysicalDeviceFeatures features = {0}; - // if (features.sparseBinding ) features.sparseBinding = VK_TRUE; - enabled_features = features; + enabled_features = VkPhysicalDeviceFeatures{0}; const VkDeviceCreateInfo device_ci = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, nullptr, 0, 1, &q_ci, 0, nullptr, 0, nullptr, &enabled_features}; @@ -1192,7 +1197,7 @@ struct AppGpu { for (size_t fmt_i = 0; fmt_i < formats.size(); ++fmt_i) { // only iterate over VK_IMAGE_TILING_OPTIMAL and VK_IMAGE_TILING_LINEAR (0 and 1) - for (int tiling = VK_IMAGE_TILING_OPTIMAL; tiling <= VK_IMAGE_TILING_LINEAR; ++tiling) { + for (size_t tiling = VK_IMAGE_TILING_OPTIMAL; tiling <= VK_IMAGE_TILING_LINEAR; ++tiling) { mem_type_res_support.image[tiling][fmt_i].format = formats[fmt_i]; mem_type_res_support.image[tiling][fmt_i].regular_supported = true; mem_type_res_support.image[tiling][fmt_i].sparse_supported = true; @@ -1296,7 +1301,7 @@ struct AppGpu { CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME)) { VkPhysicalDeviceMemoryBudgetPropertiesEXT *mem_budget_props = (VkPhysicalDeviceMemoryBudgetPropertiesEXT *)structure; - for (int i = 0; i < VK_MAX_MEMORY_HEAPS; i++) { + for (uint32_t i = 0; i < VK_MAX_MEMORY_HEAPS; i++) { heapBudget[i] = mem_budget_props->heapBudget[i]; heapUsage[i] = mem_budget_props->heapUsage[i]; } @@ -1341,6 +1346,9 @@ struct AppGpu { } } + AppGpu(const AppGpu &) = delete; + const AppGpu &operator=(const AppGpu &) = delete; + bool CheckPhysicalDeviceExtensionIncluded(std::string extension_to_check) { for (auto &extension : device_extensions) { if (extension_to_check == std::string(extension.extensionName)) { @@ -1449,7 +1457,7 @@ struct hash { std::unordered_map> FormatPropMap(AppGpu &gpu) { std::unordered_map> map; for (auto fmtRange : gpu.supported_format_ranges) { - for (uint32_t fmt = fmtRange.first_format; fmt <= fmtRange.last_format; ++fmt) { + for (int32_t fmt = fmtRange.first_format; fmt <= fmtRange.last_format; ++fmt) { VkFormatProperties props; vkGetPhysicalDeviceFormatProperties(gpu.phys_device, static_cast(fmt), &props);