From 8506077b9a25a00684e8be24b779733ae1405a54 Mon Sep 17 00:00:00 2001 From: spencer-lunarg Date: Wed, 13 Mar 2024 23:41:08 +0900 Subject: [PATCH] layers: Split up ValidatePnextStructContents --- layers/stateless/sl_utils.cpp | 9 + layers/stateless/stateless_validation.h | 6 + .../generated/stateless_validation_helper.cpp | 13789 ++++++++-------- .../stateless_validation_helper_generator.py | 255 +- 4 files changed, 7085 insertions(+), 6974 deletions(-) diff --git a/layers/stateless/sl_utils.cpp b/layers/stateless/sl_utils.cpp index b6b3ee903e8..3c6f6f9dd43 100644 --- a/layers/stateless/sl_utils.cpp +++ b/layers/stateless/sl_utils.cpp @@ -274,6 +274,15 @@ bool StatelessValidation::ValidateStructPnext(const Location &loc, const void *n } // Send Location without pNext field so the pNext() connector can be used skip |= ValidatePnextStructContents(loc, current, pnext_vuid, caller_physical_device, is_const_param); + if (loc.function == Func::vkGetPhysicalDeviceProperties2 || + loc.function == Func::vkGetPhysicalDeviceProperties2KHR) { + skip |= ValidatePnextPropertyStructContents(loc, current, pnext_vuid, caller_physical_device, + is_const_param); + } else if (loc.function == Func::vkGetPhysicalDeviceFeatures2 || + loc.function == Func::vkGetPhysicalDeviceFeatures2KHR || loc.function == Func::vkCreateDevice) { + skip |= ValidatePnextFeatureStructContents(loc, current, pnext_vuid, caller_physical_device, + is_const_param); + } } } current = reinterpret_cast(current->pNext); diff --git a/layers/stateless/stateless_validation.h b/layers/stateless/stateless_validation.h index 7e295be58e5..df3846ed22b 100644 --- a/layers/stateless/stateless_validation.h +++ b/layers/stateless/stateless_validation.h @@ -364,6 +364,12 @@ class StatelessValidation : public ValidationObject { bool CheckPromotedApiAgainstVulkanVersion(VkPhysicalDevice pdev, const Location &loc, const uint32_t promoted_version) const; bool SupportedByPdev(const VkPhysicalDevice physical_device, vvl::Extension extension) const; + bool ValidatePnextFeatureStructContents(const Location &loc, const VkBaseOutStructure *header, const char *pnext_vuid, + VkPhysicalDevice caller_physical_device = VK_NULL_HANDLE, + bool is_const_param = true) const; + bool ValidatePnextPropertyStructContents(const Location &loc, const VkBaseOutStructure *header, const char *pnext_vuid, + VkPhysicalDevice caller_physical_device = VK_NULL_HANDLE, + bool is_const_param = true) const; bool ValidatePnextStructContents(const Location &loc, const VkBaseOutStructure *header, const char *pnext_vuid, VkPhysicalDevice caller_physical_device = VK_NULL_HANDLE, bool is_const_param = true) const; diff --git a/layers/vulkan/generated/stateless_validation_helper.cpp b/layers/vulkan/generated/stateless_validation_helper.cpp index 6f3b4cc6db4..a2452a1a50d 100644 --- a/layers/vulkan/generated/stateless_validation_helper.cpp +++ b/layers/vulkan/generated/stateless_validation_helper.cpp @@ -28,70 +28,12 @@ #include "generated/enum_flag_bits.h" #include "generated/layer_chassis_dispatch.h" -bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const VkBaseOutStructure* header, const char* pnext_vuid, - VkPhysicalDevice caller_physical_device, bool is_const_param) const { +bool StatelessValidation::ValidatePnextFeatureStructContents(const Location& loc, const VkBaseOutStructure* header, + const char* pnext_vuid, VkPhysicalDevice caller_physical_device, + bool is_const_param) const { bool skip = false; const bool is_physdev_api = caller_physical_device != VK_NULL_HANDLE; switch (header->sType) { - // Validation code for VkShaderModuleCreateInfo structure members - case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: { // Covers VUID-VkShaderModuleCreateInfo-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkShaderModuleCreateInfo); - VkShaderModuleCreateInfo* structure = (VkShaderModuleCreateInfo*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkShaderModuleCreateInfo-flags-zerobitmask"); - - skip |= ValidateArray(pNext_loc.dot(Field::codeSize), pNext_loc.dot(Field::pCode), structure->codeSize / 4, - &structure->pCode, true, true, "VUID-VkShaderModuleCreateInfo-codeSize-01085", - "VUID-VkShaderModuleCreateInfo-pCode-parameter"); - } - } break; - - // Validation code for VkPipelineLayoutCreateInfo structure members - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: { // Covers VUID-VkPipelineLayoutCreateInfo-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineLayoutCreateInfo); - VkPipelineLayoutCreateInfo* structure = (VkPipelineLayoutCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkPipelineLayoutCreateFlagBits, - AllVkPipelineLayoutCreateFlagBits, structure->flags, kOptionalFlags, - "VUID-VkPipelineLayoutCreateInfo-flags-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::pushConstantRangeCount), pNext_loc.dot(Field::pPushConstantRanges), - structure->pushConstantRangeCount, &structure->pPushConstantRanges, false, true, - kVUIDUndefined, "VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-parameter"); - - if (structure->pPushConstantRanges != nullptr) { - for (uint32_t pushConstantRangeIndex = 0; pushConstantRangeIndex < structure->pushConstantRangeCount; - ++pushConstantRangeIndex) { - [[maybe_unused]] const Location pPushConstantRanges_loc = - pNext_loc.dot(Field::pPushConstantRanges, pushConstantRangeIndex); - skip |= ValidateFlags(pPushConstantRanges_loc.dot(Field::stageFlags), - vvl::FlagBitmask::VkShaderStageFlagBits, AllVkShaderStageFlagBits, - structure->pPushConstantRanges[pushConstantRangeIndex].stageFlags, kRequiredFlags, - "VUID-VkPushConstantRange-stageFlags-parameter", - "VUID-VkPushConstantRange-stageFlags-requiredbitmask"); - } - } - } - } break; - - // Validation code for VkPhysicalDeviceSubgroupProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: { // Covers VUID-VkPhysicalDeviceSubgroupProperties-sType-sType - - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_1) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES) " - "which was added in VK_API_VERSION_1_1 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } - } - } break; - // Validation code for VkPhysicalDevice16BitStorageFeatures structure members case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: { // Covers // VUID-VkPhysicalDevice16BitStorageFeatures-sType-sType @@ -123,8669 +65,9142 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const } } break; - // Validation code for VkMemoryDedicatedRequirements structure members - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: { // Covers VUID-VkMemoryDedicatedRequirements-sType-sType + // Validation code for VkPhysicalDeviceMultiviewFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: { // Covers VUID-VkPhysicalDeviceMultiviewFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dedicated_allocation)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dedicated_allocation))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_multiview)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_multiview))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS), but " - "its parent extension " - "VK_KHR_dedicated_allocation has not been enabled."); + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES), " + "but its parent extension " + "VK_KHR_multiview has not been enabled."); } - } break; + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMultiviewFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_multiview)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMultiviewFeatures, but when creating VkDevice, the " + "parent extension " + "(VK_KHR_multiview) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMultiviewFeatures* structure = (VkPhysicalDeviceMultiviewFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::multiview), structure->multiview); - // Validation code for VkMemoryDedicatedAllocateInfo structure members - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: { // Covers VUID-VkMemoryDedicatedAllocateInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewGeometryShader), structure->multiviewGeometryShader); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dedicated_allocation)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dedicated_allocation))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO), but " - "its parent extension " - "VK_KHR_dedicated_allocation has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewTessellationShader), structure->multiviewTessellationShader); } } break; - // Validation code for VkMemoryAllocateFlagsInfo structure members - case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: { // Covers VUID-VkMemoryAllocateFlagsInfo-sType-sType + // Validation code for VkPhysicalDeviceVariablePointersFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: { // Covers + // VUID-VkPhysicalDeviceVariablePointersFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_variable_pointers)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_variable_pointers))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO), but its " - "parent extension " - "VK_KHR_device_group has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES), but its parent extension " + "VK_KHR_variable_pointers has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMemoryAllocateFlagsInfo); - if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVariablePointersFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_variable_pointers)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceVariablePointersFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_variable_pointers) was not included in ppEnabledExtensionNames."); } - VkMemoryAllocateFlagsInfo* structure = (VkMemoryAllocateFlagsInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkMemoryAllocateFlagBits, - AllVkMemoryAllocateFlagBits, structure->flags, kOptionalFlags, - "VUID-VkMemoryAllocateFlagsInfo-flags-parameter"); + VkPhysicalDeviceVariablePointersFeatures* structure = (VkPhysicalDeviceVariablePointersFeatures*)header; + skip |= + ValidateBool32(pNext_loc.dot(Field::variablePointersStorageBuffer), structure->variablePointersStorageBuffer); + + skip |= ValidateBool32(pNext_loc.dot(Field::variablePointers), structure->variablePointers); } } break; - // Validation code for VkDeviceGroupRenderPassBeginInfo structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: { // Covers VUID-VkDeviceGroupRenderPassBeginInfo-sType-sType + // Validation code for VkPhysicalDeviceProtectedMemoryFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: { // Covers + // VUID-VkPhysicalDeviceProtectedMemoryFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO), " - "but its parent extension " - "VK_KHR_device_group has not been enabled."); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_1) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES) " + "which was added in VK_API_VERSION_1_1 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupRenderPassBeginInfo); - if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); - } - VkDeviceGroupRenderPassBeginInfo* structure = (VkDeviceGroupRenderPassBeginInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::deviceRenderAreaCount), pNext_loc.dot(Field::pDeviceRenderAreas), - structure->deviceRenderAreaCount, &structure->pDeviceRenderAreas, false, true, kVUIDUndefined, - "VUID-VkDeviceGroupRenderPassBeginInfo-pDeviceRenderAreas-parameter"); - - if (structure->pDeviceRenderAreas != nullptr) { - for (uint32_t deviceRenderAreaIndex = 0; deviceRenderAreaIndex < structure->deviceRenderAreaCount; - ++deviceRenderAreaIndex) { - [[maybe_unused]] const Location pDeviceRenderAreas_loc = - pNext_loc.dot(Field::pDeviceRenderAreas, deviceRenderAreaIndex); - } - } + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceProtectedMemoryFeatures); + VkPhysicalDeviceProtectedMemoryFeatures* structure = (VkPhysicalDeviceProtectedMemoryFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::protectedMemory), structure->protectedMemory); } } break; - // Validation code for VkDeviceGroupCommandBufferBeginInfo structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: { // Covers - // VUID-VkDeviceGroupCommandBufferBeginInfo-sType-sType + // Validation code for VkPhysicalDeviceSamplerYcbcrConversionFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: { // Covers + // VUID-VkPhysicalDeviceSamplerYcbcrConversionFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO), but its parent extension " - "VK_KHR_device_group has not been enabled."); - } - } break; - - // Validation code for VkDeviceGroupSubmitInfo structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: { // Covers VUID-VkDeviceGroupSubmitInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO), but its " - "parent extension " - "VK_KHR_device_group has not been enabled."); + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES), but its parent extension " + "VK_KHR_sampler_ycbcr_conversion has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupSubmitInfo); - if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSamplerYcbcrConversionFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceSamplerYcbcrConversionFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_sampler_ycbcr_conversion) was not included in ppEnabledExtensionNames."); } - VkDeviceGroupSubmitInfo* structure = (VkDeviceGroupSubmitInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::waitSemaphoreCount), pNext_loc.dot(Field::pWaitSemaphoreDeviceIndices), - structure->waitSemaphoreCount, &structure->pWaitSemaphoreDeviceIndices, false, true, - kVUIDUndefined, "VUID-VkDeviceGroupSubmitInfo-pWaitSemaphoreDeviceIndices-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::commandBufferCount), pNext_loc.dot(Field::pCommandBufferDeviceMasks), - structure->commandBufferCount, &structure->pCommandBufferDeviceMasks, false, true, - kVUIDUndefined, "VUID-VkDeviceGroupSubmitInfo-pCommandBufferDeviceMasks-parameter"); - - skip |= - ValidateArray(pNext_loc.dot(Field::signalSemaphoreCount), pNext_loc.dot(Field::pSignalSemaphoreDeviceIndices), - structure->signalSemaphoreCount, &structure->pSignalSemaphoreDeviceIndices, false, true, - kVUIDUndefined, "VUID-VkDeviceGroupSubmitInfo-pSignalSemaphoreDeviceIndices-parameter"); + VkPhysicalDeviceSamplerYcbcrConversionFeatures* structure = (VkPhysicalDeviceSamplerYcbcrConversionFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::samplerYcbcrConversion), structure->samplerYcbcrConversion); } } break; - // Validation code for VkDeviceGroupBindSparseInfo structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: { // Covers VUID-VkDeviceGroupBindSparseInfo-sType-sType + // Validation code for VkPhysicalDeviceShaderDrawParametersFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderDrawParametersFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO), but " - "its parent extension " - "VK_KHR_device_group has not been enabled."); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_1) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES) which was added in " + "VK_API_VERSION_1_1 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderDrawParametersFeatures); + VkPhysicalDeviceShaderDrawParametersFeatures* structure = (VkPhysicalDeviceShaderDrawParametersFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderDrawParameters), structure->shaderDrawParameters); } } break; - // Validation code for VkBindBufferMemoryDeviceGroupInfo structure members - case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: { // Covers VUID-VkBindBufferMemoryDeviceGroupInfo-sType-sType + // Validation code for VkPhysicalDeviceVulkan11Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: { // Covers VUID-VkPhysicalDeviceVulkan11Features-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO), but its parent extension " - "VK_KHR_device_group has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindBufferMemoryDeviceGroupInfo); - if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_2) { skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES) " + "which was added in VK_API_VERSION_1_2 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); } - VkBindBufferMemoryDeviceGroupInfo* structure = (VkBindBufferMemoryDeviceGroupInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::deviceIndexCount), pNext_loc.dot(Field::pDeviceIndices), - structure->deviceIndexCount, &structure->pDeviceIndices, false, true, kVUIDUndefined, - "VUID-VkBindBufferMemoryDeviceGroupInfo-pDeviceIndices-parameter"); - } - } break; - - // Validation code for VkBindImageMemoryDeviceGroupInfo structure members - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: { // Covers VUID-VkBindImageMemoryDeviceGroupInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO), " - "but its parent extension " - "VK_KHR_device_group has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindImageMemoryDeviceGroupInfo); - if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); - } - VkBindImageMemoryDeviceGroupInfo* structure = (VkBindImageMemoryDeviceGroupInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::deviceIndexCount), pNext_loc.dot(Field::pDeviceIndices), - structure->deviceIndexCount, &structure->pDeviceIndices, false, true, kVUIDUndefined, - "VUID-VkBindImageMemoryDeviceGroupInfo-pDeviceIndices-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkan11Features); + VkPhysicalDeviceVulkan11Features* structure = (VkPhysicalDeviceVulkan11Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::storageBuffer16BitAccess), structure->storageBuffer16BitAccess); - skip |= ValidateArray(pNext_loc.dot(Field::splitInstanceBindRegionCount), - pNext_loc.dot(Field::pSplitInstanceBindRegions), structure->splitInstanceBindRegionCount, - &structure->pSplitInstanceBindRegions, false, true, kVUIDUndefined, - "VUID-VkBindImageMemoryDeviceGroupInfo-pSplitInstanceBindRegions-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::uniformAndStorageBuffer16BitAccess), + structure->uniformAndStorageBuffer16BitAccess); - if (structure->pSplitInstanceBindRegions != nullptr) { - for (uint32_t splitInstanceBindRegionIndex = 0; - splitInstanceBindRegionIndex < structure->splitInstanceBindRegionCount; ++splitInstanceBindRegionIndex) { - [[maybe_unused]] const Location pSplitInstanceBindRegions_loc = - pNext_loc.dot(Field::pSplitInstanceBindRegions, splitInstanceBindRegionIndex); - } - } - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::storagePushConstant16), structure->storagePushConstant16); - // Validation code for VkDeviceGroupDeviceCreateInfo structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: { // Covers VUID-VkDeviceGroupDeviceCreateInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::storageInputOutput16), structure->storageInputOutput16); - if (!IsExtEnabled(instance_extensions.vk_khr_device_group_creation)) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO), but " - "its parent extension " - "VK_KHR_device_group_creation has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupDeviceCreateInfo); - VkDeviceGroupDeviceCreateInfo* structure = (VkDeviceGroupDeviceCreateInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::physicalDeviceCount), pNext_loc.dot(Field::pPhysicalDevices), - structure->physicalDeviceCount, &structure->pPhysicalDevices, false, true, kVUIDUndefined, - "VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::multiview), structure->multiview); - // Validation code for VkPhysicalDeviceFeatures2 structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: { // Covers VUID-VkPhysicalDeviceFeatures2-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewGeometryShader), structure->multiviewGeometryShader); - if (!IsExtEnabled(instance_extensions.vk_khr_get_physical_device_properties2)) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2), but its " - "parent extension " - "VK_KHR_get_physical_device_properties2 has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFeatures2); - VkPhysicalDeviceFeatures2* structure = (VkPhysicalDeviceFeatures2*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::robustBufferAccess), structure->features.robustBufferAccess); + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewTessellationShader), structure->multiviewTessellationShader); - skip |= ValidateBool32(pNext_loc.dot(Field::fullDrawIndexUint32), structure->features.fullDrawIndexUint32); + skip |= + ValidateBool32(pNext_loc.dot(Field::variablePointersStorageBuffer), structure->variablePointersStorageBuffer); - skip |= ValidateBool32(pNext_loc.dot(Field::imageCubeArray), structure->features.imageCubeArray); + skip |= ValidateBool32(pNext_loc.dot(Field::variablePointers), structure->variablePointers); - skip |= ValidateBool32(pNext_loc.dot(Field::independentBlend), structure->features.independentBlend); + skip |= ValidateBool32(pNext_loc.dot(Field::protectedMemory), structure->protectedMemory); - skip |= ValidateBool32(pNext_loc.dot(Field::geometryShader), structure->features.geometryShader); + skip |= ValidateBool32(pNext_loc.dot(Field::samplerYcbcrConversion), structure->samplerYcbcrConversion); - skip |= ValidateBool32(pNext_loc.dot(Field::tessellationShader), structure->features.tessellationShader); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderDrawParameters), structure->shaderDrawParameters); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::sampleRateShading), structure->features.sampleRateShading); + // Validation code for VkPhysicalDeviceVulkan12Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: { // Covers VUID-VkPhysicalDeviceVulkan12Features-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::dualSrcBlend), structure->features.dualSrcBlend); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_2) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES) " + "which was added in VK_API_VERSION_1_2 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkan12Features); + VkPhysicalDeviceVulkan12Features* structure = (VkPhysicalDeviceVulkan12Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::samplerMirrorClampToEdge), structure->samplerMirrorClampToEdge); - skip |= ValidateBool32(pNext_loc.dot(Field::logicOp), structure->features.logicOp); + skip |= ValidateBool32(pNext_loc.dot(Field::drawIndirectCount), structure->drawIndirectCount); - skip |= ValidateBool32(pNext_loc.dot(Field::multiDrawIndirect), structure->features.multiDrawIndirect); + skip |= ValidateBool32(pNext_loc.dot(Field::storageBuffer8BitAccess), structure->storageBuffer8BitAccess); - skip |= - ValidateBool32(pNext_loc.dot(Field::drawIndirectFirstInstance), structure->features.drawIndirectFirstInstance); + skip |= ValidateBool32(pNext_loc.dot(Field::uniformAndStorageBuffer8BitAccess), + structure->uniformAndStorageBuffer8BitAccess); - skip |= ValidateBool32(pNext_loc.dot(Field::depthClamp), structure->features.depthClamp); + skip |= ValidateBool32(pNext_loc.dot(Field::storagePushConstant8), structure->storagePushConstant8); - skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasClamp), structure->features.depthBiasClamp); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferInt64Atomics), structure->shaderBufferInt64Atomics); - skip |= ValidateBool32(pNext_loc.dot(Field::fillModeNonSolid), structure->features.fillModeNonSolid); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedInt64Atomics), structure->shaderSharedInt64Atomics); - skip |= ValidateBool32(pNext_loc.dot(Field::depthBounds), structure->features.depthBounds); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat16), structure->shaderFloat16); - skip |= ValidateBool32(pNext_loc.dot(Field::wideLines), structure->features.wideLines); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt8), structure->shaderInt8); - skip |= ValidateBool32(pNext_loc.dot(Field::largePoints), structure->features.largePoints); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorIndexing), structure->descriptorIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::alphaToOne), structure->features.alphaToOne); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayDynamicIndexing), + structure->shaderInputAttachmentArrayDynamicIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::multiViewport), structure->features.multiViewport); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayDynamicIndexing), + structure->shaderUniformTexelBufferArrayDynamicIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::samplerAnisotropy), structure->features.samplerAnisotropy); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayDynamicIndexing), + structure->shaderStorageTexelBufferArrayDynamicIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionETC2), structure->features.textureCompressionETC2); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformBufferArrayNonUniformIndexing), + structure->shaderUniformBufferArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionASTC_LDR), - structure->features.textureCompressionASTC_LDR); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampledImageArrayNonUniformIndexing), + structure->shaderSampledImageArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionBC), structure->features.textureCompressionBC); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageBufferArrayNonUniformIndexing), + structure->shaderStorageBufferArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::occlusionQueryPrecise), structure->features.occlusionQueryPrecise); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageArrayNonUniformIndexing), + structure->shaderStorageImageArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineStatisticsQuery), structure->features.pipelineStatisticsQuery); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayNonUniformIndexing), + structure->shaderInputAttachmentArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::vertexPipelineStoresAndAtomics), - structure->features.vertexPipelineStoresAndAtomics); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayNonUniformIndexing), + structure->shaderUniformTexelBufferArrayNonUniformIndexing); - skip |= - ValidateBool32(pNext_loc.dot(Field::fragmentStoresAndAtomics), structure->features.fragmentStoresAndAtomics); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayNonUniformIndexing), + structure->shaderStorageTexelBufferArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderTessellationAndGeometryPointSize), - structure->features.shaderTessellationAndGeometryPointSize); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformBufferUpdateAfterBind), + structure->descriptorBindingUniformBufferUpdateAfterBind); - skip |= - ValidateBool32(pNext_loc.dot(Field::shaderImageGatherExtended), structure->features.shaderImageGatherExtended); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingSampledImageUpdateAfterBind), + structure->descriptorBindingSampledImageUpdateAfterBind); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageExtendedFormats), - structure->features.shaderStorageImageExtendedFormats); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageImageUpdateAfterBind), + structure->descriptorBindingStorageImageUpdateAfterBind); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageMultisample), - structure->features.shaderStorageImageMultisample); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageBufferUpdateAfterBind), + structure->descriptorBindingStorageBufferUpdateAfterBind); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageReadWithoutFormat), - structure->features.shaderStorageImageReadWithoutFormat); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformTexelBufferUpdateAfterBind), + structure->descriptorBindingUniformTexelBufferUpdateAfterBind); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageWriteWithoutFormat), - structure->features.shaderStorageImageWriteWithoutFormat); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageTexelBufferUpdateAfterBind), + structure->descriptorBindingStorageTexelBufferUpdateAfterBind); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformBufferArrayDynamicIndexing), - structure->features.shaderUniformBufferArrayDynamicIndexing); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUpdateUnusedWhilePending), + structure->descriptorBindingUpdateUnusedWhilePending); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampledImageArrayDynamicIndexing), - structure->features.shaderSampledImageArrayDynamicIndexing); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingPartiallyBound), + structure->descriptorBindingPartiallyBound); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageBufferArrayDynamicIndexing), - structure->features.shaderStorageBufferArrayDynamicIndexing); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingVariableDescriptorCount), + structure->descriptorBindingVariableDescriptorCount); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageArrayDynamicIndexing), - structure->features.shaderStorageImageArrayDynamicIndexing); + skip |= ValidateBool32(pNext_loc.dot(Field::runtimeDescriptorArray), structure->runtimeDescriptorArray); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderClipDistance), structure->features.shaderClipDistance); + skip |= ValidateBool32(pNext_loc.dot(Field::samplerFilterMinmax), structure->samplerFilterMinmax); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderCullDistance), structure->features.shaderCullDistance); + skip |= ValidateBool32(pNext_loc.dot(Field::scalarBlockLayout), structure->scalarBlockLayout); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat64), structure->features.shaderFloat64); + skip |= ValidateBool32(pNext_loc.dot(Field::imagelessFramebuffer), structure->imagelessFramebuffer); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt64), structure->features.shaderInt64); + skip |= ValidateBool32(pNext_loc.dot(Field::uniformBufferStandardLayout), structure->uniformBufferStandardLayout); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt16), structure->features.shaderInt16); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupExtendedTypes), structure->shaderSubgroupExtendedTypes); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderResourceResidency), structure->features.shaderResourceResidency); + skip |= ValidateBool32(pNext_loc.dot(Field::separateDepthStencilLayouts), structure->separateDepthStencilLayouts); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderResourceMinLod), structure->features.shaderResourceMinLod); + skip |= ValidateBool32(pNext_loc.dot(Field::hostQueryReset), structure->hostQueryReset); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseBinding), structure->features.sparseBinding); + skip |= ValidateBool32(pNext_loc.dot(Field::timelineSemaphore), structure->timelineSemaphore); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyBuffer), structure->features.sparseResidencyBuffer); + skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddress), structure->bufferDeviceAddress); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyImage2D), structure->features.sparseResidencyImage2D); + skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressCaptureReplay), + structure->bufferDeviceAddressCaptureReplay); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyImage3D), structure->features.sparseResidencyImage3D); + skip |= + ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressMultiDevice), structure->bufferDeviceAddressMultiDevice); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidency2Samples), structure->features.sparseResidency2Samples); + skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModel), structure->vulkanMemoryModel); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidency4Samples), structure->features.sparseResidency4Samples); + skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelDeviceScope), structure->vulkanMemoryModelDeviceScope); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidency8Samples), structure->features.sparseResidency8Samples); + skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelAvailabilityVisibilityChains), + structure->vulkanMemoryModelAvailabilityVisibilityChains); - skip |= - ValidateBool32(pNext_loc.dot(Field::sparseResidency16Samples), structure->features.sparseResidency16Samples); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderOutputViewportIndex), structure->shaderOutputViewportIndex); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyAliased), structure->features.sparseResidencyAliased); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderOutputLayer), structure->shaderOutputLayer); - skip |= ValidateBool32(pNext_loc.dot(Field::variableMultisampleRate), structure->features.variableMultisampleRate); - - skip |= ValidateBool32(pNext_loc.dot(Field::inheritedQueries), structure->features.inheritedQueries); - } - } break; - - // Validation code for VkPhysicalDevicePointClippingProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: { // Covers - // VUID-VkPhysicalDevicePointClippingProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES), but its parent extension " - "VK_KHR_maintenance2 has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::subgroupBroadcastDynamicId), structure->subgroupBroadcastDynamicId); } } break; - // Validation code for VkRenderPassInputAttachmentAspectCreateInfo structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: { // Covers - // VUID-VkRenderPassInputAttachmentAspectCreateInfo-sType-sType + // Validation code for VkPhysicalDevice8BitStorageFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: { // Covers + // VUID-VkPhysicalDevice8BitStorageFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_8bit_storage)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_8bit_storage))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO), but its parent extension " - "VK_KHR_maintenance2 has not been enabled."); + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES), but its parent extension " + "VK_KHR_8bit_storage has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassInputAttachmentAspectCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance2)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance2"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevice8BitStorageFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_8bit_storage)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevice8BitStorageFeatures, but when creating VkDevice, the " + "parent extension " + "(VK_KHR_8bit_storage) was not included in ppEnabledExtensionNames."); } - VkRenderPassInputAttachmentAspectCreateInfo* structure = (VkRenderPassInputAttachmentAspectCreateInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::aspectReferenceCount), pNext_loc.dot(Field::pAspectReferences), - structure->aspectReferenceCount, &structure->pAspectReferences, true, true, - "VUID-VkRenderPassInputAttachmentAspectCreateInfo-aspectReferenceCount-arraylength", - "VUID-VkRenderPassInputAttachmentAspectCreateInfo-pAspectReferences-parameter"); + VkPhysicalDevice8BitStorageFeatures* structure = (VkPhysicalDevice8BitStorageFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::storageBuffer8BitAccess), structure->storageBuffer8BitAccess); - if (structure->pAspectReferences != nullptr) { - for (uint32_t aspectReferenceIndex = 0; aspectReferenceIndex < structure->aspectReferenceCount; - ++aspectReferenceIndex) { - [[maybe_unused]] const Location pAspectReferences_loc = - pNext_loc.dot(Field::pAspectReferences, aspectReferenceIndex); - skip |= - ValidateFlags(pAspectReferences_loc.dot(Field::aspectMask), vvl::FlagBitmask::VkImageAspectFlagBits, - AllVkImageAspectFlagBits, structure->pAspectReferences[aspectReferenceIndex].aspectMask, - kRequiredFlags, "VUID-VkInputAttachmentAspectReference-aspectMask-parameter", - "VUID-VkInputAttachmentAspectReference-aspectMask-requiredbitmask"); - } - } + skip |= ValidateBool32(pNext_loc.dot(Field::uniformAndStorageBuffer8BitAccess), + structure->uniformAndStorageBuffer8BitAccess); + + skip |= ValidateBool32(pNext_loc.dot(Field::storagePushConstant8), structure->storagePushConstant8); } } break; - // Validation code for VkImageViewUsageCreateInfo structure members - case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: { // Covers VUID-VkImageViewUsageCreateInfo-sType-sType + // Validation code for VkPhysicalDeviceShaderAtomicInt64Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderAtomicInt64Features-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_atomic_int64)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_atomic_int64))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO), but " - "its parent extension " - "VK_KHR_maintenance2 has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES), but its parent extension " + "VK_KHR_shader_atomic_int64 has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageViewUsageCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance2)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance2"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicInt64Features); + if (!IsExtEnabled(device_extensions.vk_khr_shader_atomic_int64)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderAtomicInt64Features, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_atomic_int64) was not included in ppEnabledExtensionNames."); } - VkImageViewUsageCreateInfo* structure = (VkImageViewUsageCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::usage), vvl::FlagBitmask::VkImageUsageFlagBits, AllVkImageUsageFlagBits, - structure->usage, kRequiredFlags, "VUID-VkImageViewUsageCreateInfo-usage-parameter", - "VUID-VkImageViewUsageCreateInfo-usage-requiredbitmask"); - } - } break; - - // Validation code for VkPipelineTessellationDomainOriginStateCreateInfo structure members - case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: { // Covers - // VUID-VkPipelineTessellationDomainOriginStateCreateInfo-sType-sType + VkPhysicalDeviceShaderAtomicInt64Features* structure = (VkPhysicalDeviceShaderAtomicInt64Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferInt64Atomics), structure->shaderBufferInt64Atomics); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO), but its parent extension " - "VK_KHR_maintenance2 has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineTessellationDomainOriginStateCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance2)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance2"); - } - VkPipelineTessellationDomainOriginStateCreateInfo* structure = - (VkPipelineTessellationDomainOriginStateCreateInfo*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::domainOrigin), vvl::Enum::VkTessellationDomainOrigin, - structure->domainOrigin, - "VUID-VkPipelineTessellationDomainOriginStateCreateInfo-domainOrigin-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedInt64Atomics), structure->shaderSharedInt64Atomics); } } break; - // Validation code for VkRenderPassMultiviewCreateInfo structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: { // Covers VUID-VkRenderPassMultiviewCreateInfo-sType-sType + // Validation code for VkPhysicalDeviceShaderFloat16Int8Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderFloat16Int8Features-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_multiview)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_multiview))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_float16_int8)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_float16_int8))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO), " - "but its parent extension " - "VK_KHR_multiview has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES), but its parent extension " + "VK_KHR_shader_float16_int8 has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassMultiviewCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_multiview)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_multiview"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderFloat16Int8Features); + if (!IsExtEnabled(device_extensions.vk_khr_shader_float16_int8)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderFloat16Int8Features, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_float16_int8) was not included in ppEnabledExtensionNames."); } - VkRenderPassMultiviewCreateInfo* structure = (VkRenderPassMultiviewCreateInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::subpassCount), pNext_loc.dot(Field::pViewMasks), structure->subpassCount, - &structure->pViewMasks, false, true, kVUIDUndefined, - "VUID-VkRenderPassMultiviewCreateInfo-pViewMasks-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::dependencyCount), pNext_loc.dot(Field::pViewOffsets), - structure->dependencyCount, &structure->pViewOffsets, false, true, kVUIDUndefined, - "VUID-VkRenderPassMultiviewCreateInfo-pViewOffsets-parameter"); + VkPhysicalDeviceShaderFloat16Int8Features* structure = (VkPhysicalDeviceShaderFloat16Int8Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat16), structure->shaderFloat16); - skip |= ValidateArray(pNext_loc.dot(Field::correlationMaskCount), pNext_loc.dot(Field::pCorrelationMasks), - structure->correlationMaskCount, &structure->pCorrelationMasks, false, true, kVUIDUndefined, - "VUID-VkRenderPassMultiviewCreateInfo-pCorrelationMasks-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt8), structure->shaderInt8); } } break; - // Validation code for VkPhysicalDeviceMultiviewFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: { // Covers VUID-VkPhysicalDeviceMultiviewFeatures-sType-sType + // Validation code for VkPhysicalDeviceDescriptorIndexingFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: { // Covers + // VUID-VkPhysicalDeviceDescriptorIndexingFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_multiview)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_multiview))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES), " - "but its parent extension " - "VK_KHR_multiview has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES), but its parent extension " + "VK_EXT_descriptor_indexing has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMultiviewFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_multiview)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDescriptorIndexingFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMultiviewFeatures, but when creating VkDevice, the " - "parent extension " - "(VK_KHR_multiview) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceDescriptorIndexingFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_descriptor_indexing) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceMultiviewFeatures* structure = (VkPhysicalDeviceMultiviewFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::multiview), structure->multiview); + VkPhysicalDeviceDescriptorIndexingFeatures* structure = (VkPhysicalDeviceDescriptorIndexingFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayDynamicIndexing), + structure->shaderInputAttachmentArrayDynamicIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewGeometryShader), structure->multiviewGeometryShader); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayDynamicIndexing), + structure->shaderUniformTexelBufferArrayDynamicIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewTessellationShader), structure->multiviewTessellationShader); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayDynamicIndexing), + structure->shaderStorageTexelBufferArrayDynamicIndexing); - // Validation code for VkPhysicalDeviceMultiviewProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceMultiviewProperties-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformBufferArrayNonUniformIndexing), + structure->shaderUniformBufferArrayNonUniformIndexing); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_multiview)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_multiview))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES), but its parent extension " - "VK_KHR_multiview has not been enabled."); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampledImageArrayNonUniformIndexing), + structure->shaderSampledImageArrayNonUniformIndexing); - // Validation code for VkPhysicalDeviceVariablePointersFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: { // Covers - // VUID-VkPhysicalDeviceVariablePointersFeatures-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageBufferArrayNonUniformIndexing), + structure->shaderStorageBufferArrayNonUniformIndexing); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_variable_pointers)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_variable_pointers))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES), but its parent extension " - "VK_KHR_variable_pointers has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVariablePointersFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_variable_pointers)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceVariablePointersFeatures, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_variable_pointers) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceVariablePointersFeatures* structure = (VkPhysicalDeviceVariablePointersFeatures*)header; - skip |= - ValidateBool32(pNext_loc.dot(Field::variablePointersStorageBuffer), structure->variablePointersStorageBuffer); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageArrayNonUniformIndexing), + structure->shaderStorageImageArrayNonUniformIndexing); - skip |= ValidateBool32(pNext_loc.dot(Field::variablePointers), structure->variablePointers); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayNonUniformIndexing), + structure->shaderInputAttachmentArrayNonUniformIndexing); - // Validation code for VkPhysicalDeviceProtectedMemoryFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: { // Covers - // VUID-VkPhysicalDeviceProtectedMemoryFeatures-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayNonUniformIndexing), + structure->shaderUniformTexelBufferArrayNonUniformIndexing); - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_1) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES) " - "which was added in VK_API_VERSION_1_1 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceProtectedMemoryFeatures); - VkPhysicalDeviceProtectedMemoryFeatures* structure = (VkPhysicalDeviceProtectedMemoryFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::protectedMemory), structure->protectedMemory); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayNonUniformIndexing), + structure->shaderStorageTexelBufferArrayNonUniformIndexing); - // Validation code for VkPhysicalDeviceProtectedMemoryProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceProtectedMemoryProperties-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformBufferUpdateAfterBind), + structure->descriptorBindingUniformBufferUpdateAfterBind); - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_1) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES) " - "which was added in VK_API_VERSION_1_1 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingSampledImageUpdateAfterBind), + structure->descriptorBindingSampledImageUpdateAfterBind); - // Validation code for VkProtectedSubmitInfo structure members - case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: { // Covers VUID-VkProtectedSubmitInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageImageUpdateAfterBind), + structure->descriptorBindingStorageImageUpdateAfterBind); - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_1) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO) which was " - "added in VK_API_VERSION_1_1 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkProtectedSubmitInfo); - VkProtectedSubmitInfo* structure = (VkProtectedSubmitInfo*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::protectedSubmit), structure->protectedSubmit); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageBufferUpdateAfterBind), + structure->descriptorBindingStorageBufferUpdateAfterBind); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformTexelBufferUpdateAfterBind), + structure->descriptorBindingUniformTexelBufferUpdateAfterBind); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageTexelBufferUpdateAfterBind), + structure->descriptorBindingStorageTexelBufferUpdateAfterBind); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUpdateUnusedWhilePending), + structure->descriptorBindingUpdateUnusedWhilePending); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingPartiallyBound), + structure->descriptorBindingPartiallyBound); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingVariableDescriptorCount), + structure->descriptorBindingVariableDescriptorCount); + + skip |= ValidateBool32(pNext_loc.dot(Field::runtimeDescriptorArray), structure->runtimeDescriptorArray); } } break; - // Validation code for VkSamplerYcbcrConversionInfo structure members - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: { // Covers VUID-VkSamplerYcbcrConversionInfo-sType-sType + // Validation code for VkPhysicalDeviceScalarBlockLayoutFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: { // Covers + // VUID-VkPhysicalDeviceScalarBlockLayoutFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_scalar_block_layout)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_scalar_block_layout))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO), but " - "its parent extension " - "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES), but its parent extension " + "VK_EXT_scalar_block_layout has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerYcbcrConversionInfo); - if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceScalarBlockLayoutFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_scalar_block_layout)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_sampler_ycbcr_conversion"); + "includes a pointer to a VkPhysicalDeviceScalarBlockLayoutFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_scalar_block_layout) was not included in ppEnabledExtensionNames."); } - VkSamplerYcbcrConversionInfo* structure = (VkSamplerYcbcrConversionInfo*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::conversion), structure->conversion); + VkPhysicalDeviceScalarBlockLayoutFeatures* structure = (VkPhysicalDeviceScalarBlockLayoutFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::scalarBlockLayout), structure->scalarBlockLayout); } } break; - // Validation code for VkBindImagePlaneMemoryInfo structure members - case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: { // Covers VUID-VkBindImagePlaneMemoryInfo-sType-sType + // Validation code for VkPhysicalDeviceVulkanMemoryModelFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: { // Covers + // VUID-VkPhysicalDeviceVulkanMemoryModelFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_vulkan_memory_model)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_vulkan_memory_model))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO), but " - "its parent extension " - "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES), but its parent extension " + "VK_KHR_vulkan_memory_model has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindImagePlaneMemoryInfo); - if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkanMemoryModelFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_vulkan_memory_model)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_sampler_ycbcr_conversion"); + "includes a pointer to a VkPhysicalDeviceVulkanMemoryModelFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_vulkan_memory_model) was not included in ppEnabledExtensionNames."); } - VkBindImagePlaneMemoryInfo* structure = (VkBindImagePlaneMemoryInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::planeAspect), vvl::FlagBitmask::VkImageAspectFlagBits, - AllVkImageAspectFlagBits, structure->planeAspect, kRequiredSingleBit, - "VUID-VkBindImagePlaneMemoryInfo-planeAspect-parameter", - "VUID-VkBindImagePlaneMemoryInfo-planeAspect-parameter"); + VkPhysicalDeviceVulkanMemoryModelFeatures* structure = (VkPhysicalDeviceVulkanMemoryModelFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModel), structure->vulkanMemoryModel); + + skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelDeviceScope), structure->vulkanMemoryModelDeviceScope); + + skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelAvailabilityVisibilityChains), + structure->vulkanMemoryModelAvailabilityVisibilityChains); } } break; - // Validation code for VkImagePlaneMemoryRequirementsInfo structure members - case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: { // Covers - // VUID-VkImagePlaneMemoryRequirementsInfo-sType-sType + // Validation code for VkPhysicalDeviceImagelessFramebufferFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: { // Covers + // VUID-VkPhysicalDeviceImagelessFramebufferFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_imageless_framebuffer)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO), but its parent extension " - "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES), but its parent extension " + "VK_KHR_imageless_framebuffer has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImagePlaneMemoryRequirementsInfo); - if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImagelessFramebufferFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_sampler_ycbcr_conversion"); + "includes a pointer to a VkPhysicalDeviceImagelessFramebufferFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_imageless_framebuffer) was not included in ppEnabledExtensionNames."); } - VkImagePlaneMemoryRequirementsInfo* structure = (VkImagePlaneMemoryRequirementsInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::planeAspect), vvl::FlagBitmask::VkImageAspectFlagBits, - AllVkImageAspectFlagBits, structure->planeAspect, kRequiredSingleBit, - "VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-parameter", - "VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-parameter"); + VkPhysicalDeviceImagelessFramebufferFeatures* structure = (VkPhysicalDeviceImagelessFramebufferFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::imagelessFramebuffer), structure->imagelessFramebuffer); } } break; - // Validation code for VkPhysicalDeviceSamplerYcbcrConversionFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: { // Covers - // VUID-VkPhysicalDeviceSamplerYcbcrConversionFeatures-sType-sType + // Validation code for VkPhysicalDeviceUniformBufferStandardLayoutFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: { // Covers + // VUID-VkPhysicalDeviceUniformBufferStandardLayoutFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES), but its parent extension " - "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_uniform_buffer_standard_layout)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_uniform_buffer_standard_layout))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES), but its parent extension " + "VK_KHR_uniform_buffer_standard_layout has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSamplerYcbcrConversionFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceUniformBufferStandardLayoutFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_uniform_buffer_standard_layout)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSamplerYcbcrConversionFeatures, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_sampler_ycbcr_conversion) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceUniformBufferStandardLayoutFeatures, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_uniform_buffer_standard_layout) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceSamplerYcbcrConversionFeatures* structure = (VkPhysicalDeviceSamplerYcbcrConversionFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::samplerYcbcrConversion), structure->samplerYcbcrConversion); + VkPhysicalDeviceUniformBufferStandardLayoutFeatures* structure = + (VkPhysicalDeviceUniformBufferStandardLayoutFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::uniformBufferStandardLayout), structure->uniformBufferStandardLayout); } } break; - // Validation code for VkSamplerYcbcrConversionImageFormatProperties structure members - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: { // Covers - // VUID-VkSamplerYcbcrConversionImageFormatProperties-sType-sType + // Validation code for VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES), but its parent extension " - "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_subgroup_extended_types)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_subgroup_extended_types))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES), but its parent extension " + "VK_KHR_shader_subgroup_extended_types has not been enabled."); } } break; - // Validation code for VkPhysicalDeviceExternalImageFormatInfo structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: { // Covers - // VUID-VkPhysicalDeviceExternalImageFormatInfo-sType-sType + // Validation code for VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: { // Covers + // VUID-VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures-sType-sType - if (!IsExtEnabled(instance_extensions.vk_khr_external_memory_capabilities)) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO), but its parent extension " - "VK_KHR_external_memory_capabilities has not been enabled."); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_separate_depth_stencil_layouts)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES), but its parent extension " + "VK_KHR_separate_depth_stencil_layouts has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExternalImageFormatInfo); - VkPhysicalDeviceExternalImageFormatInfo* structure = (VkPhysicalDeviceExternalImageFormatInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, - "VUID-VkPhysicalDeviceExternalImageFormatInfo-handleType-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_separate_depth_stencil_layouts) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* structure = + (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::separateDepthStencilLayouts), structure->separateDepthStencilLayouts); } } break; - // Validation code for VkExternalImageFormatProperties structure members - case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: { // Covers VUID-VkExternalImageFormatProperties-sType-sType + // Validation code for VkPhysicalDeviceHostQueryResetFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: { // Covers + // VUID-VkPhysicalDeviceHostQueryResetFeatures-sType-sType - if (!IsExtEnabled(instance_extensions.vk_khr_external_memory_capabilities)) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_host_query_reset)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_host_query_reset))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES), " - "but its parent extension " - "VK_KHR_external_memory_capabilities has not been enabled."); - } - } break; - - // Validation code for VkPhysicalDeviceIDProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: { // Covers VUID-VkPhysicalDeviceIDProperties-sType-sType - - if (!IsExtEnabled(instance_extensions.vk_khr_external_fence_capabilities)) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES), but " - "its parent extension " - "VK_KHR_external_fence_capabilities has not been enabled."); - } - } break; - - // Validation code for VkExternalMemoryImageCreateInfo structure members - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: { // Covers VUID-VkExternalMemoryImageCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_memory)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_memory))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO), " - "but its parent extension " - "VK_KHR_external_memory has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryImageCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_external_memory)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_memory"); - } - VkExternalMemoryImageCreateInfo* structure = (VkExternalMemoryImageCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, - "VUID-VkExternalMemoryImageCreateInfo-handleTypes-parameter"); - } - } break; - - // Validation code for VkExternalMemoryBufferCreateInfo structure members - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: { // Covers VUID-VkExternalMemoryBufferCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_memory)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_memory))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO), " - "but its parent extension " - "VK_KHR_external_memory has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryBufferCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_external_memory)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_memory"); - } - VkExternalMemoryBufferCreateInfo* structure = (VkExternalMemoryBufferCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, - "VUID-VkExternalMemoryBufferCreateInfo-handleTypes-parameter"); - } - } break; - - // Validation code for VkExportMemoryAllocateInfo structure members - case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: { // Covers VUID-VkExportMemoryAllocateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_memory)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_memory))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO), but its " - "parent extension " - "VK_KHR_external_memory has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES), but its parent extension " + "VK_EXT_host_query_reset has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMemoryAllocateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_external_memory)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_memory"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceHostQueryResetFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_host_query_reset)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceHostQueryResetFeatures, but when creating VkDevice, " + "the parent extension " + "(VK_EXT_host_query_reset) was not included in ppEnabledExtensionNames."); } - VkExportMemoryAllocateInfo* structure = (VkExportMemoryAllocateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, - "VUID-VkExportMemoryAllocateInfo-handleTypes-parameter"); + VkPhysicalDeviceHostQueryResetFeatures* structure = (VkPhysicalDeviceHostQueryResetFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::hostQueryReset), structure->hostQueryReset); } } break; - // Validation code for VkExportFenceCreateInfo structure members - case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: { // Covers VUID-VkExportFenceCreateInfo-sType-sType + // Validation code for VkPhysicalDeviceTimelineSemaphoreFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: { // Covers + // VUID-VkPhysicalDeviceTimelineSemaphoreFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_fence)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_fence))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO), but its " - "parent extension " - "VK_KHR_external_fence has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES), but its parent extension " + "VK_KHR_timeline_semaphore has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportFenceCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_external_fence)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_fence"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTimelineSemaphoreFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_timeline_semaphore)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceTimelineSemaphoreFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_timeline_semaphore) was not included in ppEnabledExtensionNames."); } - VkExportFenceCreateInfo* structure = (VkExportFenceCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalFenceHandleTypeFlagBits, - AllVkExternalFenceHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, - "VUID-VkExportFenceCreateInfo-handleTypes-parameter"); + VkPhysicalDeviceTimelineSemaphoreFeatures* structure = (VkPhysicalDeviceTimelineSemaphoreFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::timelineSemaphore), structure->timelineSemaphore); } } break; - // Validation code for VkExportSemaphoreCreateInfo structure members - case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: { // Covers VUID-VkExportSemaphoreCreateInfo-sType-sType + // Validation code for VkPhysicalDeviceBufferDeviceAddressFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: { // Covers + // VUID-VkPhysicalDeviceBufferDeviceAddressFeatures-sType-sType - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_semaphore)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_semaphore))) { + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_buffer_device_address)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_buffer_device_address))) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO), but " - "its parent extension " - "VK_KHR_external_semaphore has not been enabled."); + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES), but its parent extension " + "VK_KHR_buffer_device_address has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportSemaphoreCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_external_semaphore)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBufferDeviceAddressFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_buffer_device_address)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_external_semaphore"); + "includes a pointer to a VkPhysicalDeviceBufferDeviceAddressFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_buffer_device_address) was not included in ppEnabledExtensionNames."); } - VkExportSemaphoreCreateInfo* structure = (VkExportSemaphoreCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalSemaphoreHandleTypeFlagBits, - AllVkExternalSemaphoreHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, - "VUID-VkExportSemaphoreCreateInfo-handleTypes-parameter"); - } - } break; - - // Validation code for VkPhysicalDeviceMaintenance3Properties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceMaintenance3Properties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance3)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance3))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES), but its parent extension " - "VK_KHR_maintenance3 has not been enabled."); - } - } break; + VkPhysicalDeviceBufferDeviceAddressFeatures* structure = (VkPhysicalDeviceBufferDeviceAddressFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddress), structure->bufferDeviceAddress); - // Validation code for VkPhysicalDeviceShaderDrawParametersFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderDrawParametersFeatures-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressCaptureReplay), + structure->bufferDeviceAddressCaptureReplay); - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_1) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES) which was added in " - "VK_API_VERSION_1_1 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderDrawParametersFeatures); - VkPhysicalDeviceShaderDrawParametersFeatures* structure = (VkPhysicalDeviceShaderDrawParametersFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderDrawParameters), structure->shaderDrawParameters); + skip |= + ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressMultiDevice), structure->bufferDeviceAddressMultiDevice); } } break; - // Validation code for VkPhysicalDeviceVulkan11Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: { // Covers VUID-VkPhysicalDeviceVulkan11Features-sType-sType + // Validation code for VkPhysicalDeviceVulkan13Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: { // Covers VUID-VkPhysicalDeviceVulkan13Features-sType-sType if (is_physdev_api) { VkPhysicalDeviceProperties device_properties = {}; DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_2) { + if (device_properties.apiVersion < VK_API_VERSION_1_3) { skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES) " - "which was added in VK_API_VERSION_1_2 but the " + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES) " + "which was added in VK_API_VERSION_1_3 but the " "current effective API version is %s.", StringAPIVersion(api_version).c_str()); } } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkan11Features); - VkPhysicalDeviceVulkan11Features* structure = (VkPhysicalDeviceVulkan11Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::storageBuffer16BitAccess), structure->storageBuffer16BitAccess); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkan13Features); + VkPhysicalDeviceVulkan13Features* structure = (VkPhysicalDeviceVulkan13Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::robustImageAccess), structure->robustImageAccess); - skip |= ValidateBool32(pNext_loc.dot(Field::uniformAndStorageBuffer16BitAccess), - structure->uniformAndStorageBuffer16BitAccess); + skip |= ValidateBool32(pNext_loc.dot(Field::inlineUniformBlock), structure->inlineUniformBlock); - skip |= ValidateBool32(pNext_loc.dot(Field::storagePushConstant16), structure->storagePushConstant16); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingInlineUniformBlockUpdateAfterBind), + structure->descriptorBindingInlineUniformBlockUpdateAfterBind); - skip |= ValidateBool32(pNext_loc.dot(Field::storageInputOutput16), structure->storageInputOutput16); + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineCreationCacheControl), structure->pipelineCreationCacheControl); - skip |= ValidateBool32(pNext_loc.dot(Field::multiview), structure->multiview); + skip |= ValidateBool32(pNext_loc.dot(Field::privateData), structure->privateData); - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewGeometryShader), structure->multiviewGeometryShader); + skip |= + ValidateBool32(pNext_loc.dot(Field::shaderDemoteToHelperInvocation), structure->shaderDemoteToHelperInvocation); - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewTessellationShader), structure->multiviewTessellationShader); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderTerminateInvocation), structure->shaderTerminateInvocation); - skip |= - ValidateBool32(pNext_loc.dot(Field::variablePointersStorageBuffer), structure->variablePointersStorageBuffer); + skip |= ValidateBool32(pNext_loc.dot(Field::subgroupSizeControl), structure->subgroupSizeControl); - skip |= ValidateBool32(pNext_loc.dot(Field::variablePointers), structure->variablePointers); + skip |= ValidateBool32(pNext_loc.dot(Field::computeFullSubgroups), structure->computeFullSubgroups); - skip |= ValidateBool32(pNext_loc.dot(Field::protectedMemory), structure->protectedMemory); + skip |= ValidateBool32(pNext_loc.dot(Field::synchronization2), structure->synchronization2); - skip |= ValidateBool32(pNext_loc.dot(Field::samplerYcbcrConversion), structure->samplerYcbcrConversion); + skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionASTC_HDR), structure->textureCompressionASTC_HDR); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderDrawParameters), structure->shaderDrawParameters); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderZeroInitializeWorkgroupMemory), + structure->shaderZeroInitializeWorkgroupMemory); - // Validation code for VkPhysicalDeviceVulkan11Properties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceVulkan11Properties-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRendering), structure->dynamicRendering); - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_2) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES) which " - "was added in VK_API_VERSION_1_2 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } + skip |= ValidateBool32(pNext_loc.dot(Field::shaderIntegerDotProduct), structure->shaderIntegerDotProduct); + + skip |= ValidateBool32(pNext_loc.dot(Field::maintenance4), structure->maintenance4); } } break; - // Validation code for VkPhysicalDeviceVulkan12Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: { // Covers VUID-VkPhysicalDeviceVulkan12Features-sType-sType + // Validation code for VkPhysicalDeviceShaderTerminateInvocationFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderTerminateInvocationFeatures-sType-sType - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_2) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES) " - "which was added in VK_API_VERSION_1_2 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); - } + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_terminate_invocation)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_terminate_invocation))) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES), but its parent extension " + "VK_KHR_shader_terminate_invocation has not been enabled."); } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkan12Features); - VkPhysicalDeviceVulkan12Features* structure = (VkPhysicalDeviceVulkan12Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::samplerMirrorClampToEdge), structure->samplerMirrorClampToEdge); - - skip |= ValidateBool32(pNext_loc.dot(Field::drawIndirectCount), structure->drawIndirectCount); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderTerminateInvocationFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_shader_terminate_invocation)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderTerminateInvocationFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_terminate_invocation) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderTerminateInvocationFeatures* structure = + (VkPhysicalDeviceShaderTerminateInvocationFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderTerminateInvocation), structure->shaderTerminateInvocation); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::storageBuffer8BitAccess), structure->storageBuffer8BitAccess); + // Validation code for VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::uniformAndStorageBuffer8BitAccess), - structure->uniformAndStorageBuffer8BitAccess); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_shader_demote_to_helper_invocation)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_shader_demote_to_helper_invocation))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES), but its parent extension " + "VK_EXT_shader_demote_to_helper_invocation has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_shader_demote_to_helper_invocation)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_shader_demote_to_helper_invocation) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures* structure = + (VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures*)header; + skip |= + ValidateBool32(pNext_loc.dot(Field::shaderDemoteToHelperInvocation), structure->shaderDemoteToHelperInvocation); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::storagePushConstant8), structure->storagePushConstant8); + // Validation code for VkPhysicalDevicePrivateDataFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: { // Covers + // VUID-VkPhysicalDevicePrivateDataFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferInt64Atomics), structure->shaderBufferInt64Atomics); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_private_data)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_private_data))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES), but its parent extension " + "VK_EXT_private_data has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePrivateDataFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_private_data)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePrivateDataFeatures, but when creating VkDevice, the " + "parent extension " + "(VK_EXT_private_data) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePrivateDataFeatures* structure = (VkPhysicalDevicePrivateDataFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::privateData), structure->privateData); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedInt64Atomics), structure->shaderSharedInt64Atomics); + // Validation code for VkPhysicalDevicePipelineCreationCacheControlFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: { // Covers + // VUID-VkPhysicalDevicePipelineCreationCacheControlFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat16), structure->shaderFloat16); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_pipeline_creation_cache_control)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_pipeline_creation_cache_control))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES), but its parent extension " + "VK_EXT_pipeline_creation_cache_control has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelineCreationCacheControlFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_creation_cache_control)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePipelineCreationCacheControlFeatures, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_pipeline_creation_cache_control) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePipelineCreationCacheControlFeatures* structure = + (VkPhysicalDevicePipelineCreationCacheControlFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineCreationCacheControl), structure->pipelineCreationCacheControl); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt8), structure->shaderInt8); + // Validation code for VkPhysicalDeviceSynchronization2Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: { // Covers + // VUID-VkPhysicalDeviceSynchronization2Features-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorIndexing), structure->descriptorIndexing); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_synchronization2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_synchronization2))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES), but its parent extension " + "VK_KHR_synchronization2 has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSynchronization2Features); + if (!IsExtEnabled(device_extensions.vk_khr_synchronization2)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceSynchronization2Features, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_synchronization2) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceSynchronization2Features* structure = (VkPhysicalDeviceSynchronization2Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::synchronization2), structure->synchronization2); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayDynamicIndexing), - structure->shaderInputAttachmentArrayDynamicIndexing); + // Validation code for VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: { // Covers + // VUID-VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayDynamicIndexing), - structure->shaderUniformTexelBufferArrayDynamicIndexing); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_zero_initialize_workgroup_memory)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_zero_initialize_workgroup_memory))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES), but its parent extension " + "VK_KHR_zero_initialize_workgroup_memory has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_zero_initialize_workgroup_memory)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_zero_initialize_workgroup_memory) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures* structure = + (VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderZeroInitializeWorkgroupMemory), + structure->shaderZeroInitializeWorkgroupMemory); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayDynamicIndexing), - structure->shaderStorageTexelBufferArrayDynamicIndexing); + // Validation code for VkPhysicalDeviceImageRobustnessFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: { // Covers + // VUID-VkPhysicalDeviceImageRobustnessFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformBufferArrayNonUniformIndexing), - structure->shaderUniformBufferArrayNonUniformIndexing); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_image_robustness)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_image_robustness))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES), but its parent extension " + "VK_EXT_image_robustness has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageRobustnessFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_image_robustness)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceImageRobustnessFeatures, but when creating VkDevice, " + "the parent extension " + "(VK_EXT_image_robustness) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceImageRobustnessFeatures* structure = (VkPhysicalDeviceImageRobustnessFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::robustImageAccess), structure->robustImageAccess); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampledImageArrayNonUniformIndexing), - structure->shaderSampledImageArrayNonUniformIndexing); + // Validation code for VkPhysicalDeviceSubgroupSizeControlFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: { // Covers + // VUID-VkPhysicalDeviceSubgroupSizeControlFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageBufferArrayNonUniformIndexing), - structure->shaderStorageBufferArrayNonUniformIndexing); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_subgroup_size_control)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_subgroup_size_control))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES), but its parent extension " + "VK_EXT_subgroup_size_control has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSubgroupSizeControlFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_subgroup_size_control)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceSubgroupSizeControlFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_subgroup_size_control) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceSubgroupSizeControlFeatures* structure = (VkPhysicalDeviceSubgroupSizeControlFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::subgroupSizeControl), structure->subgroupSizeControl); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageArrayNonUniformIndexing), - structure->shaderStorageImageArrayNonUniformIndexing); + skip |= ValidateBool32(pNext_loc.dot(Field::computeFullSubgroups), structure->computeFullSubgroups); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayNonUniformIndexing), - structure->shaderInputAttachmentArrayNonUniformIndexing); + // Validation code for VkPhysicalDeviceInlineUniformBlockFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: { // Covers + // VUID-VkPhysicalDeviceInlineUniformBlockFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayNonUniformIndexing), - structure->shaderUniformTexelBufferArrayNonUniformIndexing); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES), but its parent extension " + "VK_EXT_inline_uniform_block has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceInlineUniformBlockFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_inline_uniform_block)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceInlineUniformBlockFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_inline_uniform_block) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceInlineUniformBlockFeatures* structure = (VkPhysicalDeviceInlineUniformBlockFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::inlineUniformBlock), structure->inlineUniformBlock); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayNonUniformIndexing), - structure->shaderStorageTexelBufferArrayNonUniformIndexing); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingInlineUniformBlockUpdateAfterBind), + structure->descriptorBindingInlineUniformBlockUpdateAfterBind); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformBufferUpdateAfterBind), - structure->descriptorBindingUniformBufferUpdateAfterBind); + // Validation code for VkPhysicalDeviceTextureCompressionASTCHDRFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: { // Covers + // VUID-VkPhysicalDeviceTextureCompressionASTCHDRFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingSampledImageUpdateAfterBind), - structure->descriptorBindingSampledImageUpdateAfterBind); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_texture_compression_astc_hdr)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_texture_compression_astc_hdr))) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES), but its parent extension " + "VK_EXT_texture_compression_astc_hdr has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTextureCompressionASTCHDRFeatures); + if (!IsExtEnabled(device_extensions.vk_ext_texture_compression_astc_hdr)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceTextureCompressionASTCHDRFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_texture_compression_astc_hdr) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceTextureCompressionASTCHDRFeatures* structure = + (VkPhysicalDeviceTextureCompressionASTCHDRFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionASTC_HDR), structure->textureCompressionASTC_HDR); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageImageUpdateAfterBind), - structure->descriptorBindingStorageImageUpdateAfterBind); + // Validation code for VkPhysicalDeviceDynamicRenderingFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: { // Covers + // VUID-VkPhysicalDeviceDynamicRenderingFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageBufferUpdateAfterBind), - structure->descriptorBindingStorageBufferUpdateAfterBind); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES), but its parent extension " + "VK_KHR_dynamic_rendering has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDynamicRenderingFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDynamicRenderingFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_dynamic_rendering) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDynamicRenderingFeatures* structure = (VkPhysicalDeviceDynamicRenderingFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRendering), structure->dynamicRendering); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformTexelBufferUpdateAfterBind), - structure->descriptorBindingUniformTexelBufferUpdateAfterBind); + // Validation code for VkPhysicalDeviceShaderIntegerDotProductFeatures structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: { // Covers + // VUID-VkPhysicalDeviceShaderIntegerDotProductFeatures-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageTexelBufferUpdateAfterBind), - structure->descriptorBindingStorageTexelBufferUpdateAfterBind); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_integer_dot_product)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_integer_dot_product))) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES), but its parent extension " + "VK_KHR_shader_integer_dot_product has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderIntegerDotProductFeatures); + if (!IsExtEnabled(device_extensions.vk_khr_shader_integer_dot_product)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderIntegerDotProductFeatures, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_integer_dot_product) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderIntegerDotProductFeatures* structure = + (VkPhysicalDeviceShaderIntegerDotProductFeatures*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderIntegerDotProduct), structure->shaderIntegerDotProduct); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUpdateUnusedWhilePending), - structure->descriptorBindingUpdateUnusedWhilePending); + // Validation code for VkPhysicalDeviceMaintenance4Features structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: { // Covers + // VUID-VkPhysicalDeviceMaintenance4Features-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingPartiallyBound), - structure->descriptorBindingPartiallyBound); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance4)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance4))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES), but its parent extension " + "VK_KHR_maintenance4 has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMaintenance4Features); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance4)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMaintenance4Features, but when creating VkDevice, " + "the parent extension " + "(VK_KHR_maintenance4) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMaintenance4Features* structure = (VkPhysicalDeviceMaintenance4Features*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::maintenance4), structure->maintenance4); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingVariableDescriptorCount), - structure->descriptorBindingVariableDescriptorCount); + // Validation code for VkPhysicalDevicePerformanceQueryFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDevicePerformanceQueryFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePerformanceQueryFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_performance_query)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePerformanceQueryFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_performance_query) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePerformanceQueryFeaturesKHR* structure = (VkPhysicalDevicePerformanceQueryFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::performanceCounterQueryPools), structure->performanceCounterQueryPools); - skip |= ValidateBool32(pNext_loc.dot(Field::runtimeDescriptorArray), structure->runtimeDescriptorArray); + skip |= ValidateBool32(pNext_loc.dot(Field::performanceCounterMultipleQueryPools), + structure->performanceCounterMultipleQueryPools); + } + } break; +#ifdef VK_ENABLE_BETA_EXTENSIONS - skip |= ValidateBool32(pNext_loc.dot(Field::samplerFilterMinmax), structure->samplerFilterMinmax); + // Validation code for VkPhysicalDevicePortabilitySubsetFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDevicePortabilitySubsetFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePortabilitySubsetFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_portability_subset)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePortabilitySubsetFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_portability_subset) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePortabilitySubsetFeaturesKHR* structure = (VkPhysicalDevicePortabilitySubsetFeaturesKHR*)header; + skip |= + ValidateBool32(pNext_loc.dot(Field::constantAlphaColorBlendFactors), structure->constantAlphaColorBlendFactors); - skip |= ValidateBool32(pNext_loc.dot(Field::scalarBlockLayout), structure->scalarBlockLayout); + skip |= ValidateBool32(pNext_loc.dot(Field::events), structure->events); - skip |= ValidateBool32(pNext_loc.dot(Field::imagelessFramebuffer), structure->imagelessFramebuffer); + skip |= ValidateBool32(pNext_loc.dot(Field::imageViewFormatReinterpretation), + structure->imageViewFormatReinterpretation); + + skip |= ValidateBool32(pNext_loc.dot(Field::imageViewFormatSwizzle), structure->imageViewFormatSwizzle); + + skip |= ValidateBool32(pNext_loc.dot(Field::imageView2DOn3DImage), structure->imageView2DOn3DImage); + + skip |= ValidateBool32(pNext_loc.dot(Field::multisampleArrayImage), structure->multisampleArrayImage); + + skip |= ValidateBool32(pNext_loc.dot(Field::mutableComparisonSamplers), structure->mutableComparisonSamplers); + + skip |= ValidateBool32(pNext_loc.dot(Field::pointPolygons), structure->pointPolygons); + + skip |= ValidateBool32(pNext_loc.dot(Field::samplerMipLodBias), structure->samplerMipLodBias); + + skip |= ValidateBool32(pNext_loc.dot(Field::separateStencilMaskRef), structure->separateStencilMaskRef); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampleRateInterpolationFunctions), + structure->shaderSampleRateInterpolationFunctions); + + skip |= ValidateBool32(pNext_loc.dot(Field::tessellationIsolines), structure->tessellationIsolines); + + skip |= ValidateBool32(pNext_loc.dot(Field::tessellationPointMode), structure->tessellationPointMode); + + skip |= ValidateBool32(pNext_loc.dot(Field::triangleFans), structure->triangleFans); + + skip |= ValidateBool32(pNext_loc.dot(Field::vertexAttributeAccessBeyondStride), + structure->vertexAttributeAccessBeyondStride); + } + } break; +#endif // VK_ENABLE_BETA_EXTENSIONS + + // Validation code for VkPhysicalDeviceShaderClockFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderClockFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderClockFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_clock)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderClockFeaturesKHR, but when creating VkDevice, " + "the parent extension " + "(VK_KHR_shader_clock) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderClockFeaturesKHR* structure = (VkPhysicalDeviceShaderClockFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupClock), structure->shaderSubgroupClock); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderDeviceClock), structure->shaderDeviceClock); + } + } break; + + // Validation code for VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_global_priority) && + !IsExtEnabled(device_extensions.vk_ext_global_priority_query)) { + skip |= LogError( + pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR, but when creating VkDevice, the " + "parent extension " + "(VK_KHR_global_priority or VK_EXT_global_priority_query) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR* structure = (VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::globalPriorityQuery), structure->globalPriorityQuery); + } + } break; + + // Validation code for VkPhysicalDeviceFragmentShadingRateFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceFragmentShadingRateFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShadingRateFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_fragment_shading_rate)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceFragmentShadingRateFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_fragment_shading_rate) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceFragmentShadingRateFeaturesKHR* structure = (VkPhysicalDeviceFragmentShadingRateFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineFragmentShadingRate), structure->pipelineFragmentShadingRate); + + skip |= ValidateBool32(pNext_loc.dot(Field::primitiveFragmentShadingRate), structure->primitiveFragmentShadingRate); + + skip |= + ValidateBool32(pNext_loc.dot(Field::attachmentFragmentShadingRate), structure->attachmentFragmentShadingRate); + } + } break; + + // Validation code for VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering_local_read)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_dynamic_rendering_local_read) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR* structure = + (VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRenderingLocalRead), structure->dynamicRenderingLocalRead); + } + } break; + + // Validation code for VkPhysicalDeviceShaderQuadControlFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderQuadControlFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderQuadControlFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_quad_control)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderQuadControlFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_quad_control) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderQuadControlFeaturesKHR* structure = (VkPhysicalDeviceShaderQuadControlFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderQuadControl), structure->shaderQuadControl); + } + } break; + + // Validation code for VkPhysicalDevicePresentWaitFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDevicePresentWaitFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePresentWaitFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_present_wait)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePresentWaitFeaturesKHR, but when creating VkDevice, " + "the parent extension " + "(VK_KHR_present_wait) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePresentWaitFeaturesKHR* structure = (VkPhysicalDevicePresentWaitFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::presentWait), structure->presentWait); + } + } break; + + // Validation code for VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_pipeline_executable_properties)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_pipeline_executable_properties) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR* structure = + (VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineExecutableInfo), structure->pipelineExecutableInfo); + } + } break; + + // Validation code for VkPhysicalDevicePresentIdFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDevicePresentIdFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePresentIdFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_present_id)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePresentIdFeaturesKHR, but when creating VkDevice, " + "the parent extension " + "(VK_KHR_present_id) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePresentIdFeaturesKHR* structure = (VkPhysicalDevicePresentIdFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::presentId), structure->presentId); + } + } break; + + // Validation code for VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_fragment_shader_barycentric) && + !IsExtEnabled(device_extensions.vk_nv_fragment_shader_barycentric)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_fragment_shader_barycentric or VK_NV_fragment_shader_barycentric) was not included " + "in ppEnabledExtensionNames."); + } + VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR* structure = + (VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShaderBarycentric), structure->fragmentShaderBarycentric); + } + } break; + + // Validation code for VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_subgroup_uniform_control_flow)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, but " + "when creating VkDevice, the parent extension " + "(VK_KHR_shader_subgroup_uniform_control_flow) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR* structure = + (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupUniformControlFlow), + structure->shaderSubgroupUniformControlFlow); + } + } break; + + // Validation code for VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_workgroup_memory_explicit_layout)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_workgroup_memory_explicit_layout) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR* structure = + (VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR*)header; + skip |= + ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayout), structure->workgroupMemoryExplicitLayout); + + skip |= ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayoutScalarBlockLayout), + structure->workgroupMemoryExplicitLayoutScalarBlockLayout); + + skip |= ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayout8BitAccess), + structure->workgroupMemoryExplicitLayout8BitAccess); + + skip |= ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayout16BitAccess), + structure->workgroupMemoryExplicitLayout16BitAccess); + } + } break; + + // Validation code for VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_ray_tracing_maintenance1)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_ray_tracing_maintenance1) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR* structure = + (VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingMaintenance1), structure->rayTracingMaintenance1); + + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineTraceRaysIndirect2), + structure->rayTracingPipelineTraceRaysIndirect2); + } + } break; + + // Validation code for VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_subgroup_rotate)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_subgroup_rotate) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR* structure = + (VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupRotate), structure->shaderSubgroupRotate); + + skip |= + ValidateBool32(pNext_loc.dot(Field::shaderSubgroupRotateClustered), structure->shaderSubgroupRotateClustered); + } + } break; + + // Validation code for VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_maximal_reconvergence)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_shader_maximal_reconvergence) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR* structure = + (VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderMaximalReconvergence), structure->shaderMaximalReconvergence); + } + } break; + + // Validation code for VkPhysicalDeviceMaintenance5FeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceMaintenance5FeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMaintenance5FeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance5)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMaintenance5FeaturesKHR, but when creating VkDevice, " + "the parent extension " + "(VK_KHR_maintenance5) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMaintenance5FeaturesKHR* structure = (VkPhysicalDeviceMaintenance5FeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::maintenance5), structure->maintenance5); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::uniformBufferStandardLayout), structure->uniformBufferStandardLayout); + // Validation code for VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_ray_tracing_position_fetch)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR, but when " + "creating VkDevice, the parent extension " + "(VK_KHR_ray_tracing_position_fetch) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR* structure = + (VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPositionFetch), structure->rayTracingPositionFetch); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupExtendedTypes), structure->shaderSubgroupExtendedTypes); + // Validation code for VkPhysicalDeviceCooperativeMatrixFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceCooperativeMatrixFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCooperativeMatrixFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_cooperative_matrix)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceCooperativeMatrixFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_cooperative_matrix) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceCooperativeMatrixFeaturesKHR* structure = (VkPhysicalDeviceCooperativeMatrixFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrix), structure->cooperativeMatrix); - skip |= ValidateBool32(pNext_loc.dot(Field::separateDepthStencilLayouts), structure->separateDepthStencilLayouts); + skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrixRobustBufferAccess), + structure->cooperativeMatrixRobustBufferAccess); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::hostQueryReset), structure->hostQueryReset); + // Validation code for VkPhysicalDeviceVideoMaintenance1FeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceVideoMaintenance1FeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVideoMaintenance1FeaturesKHR); + VkPhysicalDeviceVideoMaintenance1FeaturesKHR* structure = (VkPhysicalDeviceVideoMaintenance1FeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::videoMaintenance1), structure->videoMaintenance1); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::timelineSemaphore), structure->timelineSemaphore); + // Validation code for VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_vertex_attribute_divisor) && + !IsExtEnabled(device_extensions.vk_ext_vertex_attribute_divisor)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_vertex_attribute_divisor or VK_EXT_vertex_attribute_divisor) was not included in " + "ppEnabledExtensionNames."); + } + VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR* structure = + (VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::vertexAttributeInstanceRateDivisor), + structure->vertexAttributeInstanceRateDivisor); - skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddress), structure->bufferDeviceAddress); + skip |= ValidateBool32(pNext_loc.dot(Field::vertexAttributeInstanceRateZeroDivisor), + structure->vertexAttributeInstanceRateZeroDivisor); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressCaptureReplay), - structure->bufferDeviceAddressCaptureReplay); + // Validation code for VkPhysicalDeviceShaderFloatControls2FeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderFloatControls2FeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderFloatControls2FeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_float_controls2)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderFloatControls2FeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_float_controls2) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderFloatControls2FeaturesKHR* structure = + (VkPhysicalDeviceShaderFloatControls2FeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloatControls2), structure->shaderFloatControls2); + } + } break; - skip |= - ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressMultiDevice), structure->bufferDeviceAddressMultiDevice); + // Validation code for VkPhysicalDeviceIndexTypeUint8FeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceIndexTypeUint8FeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceIndexTypeUint8FeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_index_type_uint8) && + !IsExtEnabled(device_extensions.vk_ext_index_type_uint8)) { + skip |= LogError( + pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceIndexTypeUint8FeaturesKHR, but when creating VkDevice, the parent " + "extension " + "(VK_KHR_index_type_uint8 or VK_EXT_index_type_uint8) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceIndexTypeUint8FeaturesKHR* structure = (VkPhysicalDeviceIndexTypeUint8FeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::indexTypeUint8), structure->indexTypeUint8); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModel), structure->vulkanMemoryModel); + // Validation code for VkPhysicalDeviceLineRasterizationFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceLineRasterizationFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceLineRasterizationFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_line_rasterization) && + !IsExtEnabled(device_extensions.vk_ext_line_rasterization)) { + skip |= LogError( + pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceLineRasterizationFeaturesKHR, but when creating VkDevice, the " + "parent extension " + "(VK_KHR_line_rasterization or VK_EXT_line_rasterization) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceLineRasterizationFeaturesKHR* structure = (VkPhysicalDeviceLineRasterizationFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rectangularLines), structure->rectangularLines); - skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelDeviceScope), structure->vulkanMemoryModelDeviceScope); + skip |= ValidateBool32(pNext_loc.dot(Field::bresenhamLines), structure->bresenhamLines); - skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelAvailabilityVisibilityChains), - structure->vulkanMemoryModelAvailabilityVisibilityChains); + skip |= ValidateBool32(pNext_loc.dot(Field::smoothLines), structure->smoothLines); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderOutputViewportIndex), structure->shaderOutputViewportIndex); + skip |= ValidateBool32(pNext_loc.dot(Field::stippledRectangularLines), structure->stippledRectangularLines); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderOutputLayer), structure->shaderOutputLayer); + skip |= ValidateBool32(pNext_loc.dot(Field::stippledBresenhamLines), structure->stippledBresenhamLines); - skip |= ValidateBool32(pNext_loc.dot(Field::subgroupBroadcastDynamicId), structure->subgroupBroadcastDynamicId); + skip |= ValidateBool32(pNext_loc.dot(Field::stippledSmoothLines), structure->stippledSmoothLines); } } break; - // Validation code for VkPhysicalDeviceVulkan12Properties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceVulkan12Properties-sType-sType - - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_2) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES) which " - "was added in VK_API_VERSION_1_2 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); + // Validation code for VkPhysicalDeviceShaderExpectAssumeFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceShaderExpectAssumeFeaturesKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderExpectAssumeFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_shader_expect_assume)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderExpectAssumeFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_shader_expect_assume) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceShaderExpectAssumeFeaturesKHR* structure = (VkPhysicalDeviceShaderExpectAssumeFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderExpectAssume), structure->shaderExpectAssume); } } break; - // Validation code for VkImageFormatListCreateInfo structure members - case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: { // Covers VUID-VkImageFormatListCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_image_format_list)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_image_format_list))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO), but " - "its parent extension " - "VK_KHR_image_format_list has not been enabled."); - } + // Validation code for VkPhysicalDeviceMaintenance6FeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceMaintenance6FeaturesKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageFormatListCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_image_format_list)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMaintenance6FeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance6)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_image_format_list"); + "includes a pointer to a VkPhysicalDeviceMaintenance6FeaturesKHR, but when creating VkDevice, " + "the parent extension " + "(VK_KHR_maintenance6) was not included in ppEnabledExtensionNames."); } - VkImageFormatListCreateInfo* structure = (VkImageFormatListCreateInfo*)header; - skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::viewFormatCount), pNext_loc.dot(Field::pViewFormats), - vvl::Enum::VkFormat, structure->viewFormatCount, structure->pViewFormats, false, - true, kVUIDUndefined, "VUID-VkImageFormatListCreateInfo-pViewFormats-parameter"); + VkPhysicalDeviceMaintenance6FeaturesKHR* structure = (VkPhysicalDeviceMaintenance6FeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::maintenance6), structure->maintenance6); } } break; - // Validation code for VkPhysicalDevice8BitStorageFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: { // Covers - // VUID-VkPhysicalDevice8BitStorageFeatures-sType-sType + // Validation code for VkPhysicalDeviceTransformFeedbackFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceTransformFeedbackFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTransformFeedbackFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_transform_feedback)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceTransformFeedbackFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_transform_feedback) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceTransformFeedbackFeaturesEXT* structure = (VkPhysicalDeviceTransformFeedbackFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::transformFeedback), structure->transformFeedback); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_8bit_storage)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_8bit_storage))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES), but its parent extension " - "VK_KHR_8bit_storage has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::geometryStreams), structure->geometryStreams); } + } break; + + // Validation code for VkPhysicalDeviceCornerSampledImageFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceCornerSampledImageFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevice8BitStorageFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_8bit_storage)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCornerSampledImageFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_corner_sampled_image)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevice8BitStorageFeatures, but when creating VkDevice, the " - "parent extension " - "(VK_KHR_8bit_storage) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceCornerSampledImageFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_corner_sampled_image) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevice8BitStorageFeatures* structure = (VkPhysicalDevice8BitStorageFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::storageBuffer8BitAccess), structure->storageBuffer8BitAccess); - - skip |= ValidateBool32(pNext_loc.dot(Field::uniformAndStorageBuffer8BitAccess), - structure->uniformAndStorageBuffer8BitAccess); + VkPhysicalDeviceCornerSampledImageFeaturesNV* structure = (VkPhysicalDeviceCornerSampledImageFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::cornerSampledImage), structure->cornerSampledImage); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::storagePushConstant8), structure->storagePushConstant8); + // Validation code for VkPhysicalDeviceASTCDecodeFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceASTCDecodeFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceASTCDecodeFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_astc_decode_mode)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceASTCDecodeFeaturesEXT, but when creating VkDevice, " + "the parent extension " + "(VK_EXT_astc_decode_mode) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceASTCDecodeFeaturesEXT* structure = (VkPhysicalDeviceASTCDecodeFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::decodeModeSharedExponent), structure->decodeModeSharedExponent); } } break; - // Validation code for VkPhysicalDeviceDriverProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: { // Covers VUID-VkPhysicalDeviceDriverProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_driver_properties)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_driver_properties))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES), " - "but its parent extension " - "VK_KHR_driver_properties has not been enabled."); + // Validation code for VkPhysicalDevicePipelineRobustnessFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePipelineRobustnessFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelineRobustnessFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_robustness)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePipelineRobustnessFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_pipeline_robustness) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePipelineRobustnessFeaturesEXT* structure = (VkPhysicalDevicePipelineRobustnessFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineRobustness), structure->pipelineRobustness); } } break; - // Validation code for VkPhysicalDeviceShaderAtomicInt64Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderAtomicInt64Features-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_atomic_int64)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_atomic_int64))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES), but its parent extension " - "VK_KHR_shader_atomic_int64 has not been enabled."); - } + // Validation code for VkPhysicalDeviceConditionalRenderingFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceConditionalRenderingFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicInt64Features); - if (!IsExtEnabled(device_extensions.vk_khr_shader_atomic_int64)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceConditionalRenderingFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_conditional_rendering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderAtomicInt64Features, but when creating " + "includes a pointer to a VkPhysicalDeviceConditionalRenderingFeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_KHR_shader_atomic_int64) was not included in ppEnabledExtensionNames."); + "(VK_EXT_conditional_rendering) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderAtomicInt64Features* structure = (VkPhysicalDeviceShaderAtomicInt64Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferInt64Atomics), structure->shaderBufferInt64Atomics); + VkPhysicalDeviceConditionalRenderingFeaturesEXT* structure = + (VkPhysicalDeviceConditionalRenderingFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::conditionalRendering), structure->conditionalRendering); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedInt64Atomics), structure->shaderSharedInt64Atomics); + skip |= + ValidateBool32(pNext_loc.dot(Field::inheritedConditionalRendering), structure->inheritedConditionalRendering); } } break; - // Validation code for VkPhysicalDeviceShaderFloat16Int8Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderFloat16Int8Features-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_float16_int8)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_float16_int8))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES), but its parent extension " - "VK_KHR_shader_float16_int8 has not been enabled."); - } + // Validation code for VkPhysicalDeviceDepthClipEnableFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDepthClipEnableFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderFloat16Int8Features); - if (!IsExtEnabled(device_extensions.vk_khr_shader_float16_int8)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthClipEnableFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_enable)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderFloat16Int8Features, but when creating " + "includes a pointer to a VkPhysicalDeviceDepthClipEnableFeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_KHR_shader_float16_int8) was not included in ppEnabledExtensionNames."); + "(VK_EXT_depth_clip_enable) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderFloat16Int8Features* structure = (VkPhysicalDeviceShaderFloat16Int8Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat16), structure->shaderFloat16); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt8), structure->shaderInt8); + VkPhysicalDeviceDepthClipEnableFeaturesEXT* structure = (VkPhysicalDeviceDepthClipEnableFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::depthClipEnable), structure->depthClipEnable); } } break; - // Validation code for VkPhysicalDeviceFloatControlsProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceFloatControlsProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_float_controls)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_float_controls))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES), but its parent extension " - "VK_KHR_shader_float_controls has not been enabled."); + // Validation code for VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG: { // Covers + // VUID-VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG); + if (!IsExtEnabled(device_extensions.vk_img_relaxed_line_rasterization)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG, but when " + "creating VkDevice, the parent extension " + "(VK_IMG_relaxed_line_rasterization) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG* structure = + (VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::relaxedLineRasterization), structure->relaxedLineRasterization); } } break; +#ifdef VK_ENABLE_BETA_EXTENSIONS - // Validation code for VkDescriptorSetLayoutBindingFlagsCreateInfo structure members - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: { // Covers - // VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO), but its parent extension " - "VK_EXT_descriptor_indexing has not been enabled."); - } + // Validation code for VkPhysicalDeviceShaderEnqueueFeaturesAMDX structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX: { // Covers + // VUID-VkPhysicalDeviceShaderEnqueueFeaturesAMDX-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDescriptorSetLayoutBindingFlagsCreateInfo); - if (!IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderEnqueueFeaturesAMDX); + if (!IsExtEnabled(device_extensions.vk_amdx_shader_enqueue)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_descriptor_indexing"); + "includes a pointer to a VkPhysicalDeviceShaderEnqueueFeaturesAMDX, but when creating " + "VkDevice, the parent extension " + "(VK_AMDX_shader_enqueue) was not included in ppEnabledExtensionNames."); } - VkDescriptorSetLayoutBindingFlagsCreateInfo* structure = (VkDescriptorSetLayoutBindingFlagsCreateInfo*)header; - skip |= ValidateFlagsArray(pNext_loc.dot(Field::bindingCount), pNext_loc.dot(Field::pBindingFlags), - vvl::FlagBitmask::VkDescriptorBindingFlagBits, AllVkDescriptorBindingFlagBits, - structure->bindingCount, structure->pBindingFlags, false, kVUIDUndefined, - "VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-parameter"); + VkPhysicalDeviceShaderEnqueueFeaturesAMDX* structure = (VkPhysicalDeviceShaderEnqueueFeaturesAMDX*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderEnqueue), structure->shaderEnqueue); } } break; +#endif // VK_ENABLE_BETA_EXTENSIONS - // Validation code for VkPhysicalDeviceDescriptorIndexingFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: { // Covers - // VUID-VkPhysicalDeviceDescriptorIndexingFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES), but its parent extension " - "VK_EXT_descriptor_indexing has not been enabled."); - } + // Validation code for VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDescriptorIndexingFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_blend_operation_advanced)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDescriptorIndexingFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_EXT_descriptor_indexing) was not included in ppEnabledExtensionNames."); + "(VK_EXT_blend_operation_advanced) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceDescriptorIndexingFeatures* structure = (VkPhysicalDeviceDescriptorIndexingFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayDynamicIndexing), - structure->shaderInputAttachmentArrayDynamicIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayDynamicIndexing), - structure->shaderUniformTexelBufferArrayDynamicIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayDynamicIndexing), - structure->shaderStorageTexelBufferArrayDynamicIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformBufferArrayNonUniformIndexing), - structure->shaderUniformBufferArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampledImageArrayNonUniformIndexing), - structure->shaderSampledImageArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageBufferArrayNonUniformIndexing), - structure->shaderStorageBufferArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageArrayNonUniformIndexing), - structure->shaderStorageImageArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderInputAttachmentArrayNonUniformIndexing), - structure->shaderInputAttachmentArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformTexelBufferArrayNonUniformIndexing), - structure->shaderUniformTexelBufferArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageTexelBufferArrayNonUniformIndexing), - structure->shaderStorageTexelBufferArrayNonUniformIndexing); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformBufferUpdateAfterBind), - structure->descriptorBindingUniformBufferUpdateAfterBind); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingSampledImageUpdateAfterBind), - structure->descriptorBindingSampledImageUpdateAfterBind); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageImageUpdateAfterBind), - structure->descriptorBindingStorageImageUpdateAfterBind); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageBufferUpdateAfterBind), - structure->descriptorBindingStorageBufferUpdateAfterBind); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUniformTexelBufferUpdateAfterBind), - structure->descriptorBindingUniformTexelBufferUpdateAfterBind); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingStorageTexelBufferUpdateAfterBind), - structure->descriptorBindingStorageTexelBufferUpdateAfterBind); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingUpdateUnusedWhilePending), - structure->descriptorBindingUpdateUnusedWhilePending); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingPartiallyBound), - structure->descriptorBindingPartiallyBound); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingVariableDescriptorCount), - structure->descriptorBindingVariableDescriptorCount); + VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* structure = + (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::advancedBlendCoherentOperations), + structure->advancedBlendCoherentOperations); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::runtimeDescriptorArray), structure->runtimeDescriptorArray); + // Validation code for VkPhysicalDeviceShaderSMBuiltinsFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceShaderSMBuiltinsFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderSMBuiltinsFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_shader_sm_builtins)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderSMBuiltinsFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_shader_sm_builtins) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderSMBuiltinsFeaturesNV* structure = (VkPhysicalDeviceShaderSMBuiltinsFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSMBuiltins), structure->shaderSMBuiltins); } } break; - // Validation code for VkPhysicalDeviceDescriptorIndexingProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceDescriptorIndexingProperties-sType-sType + // Validation code for VkPhysicalDeviceShadingRateImageFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceShadingRateImageFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShadingRateImageFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_shading_rate_image)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShadingRateImageFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_shading_rate_image) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShadingRateImageFeaturesNV* structure = (VkPhysicalDeviceShadingRateImageFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shadingRateImage), structure->shadingRateImage); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES), but its parent extension " - "VK_EXT_descriptor_indexing has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::shadingRateCoarseSampleOrder), structure->shadingRateCoarseSampleOrder); } } break; - // Validation code for VkDescriptorSetVariableDescriptorCountAllocateInfo structure members - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: { // Covers - // VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO), but its parent extension " - "VK_EXT_descriptor_indexing has not been enabled."); - } + // Validation code for VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDescriptorSetVariableDescriptorCountAllocateInfo); - if (!IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_representative_fragment_test)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_descriptor_indexing"); + "includes a pointer to a VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_representative_fragment_test) was not included in ppEnabledExtensionNames."); } - VkDescriptorSetVariableDescriptorCountAllocateInfo* structure = - (VkDescriptorSetVariableDescriptorCountAllocateInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::descriptorSetCount), pNext_loc.dot(Field::pDescriptorCounts), - structure->descriptorSetCount, &structure->pDescriptorCounts, false, true, kVUIDUndefined, - "VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-pDescriptorCounts-parameter"); + VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV* structure = + (VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::representativeFragmentTest), structure->representativeFragmentTest); } } break; - // Validation code for VkDescriptorSetVariableDescriptorCountLayoutSupport structure members - case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: { // Covers - // VUID-VkDescriptorSetVariableDescriptorCountLayoutSupport-sType-sType + // Validation code for VkPhysicalDeviceComputeShaderDerivativesFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceComputeShaderDerivativesFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceComputeShaderDerivativesFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_compute_shader_derivatives)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceComputeShaderDerivativesFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_compute_shader_derivatives) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceComputeShaderDerivativesFeaturesNV* structure = + (VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::computeDerivativeGroupQuads), structure->computeDerivativeGroupQuads); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT), but its parent extension " - "VK_EXT_descriptor_indexing has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::computeDerivativeGroupLinear), structure->computeDerivativeGroupLinear); } } break; - // Validation code for VkSubpassDescriptionDepthStencilResolve structure members - case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: { // Covers - // VUID-VkSubpassDescriptionDepthStencilResolve-sType-sType + // Validation code for VkPhysicalDeviceMeshShaderFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceMeshShaderFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMeshShaderFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_mesh_shader)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMeshShaderFeaturesNV, but when creating VkDevice, " + "the parent extension " + "(VK_NV_mesh_shader) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMeshShaderFeaturesNV* structure = (VkPhysicalDeviceMeshShaderFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::taskShader), structure->taskShader); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_depth_stencil_resolve)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_depth_stencil_resolve))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE), but its parent extension " - "VK_KHR_depth_stencil_resolve has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::meshShader), structure->meshShader); } + } break; + + // Validation code for VkPhysicalDeviceShaderImageFootprintFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceShaderImageFootprintFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSubpassDescriptionDepthStencilResolve); - if (!IsExtEnabled(device_extensions.vk_khr_depth_stencil_resolve)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderImageFootprintFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_shader_image_footprint)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_depth_stencil_resolve"); + "includes a pointer to a VkPhysicalDeviceShaderImageFootprintFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_shader_image_footprint) was not included in ppEnabledExtensionNames."); } - VkSubpassDescriptionDepthStencilResolve* structure = (VkSubpassDescriptionDepthStencilResolve*)header; - skip |= ValidateStructType(pNext_loc.dot(Field::pDepthStencilResolveAttachment), - "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2", structure->pDepthStencilResolveAttachment, - VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, false, - "VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-parameter", - "VUID-VkAttachmentReference2-sType-sType"); + VkPhysicalDeviceShaderImageFootprintFeaturesNV* structure = (VkPhysicalDeviceShaderImageFootprintFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::imageFootprint), structure->imageFootprint); + } + } break; - if (structure->pDepthStencilResolveAttachment != nullptr) { - [[maybe_unused]] const Location pDepthStencilResolveAttachment_loc = - pNext_loc.dot(Field::pDepthStencilResolveAttachment); - skip |= ValidateRangedEnum(pDepthStencilResolveAttachment_loc.dot(Field::layout), vvl::Enum::VkImageLayout, - structure->pDepthStencilResolveAttachment->layout, - "VUID-VkAttachmentReference2-layout-parameter"); + // Validation code for VkPhysicalDeviceExclusiveScissorFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceExclusiveScissorFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExclusiveScissorFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_scissor_exclusive)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceExclusiveScissorFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_scissor_exclusive) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceExclusiveScissorFeaturesNV* structure = (VkPhysicalDeviceExclusiveScissorFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::exclusiveScissor), structure->exclusiveScissor); } } break; - // Validation code for VkPhysicalDeviceDepthStencilResolveProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceDepthStencilResolveProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_depth_stencil_resolve)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_depth_stencil_resolve))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES), but its parent extension " - "VK_KHR_depth_stencil_resolve has not been enabled."); + // Validation code for VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL: { // Covers + // VUID-VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL); + if (!IsExtEnabled(device_extensions.vk_intel_shader_integer_functions2)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, but when " + "creating VkDevice, the parent extension " + "(VK_INTEL_shader_integer_functions2) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL* structure = + (VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderIntegerFunctions2), structure->shaderIntegerFunctions2); } } break; - // Validation code for VkPhysicalDeviceScalarBlockLayoutFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: { // Covers - // VUID-VkPhysicalDeviceScalarBlockLayoutFeatures-sType-sType + // Validation code for VkPhysicalDeviceFragmentDensityMapFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceFragmentDensityMapFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentDensityMapFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_fragment_density_map)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceFragmentDensityMapFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_fragment_density_map) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceFragmentDensityMapFeaturesEXT* structure = (VkPhysicalDeviceFragmentDensityMapFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMap), structure->fragmentDensityMap); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_scalar_block_layout)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_scalar_block_layout))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES), but its parent extension " - "VK_EXT_scalar_block_layout has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapDynamic), structure->fragmentDensityMapDynamic); + + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapNonSubsampledImages), + structure->fragmentDensityMapNonSubsampledImages); } + } break; + + // Validation code for VkPhysicalDeviceCoherentMemoryFeaturesAMD structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD: { // Covers + // VUID-VkPhysicalDeviceCoherentMemoryFeaturesAMD-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceScalarBlockLayoutFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_scalar_block_layout)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCoherentMemoryFeaturesAMD); + if (!IsExtEnabled(device_extensions.vk_amd_device_coherent_memory)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceScalarBlockLayoutFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceCoherentMemoryFeaturesAMD, but when creating " "VkDevice, the parent extension " - "(VK_EXT_scalar_block_layout) was not included in ppEnabledExtensionNames."); + "(VK_AMD_device_coherent_memory) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceScalarBlockLayoutFeatures* structure = (VkPhysicalDeviceScalarBlockLayoutFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::scalarBlockLayout), structure->scalarBlockLayout); + VkPhysicalDeviceCoherentMemoryFeaturesAMD* structure = (VkPhysicalDeviceCoherentMemoryFeaturesAMD*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::deviceCoherentMemory), structure->deviceCoherentMemory); } } break; - // Validation code for VkImageStencilUsageCreateInfo structure members - case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: { // Covers VUID-VkImageStencilUsageCreateInfo-sType-sType + // Validation code for VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_image_atomic_int64)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_shader_image_atomic_int64) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT* structure = + (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderImageInt64Atomics), structure->shaderImageInt64Atomics); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_separate_stencil_usage)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_separate_stencil_usage))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO), but " - "its parent extension " - "VK_EXT_separate_stencil_usage has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::sparseImageInt64Atomics), structure->sparseImageInt64Atomics); } + } break; + + // Validation code for VkPhysicalDeviceMemoryPriorityFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceMemoryPriorityFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageStencilUsageCreateInfo); - if (!IsExtEnabled(device_extensions.vk_ext_separate_stencil_usage)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMemoryPriorityFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_memory_priority)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_separate_stencil_usage"); + "includes a pointer to a VkPhysicalDeviceMemoryPriorityFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_memory_priority) was not included in ppEnabledExtensionNames."); } - VkImageStencilUsageCreateInfo* structure = (VkImageStencilUsageCreateInfo*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::stencilUsage), vvl::FlagBitmask::VkImageUsageFlagBits, - AllVkImageUsageFlagBits, structure->stencilUsage, kRequiredFlags, - "VUID-VkImageStencilUsageCreateInfo-stencilUsage-parameter", - "VUID-VkImageStencilUsageCreateInfo-stencilUsage-requiredbitmask"); + VkPhysicalDeviceMemoryPriorityFeaturesEXT* structure = (VkPhysicalDeviceMemoryPriorityFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::memoryPriority), structure->memoryPriority); + } + } break; + + // Validation code for VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_dedicated_allocation_image_aliasing)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_dedicated_allocation_image_aliasing) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV* structure = + (VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dedicatedAllocationImageAliasing), + structure->dedicatedAllocationImageAliasing); } } break; - // Validation code for VkSamplerReductionModeCreateInfo structure members - case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: { // Covers VUID-VkSamplerReductionModeCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_sampler_filter_minmax)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_sampler_filter_minmax))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO), " - "but its parent extension " - "VK_EXT_sampler_filter_minmax has not been enabled."); - } + // Validation code for VkPhysicalDeviceBufferDeviceAddressFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceBufferDeviceAddressFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerReductionModeCreateInfo); - if (!IsExtEnabled(device_extensions.vk_ext_sampler_filter_minmax)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBufferDeviceAddressFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_buffer_device_address)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_sampler_filter_minmax"); + "includes a pointer to a VkPhysicalDeviceBufferDeviceAddressFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_buffer_device_address) was not included in ppEnabledExtensionNames."); } - VkSamplerReductionModeCreateInfo* structure = (VkSamplerReductionModeCreateInfo*)header; - skip |= - ValidateRangedEnum(pNext_loc.dot(Field::reductionMode), vvl::Enum::VkSamplerReductionMode, - structure->reductionMode, "VUID-VkSamplerReductionModeCreateInfo-reductionMode-parameter"); - } - } break; + VkPhysicalDeviceBufferDeviceAddressFeaturesEXT* structure = (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddress), structure->bufferDeviceAddress); - // Validation code for VkPhysicalDeviceSamplerFilterMinmaxProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceSamplerFilterMinmaxProperties-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressCaptureReplay), + structure->bufferDeviceAddressCaptureReplay); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_sampler_filter_minmax)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_sampler_filter_minmax))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES), but its parent extension " - "VK_EXT_sampler_filter_minmax has not been enabled."); + skip |= + ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressMultiDevice), structure->bufferDeviceAddressMultiDevice); } } break; - // Validation code for VkPhysicalDeviceVulkanMemoryModelFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: { // Covers - // VUID-VkPhysicalDeviceVulkanMemoryModelFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_vulkan_memory_model)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_vulkan_memory_model))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES), but its parent extension " - "VK_KHR_vulkan_memory_model has not been enabled."); - } + // Validation code for VkPhysicalDeviceCooperativeMatrixFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceCooperativeMatrixFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkanMemoryModelFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_vulkan_memory_model)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCooperativeMatrixFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_cooperative_matrix)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceVulkanMemoryModelFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceCooperativeMatrixFeaturesNV, but when creating " "VkDevice, the parent extension " - "(VK_KHR_vulkan_memory_model) was not included in ppEnabledExtensionNames."); + "(VK_NV_cooperative_matrix) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceVulkanMemoryModelFeatures* structure = (VkPhysicalDeviceVulkanMemoryModelFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModel), structure->vulkanMemoryModel); - - skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelDeviceScope), structure->vulkanMemoryModelDeviceScope); + VkPhysicalDeviceCooperativeMatrixFeaturesNV* structure = (VkPhysicalDeviceCooperativeMatrixFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrix), structure->cooperativeMatrix); - skip |= ValidateBool32(pNext_loc.dot(Field::vulkanMemoryModelAvailabilityVisibilityChains), - structure->vulkanMemoryModelAvailabilityVisibilityChains); + skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrixRobustBufferAccess), + structure->cooperativeMatrixRobustBufferAccess); } } break; - // Validation code for VkPhysicalDeviceImagelessFramebufferFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: { // Covers - // VUID-VkPhysicalDeviceImagelessFramebufferFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_imageless_framebuffer)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES), but its parent extension " - "VK_KHR_imageless_framebuffer has not been enabled."); - } + // Validation code for VkPhysicalDeviceCoverageReductionModeFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceCoverageReductionModeFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImagelessFramebufferFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCoverageReductionModeFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_coverage_reduction_mode)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImagelessFramebufferFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceCoverageReductionModeFeaturesNV, but when creating " "VkDevice, the parent extension " - "(VK_KHR_imageless_framebuffer) was not included in ppEnabledExtensionNames."); + "(VK_NV_coverage_reduction_mode) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceImagelessFramebufferFeatures* structure = (VkPhysicalDeviceImagelessFramebufferFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::imagelessFramebuffer), structure->imagelessFramebuffer); + VkPhysicalDeviceCoverageReductionModeFeaturesNV* structure = + (VkPhysicalDeviceCoverageReductionModeFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::coverageReductionMode), structure->coverageReductionMode); } } break; - // Validation code for VkFramebufferAttachmentsCreateInfo structure members - case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: { // Covers VUID-VkFramebufferAttachmentsCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_imageless_framebuffer)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO), " - "but its parent extension " - "VK_KHR_imageless_framebuffer has not been enabled."); - } + // Validation code for VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkFramebufferAttachmentsCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_fragment_shader_interlock)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_imageless_framebuffer"); + "includes a pointer to a VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_fragment_shader_interlock) was not included in ppEnabledExtensionNames."); } - VkFramebufferAttachmentsCreateInfo* structure = (VkFramebufferAttachmentsCreateInfo*)header; - skip |= ValidateStructTypeArray( - pNext_loc.dot(Field::attachmentImageInfoCount), pNext_loc.dot(Field::pAttachmentImageInfos), - "VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO", structure->attachmentImageInfoCount, - structure->pAttachmentImageInfos, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO, false, true, - "VUID-VkFramebufferAttachmentImageInfo-sType-sType", - "VUID-VkFramebufferAttachmentsCreateInfo-pAttachmentImageInfos-parameter", kVUIDUndefined); - - if (structure->pAttachmentImageInfos != nullptr) { - for (uint32_t attachmentImageInfoIndex = 0; attachmentImageInfoIndex < structure->attachmentImageInfoCount; - ++attachmentImageInfoIndex) { - [[maybe_unused]] const Location pAttachmentImageInfos_loc = - pNext_loc.dot(Field::pAttachmentImageInfos, attachmentImageInfoIndex); - skip |= ValidateFlags(pAttachmentImageInfos_loc.dot(Field::flags), vvl::FlagBitmask::VkImageCreateFlagBits, - AllVkImageCreateFlagBits, - structure->pAttachmentImageInfos[attachmentImageInfoIndex].flags, kOptionalFlags, - "VUID-VkFramebufferAttachmentImageInfo-flags-parameter"); + VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT* structure = + (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT*)header; + skip |= + ValidateBool32(pNext_loc.dot(Field::fragmentShaderSampleInterlock), structure->fragmentShaderSampleInterlock); - skip |= - ValidateFlags(pAttachmentImageInfos_loc.dot(Field::usage), vvl::FlagBitmask::VkImageUsageFlagBits, - AllVkImageUsageFlagBits, structure->pAttachmentImageInfos[attachmentImageInfoIndex].usage, - kRequiredFlags, "VUID-VkFramebufferAttachmentImageInfo-usage-parameter", - "VUID-VkFramebufferAttachmentImageInfo-usage-requiredbitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShaderPixelInterlock), structure->fragmentShaderPixelInterlock); - skip |= ValidateRangedEnumArray(pAttachmentImageInfos_loc.dot(Field::viewFormatCount), - pAttachmentImageInfos_loc.dot(Field::pViewFormats), vvl::Enum::VkFormat, - structure->pAttachmentImageInfos[attachmentImageInfoIndex].viewFormatCount, - structure->pAttachmentImageInfos[attachmentImageInfoIndex].pViewFormats, - false, true, kVUIDUndefined, - "VUID-VkFramebufferAttachmentImageInfo-pViewFormats-parameter"); - } - } + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShaderShadingRateInterlock), + structure->fragmentShaderShadingRateInterlock); } } break; - // Validation code for VkRenderPassAttachmentBeginInfo structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: { // Covers VUID-VkRenderPassAttachmentBeginInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_imageless_framebuffer)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO), " - "but its parent extension " - "VK_KHR_imageless_framebuffer has not been enabled."); - } + // Validation code for VkPhysicalDeviceYcbcrImageArraysFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceYcbcrImageArraysFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassAttachmentBeginInfo); - if (!IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceYcbcrImageArraysFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_ycbcr_image_arrays)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_imageless_framebuffer"); + "includes a pointer to a VkPhysicalDeviceYcbcrImageArraysFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_ycbcr_image_arrays) was not included in ppEnabledExtensionNames."); } - VkRenderPassAttachmentBeginInfo* structure = (VkRenderPassAttachmentBeginInfo*)header; - skip |= ValidateArray(pNext_loc.dot(Field::attachmentCount), pNext_loc.dot(Field::pAttachments), - structure->attachmentCount, &structure->pAttachments, false, true, kVUIDUndefined, - "VUID-VkRenderPassAttachmentBeginInfo-pAttachments-parameter"); + VkPhysicalDeviceYcbcrImageArraysFeaturesEXT* structure = (VkPhysicalDeviceYcbcrImageArraysFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::ycbcrImageArrays), structure->ycbcrImageArrays); } } break; - // Validation code for VkPhysicalDeviceUniformBufferStandardLayoutFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: { // Covers - // VUID-VkPhysicalDeviceUniformBufferStandardLayoutFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_uniform_buffer_standard_layout)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_uniform_buffer_standard_layout))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES), but its parent extension " - "VK_KHR_uniform_buffer_standard_layout has not been enabled."); - } + // Validation code for VkPhysicalDeviceProvokingVertexFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceProvokingVertexFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceUniformBufferStandardLayoutFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_uniform_buffer_standard_layout)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceProvokingVertexFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_provoking_vertex)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceUniformBufferStandardLayoutFeatures, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_uniform_buffer_standard_layout) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceProvokingVertexFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_provoking_vertex) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceUniformBufferStandardLayoutFeatures* structure = - (VkPhysicalDeviceUniformBufferStandardLayoutFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::uniformBufferStandardLayout), structure->uniformBufferStandardLayout); + VkPhysicalDeviceProvokingVertexFeaturesEXT* structure = (VkPhysicalDeviceProvokingVertexFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::provokingVertexLast), structure->provokingVertexLast); + + skip |= ValidateBool32(pNext_loc.dot(Field::transformFeedbackPreservesProvokingVertex), + structure->transformFeedbackPreservesProvokingVertex); } } break; - // Validation code for VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures-sType-sType + // Validation code for VkPhysicalDeviceShaderAtomicFloatFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceShaderAtomicFloatFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicFloatFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_atomic_float)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_shader_atomic_float) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderAtomicFloatFeaturesEXT* structure = (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat32Atomics), structure->shaderBufferFloat32Atomics); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_subgroup_extended_types)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_subgroup_extended_types))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES), but its parent extension " - "VK_KHR_shader_subgroup_extended_types has not been enabled."); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat32AtomicAdd), structure->shaderBufferFloat32AtomicAdd); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat64Atomics), structure->shaderBufferFloat64Atomics); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat64AtomicAdd), structure->shaderBufferFloat64AtomicAdd); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat32Atomics), structure->shaderSharedFloat32Atomics); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat32AtomicAdd), structure->shaderSharedFloat32AtomicAdd); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat64Atomics), structure->shaderSharedFloat64Atomics); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat64AtomicAdd), structure->shaderSharedFloat64AtomicAdd); - // Validation code for VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: { // Covers - // VUID-VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderImageFloat32Atomics), structure->shaderImageFloat32Atomics); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_separate_depth_stencil_layouts)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES), but its parent extension " - "VK_KHR_separate_depth_stencil_layouts has not been enabled."); - } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_separate_depth_stencil_layouts) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* structure = - (VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::separateDepthStencilLayouts), structure->separateDepthStencilLayouts); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderImageFloat32AtomicAdd), structure->shaderImageFloat32AtomicAdd); - // Validation code for VkAttachmentReferenceStencilLayout structure members - case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: { // Covers VUID-VkAttachmentReferenceStencilLayout-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::sparseImageFloat32Atomics), structure->sparseImageFloat32Atomics); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_separate_depth_stencil_layouts)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT), " - "but its parent extension " - "VK_KHR_separate_depth_stencil_layouts has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::sparseImageFloat32AtomicAdd), structure->sparseImageFloat32AtomicAdd); } + } break; + + // Validation code for VkPhysicalDeviceExtendedDynamicStateFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceExtendedDynamicStateFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAttachmentReferenceStencilLayout); - if (!IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicStateFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_separate_depth_stencil_layouts"); + "includes a pointer to a VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_extended_dynamic_state) was not included in ppEnabledExtensionNames."); } - VkAttachmentReferenceStencilLayout* structure = (VkAttachmentReferenceStencilLayout*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilLayout), vvl::Enum::VkImageLayout, structure->stencilLayout, - "VUID-VkAttachmentReferenceStencilLayout-stencilLayout-parameter"); + VkPhysicalDeviceExtendedDynamicStateFeaturesEXT* structure = + (VkPhysicalDeviceExtendedDynamicStateFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState), structure->extendedDynamicState); } } break; - // Validation code for VkAttachmentDescriptionStencilLayout structure members - case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: { // Covers - // VUID-VkAttachmentDescriptionStencilLayout-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_separate_depth_stencil_layouts)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT), but its parent extension " - "VK_KHR_separate_depth_stencil_layouts has not been enabled."); - } + // Validation code for VkPhysicalDeviceHostImageCopyFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceHostImageCopyFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAttachmentDescriptionStencilLayout); - if (!IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceHostImageCopyFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_host_image_copy)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_separate_depth_stencil_layouts"); + "includes a pointer to a VkPhysicalDeviceHostImageCopyFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_host_image_copy) was not included in ppEnabledExtensionNames."); } - VkAttachmentDescriptionStencilLayout* structure = (VkAttachmentDescriptionStencilLayout*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilInitialLayout), vvl::Enum::VkImageLayout, - structure->stencilInitialLayout, - "VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-parameter"); - - skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilFinalLayout), vvl::Enum::VkImageLayout, - structure->stencilFinalLayout, - "VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-parameter"); + VkPhysicalDeviceHostImageCopyFeaturesEXT* structure = (VkPhysicalDeviceHostImageCopyFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::hostImageCopy), structure->hostImageCopy); } } break; - // Validation code for VkPhysicalDeviceHostQueryResetFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: { // Covers - // VUID-VkPhysicalDeviceHostQueryResetFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_host_query_reset)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_host_query_reset))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES), but its parent extension " - "VK_EXT_host_query_reset has not been enabled."); - } + // Validation code for VkPhysicalDeviceMapMemoryPlacedFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceMapMemoryPlacedFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceHostQueryResetFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_host_query_reset)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMapMemoryPlacedFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_map_memory_placed)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceHostQueryResetFeatures, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_host_query_reset) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceMapMemoryPlacedFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_map_memory_placed) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceHostQueryResetFeatures* structure = (VkPhysicalDeviceHostQueryResetFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::hostQueryReset), structure->hostQueryReset); - } - } break; + VkPhysicalDeviceMapMemoryPlacedFeaturesEXT* structure = (VkPhysicalDeviceMapMemoryPlacedFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::memoryMapPlaced), structure->memoryMapPlaced); - // Validation code for VkPhysicalDeviceTimelineSemaphoreFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: { // Covers - // VUID-VkPhysicalDeviceTimelineSemaphoreFeatures-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::memoryMapRangePlaced), structure->memoryMapRangePlaced); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES), but its parent extension " - "VK_KHR_timeline_semaphore has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::memoryUnmapReserve), structure->memoryUnmapReserve); } + } break; + + // Validation code for VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTimelineSemaphoreFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_timeline_semaphore)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_atomic_float2)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceTimelineSemaphoreFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_KHR_timeline_semaphore) was not included in ppEnabledExtensionNames."); + "(VK_EXT_shader_atomic_float2) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceTimelineSemaphoreFeatures* structure = (VkPhysicalDeviceTimelineSemaphoreFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::timelineSemaphore), structure->timelineSemaphore); - } - } break; + VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT* structure = (VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat16Atomics), structure->shaderBufferFloat16Atomics); - // Validation code for VkPhysicalDeviceTimelineSemaphoreProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceTimelineSemaphoreProperties-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat16AtomicAdd), structure->shaderBufferFloat16AtomicAdd); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES), but its parent extension " - "VK_KHR_timeline_semaphore has not been enabled."); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat16AtomicMinMax), + structure->shaderBufferFloat16AtomicMinMax); - // Validation code for VkSemaphoreTypeCreateInfo structure members - case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: { // Covers VUID-VkSemaphoreTypeCreateInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat32AtomicMinMax), + structure->shaderBufferFloat32AtomicMinMax); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO), but its " - "parent extension " - "VK_KHR_timeline_semaphore has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat64AtomicMinMax), + structure->shaderBufferFloat64AtomicMinMax); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat16Atomics), structure->shaderSharedFloat16Atomics); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat16AtomicAdd), structure->shaderSharedFloat16AtomicAdd); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat16AtomicMinMax), + structure->shaderSharedFloat16AtomicMinMax); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat32AtomicMinMax), + structure->shaderSharedFloat32AtomicMinMax); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat64AtomicMinMax), + structure->shaderSharedFloat64AtomicMinMax); + + skip |= + ValidateBool32(pNext_loc.dot(Field::shaderImageFloat32AtomicMinMax), structure->shaderImageFloat32AtomicMinMax); + + skip |= + ValidateBool32(pNext_loc.dot(Field::sparseImageFloat32AtomicMinMax), structure->sparseImageFloat32AtomicMinMax); } + } break; + + // Validation code for VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSemaphoreTypeCreateInfo); - if (!IsExtEnabled(device_extensions.vk_khr_timeline_semaphore)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_timeline_semaphore"); + "includes a pointer to a VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_swapchain_maintenance1) was not included in ppEnabledExtensionNames."); } - VkSemaphoreTypeCreateInfo* structure = (VkSemaphoreTypeCreateInfo*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::semaphoreType), vvl::Enum::VkSemaphoreType, - structure->semaphoreType, "VUID-VkSemaphoreTypeCreateInfo-semaphoreType-parameter"); + VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT* structure = + (VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::swapchainMaintenance1), structure->swapchainMaintenance1); } } break; - // Validation code for VkTimelineSemaphoreSubmitInfo structure members - case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: { // Covers VUID-VkTimelineSemaphoreSubmitInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO), but " - "its parent extension " - "VK_KHR_timeline_semaphore has not been enabled."); + // Validation code for VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_device_generated_commands)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_device_generated_commands) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV* structure = + (VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedCommands), structure->deviceGeneratedCommands); } } break; - // Validation code for VkPhysicalDeviceBufferDeviceAddressFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: { // Covers - // VUID-VkPhysicalDeviceBufferDeviceAddressFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_buffer_device_address)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_buffer_device_address))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES), but its parent extension " - "VK_KHR_buffer_device_address has not been enabled."); + // Validation code for VkPhysicalDeviceInheritedViewportScissorFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceInheritedViewportScissorFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceInheritedViewportScissorFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_inherited_viewport_scissor)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceInheritedViewportScissorFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_inherited_viewport_scissor) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceInheritedViewportScissorFeaturesNV* structure = + (VkPhysicalDeviceInheritedViewportScissorFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::inheritedViewportScissor2D), structure->inheritedViewportScissor2D); } + } break; + + // Validation code for VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBufferDeviceAddressFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_buffer_device_address)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_texel_buffer_alignment)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceBufferDeviceAddressFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_KHR_buffer_device_address) was not included in ppEnabledExtensionNames."); + "(VK_EXT_texel_buffer_alignment) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceBufferDeviceAddressFeatures* structure = (VkPhysicalDeviceBufferDeviceAddressFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddress), structure->bufferDeviceAddress); - - skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressCaptureReplay), - structure->bufferDeviceAddressCaptureReplay); - - skip |= - ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressMultiDevice), structure->bufferDeviceAddressMultiDevice); + VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT* structure = + (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::texelBufferAlignment), structure->texelBufferAlignment); } } break; - // Validation code for VkBufferOpaqueCaptureAddressCreateInfo structure members - case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: { // Covers - // VUID-VkBufferOpaqueCaptureAddressCreateInfo-sType-sType + // Validation code for VkPhysicalDeviceDepthBiasControlFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDepthBiasControlFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthBiasControlFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_bias_control)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDepthBiasControlFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_depth_bias_control) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDepthBiasControlFeaturesEXT* structure = (VkPhysicalDeviceDepthBiasControlFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasControl), structure->depthBiasControl); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_buffer_device_address)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_buffer_device_address))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO), but its parent extension " - "VK_KHR_buffer_device_address has not been enabled."); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::leastRepresentableValueForceUnormRepresentation), + structure->leastRepresentableValueForceUnormRepresentation); - // Validation code for VkMemoryOpaqueCaptureAddressAllocateInfo structure members - case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: { // Covers - // VUID-VkMemoryOpaqueCaptureAddressAllocateInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::floatRepresentation), structure->floatRepresentation); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_buffer_device_address)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_buffer_device_address))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO), but its parent extension " - "VK_KHR_buffer_device_address has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasExact), structure->depthBiasExact); } } break; - // Validation code for VkPhysicalDeviceVulkan13Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: { // Covers VUID-VkPhysicalDeviceVulkan13Features-sType-sType - - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_3) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES) " - "which was added in VK_API_VERSION_1_3 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); + // Validation code for VkPhysicalDeviceDeviceMemoryReportFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDeviceMemoryReportFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDeviceMemoryReportFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_device_memory_report)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_device_memory_report) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceDeviceMemoryReportFeaturesEXT* structure = (VkPhysicalDeviceDeviceMemoryReportFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::deviceMemoryReport), structure->deviceMemoryReport); } - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVulkan13Features); - VkPhysicalDeviceVulkan13Features* structure = (VkPhysicalDeviceVulkan13Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::robustImageAccess), structure->robustImageAccess); + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::inlineUniformBlock), structure->inlineUniformBlock); + // Validation code for VkPhysicalDeviceRobustness2FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceRobustness2FeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRobustness2FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_robustness2)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRobustness2FeaturesEXT, but when creating VkDevice, " + "the parent extension " + "(VK_EXT_robustness2) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceRobustness2FeaturesEXT* structure = (VkPhysicalDeviceRobustness2FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::robustBufferAccess2), structure->robustBufferAccess2); - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingInlineUniformBlockUpdateAfterBind), - structure->descriptorBindingInlineUniformBlockUpdateAfterBind); + skip |= ValidateBool32(pNext_loc.dot(Field::robustImageAccess2), structure->robustImageAccess2); - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineCreationCacheControl), structure->pipelineCreationCacheControl); + skip |= ValidateBool32(pNext_loc.dot(Field::nullDescriptor), structure->nullDescriptor); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::privateData), structure->privateData); + // Validation code for VkPhysicalDeviceCustomBorderColorFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceCustomBorderColorFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCustomBorderColorFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_custom_border_color)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceCustomBorderColorFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_custom_border_color) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceCustomBorderColorFeaturesEXT* structure = (VkPhysicalDeviceCustomBorderColorFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::customBorderColors), structure->customBorderColors); skip |= - ValidateBool32(pNext_loc.dot(Field::shaderDemoteToHelperInvocation), structure->shaderDemoteToHelperInvocation); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderTerminateInvocation), structure->shaderTerminateInvocation); - - skip |= ValidateBool32(pNext_loc.dot(Field::subgroupSizeControl), structure->subgroupSizeControl); - - skip |= ValidateBool32(pNext_loc.dot(Field::computeFullSubgroups), structure->computeFullSubgroups); - - skip |= ValidateBool32(pNext_loc.dot(Field::synchronization2), structure->synchronization2); - - skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionASTC_HDR), structure->textureCompressionASTC_HDR); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderZeroInitializeWorkgroupMemory), - structure->shaderZeroInitializeWorkgroupMemory); - - skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRendering), structure->dynamicRendering); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderIntegerDotProduct), structure->shaderIntegerDotProduct); - - skip |= ValidateBool32(pNext_loc.dot(Field::maintenance4), structure->maintenance4); + ValidateBool32(pNext_loc.dot(Field::customBorderColorWithoutFormat), structure->customBorderColorWithoutFormat); } } break; - // Validation code for VkPhysicalDeviceVulkan13Properties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceVulkan13Properties-sType-sType - - if (is_physdev_api) { - VkPhysicalDeviceProperties device_properties = {}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < VK_API_VERSION_1_3) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES) which " - "was added in VK_API_VERSION_1_3 but the " - "current effective API version is %s.", - StringAPIVersion(api_version).c_str()); + // Validation code for VkPhysicalDevicePresentBarrierFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV: { // Covers + // VUID-VkPhysicalDevicePresentBarrierFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePresentBarrierFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_present_barrier)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePresentBarrierFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_present_barrier) was not included in ppEnabledExtensionNames."); } + VkPhysicalDevicePresentBarrierFeaturesNV* structure = (VkPhysicalDevicePresentBarrierFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::presentBarrier), structure->presentBarrier); } } break; - // Validation code for VkPipelineCreationFeedbackCreateInfo structure members - case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: { // Covers - // VUID-VkPipelineCreationFeedbackCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_pipeline_creation_feedback)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_pipeline_creation_feedback))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO), but its parent extension " - "VK_EXT_pipeline_creation_feedback has not been enabled."); - } + // Validation code for VkPhysicalDeviceDiagnosticsConfigFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceDiagnosticsConfigFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCreationFeedbackCreateInfo); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_creation_feedback)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDiagnosticsConfigFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_device_diagnostics_config)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_pipeline_creation_feedback"); - } - VkPipelineCreationFeedbackCreateInfo* structure = (VkPipelineCreationFeedbackCreateInfo*)header; - skip |= - ValidateRequiredPointer(pNext_loc.dot(Field::pPipelineCreationFeedback), structure->pPipelineCreationFeedback, - "VUID-VkPipelineCreationFeedbackCreateInfo-pPipelineCreationFeedback-parameter"); - - if (structure->pPipelineCreationFeedback != nullptr) { - [[maybe_unused]] const Location pPipelineCreationFeedback_loc = pNext_loc.dot(Field::pPipelineCreationFeedback); + "includes a pointer to a VkPhysicalDeviceDiagnosticsConfigFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_device_diagnostics_config) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceDiagnosticsConfigFeaturesNV* structure = (VkPhysicalDeviceDiagnosticsConfigFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::diagnosticsConfig), structure->diagnosticsConfig); + } + } break; - skip |= ValidateArray( - pNext_loc.dot(Field::pipelineStageCreationFeedbackCount), pNext_loc.dot(Field::pPipelineStageCreationFeedbacks), - structure->pipelineStageCreationFeedbackCount, &structure->pPipelineStageCreationFeedbacks, false, true, - kVUIDUndefined, "VUID-VkPipelineCreationFeedbackCreateInfo-pPipelineStageCreationFeedbacks-parameter"); - - if (structure->pPipelineStageCreationFeedbacks != nullptr) { - for (uint32_t pipelineStageCreationFeedbackIndex = 0; - pipelineStageCreationFeedbackIndex < structure->pipelineStageCreationFeedbackCount; - ++pipelineStageCreationFeedbackIndex) { - [[maybe_unused]] const Location pPipelineStageCreationFeedbacks_loc = - pNext_loc.dot(Field::pPipelineStageCreationFeedbacks, pipelineStageCreationFeedbackIndex); - } + // Validation code for VkPhysicalDeviceCudaKernelLaunchFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceCudaKernelLaunchFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCudaKernelLaunchFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_cuda_kernel_launch)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceCudaKernelLaunchFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_cuda_kernel_launch) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceCudaKernelLaunchFeaturesNV* structure = (VkPhysicalDeviceCudaKernelLaunchFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::cudaKernelLaunchFeatures), structure->cudaKernelLaunchFeatures); } } break; - // Validation code for VkPhysicalDeviceShaderTerminateInvocationFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderTerminateInvocationFeatures-sType-sType + // Validation code for VkPhysicalDeviceDescriptorBufferFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDescriptorBufferFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDescriptorBufferFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDescriptorBufferFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_descriptor_buffer) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDescriptorBufferFeaturesEXT* structure = (VkPhysicalDeviceDescriptorBufferFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBuffer), structure->descriptorBuffer); + + skip |= + ValidateBool32(pNext_loc.dot(Field::descriptorBufferCaptureReplay), structure->descriptorBufferCaptureReplay); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBufferImageLayoutIgnored), + structure->descriptorBufferImageLayoutIgnored); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_terminate_invocation)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_terminate_invocation))) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES), but its parent extension " - "VK_KHR_shader_terminate_invocation has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBufferPushDescriptors), + structure->descriptorBufferPushDescriptors); } + } break; + + // Validation code for VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderTerminateInvocationFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_shader_terminate_invocation)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_graphics_pipeline_library)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderTerminateInvocationFeatures, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_shader_terminate_invocation) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_graphics_pipeline_library) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderTerminateInvocationFeatures* structure = - (VkPhysicalDeviceShaderTerminateInvocationFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderTerminateInvocation), structure->shaderTerminateInvocation); + VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT* structure = + (VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::graphicsPipelineLibrary), structure->graphicsPipelineLibrary); } } break; - // Validation code for VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_shader_demote_to_helper_invocation)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_shader_demote_to_helper_invocation))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES), but its parent extension " - "VK_EXT_shader_demote_to_helper_invocation has not been enabled."); - } + // Validation code for VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD: { // Covers + // VUID-VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD-sType-sType if (is_const_param) { [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_shader_demote_to_helper_invocation)) { + loc.pNext(Struct::VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD); + if (!IsExtEnabled(device_extensions.vk_amd_shader_early_and_late_fragment_tests)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures, but when " + "includes a pointer to a VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD, but when " "creating VkDevice, the parent extension " - "(VK_EXT_shader_demote_to_helper_invocation) was not included in ppEnabledExtensionNames."); + "(VK_AMD_shader_early_and_late_fragment_tests) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures* structure = - (VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures*)header; - skip |= - ValidateBool32(pNext_loc.dot(Field::shaderDemoteToHelperInvocation), structure->shaderDemoteToHelperInvocation); + VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD* structure = + (VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderEarlyAndLateFragmentTests), + structure->shaderEarlyAndLateFragmentTests); } } break; - // Validation code for VkPhysicalDevicePrivateDataFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: { // Covers - // VUID-VkPhysicalDevicePrivateDataFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_private_data)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_private_data))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES), but its parent extension " - "VK_EXT_private_data has not been enabled."); - } + // Validation code for VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePrivateDataFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_private_data)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_fragment_shading_rate_enums)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePrivateDataFeatures, but when creating VkDevice, the " - "parent extension " - "(VK_EXT_private_data) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_fragment_shading_rate_enums) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePrivateDataFeatures* structure = (VkPhysicalDevicePrivateDataFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::privateData), structure->privateData); - } - } break; + VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV* structure = + (VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShadingRateEnums), structure->fragmentShadingRateEnums); - // Validation code for VkDevicePrivateDataCreateInfo structure members - case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: { // Covers VUID-VkDevicePrivateDataCreateInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::supersampleFragmentShadingRates), + structure->supersampleFragmentShadingRates); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_private_data)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_private_data))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO), but " - "its parent extension " - "VK_EXT_private_data has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::noInvocationFragmentShadingRates), + structure->noInvocationFragmentShadingRates); } } break; - // Validation code for VkPhysicalDevicePipelineCreationCacheControlFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: { // Covers - // VUID-VkPhysicalDevicePipelineCreationCacheControlFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_pipeline_creation_cache_control)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_pipeline_creation_cache_control))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES), but its parent extension " - "VK_EXT_pipeline_creation_cache_control has not been enabled."); - } + // Validation code for VkPhysicalDeviceRayTracingMotionBlurFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceRayTracingMotionBlurFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelineCreationCacheControlFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_creation_cache_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingMotionBlurFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_motion_blur)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePipelineCreationCacheControlFeatures, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_pipeline_creation_cache_control) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceRayTracingMotionBlurFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_ray_tracing_motion_blur) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePipelineCreationCacheControlFeatures* structure = - (VkPhysicalDevicePipelineCreationCacheControlFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineCreationCacheControl), structure->pipelineCreationCacheControl); + VkPhysicalDeviceRayTracingMotionBlurFeaturesNV* structure = (VkPhysicalDeviceRayTracingMotionBlurFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingMotionBlur), structure->rayTracingMotionBlur); + + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingMotionBlurPipelineTraceRaysIndirect), + structure->rayTracingMotionBlurPipelineTraceRaysIndirect); } } break; - // Validation code for VkMemoryBarrier2 structure members - case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: { // Covers VUID-VkMemoryBarrier2-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_synchronization2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_synchronization2))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_BARRIER_2), but its parent extension " - "VK_KHR_synchronization2 has not been enabled."); - } + // Validation code for VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMemoryBarrier2); - if (!IsExtEnabled(device_extensions.vk_khr_synchronization2)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_ycbcr_2plane_444_formats)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_synchronization2"); + "includes a pointer to a VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_ycbcr_2plane_444_formats) was not included in ppEnabledExtensionNames."); } - VkMemoryBarrier2* structure = (VkMemoryBarrier2*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::srcStageMask), vvl::FlagBitmask::VkPipelineStageFlagBits2, - AllVkPipelineStageFlagBits2, structure->srcStageMask, kOptionalFlags, - "VUID-VkMemoryBarrier2-srcStageMask-parameter"); - - skip |= - ValidateFlags(pNext_loc.dot(Field::srcAccessMask), vvl::FlagBitmask::VkAccessFlagBits2, AllVkAccessFlagBits2, - structure->srcAccessMask, kOptionalFlags, "VUID-VkMemoryBarrier2-srcAccessMask-parameter"); - - skip |= ValidateFlags(pNext_loc.dot(Field::dstStageMask), vvl::FlagBitmask::VkPipelineStageFlagBits2, - AllVkPipelineStageFlagBits2, structure->dstStageMask, kOptionalFlags, - "VUID-VkMemoryBarrier2-dstStageMask-parameter"); - - skip |= - ValidateFlags(pNext_loc.dot(Field::dstAccessMask), vvl::FlagBitmask::VkAccessFlagBits2, AllVkAccessFlagBits2, - structure->dstAccessMask, kOptionalFlags, "VUID-VkMemoryBarrier2-dstAccessMask-parameter"); + VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT* structure = + (VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::ycbcr2plane444Formats), structure->ycbcr2plane444Formats); } } break; - // Validation code for VkPhysicalDeviceSynchronization2Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: { // Covers - // VUID-VkPhysicalDeviceSynchronization2Features-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_synchronization2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_synchronization2))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES), but its parent extension " - "VK_KHR_synchronization2 has not been enabled."); - } + // Validation code for VkPhysicalDeviceFragmentDensityMap2FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceFragmentDensityMap2FeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSynchronization2Features); - if (!IsExtEnabled(device_extensions.vk_khr_synchronization2)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentDensityMap2FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_fragment_density_map2)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSynchronization2Features, but when creating " + "includes a pointer to a VkPhysicalDeviceFragmentDensityMap2FeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_KHR_synchronization2) was not included in ppEnabledExtensionNames."); + "(VK_EXT_fragment_density_map2) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceSynchronization2Features* structure = (VkPhysicalDeviceSynchronization2Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::synchronization2), structure->synchronization2); + VkPhysicalDeviceFragmentDensityMap2FeaturesEXT* structure = (VkPhysicalDeviceFragmentDensityMap2FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapDeferred), structure->fragmentDensityMapDeferred); } } break; - // Validation code for VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: { // Covers - // VUID-VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_zero_initialize_workgroup_memory)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_zero_initialize_workgroup_memory))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES), but its parent extension " - "VK_KHR_zero_initialize_workgroup_memory has not been enabled."); - } + // Validation code for VkPhysicalDeviceImageCompressionControlFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceImageCompressionControlFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_zero_initialize_workgroup_memory)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageCompressionControlFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_compression_control)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures, but when " + "includes a pointer to a VkPhysicalDeviceImageCompressionControlFeaturesEXT, but when " "creating VkDevice, the parent extension " - "(VK_KHR_zero_initialize_workgroup_memory) was not included in ppEnabledExtensionNames."); + "(VK_EXT_image_compression_control) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures* structure = - (VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderZeroInitializeWorkgroupMemory), - structure->shaderZeroInitializeWorkgroupMemory); + VkPhysicalDeviceImageCompressionControlFeaturesEXT* structure = + (VkPhysicalDeviceImageCompressionControlFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::imageCompressionControl), structure->imageCompressionControl); } } break; - // Validation code for VkPhysicalDeviceImageRobustnessFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: { // Covers - // VUID-VkPhysicalDeviceImageRobustnessFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_image_robustness)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_image_robustness))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES), but its parent extension " - "VK_EXT_image_robustness has not been enabled."); + // Validation code for VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_attachment_feedback_loop_layout)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_attachment_feedback_loop_layout) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT* structure = + (VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::attachmentFeedbackLoopLayout), structure->attachmentFeedbackLoopLayout); } + } break; + + // Validation code for VkPhysicalDevice4444FormatsFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevice4444FormatsFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageRobustnessFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_image_robustness)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevice4444FormatsFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_4444_formats)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageRobustnessFeatures, but when creating VkDevice, " + "includes a pointer to a VkPhysicalDevice4444FormatsFeaturesEXT, but when creating VkDevice, " "the parent extension " - "(VK_EXT_image_robustness) was not included in ppEnabledExtensionNames."); + "(VK_EXT_4444_formats) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceImageRobustnessFeatures* structure = (VkPhysicalDeviceImageRobustnessFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::robustImageAccess), structure->robustImageAccess); + VkPhysicalDevice4444FormatsFeaturesEXT* structure = (VkPhysicalDevice4444FormatsFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::formatA4R4G4B4), structure->formatA4R4G4B4); + + skip |= ValidateBool32(pNext_loc.dot(Field::formatA4B4G4R4), structure->formatA4B4G4R4); } } break; - // Validation code for VkPhysicalDeviceSubgroupSizeControlFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: { // Covers - // VUID-VkPhysicalDeviceSubgroupSizeControlFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_subgroup_size_control)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_subgroup_size_control))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES), but its parent extension " - "VK_EXT_subgroup_size_control has not been enabled."); - } + // Validation code for VkPhysicalDeviceFaultFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT: { // Covers VUID-VkPhysicalDeviceFaultFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSubgroupSizeControlFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_subgroup_size_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFaultFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_device_fault)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSubgroupSizeControlFeatures, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_subgroup_size_control) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceFaultFeaturesEXT, but when creating VkDevice, the " + "parent extension " + "(VK_EXT_device_fault) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceSubgroupSizeControlFeatures* structure = (VkPhysicalDeviceSubgroupSizeControlFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::subgroupSizeControl), structure->subgroupSizeControl); + VkPhysicalDeviceFaultFeaturesEXT* structure = (VkPhysicalDeviceFaultFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::deviceFault), structure->deviceFault); - skip |= ValidateBool32(pNext_loc.dot(Field::computeFullSubgroups), structure->computeFullSubgroups); + skip |= ValidateBool32(pNext_loc.dot(Field::deviceFaultVendorBinary), structure->deviceFaultVendorBinary); } } break; - // Validation code for VkPhysicalDeviceSubgroupSizeControlProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceSubgroupSizeControlProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_subgroup_size_control)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_subgroup_size_control))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES), but its parent extension " - "VK_EXT_subgroup_size_control has not been enabled."); - } - } break; + // Validation code for VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_arm_rasterization_order_attachment_access) && + !IsExtEnabled(device_extensions.vk_ext_rasterization_order_attachment_access)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT, but " + "when creating VkDevice, the parent extension " + "(VK_ARM_rasterization_order_attachment_access or " + "VK_EXT_rasterization_order_attachment_access) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT* structure = + (VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rasterizationOrderColorAttachmentAccess), + structure->rasterizationOrderColorAttachmentAccess); - // Validation code for VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure members - case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: { // Covers - // VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::rasterizationOrderDepthAttachmentAccess), + structure->rasterizationOrderDepthAttachmentAccess); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_subgroup_size_control)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_subgroup_size_control))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO), but its parent extension " - "VK_EXT_subgroup_size_control has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::rasterizationOrderStencilAttachmentAccess), + structure->rasterizationOrderStencilAttachmentAccess); } } break; - // Validation code for VkPhysicalDeviceInlineUniformBlockFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: { // Covers - // VUID-VkPhysicalDeviceInlineUniformBlockFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES), but its parent extension " - "VK_EXT_inline_uniform_block has not been enabled."); - } + // Validation code for VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceInlineUniformBlockFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_inline_uniform_block)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_rgba10x6_formats)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceInlineUniformBlockFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_EXT_inline_uniform_block) was not included in ppEnabledExtensionNames."); + "(VK_EXT_rgba10x6_formats) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceInlineUniformBlockFeatures* structure = (VkPhysicalDeviceInlineUniformBlockFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::inlineUniformBlock), structure->inlineUniformBlock); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingInlineUniformBlockUpdateAfterBind), - structure->descriptorBindingInlineUniformBlockUpdateAfterBind); + VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT* structure = (VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::formatRgba10x6WithoutYCbCrSampler), + structure->formatRgba10x6WithoutYCbCrSampler); } } break; - // Validation code for VkPhysicalDeviceInlineUniformBlockProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceInlineUniformBlockProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES), but its parent extension " - "VK_EXT_inline_uniform_block has not been enabled."); + // Validation code for VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_valve_mutable_descriptor_type) && + !IsExtEnabled(device_extensions.vk_ext_mutable_descriptor_type)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_VALVE_mutable_descriptor_type or VK_EXT_mutable_descriptor_type) was not included in " + "ppEnabledExtensionNames."); + } + VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT* structure = + (VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::mutableDescriptorType), structure->mutableDescriptorType); } } break; - // Validation code for VkWriteDescriptorSetInlineUniformBlock structure members - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: { // Covers - // VUID-VkWriteDescriptorSetInlineUniformBlock-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK), but its parent extension " - "VK_EXT_inline_uniform_block has not been enabled."); - } + // Validation code for VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWriteDescriptorSetInlineUniformBlock); - if (!IsExtEnabled(device_extensions.vk_ext_inline_uniform_block)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_vertex_input_dynamic_state)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_inline_uniform_block"); + "includes a pointer to a VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_vertex_input_dynamic_state) was not included in ppEnabledExtensionNames."); } - VkWriteDescriptorSetInlineUniformBlock* structure = (VkWriteDescriptorSetInlineUniformBlock*)header; - skip |= - ValidateArray(pNext_loc.dot(Field::dataSize), pNext_loc.dot(Field::pData), structure->dataSize, - &structure->pData, true, true, "VUID-VkWriteDescriptorSetInlineUniformBlock-dataSize-arraylength", - "VUID-VkWriteDescriptorSetInlineUniformBlock-pData-parameter"); + VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT* structure = + (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::vertexInputDynamicState), structure->vertexInputDynamicState); } } break; - // Validation code for VkDescriptorPoolInlineUniformBlockCreateInfo structure members - case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: { // Covers - // VUID-VkDescriptorPoolInlineUniformBlockCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO), but its parent extension " - "VK_EXT_inline_uniform_block has not been enabled."); + // Validation code for VkPhysicalDeviceAddressBindingReportFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceAddressBindingReportFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceAddressBindingReportFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_device_address_binding_report)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceAddressBindingReportFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_device_address_binding_report) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceAddressBindingReportFeaturesEXT* structure = + (VkPhysicalDeviceAddressBindingReportFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::reportAddressBinding), structure->reportAddressBinding); } } break; - // Validation code for VkPhysicalDeviceTextureCompressionASTCHDRFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: { // Covers - // VUID-VkPhysicalDeviceTextureCompressionASTCHDRFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_texture_compression_astc_hdr)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_texture_compression_astc_hdr))) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES), but its parent extension " - "VK_EXT_texture_compression_astc_hdr has not been enabled."); - } + // Validation code for VkPhysicalDeviceDepthClipControlFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDepthClipControlFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTextureCompressionASTCHDRFeatures); - if (!IsExtEnabled(device_extensions.vk_ext_texture_compression_astc_hdr)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthClipControlFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_control)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceTextureCompressionASTCHDRFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceDepthClipControlFeaturesEXT, but when creating " "VkDevice, the parent extension " - "(VK_EXT_texture_compression_astc_hdr) was not included in ppEnabledExtensionNames."); + "(VK_EXT_depth_clip_control) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceTextureCompressionASTCHDRFeatures* structure = - (VkPhysicalDeviceTextureCompressionASTCHDRFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionASTC_HDR), structure->textureCompressionASTC_HDR); + VkPhysicalDeviceDepthClipControlFeaturesEXT* structure = (VkPhysicalDeviceDepthClipControlFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::depthClipControl), structure->depthClipControl); } } break; - // Validation code for VkPipelineRenderingCreateInfo structure members - case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: { // Covers VUID-VkPipelineRenderingCreateInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO), but " - "its parent extension " - "VK_KHR_dynamic_rendering has not been enabled."); + // Validation code for VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_primitive_topology_list_restart)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_primitive_topology_list_restart) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT* structure = + (VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::primitiveTopologyListRestart), structure->primitiveTopologyListRestart); + + skip |= ValidateBool32(pNext_loc.dot(Field::primitiveTopologyPatchListRestart), + structure->primitiveTopologyPatchListRestart); } } break; - // Validation code for VkPhysicalDeviceDynamicRenderingFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: { // Covers - // VUID-VkPhysicalDeviceDynamicRenderingFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES), but its parent extension " - "VK_KHR_dynamic_rendering has not been enabled."); - } + // Validation code for VkPhysicalDeviceSubpassShadingFeaturesHUAWEI structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI: { // Covers + // VUID-VkPhysicalDeviceSubpassShadingFeaturesHUAWEI-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDynamicRenderingFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSubpassShadingFeaturesHUAWEI); + if (!IsExtEnabled(device_extensions.vk_huawei_subpass_shading)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDynamicRenderingFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceSubpassShadingFeaturesHUAWEI, but when creating " "VkDevice, the parent extension " - "(VK_KHR_dynamic_rendering) was not included in ppEnabledExtensionNames."); + "(VK_HUAWEI_subpass_shading) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceDynamicRenderingFeatures* structure = (VkPhysicalDeviceDynamicRenderingFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRendering), structure->dynamicRendering); + VkPhysicalDeviceSubpassShadingFeaturesHUAWEI* structure = (VkPhysicalDeviceSubpassShadingFeaturesHUAWEI*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::subpassShading), structure->subpassShading); } } break; - // Validation code for VkCommandBufferInheritanceRenderingInfo structure members - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: { // Covers - // VUID-VkCommandBufferInheritanceRenderingInfo-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO), but its parent extension " - "VK_KHR_dynamic_rendering has not been enabled."); - } + // Validation code for VkPhysicalDeviceInvocationMaskFeaturesHUAWEI structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI: { // Covers + // VUID-VkPhysicalDeviceInvocationMaskFeaturesHUAWEI-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkCommandBufferInheritanceRenderingInfo); - if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceInvocationMaskFeaturesHUAWEI); + if (!IsExtEnabled(device_extensions.vk_huawei_invocation_mask)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_dynamic_rendering"); + "includes a pointer to a VkPhysicalDeviceInvocationMaskFeaturesHUAWEI, but when creating " + "VkDevice, the parent extension " + "(VK_HUAWEI_invocation_mask) was not included in ppEnabledExtensionNames."); } - VkCommandBufferInheritanceRenderingInfo* structure = (VkCommandBufferInheritanceRenderingInfo*)header; - skip |= - ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkRenderingFlagBits, AllVkRenderingFlagBits, - structure->flags, kOptionalFlags, "VUID-VkCommandBufferInheritanceRenderingInfo-flags-parameter"); - - skip |= ValidateRangedEnumArray( - pNext_loc.dot(Field::colorAttachmentCount), pNext_loc.dot(Field::pColorAttachmentFormats), vvl::Enum::VkFormat, - structure->colorAttachmentCount, structure->pColorAttachmentFormats, false, true, kVUIDUndefined, - "VUID-VkCommandBufferInheritanceRenderingInfo-pColorAttachmentFormats-parameter"); - - skip |= ValidateRangedEnum(pNext_loc.dot(Field::depthAttachmentFormat), vvl::Enum::VkFormat, - structure->depthAttachmentFormat, - "VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-parameter"); - - skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilAttachmentFormat), vvl::Enum::VkFormat, - structure->stencilAttachmentFormat, - "VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-parameter"); - - skip |= ValidateFlags(pNext_loc.dot(Field::rasterizationSamples), vvl::FlagBitmask::VkSampleCountFlagBits, - AllVkSampleCountFlagBits, structure->rasterizationSamples, kOptionalSingleBit, - "VUID-VkCommandBufferInheritanceRenderingInfo-rasterizationSamples-parameter"); + VkPhysicalDeviceInvocationMaskFeaturesHUAWEI* structure = (VkPhysicalDeviceInvocationMaskFeaturesHUAWEI*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::invocationMask), structure->invocationMask); } } break; - // Validation code for VkPhysicalDeviceShaderIntegerDotProductFeatures structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: { // Covers - // VUID-VkPhysicalDeviceShaderIntegerDotProductFeatures-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_integer_dot_product)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_integer_dot_product))) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES), but its parent extension " - "VK_KHR_shader_integer_dot_product has not been enabled."); - } + // Validation code for VkPhysicalDeviceExternalMemoryRDMAFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceExternalMemoryRDMAFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderIntegerDotProductFeatures); - if (!IsExtEnabled(device_extensions.vk_khr_shader_integer_dot_product)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExternalMemoryRDMAFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_external_memory_rdma)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderIntegerDotProductFeatures, but when creating " + "includes a pointer to a VkPhysicalDeviceExternalMemoryRDMAFeaturesNV, but when creating " "VkDevice, the parent extension " - "(VK_KHR_shader_integer_dot_product) was not included in ppEnabledExtensionNames."); + "(VK_NV_external_memory_rdma) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderIntegerDotProductFeatures* structure = - (VkPhysicalDeviceShaderIntegerDotProductFeatures*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderIntegerDotProduct), structure->shaderIntegerDotProduct); + VkPhysicalDeviceExternalMemoryRDMAFeaturesNV* structure = (VkPhysicalDeviceExternalMemoryRDMAFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::externalMemoryRDMA), structure->externalMemoryRDMA); } } break; - // Validation code for VkPhysicalDeviceShaderIntegerDotProductProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceShaderIntegerDotProductProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_integer_dot_product)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_integer_dot_product))) { - skip |= - LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES), but its parent extension " - "VK_KHR_shader_integer_dot_product has not been enabled."); + // Validation code for VkPhysicalDevicePipelinePropertiesFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePipelinePropertiesFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelinePropertiesFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_properties)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePipelinePropertiesFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_pipeline_properties) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePipelinePropertiesFeaturesEXT* structure = (VkPhysicalDevicePipelinePropertiesFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelinePropertiesIdentifier), structure->pipelinePropertiesIdentifier); } } break; - // Validation code for VkPhysicalDeviceTexelBufferAlignmentProperties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceTexelBufferAlignmentProperties-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_texel_buffer_alignment)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_texel_buffer_alignment))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES), but its parent extension " - "VK_EXT_texel_buffer_alignment has not been enabled."); + // Validation code for VkPhysicalDeviceFrameBoundaryFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceFrameBoundaryFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFrameBoundaryFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_frame_boundary)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceFrameBoundaryFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_frame_boundary) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceFrameBoundaryFeaturesEXT* structure = (VkPhysicalDeviceFrameBoundaryFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::frameBoundary), structure->frameBoundary); } } break; - // Validation code for VkFormatProperties3 structure members - case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: { // Covers VUID-VkFormatProperties3-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_format_feature_flags2)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_format_feature_flags2))) { - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3), but its parent extension " - "VK_KHR_format_feature_flags2 has not been enabled."); + // Validation code for VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_multisampled_render_to_single_sampled)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT, but " + "when creating VkDevice, the parent extension " + "(VK_EXT_multisampled_render_to_single_sampled) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT* structure = + (VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::multisampledRenderToSingleSampled), + structure->multisampledRenderToSingleSampled); } } break; - // Validation code for VkPhysicalDeviceMaintenance4Features structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: { // Covers - // VUID-VkPhysicalDeviceMaintenance4Features-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance4)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance4))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES), but its parent extension " - "VK_KHR_maintenance4 has not been enabled."); - } + // Validation code for VkPhysicalDeviceExtendedDynamicState2FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceExtendedDynamicState2FeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMaintenance4Features); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance4)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicState2FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state2)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMaintenance4Features, but when creating VkDevice, " - "the parent extension " - "(VK_KHR_maintenance4) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceExtendedDynamicState2FeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_extended_dynamic_state2) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceMaintenance4Features* structure = (VkPhysicalDeviceMaintenance4Features*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::maintenance4), structure->maintenance4); - } - } break; + VkPhysicalDeviceExtendedDynamicState2FeaturesEXT* structure = + (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState2), structure->extendedDynamicState2); - // Validation code for VkPhysicalDeviceMaintenance4Properties structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: { // Covers - // VUID-VkPhysicalDeviceMaintenance4Properties-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState2LogicOp), structure->extendedDynamicState2LogicOp); - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance4)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance4))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType " - "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES), but its parent extension " - "VK_KHR_maintenance4 has not been enabled."); + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState2PatchControlPoints), + structure->extendedDynamicState2PatchControlPoints); } } break; - // No Validation code for VkImageSwapchainCreateInfoKHR structure members -- Covers - // VUID-VkImageSwapchainCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceColorWriteEnableFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceColorWriteEnableFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceColorWriteEnableFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_color_write_enable)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceColorWriteEnableFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_color_write_enable) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceColorWriteEnableFeaturesEXT* structure = (VkPhysicalDeviceColorWriteEnableFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::colorWriteEnable), structure->colorWriteEnable); + } + } break; - // Validation code for VkBindImageMemorySwapchainInfoKHR structure members - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: { // Covers VUID-VkBindImageMemorySwapchainInfoKHR-sType-sType + // Validation code for VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindImageMemorySwapchainInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_swapchain) && !IsExtEnabled(device_extensions.vk_khr_device_group)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_primitives_generated_query)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_swapchain or VK_KHR_device_group"); + "includes a pointer to a VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_primitives_generated_query) was not included in ppEnabledExtensionNames."); } - VkBindImageMemorySwapchainInfoKHR* structure = (VkBindImageMemorySwapchainInfoKHR*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::swapchain), structure->swapchain); + VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT* structure = + (VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::primitivesGeneratedQuery), structure->primitivesGeneratedQuery); + + skip |= ValidateBool32(pNext_loc.dot(Field::primitivesGeneratedQueryWithRasterizerDiscard), + structure->primitivesGeneratedQueryWithRasterizerDiscard); + + skip |= ValidateBool32(pNext_loc.dot(Field::primitivesGeneratedQueryWithNonZeroStreams), + structure->primitivesGeneratedQueryWithNonZeroStreams); } } break; - // Validation code for VkDeviceGroupPresentInfoKHR structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: { // Covers VUID-VkDeviceGroupPresentInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceImageViewMinLodFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceImageViewMinLodFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupPresentInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_swapchain) && !IsExtEnabled(device_extensions.vk_khr_device_group)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageViewMinLodFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_view_min_lod)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_swapchain or VK_KHR_device_group"); + "includes a pointer to a VkPhysicalDeviceImageViewMinLodFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_image_view_min_lod) was not included in ppEnabledExtensionNames."); } - VkDeviceGroupPresentInfoKHR* structure = (VkDeviceGroupPresentInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pDeviceMasks), - structure->swapchainCount, &structure->pDeviceMasks, false, true, kVUIDUndefined, - "VUID-VkDeviceGroupPresentInfoKHR-pDeviceMasks-parameter"); - - skip |= ValidateFlags(pNext_loc.dot(Field::mode), vvl::FlagBitmask::VkDeviceGroupPresentModeFlagBitsKHR, - AllVkDeviceGroupPresentModeFlagBitsKHR, structure->mode, kRequiredSingleBit, - "VUID-VkDeviceGroupPresentInfoKHR-mode-parameter", - "VUID-VkDeviceGroupPresentInfoKHR-mode-parameter"); + VkPhysicalDeviceImageViewMinLodFeaturesEXT* structure = (VkPhysicalDeviceImageViewMinLodFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::minLod), structure->minLod); } } break; - // Validation code for VkDeviceGroupSwapchainCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: { // Covers - // VUID-VkDeviceGroupSwapchainCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceMultiDrawFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceMultiDrawFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupSwapchainCreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_swapchain) && !IsExtEnabled(device_extensions.vk_khr_device_group)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMultiDrawFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_multi_draw)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_swapchain or VK_KHR_device_group"); + "includes a pointer to a VkPhysicalDeviceMultiDrawFeaturesEXT, but when creating VkDevice, " + "the parent extension " + "(VK_EXT_multi_draw) was not included in ppEnabledExtensionNames."); } - VkDeviceGroupSwapchainCreateInfoKHR* structure = (VkDeviceGroupSwapchainCreateInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::modes), vvl::FlagBitmask::VkDeviceGroupPresentModeFlagBitsKHR, - AllVkDeviceGroupPresentModeFlagBitsKHR, structure->modes, kRequiredFlags, - "VUID-VkDeviceGroupSwapchainCreateInfoKHR-modes-parameter", - "VUID-VkDeviceGroupSwapchainCreateInfoKHR-modes-requiredbitmask"); + VkPhysicalDeviceMultiDrawFeaturesEXT* structure = (VkPhysicalDeviceMultiDrawFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::multiDraw), structure->multiDraw); } } break; - // Validation code for VkDisplayPresentInfoKHR structure members - case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: { // Covers VUID-VkDisplayPresentInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceImage2DViewOf3DFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceImage2DViewOf3DFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDisplayPresentInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_display_swapchain)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImage2DViewOf3DFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_2d_view_of_3d)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_display_swapchain"); + "includes a pointer to a VkPhysicalDeviceImage2DViewOf3DFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_image_2d_view_of_3d) was not included in ppEnabledExtensionNames."); } - VkDisplayPresentInfoKHR* structure = (VkDisplayPresentInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::persistent), structure->persistent); + VkPhysicalDeviceImage2DViewOf3DFeaturesEXT* structure = (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::image2DViewOf3D), structure->image2DViewOf3D); + + skip |= ValidateBool32(pNext_loc.dot(Field::sampler2DViewOf3D), structure->sampler2DViewOf3D); } } break; - // No Validation code for VkQueueFamilyQueryResultStatusPropertiesKHR structure members -- Covers - // VUID-VkQueueFamilyQueryResultStatusPropertiesKHR-sType-sType - - // No Validation code for VkQueueFamilyVideoPropertiesKHR structure members -- Covers - // VUID-VkQueueFamilyVideoPropertiesKHR-sType-sType - - // Validation code for VkVideoProfileInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR: { // Covers VUID-VkVideoProfileInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceShaderTileImageFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceShaderTileImageFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoProfileInfoKHR); - VkVideoProfileInfoKHR* structure = (VkVideoProfileInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::videoCodecOperation), vvl::FlagBitmask::VkVideoCodecOperationFlagBitsKHR, - AllVkVideoCodecOperationFlagBitsKHR, structure->videoCodecOperation, kRequiredSingleBit, - "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter", - "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter"); - + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderTileImageFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_tile_image)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderTileImageFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_shader_tile_image) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderTileImageFeaturesEXT* structure = (VkPhysicalDeviceShaderTileImageFeaturesEXT*)header; skip |= - ValidateFlags(pNext_loc.dot(Field::chromaSubsampling), vvl::FlagBitmask::VkVideoChromaSubsamplingFlagBitsKHR, - AllVkVideoChromaSubsamplingFlagBitsKHR, structure->chromaSubsampling, kRequiredFlags, - "VUID-VkVideoProfileInfoKHR-chromaSubsampling-parameter", - "VUID-VkVideoProfileInfoKHR-chromaSubsampling-requiredbitmask"); + ValidateBool32(pNext_loc.dot(Field::shaderTileImageColorReadAccess), structure->shaderTileImageColorReadAccess); - skip |= ValidateFlags(pNext_loc.dot(Field::lumaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, - AllVkVideoComponentBitDepthFlagBitsKHR, structure->lumaBitDepth, kRequiredFlags, - "VUID-VkVideoProfileInfoKHR-lumaBitDepth-parameter", - "VUID-VkVideoProfileInfoKHR-lumaBitDepth-requiredbitmask"); + skip |= + ValidateBool32(pNext_loc.dot(Field::shaderTileImageDepthReadAccess), structure->shaderTileImageDepthReadAccess); - skip |= ValidateFlags(pNext_loc.dot(Field::chromaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, - AllVkVideoComponentBitDepthFlagBitsKHR, structure->chromaBitDepth, kOptionalFlags, - "VUID-VkVideoProfileInfoKHR-chromaBitDepth-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderTileImageStencilReadAccess), + structure->shaderTileImageStencilReadAccess); } } break; - // Validation code for VkVideoProfileListInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR: { // Covers VUID-VkVideoProfileListInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceOpacityMicromapFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceOpacityMicromapFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoProfileListInfoKHR); - VkVideoProfileListInfoKHR* structure = (VkVideoProfileListInfoKHR*)header; - skip |= ValidateStructTypeArray( - pNext_loc.dot(Field::profileCount), pNext_loc.dot(Field::pProfiles), "VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR", - structure->profileCount, structure->pProfiles, VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR, false, true, - "VUID-VkVideoProfileInfoKHR-sType-sType", "VUID-VkVideoProfileListInfoKHR-pProfiles-parameter", kVUIDUndefined); - - if (structure->pProfiles != nullptr) { - for (uint32_t profileIndex = 0; profileIndex < structure->profileCount; ++profileIndex) { - [[maybe_unused]] const Location pProfiles_loc = pNext_loc.dot(Field::pProfiles, profileIndex); - skip |= ValidateFlags( - pProfiles_loc.dot(Field::videoCodecOperation), vvl::FlagBitmask::VkVideoCodecOperationFlagBitsKHR, - AllVkVideoCodecOperationFlagBitsKHR, structure->pProfiles[profileIndex].videoCodecOperation, - kRequiredSingleBit, "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter", - "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter"); - - skip |= ValidateFlags( - pProfiles_loc.dot(Field::chromaSubsampling), vvl::FlagBitmask::VkVideoChromaSubsamplingFlagBitsKHR, - AllVkVideoChromaSubsamplingFlagBitsKHR, structure->pProfiles[profileIndex].chromaSubsampling, - kRequiredFlags, "VUID-VkVideoProfileInfoKHR-chromaSubsampling-parameter", - "VUID-VkVideoProfileInfoKHR-chromaSubsampling-requiredbitmask"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceOpacityMicromapFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_opacity_micromap)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceOpacityMicromapFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_opacity_micromap) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceOpacityMicromapFeaturesEXT* structure = (VkPhysicalDeviceOpacityMicromapFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::micromap), structure->micromap); - skip |= ValidateFlags( - pProfiles_loc.dot(Field::lumaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, - AllVkVideoComponentBitDepthFlagBitsKHR, structure->pProfiles[profileIndex].lumaBitDepth, kRequiredFlags, - "VUID-VkVideoProfileInfoKHR-lumaBitDepth-parameter", - "VUID-VkVideoProfileInfoKHR-lumaBitDepth-requiredbitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::micromapCaptureReplay), structure->micromapCaptureReplay); - skip |= ValidateFlags( - pProfiles_loc.dot(Field::chromaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, - AllVkVideoComponentBitDepthFlagBitsKHR, structure->pProfiles[profileIndex].chromaBitDepth, - kOptionalFlags, "VUID-VkVideoProfileInfoKHR-chromaBitDepth-parameter"); - } - } + skip |= ValidateBool32(pNext_loc.dot(Field::micromapHostCommands), structure->micromapHostCommands); } } break; +#ifdef VK_ENABLE_BETA_EXTENSIONS - // No Validation code for VkVideoDecodeCapabilitiesKHR structure members -- Covers - // VUID-VkVideoDecodeCapabilitiesKHR-sType-sType - - // Validation code for VkVideoDecodeUsageInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR: { // Covers VUID-VkVideoDecodeUsageInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceDisplacementMicromapFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceDisplacementMicromapFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeUsageInfoKHR); - VkVideoDecodeUsageInfoKHR* structure = (VkVideoDecodeUsageInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::videoUsageHints), vvl::FlagBitmask::VkVideoDecodeUsageFlagBitsKHR, - AllVkVideoDecodeUsageFlagBitsKHR, structure->videoUsageHints, kOptionalFlags, - "VUID-VkVideoDecodeUsageInfoKHR-videoUsageHints-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDisplacementMicromapFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_displacement_micromap)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDisplacementMicromapFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_displacement_micromap) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDisplacementMicromapFeaturesNV* structure = (VkPhysicalDeviceDisplacementMicromapFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::displacementMicromap), structure->displacementMicromap); } } break; +#endif // VK_ENABLE_BETA_EXTENSIONS - // No Validation code for VkVideoEncodeH264CapabilitiesKHR structure members -- Covers - // VUID-VkVideoEncodeH264CapabilitiesKHR-sType-sType - - // No Validation code for VkVideoEncodeH264QualityLevelPropertiesKHR structure members -- Covers - // VUID-VkVideoEncodeH264QualityLevelPropertiesKHR-sType-sType - - // Validation code for VkVideoEncodeH264SessionCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH264SessionCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI: { // Covers + // VUID-VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264SessionCreateInfoKHR); - VkVideoEncodeH264SessionCreateInfoKHR* structure = (VkVideoEncodeH264SessionCreateInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::useMaxLevelIdc), structure->useMaxLevelIdc); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI); + if (!IsExtEnabled(device_extensions.vk_huawei_cluster_culling_shader)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI, but when " + "creating VkDevice, the parent extension " + "(VK_HUAWEI_cluster_culling_shader) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI* structure = + (VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::clustercullingShader), structure->clustercullingShader); + + skip |= + ValidateBool32(pNext_loc.dot(Field::multiviewClusterCullingShader), structure->multiviewClusterCullingShader); } } break; - // No Validation code for VkVideoEncodeH264SessionParametersAddInfoKHR structure members -- Covers - // VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-sType-sType - - // Validation code for VkVideoEncodeH264SessionParametersCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH264SessionParametersCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceBorderColorSwizzleFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceBorderColorSwizzleFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264SessionParametersCreateInfoKHR); - VkVideoEncodeH264SessionParametersCreateInfoKHR* structure = - (VkVideoEncodeH264SessionParametersCreateInfoKHR*)header; - skip |= ValidateStructType( - pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR", - structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, false, - "VUID-VkVideoEncodeH264SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", - "VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-sType-sType"); - - if (structure->pParametersAddInfo != nullptr) { - [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBorderColorSwizzleFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_border_color_swizzle)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceBorderColorSwizzleFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_border_color_swizzle) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceBorderColorSwizzleFeaturesEXT* structure = (VkPhysicalDeviceBorderColorSwizzleFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::borderColorSwizzle), structure->borderColorSwizzle); + + skip |= ValidateBool32(pNext_loc.dot(Field::borderColorSwizzleFromImage), structure->borderColorSwizzleFromImage); } } break; - // Validation code for VkVideoEncodeH264SessionParametersGetInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH264SessionParametersGetInfoKHR-sType-sType + // Validation code for VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264SessionParametersGetInfoKHR); - VkVideoEncodeH264SessionParametersGetInfoKHR* structure = (VkVideoEncodeH264SessionParametersGetInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::writeStdSPS), structure->writeStdSPS); - - skip |= ValidateBool32(pNext_loc.dot(Field::writeStdPPS), structure->writeStdPPS); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_pageable_device_local_memory)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_pageable_device_local_memory) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT* structure = + (VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pageableDeviceLocalMemory), structure->pageableDeviceLocalMemory); } } break; - // No Validation code for VkVideoEncodeH264SessionParametersFeedbackInfoKHR structure members -- Covers - // VUID-VkVideoEncodeH264SessionParametersFeedbackInfoKHR-sType-sType - - // Validation code for VkVideoEncodeH264PictureInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR: { // Covers VUID-VkVideoEncodeH264PictureInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceSchedulingControlsFeaturesARM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM: { // Covers + // VUID-VkPhysicalDeviceSchedulingControlsFeaturesARM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264PictureInfoKHR); - VkVideoEncodeH264PictureInfoKHR* structure = (VkVideoEncodeH264PictureInfoKHR*)header; - skip |= ValidateStructTypeArray(pNext_loc.dot(Field::naluSliceEntryCount), pNext_loc.dot(Field::pNaluSliceEntries), - "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR", - structure->naluSliceEntryCount, structure->pNaluSliceEntries, - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR, true, true, - "VUID-VkVideoEncodeH264NaluSliceInfoKHR-sType-sType", - "VUID-VkVideoEncodeH264PictureInfoKHR-pNaluSliceEntries-parameter", - "VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-arraylength"); - - if (structure->pNaluSliceEntries != nullptr) { - for (uint32_t naluSliceEntryIndex = 0; naluSliceEntryIndex < structure->naluSliceEntryCount; - ++naluSliceEntryIndex) { - [[maybe_unused]] const Location pNaluSliceEntries_loc = - pNext_loc.dot(Field::pNaluSliceEntries, naluSliceEntryIndex); - skip |= ValidateRequiredPointer(pNaluSliceEntries_loc.dot(Field::pStdSliceHeader), - structure->pNaluSliceEntries[naluSliceEntryIndex].pStdSliceHeader, - "VUID-VkVideoEncodeH264NaluSliceInfoKHR-pStdSliceHeader-parameter"); - } + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSchedulingControlsFeaturesARM); + if (!IsExtEnabled(device_extensions.vk_arm_scheduling_controls)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceSchedulingControlsFeaturesARM, but when creating " + "VkDevice, the parent extension " + "(VK_ARM_scheduling_controls) was not included in ppEnabledExtensionNames."); } - - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, - "VUID-VkVideoEncodeH264PictureInfoKHR-pStdPictureInfo-parameter"); - - skip |= ValidateBool32(pNext_loc.dot(Field::generatePrefixNalu), structure->generatePrefixNalu); + VkPhysicalDeviceSchedulingControlsFeaturesARM* structure = (VkPhysicalDeviceSchedulingControlsFeaturesARM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::schedulingControls), structure->schedulingControls); } } break; - // Validation code for VkVideoEncodeH264DpbSlotInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoEncodeH264DpbSlotInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264DpbSlotInfoKHR); - VkVideoEncodeH264DpbSlotInfoKHR* structure = (VkVideoEncodeH264DpbSlotInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, - "VUID-VkVideoEncodeH264DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_sliced_view_of_3d)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_image_sliced_view_of_3d) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT* structure = (VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::imageSlicedViewOf3D), structure->imageSlicedViewOf3D); } } break; - // No Validation code for VkVideoEncodeH264ProfileInfoKHR structure members -- Covers - // VUID-VkVideoEncodeH264ProfileInfoKHR-sType-sType - - // Validation code for VkVideoEncodeH264RateControlInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH264RateControlInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE: { // Covers + // VUID-VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264RateControlInfoKHR); - VkVideoEncodeH264RateControlInfoKHR* structure = (VkVideoEncodeH264RateControlInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkVideoEncodeH264RateControlFlagBitsKHR, - AllVkVideoEncodeH264RateControlFlagBitsKHR, structure->flags, kOptionalFlags, - "VUID-VkVideoEncodeH264RateControlInfoKHR-flags-parameter"); + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE); + if (!IsExtEnabled(device_extensions.vk_valve_descriptor_set_host_mapping)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE, but when " + "creating VkDevice, the parent extension " + "(VK_VALVE_descriptor_set_host_mapping) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE* structure = + (VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorSetHostMapping), structure->descriptorSetHostMapping); } } break; - // Validation code for VkVideoEncodeH264RateControlLayerInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH264RateControlLayerInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceDepthClampZeroOneFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDepthClampZeroOneFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264RateControlLayerInfoKHR); - VkVideoEncodeH264RateControlLayerInfoKHR* structure = (VkVideoEncodeH264RateControlLayerInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::useMinQp), structure->useMinQp); - - skip |= ValidateBool32(pNext_loc.dot(Field::useMaxQp), structure->useMaxQp); - - skip |= ValidateBool32(pNext_loc.dot(Field::useMaxFrameSize), structure->useMaxFrameSize); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthClampZeroOneFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_clamp_zero_one)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDepthClampZeroOneFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_depth_clamp_zero_one) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDepthClampZeroOneFeaturesEXT* structure = (VkPhysicalDeviceDepthClampZeroOneFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::depthClampZeroOne), structure->depthClampZeroOne); } } break; - // Validation code for VkVideoEncodeH264GopRemainingFrameInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH264GopRemainingFrameInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264GopRemainingFrameInfoKHR); - VkVideoEncodeH264GopRemainingFrameInfoKHR* structure = (VkVideoEncodeH264GopRemainingFrameInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::useGopRemainingFrames), structure->useGopRemainingFrames); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_non_seamless_cube_map)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_non_seamless_cube_map) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT* structure = (VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::nonSeamlessCubeMap), structure->nonSeamlessCubeMap); } } break; - // No Validation code for VkVideoEncodeH265CapabilitiesKHR structure members -- Covers - // VUID-VkVideoEncodeH265CapabilitiesKHR-sType-sType - - // Validation code for VkVideoEncodeH265SessionCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH265SessionCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceRenderPassStripedFeaturesARM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM: { // Covers + // VUID-VkPhysicalDeviceRenderPassStripedFeaturesARM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265SessionCreateInfoKHR); - VkVideoEncodeH265SessionCreateInfoKHR* structure = (VkVideoEncodeH265SessionCreateInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::useMaxLevelIdc), structure->useMaxLevelIdc); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRenderPassStripedFeaturesARM); + if (!IsExtEnabled(device_extensions.vk_arm_render_pass_striped)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRenderPassStripedFeaturesARM, but when creating " + "VkDevice, the parent extension " + "(VK_ARM_render_pass_striped) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceRenderPassStripedFeaturesARM* structure = (VkPhysicalDeviceRenderPassStripedFeaturesARM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::renderPassStriped), structure->renderPassStriped); } } break; - // No Validation code for VkVideoEncodeH265QualityLevelPropertiesKHR structure members -- Covers - // VUID-VkVideoEncodeH265QualityLevelPropertiesKHR-sType-sType - - // No Validation code for VkVideoEncodeH265SessionParametersAddInfoKHR structure members -- Covers - // VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-sType-sType - - // Validation code for VkVideoEncodeH265SessionParametersCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH265SessionParametersCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265SessionParametersCreateInfoKHR); - VkVideoEncodeH265SessionParametersCreateInfoKHR* structure = - (VkVideoEncodeH265SessionParametersCreateInfoKHR*)header; - skip |= ValidateStructType( - pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR", - structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, false, - "VUID-VkVideoEncodeH265SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", - "VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-sType-sType"); - - if (structure->pParametersAddInfo != nullptr) { - [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_fragment_density_map_offset)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM, but when " + "creating VkDevice, the parent extension " + "(VK_QCOM_fragment_density_map_offset) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM* structure = + (VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapOffset), structure->fragmentDensityMapOffset); } } break; - // Validation code for VkVideoEncodeH265SessionParametersGetInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH265SessionParametersGetInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceCopyMemoryIndirectFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceCopyMemoryIndirectFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265SessionParametersGetInfoKHR); - VkVideoEncodeH265SessionParametersGetInfoKHR* structure = (VkVideoEncodeH265SessionParametersGetInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::writeStdVPS), structure->writeStdVPS); - - skip |= ValidateBool32(pNext_loc.dot(Field::writeStdSPS), structure->writeStdSPS); - - skip |= ValidateBool32(pNext_loc.dot(Field::writeStdPPS), structure->writeStdPPS); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCopyMemoryIndirectFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_copy_memory_indirect)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceCopyMemoryIndirectFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_copy_memory_indirect) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceCopyMemoryIndirectFeaturesNV* structure = (VkPhysicalDeviceCopyMemoryIndirectFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::indirectCopy), structure->indirectCopy); } } break; - // No Validation code for VkVideoEncodeH265SessionParametersFeedbackInfoKHR structure members -- Covers - // VUID-VkVideoEncodeH265SessionParametersFeedbackInfoKHR-sType-sType - - // Validation code for VkVideoEncodeH265PictureInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR: { // Covers VUID-VkVideoEncodeH265PictureInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceMemoryDecompressionFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceMemoryDecompressionFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265PictureInfoKHR); - VkVideoEncodeH265PictureInfoKHR* structure = (VkVideoEncodeH265PictureInfoKHR*)header; - skip |= ValidateStructTypeArray( - pNext_loc.dot(Field::naluSliceSegmentEntryCount), pNext_loc.dot(Field::pNaluSliceSegmentEntries), - "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR", structure->naluSliceSegmentEntryCount, - structure->pNaluSliceSegmentEntries, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR, true, - true, "VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-sType-sType", - "VUID-VkVideoEncodeH265PictureInfoKHR-pNaluSliceSegmentEntries-parameter", - "VUID-VkVideoEncodeH265PictureInfoKHR-naluSliceSegmentEntryCount-arraylength"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMemoryDecompressionFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_memory_decompression)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMemoryDecompressionFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_memory_decompression) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMemoryDecompressionFeaturesNV* structure = (VkPhysicalDeviceMemoryDecompressionFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::memoryDecompression), structure->memoryDecompression); + } + } break; - if (structure->pNaluSliceSegmentEntries != nullptr) { - for (uint32_t naluSliceSegmentEntryIndex = 0; - naluSliceSegmentEntryIndex < structure->naluSliceSegmentEntryCount; ++naluSliceSegmentEntryIndex) { - [[maybe_unused]] const Location pNaluSliceSegmentEntries_loc = - pNext_loc.dot(Field::pNaluSliceSegmentEntries, naluSliceSegmentEntryIndex); - skip |= ValidateRequiredPointer( - pNaluSliceSegmentEntries_loc.dot(Field::pStdSliceSegmentHeader), - structure->pNaluSliceSegmentEntries[naluSliceSegmentEntryIndex].pStdSliceSegmentHeader, - "VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-pStdSliceSegmentHeader-parameter"); - } + // Validation code for VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_device_generated_commands_compute)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_device_generated_commands_compute) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV* structure = + (VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedCompute), structure->deviceGeneratedCompute); + + skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedComputePipelines), + structure->deviceGeneratedComputePipelines); - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, - "VUID-VkVideoEncodeH265PictureInfoKHR-pStdPictureInfo-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedComputeCaptureReplay), + structure->deviceGeneratedComputeCaptureReplay); } } break; - // Validation code for VkVideoEncodeH265DpbSlotInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoEncodeH265DpbSlotInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceLinearColorAttachmentFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceLinearColorAttachmentFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265DpbSlotInfoKHR); - VkVideoEncodeH265DpbSlotInfoKHR* structure = (VkVideoEncodeH265DpbSlotInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, - "VUID-VkVideoEncodeH265DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceLinearColorAttachmentFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_linear_color_attachment)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceLinearColorAttachmentFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_linear_color_attachment) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceLinearColorAttachmentFeaturesNV* structure = + (VkPhysicalDeviceLinearColorAttachmentFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::linearColorAttachment), structure->linearColorAttachment); } } break; - // No Validation code for VkVideoEncodeH265ProfileInfoKHR structure members -- Covers - // VUID-VkVideoEncodeH265ProfileInfoKHR-sType-sType - - // Validation code for VkVideoEncodeH265RateControlInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH265RateControlInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265RateControlInfoKHR); - VkVideoEncodeH265RateControlInfoKHR* structure = (VkVideoEncodeH265RateControlInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkVideoEncodeH265RateControlFlagBitsKHR, - AllVkVideoEncodeH265RateControlFlagBitsKHR, structure->flags, kOptionalFlags, - "VUID-VkVideoEncodeH265RateControlInfoKHR-flags-parameter"); + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_compression_control_swapchain)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT, but " + "when creating VkDevice, the parent extension " + "(VK_EXT_image_compression_control_swapchain) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT* structure = + (VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::imageCompressionControlSwapchain), + structure->imageCompressionControlSwapchain); } } break; - // Validation code for VkVideoEncodeH265RateControlLayerInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH265RateControlLayerInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceImageProcessingFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceImageProcessingFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265RateControlLayerInfoKHR); - VkVideoEncodeH265RateControlLayerInfoKHR* structure = (VkVideoEncodeH265RateControlLayerInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::useMinQp), structure->useMinQp); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageProcessingFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_image_processing)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceImageProcessingFeaturesQCOM, but when creating " + "VkDevice, the parent extension " + "(VK_QCOM_image_processing) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceImageProcessingFeaturesQCOM* structure = (VkPhysicalDeviceImageProcessingFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::textureSampleWeighted), structure->textureSampleWeighted); - skip |= ValidateBool32(pNext_loc.dot(Field::useMaxQp), structure->useMaxQp); + skip |= ValidateBool32(pNext_loc.dot(Field::textureBoxFilter), structure->textureBoxFilter); - skip |= ValidateBool32(pNext_loc.dot(Field::useMaxFrameSize), structure->useMaxFrameSize); + skip |= ValidateBool32(pNext_loc.dot(Field::textureBlockMatch), structure->textureBlockMatch); } } break; - // Validation code for VkVideoEncodeH265GopRemainingFrameInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR: { // Covers - // VUID-VkVideoEncodeH265GopRemainingFrameInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceNestedCommandBufferFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceNestedCommandBufferFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265GopRemainingFrameInfoKHR); - VkVideoEncodeH265GopRemainingFrameInfoKHR* structure = (VkVideoEncodeH265GopRemainingFrameInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::useGopRemainingFrames), structure->useGopRemainingFrames); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceNestedCommandBufferFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_nested_command_buffer)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceNestedCommandBufferFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_nested_command_buffer) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceNestedCommandBufferFeaturesEXT* structure = (VkPhysicalDeviceNestedCommandBufferFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::nestedCommandBuffer), structure->nestedCommandBuffer); + + skip |= ValidateBool32(pNext_loc.dot(Field::nestedCommandBufferRendering), structure->nestedCommandBufferRendering); + + skip |= ValidateBool32(pNext_loc.dot(Field::nestedCommandBufferSimultaneousUse), + structure->nestedCommandBufferSimultaneousUse); } } break; - // Validation code for VkVideoDecodeH264ProfileInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR: { // Covers VUID-VkVideoDecodeH264ProfileInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceExtendedDynamicState3FeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceExtendedDynamicState3FeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264ProfileInfoKHR); - VkVideoDecodeH264ProfileInfoKHR* structure = (VkVideoDecodeH264ProfileInfoKHR*)header; - skip |= - ValidateFlags(pNext_loc.dot(Field::pictureLayout), vvl::FlagBitmask::VkVideoDecodeH264PictureLayoutFlagBitsKHR, - AllVkVideoDecodeH264PictureLayoutFlagBitsKHR, structure->pictureLayout, kOptionalSingleBit, - "VUID-VkVideoDecodeH264ProfileInfoKHR-pictureLayout-parameter"); - } - } break; + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicState3FeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state3)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceExtendedDynamicState3FeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_extended_dynamic_state3) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceExtendedDynamicState3FeaturesEXT* structure = + (VkPhysicalDeviceExtendedDynamicState3FeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3TessellationDomainOrigin), + structure->extendedDynamicState3TessellationDomainOrigin); - // No Validation code for VkVideoDecodeH264CapabilitiesKHR structure members -- Covers - // VUID-VkVideoDecodeH264CapabilitiesKHR-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3DepthClampEnable), + structure->extendedDynamicState3DepthClampEnable); - // Validation code for VkVideoDecodeH264SessionParametersAddInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR: { // Covers - // VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264SessionParametersAddInfoKHR); - VkVideoDecodeH264SessionParametersAddInfoKHR* structure = (VkVideoDecodeH264SessionParametersAddInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::stdSPSCount), pNext_loc.dot(Field::pStdSPSs), structure->stdSPSCount, - &structure->pStdSPSs, false, true, kVUIDUndefined, - "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdSPSs-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3PolygonMode), + structure->extendedDynamicState3PolygonMode); - skip |= ValidateArray(pNext_loc.dot(Field::stdPPSCount), pNext_loc.dot(Field::pStdPPSs), structure->stdPPSCount, - &structure->pStdPPSs, false, true, kVUIDUndefined, - "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdPPSs-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3RasterizationSamples), + structure->extendedDynamicState3RasterizationSamples); - // Validation code for VkVideoDecodeH264SessionParametersCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoDecodeH264SessionParametersCreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264SessionParametersCreateInfoKHR); - VkVideoDecodeH264SessionParametersCreateInfoKHR* structure = - (VkVideoDecodeH264SessionParametersCreateInfoKHR*)header; - skip |= ValidateStructType( - pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR", - structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, false, - "VUID-VkVideoDecodeH264SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", - "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-sType-sType"); + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3SampleMask), + structure->extendedDynamicState3SampleMask); - if (structure->pParametersAddInfo != nullptr) { - [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); - skip |= - ValidateArray(pParametersAddInfo_loc.dot(Field::stdSPSCount), pParametersAddInfo_loc.dot(Field::pStdSPSs), - structure->pParametersAddInfo->stdSPSCount, &structure->pParametersAddInfo->pStdSPSs, false, - true, kVUIDUndefined, "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdSPSs-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3AlphaToCoverageEnable), + structure->extendedDynamicState3AlphaToCoverageEnable); - skip |= - ValidateArray(pParametersAddInfo_loc.dot(Field::stdPPSCount), pParametersAddInfo_loc.dot(Field::pStdPPSs), - structure->pParametersAddInfo->stdPPSCount, &structure->pParametersAddInfo->pStdPPSs, false, - true, kVUIDUndefined, "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdPPSs-parameter"); - } - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3AlphaToOneEnable), + structure->extendedDynamicState3AlphaToOneEnable); - // Validation code for VkVideoDecodeH264PictureInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR: { // Covers VUID-VkVideoDecodeH264PictureInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264PictureInfoKHR); - VkVideoDecodeH264PictureInfoKHR* structure = (VkVideoDecodeH264PictureInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, - "VUID-VkVideoDecodeH264PictureInfoKHR-pStdPictureInfo-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3LogicOpEnable), + structure->extendedDynamicState3LogicOpEnable); - skip |= ValidateArray(pNext_loc.dot(Field::sliceCount), pNext_loc.dot(Field::pSliceOffsets), structure->sliceCount, - &structure->pSliceOffsets, true, true, - "VUID-VkVideoDecodeH264PictureInfoKHR-sliceCount-arraylength", - "VUID-VkVideoDecodeH264PictureInfoKHR-pSliceOffsets-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorBlendEnable), + structure->extendedDynamicState3ColorBlendEnable); - // Validation code for VkVideoDecodeH264DpbSlotInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoDecodeH264DpbSlotInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264DpbSlotInfoKHR); - VkVideoDecodeH264DpbSlotInfoKHR* structure = (VkVideoDecodeH264DpbSlotInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, - "VUID-VkVideoDecodeH264DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorBlendEquation), + structure->extendedDynamicState3ColorBlendEquation); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorWriteMask), + structure->extendedDynamicState3ColorWriteMask); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3RasterizationStream), + structure->extendedDynamicState3RasterizationStream); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ConservativeRasterizationMode), + structure->extendedDynamicState3ConservativeRasterizationMode); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ExtraPrimitiveOverestimationSize), + structure->extendedDynamicState3ExtraPrimitiveOverestimationSize); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3DepthClipEnable), + structure->extendedDynamicState3DepthClipEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3SampleLocationsEnable), + structure->extendedDynamicState3SampleLocationsEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorBlendAdvanced), + structure->extendedDynamicState3ColorBlendAdvanced); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ProvokingVertexMode), + structure->extendedDynamicState3ProvokingVertexMode); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3LineRasterizationMode), + structure->extendedDynamicState3LineRasterizationMode); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3LineStippleEnable), + structure->extendedDynamicState3LineStippleEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3DepthClipNegativeOneToOne), + structure->extendedDynamicState3DepthClipNegativeOneToOne); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ViewportWScalingEnable), + structure->extendedDynamicState3ViewportWScalingEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ViewportSwizzle), + structure->extendedDynamicState3ViewportSwizzle); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageToColorEnable), + structure->extendedDynamicState3CoverageToColorEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageToColorLocation), + structure->extendedDynamicState3CoverageToColorLocation); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageModulationMode), + structure->extendedDynamicState3CoverageModulationMode); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageModulationTableEnable), + structure->extendedDynamicState3CoverageModulationTableEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageModulationTable), + structure->extendedDynamicState3CoverageModulationTable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageReductionMode), + structure->extendedDynamicState3CoverageReductionMode); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3RepresentativeFragmentTestEnable), + structure->extendedDynamicState3RepresentativeFragmentTestEnable); + + skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ShadingRateImageEnable), + structure->extendedDynamicState3ShadingRateImageEnable); } } break; - // Validation code for VkRenderingFragmentShadingRateAttachmentInfoKHR structure members - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: { // Covers - // VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderingFragmentShadingRateAttachmentInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_dynamic_rendering"); + "includes a pointer to a VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_subpass_merge_feedback) was not included in ppEnabledExtensionNames."); } - VkRenderingFragmentShadingRateAttachmentInfoKHR* structure = - (VkRenderingFragmentShadingRateAttachmentInfoKHR*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::imageLayout), vvl::Enum::VkImageLayout, structure->imageLayout, - "VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageLayout-parameter"); + VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT* structure = + (VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::subpassMergeFeedback), structure->subpassMergeFeedback); } } break; - // Validation code for VkRenderingFragmentDensityMapAttachmentInfoEXT structure members - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: { // Covers - // VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-sType-sType + // Validation code for VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderingFragmentDensityMapAttachmentInfoEXT); - if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_module_identifier)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_dynamic_rendering"); + "includes a pointer to a VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_shader_module_identifier) was not included in ppEnabledExtensionNames."); } - VkRenderingFragmentDensityMapAttachmentInfoEXT* structure = (VkRenderingFragmentDensityMapAttachmentInfoEXT*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::imageView), structure->imageView); - - skip |= ValidateRangedEnum(pNext_loc.dot(Field::imageLayout), vvl::Enum::VkImageLayout, structure->imageLayout, - "VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageLayout-parameter"); + VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT* structure = + (VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderModuleIdentifier), structure->shaderModuleIdentifier); } } break; - // Validation code for VkAttachmentSampleCountInfoAMD structure members - case VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD: { // Covers VUID-VkAttachmentSampleCountInfoAMD-sType-sType - - if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || - (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { - skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD), " - "but its parent extension " - "VK_KHR_dynamic_rendering has not been enabled."); + // Validation code for VkPhysicalDeviceOpticalFlowFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceOpticalFlowFeaturesNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceOpticalFlowFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_optical_flow)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceOpticalFlowFeaturesNV, but when creating VkDevice, " + "the parent extension " + "(VK_NV_optical_flow) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceOpticalFlowFeaturesNV* structure = (VkPhysicalDeviceOpticalFlowFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::opticalFlow), structure->opticalFlow); } } break; - // Validation code for VkMultiviewPerViewAttributesInfoNVX structure members - case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX: { // Covers - // VUID-VkMultiviewPerViewAttributesInfoNVX-sType-sType + // Validation code for VkPhysicalDeviceLegacyDitheringFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceLegacyDitheringFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMultiviewPerViewAttributesInfoNVX); - if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceLegacyDitheringFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_legacy_dithering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_dynamic_rendering"); + "includes a pointer to a VkPhysicalDeviceLegacyDitheringFeaturesEXT, but when creating " + "VkDevice, the parent extension " + "(VK_EXT_legacy_dithering) was not included in ppEnabledExtensionNames."); } - VkMultiviewPerViewAttributesInfoNVX* structure = (VkMultiviewPerViewAttributesInfoNVX*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::perViewAttributes), structure->perViewAttributes); - - skip |= - ValidateBool32(pNext_loc.dot(Field::perViewAttributesPositionXOnly), structure->perViewAttributesPositionXOnly); + VkPhysicalDeviceLegacyDitheringFeaturesEXT* structure = (VkPhysicalDeviceLegacyDitheringFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::legacyDithering), structure->legacyDithering); } } break; -#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkImportMemoryWin32HandleInfoKHR structure members - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: { // Covers VUID-VkImportMemoryWin32HandleInfoKHR-sType-sType + // Validation code for VkPhysicalDevicePipelineProtectedAccessFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePipelineProtectedAccessFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryWin32HandleInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_external_memory_win32)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelineProtectedAccessFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_protected_access)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_external_memory_win32"); + "includes a pointer to a VkPhysicalDevicePipelineProtectedAccessFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_pipeline_protected_access) was not included in ppEnabledExtensionNames."); } - VkImportMemoryWin32HandleInfoKHR* structure = (VkImportMemoryWin32HandleInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, - "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-parameter"); + VkPhysicalDevicePipelineProtectedAccessFeaturesEXT* structure = + (VkPhysicalDevicePipelineProtectedAccessFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineProtectedAccess), structure->pipelineProtectedAccess); } } break; +#ifdef VK_USE_PLATFORM_ANDROID_KHR - // No Validation code for VkExportMemoryWin32HandleInfoKHR structure members -- Covers - // VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType -#endif // VK_USE_PLATFORM_WIN32_KHR - - // Validation code for VkImportMemoryFdInfoKHR structure members - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: { // Covers VUID-VkImportMemoryFdInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceExternalFormatResolveFeaturesANDROID structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID: { // Covers + // VUID-VkPhysicalDeviceExternalFormatResolveFeaturesANDROID-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryFdInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_external_memory_fd)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExternalFormatResolveFeaturesANDROID); + if (!IsExtEnabled(device_extensions.vk_android_external_format_resolve)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_external_memory_fd"); + "includes a pointer to a VkPhysicalDeviceExternalFormatResolveFeaturesANDROID, but when " + "creating VkDevice, the parent extension " + "(VK_ANDROID_external_format_resolve) was not included in ppEnabledExtensionNames."); } - VkImportMemoryFdInfoKHR* structure = (VkImportMemoryFdInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, - "VUID-VkImportMemoryFdInfoKHR-handleType-parameter"); + VkPhysicalDeviceExternalFormatResolveFeaturesANDROID* structure = + (VkPhysicalDeviceExternalFormatResolveFeaturesANDROID*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::externalFormatResolve), structure->externalFormatResolve); } } break; -#ifdef VK_USE_PLATFORM_WIN32_KHR +#endif // VK_USE_PLATFORM_ANDROID_KHR - // Validation code for VkWin32KeyedMutexAcquireReleaseInfoKHR structure members - case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: { // Covers - // VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceShaderObjectFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceShaderObjectFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWin32KeyedMutexAcquireReleaseInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_win32_keyed_mutex)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderObjectFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_object)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_win32_keyed_mutex"); + "includes a pointer to a VkPhysicalDeviceShaderObjectFeaturesEXT, but when creating VkDevice, " + "the parent extension " + "(VK_EXT_shader_object) was not included in ppEnabledExtensionNames."); } - VkWin32KeyedMutexAcquireReleaseInfoKHR* structure = (VkWin32KeyedMutexAcquireReleaseInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireSyncs), - structure->acquireCount, &structure->pAcquireSyncs, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireKeys), - structure->acquireCount, &structure->pAcquireKeys, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireKeys-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireTimeouts), - structure->acquireCount, &structure->pAcquireTimeouts, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireTimeouts-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseSyncs), - structure->releaseCount, &structure->pReleaseSyncs, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseSyncs-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseKeys), - structure->releaseCount, &structure->pReleaseKeys, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseKeys-parameter"); + VkPhysicalDeviceShaderObjectFeaturesEXT* structure = (VkPhysicalDeviceShaderObjectFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderObject), structure->shaderObject); } } break; - // No Validation code for VkExportSemaphoreWin32HandleInfoKHR structure members -- Covers - // VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType - - // No Validation code for VkD3D12FenceSubmitInfoKHR structure members -- Covers VUID-VkD3D12FenceSubmitInfoKHR-sType-sType -#endif // VK_USE_PLATFORM_WIN32_KHR - - // No Validation code for VkPhysicalDevicePushDescriptorPropertiesKHR structure members -- Covers - // VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-sType-sType - - // Validation code for VkPresentRegionsKHR structure members - case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: { // Covers VUID-VkPresentRegionsKHR-sType-sType + // Validation code for VkPhysicalDeviceTilePropertiesFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceTilePropertiesFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPresentRegionsKHR); - if (!IsExtEnabled(device_extensions.vk_khr_incremental_present)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTilePropertiesFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_tile_properties)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_incremental_present"); + "includes a pointer to a VkPhysicalDeviceTilePropertiesFeaturesQCOM, but when creating " + "VkDevice, the parent extension " + "(VK_QCOM_tile_properties) was not included in ppEnabledExtensionNames."); } - VkPresentRegionsKHR* structure = (VkPresentRegionsKHR*)header; - skip |= - ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pRegions), structure->swapchainCount, - &structure->pRegions, true, false, "VUID-VkPresentRegionsKHR-swapchainCount-arraylength", - "VUID-VkPresentRegionsKHR-pRegions-parameter"); + VkPhysicalDeviceTilePropertiesFeaturesQCOM* structure = (VkPhysicalDeviceTilePropertiesFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::tileProperties), structure->tileProperties); + } + } break; - if (structure->pRegions != nullptr) { - for (uint32_t swapchainIndex = 0; swapchainIndex < structure->swapchainCount; ++swapchainIndex) { - [[maybe_unused]] const Location pRegions_loc = pNext_loc.dot(Field::pRegions, swapchainIndex); - if (structure->pRegions[swapchainIndex].pRectangles != nullptr) { - for (uint32_t rectangleIndex = 0; rectangleIndex < structure->pRegions[swapchainIndex].rectangleCount; - ++rectangleIndex) { - [[maybe_unused]] const Location pRectangles_loc = - pRegions_loc.dot(Field::pRectangles, rectangleIndex); - } - } - } + // Validation code for VkPhysicalDeviceAmigoProfilingFeaturesSEC structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC: { // Covers + // VUID-VkPhysicalDeviceAmigoProfilingFeaturesSEC-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceAmigoProfilingFeaturesSEC); + if (!IsExtEnabled(device_extensions.vk_sec_amigo_profiling)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceAmigoProfilingFeaturesSEC, but when creating " + "VkDevice, the parent extension " + "(VK_SEC_amigo_profiling) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceAmigoProfilingFeaturesSEC* structure = (VkPhysicalDeviceAmigoProfilingFeaturesSEC*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::amigoProfiling), structure->amigoProfiling); } } break; - // No Validation code for VkSharedPresentSurfaceCapabilitiesKHR structure members -- Covers - // VUID-VkSharedPresentSurfaceCapabilitiesKHR-sType-sType -#ifdef VK_USE_PLATFORM_WIN32_KHR - - // No Validation code for VkExportFenceWin32HandleInfoKHR structure members -- Covers - // VUID-VkExportFenceWin32HandleInfoKHR-sType-sType -#endif // VK_USE_PLATFORM_WIN32_KHR - - // Validation code for VkPhysicalDevicePerformanceQueryFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDevicePerformanceQueryFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_multiview_per_view_viewports)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM, but when " + "creating VkDevice, the parent extension " + "(VK_QCOM_multiview_per_view_viewports) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM* structure = + (VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewPerViewViewports), structure->multiviewPerViewViewports); + } + } break; + + // Validation code for VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePerformanceQueryFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_performance_query)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_invocation_reorder)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePerformanceQueryFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_performance_query) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_ray_tracing_invocation_reorder) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePerformanceQueryFeaturesKHR* structure = (VkPhysicalDevicePerformanceQueryFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::performanceCounterQueryPools), structure->performanceCounterQueryPools); - - skip |= ValidateBool32(pNext_loc.dot(Field::performanceCounterMultipleQueryPools), - structure->performanceCounterMultipleQueryPools); + VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV* structure = + (VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingInvocationReorder), structure->rayTracingInvocationReorder); } } break; - // No Validation code for VkPhysicalDevicePerformanceQueryPropertiesKHR structure members -- Covers - // VUID-VkPhysicalDevicePerformanceQueryPropertiesKHR-sType-sType - - // Validation code for VkQueryPoolPerformanceCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR: { // Covers - // VUID-VkQueryPoolPerformanceCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryPoolPerformanceCreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_performance_query)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_extended_sparse_address_space)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_performance_query"); + "includes a pointer to a VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_extended_sparse_address_space) was not included in ppEnabledExtensionNames."); } - VkQueryPoolPerformanceCreateInfoKHR* structure = (VkQueryPoolPerformanceCreateInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::counterIndexCount), pNext_loc.dot(Field::pCounterIndices), - structure->counterIndexCount, &structure->pCounterIndices, true, true, - "VUID-VkQueryPoolPerformanceCreateInfoKHR-counterIndexCount-arraylength", - "VUID-VkQueryPoolPerformanceCreateInfoKHR-pCounterIndices-parameter"); + VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV* structure = + (VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::extendedSparseAddressSpace), structure->extendedSparseAddressSpace); } } break; - // No Validation code for VkPerformanceQuerySubmitInfoKHR structure members -- Covers - // VUID-VkPerformanceQuerySubmitInfoKHR-sType-sType -#ifdef VK_ENABLE_BETA_EXTENSIONS - - // Validation code for VkPhysicalDevicePortabilitySubsetFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDevicePortabilitySubsetFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM: { // Covers + // VUID-VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePortabilitySubsetFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_portability_subset)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM); + if (!IsExtEnabled(device_extensions.vk_arm_shader_core_builtins)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePortabilitySubsetFeaturesKHR, but when creating " + "includes a pointer to a VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM, but when creating " "VkDevice, the parent extension " - "(VK_KHR_portability_subset) was not included in ppEnabledExtensionNames."); + "(VK_ARM_shader_core_builtins) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePortabilitySubsetFeaturesKHR* structure = (VkPhysicalDevicePortabilitySubsetFeaturesKHR*)header; - skip |= - ValidateBool32(pNext_loc.dot(Field::constantAlphaColorBlendFactors), structure->constantAlphaColorBlendFactors); - - skip |= ValidateBool32(pNext_loc.dot(Field::events), structure->events); - - skip |= ValidateBool32(pNext_loc.dot(Field::imageViewFormatReinterpretation), - structure->imageViewFormatReinterpretation); - - skip |= ValidateBool32(pNext_loc.dot(Field::imageViewFormatSwizzle), structure->imageViewFormatSwizzle); - - skip |= ValidateBool32(pNext_loc.dot(Field::imageView2DOn3DImage), structure->imageView2DOn3DImage); - - skip |= ValidateBool32(pNext_loc.dot(Field::multisampleArrayImage), structure->multisampleArrayImage); - - skip |= ValidateBool32(pNext_loc.dot(Field::mutableComparisonSamplers), structure->mutableComparisonSamplers); - - skip |= ValidateBool32(pNext_loc.dot(Field::pointPolygons), structure->pointPolygons); - - skip |= ValidateBool32(pNext_loc.dot(Field::samplerMipLodBias), structure->samplerMipLodBias); - - skip |= ValidateBool32(pNext_loc.dot(Field::separateStencilMaskRef), structure->separateStencilMaskRef); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampleRateInterpolationFunctions), - structure->shaderSampleRateInterpolationFunctions); - - skip |= ValidateBool32(pNext_loc.dot(Field::tessellationIsolines), structure->tessellationIsolines); - - skip |= ValidateBool32(pNext_loc.dot(Field::tessellationPointMode), structure->tessellationPointMode); - - skip |= ValidateBool32(pNext_loc.dot(Field::triangleFans), structure->triangleFans); - - skip |= ValidateBool32(pNext_loc.dot(Field::vertexAttributeAccessBeyondStride), - structure->vertexAttributeAccessBeyondStride); + VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM* structure = (VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderCoreBuiltins), structure->shaderCoreBuiltins); } } break; - // No Validation code for VkPhysicalDevicePortabilitySubsetPropertiesKHR structure members -- Covers - // VUID-VkPhysicalDevicePortabilitySubsetPropertiesKHR-sType-sType -#endif // VK_ENABLE_BETA_EXTENSIONS - - // Validation code for VkPhysicalDeviceShaderClockFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderClockFeaturesKHR-sType-sType + // Validation code for VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderClockFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_clock)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_library_group_handles)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderClockFeaturesKHR, but when creating VkDevice, " - "the parent extension " - "(VK_KHR_shader_clock) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_pipeline_library_group_handles) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderClockFeaturesKHR* structure = (VkPhysicalDeviceShaderClockFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupClock), structure->shaderSubgroupClock); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderDeviceClock), structure->shaderDeviceClock); + VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT* structure = + (VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineLibraryGroupHandles), structure->pipelineLibraryGroupHandles); } } break; - // No Validation code for VkVideoDecodeH265ProfileInfoKHR structure members -- Covers - // VUID-VkVideoDecodeH265ProfileInfoKHR-sType-sType - - // No Validation code for VkVideoDecodeH265CapabilitiesKHR structure members -- Covers - // VUID-VkVideoDecodeH265CapabilitiesKHR-sType-sType - - // Validation code for VkVideoDecodeH265SessionParametersAddInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR: { // Covers - // VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265SessionParametersAddInfoKHR); - VkVideoDecodeH265SessionParametersAddInfoKHR* structure = (VkVideoDecodeH265SessionParametersAddInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::stdVPSCount), pNext_loc.dot(Field::pStdVPSs), structure->stdVPSCount, - &structure->pStdVPSs, false, true, kVUIDUndefined, - "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdVPSs-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::stdSPSCount), pNext_loc.dot(Field::pStdSPSs), structure->stdSPSCount, - &structure->pStdSPSs, false, true, kVUIDUndefined, - "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdSPSs-parameter"); - - skip |= ValidateArray(pNext_loc.dot(Field::stdPPSCount), pNext_loc.dot(Field::pStdPPSs), structure->stdPPSCount, - &structure->pStdPPSs, false, true, kVUIDUndefined, - "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdPPSs-parameter"); + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_dynamic_rendering_unused_attachments)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT, but " + "when creating VkDevice, the parent extension " + "(VK_EXT_dynamic_rendering_unused_attachments) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT* structure = + (VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRenderingUnusedAttachments), + structure->dynamicRenderingUnusedAttachments); } } break; - // Validation code for VkVideoDecodeH265SessionParametersCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoDecodeH265SessionParametersCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265SessionParametersCreateInfoKHR); - VkVideoDecodeH265SessionParametersCreateInfoKHR* structure = - (VkVideoDecodeH265SessionParametersCreateInfoKHR*)header; - skip |= ValidateStructType( - pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR", - structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, false, - "VUID-VkVideoDecodeH265SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", - "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-sType-sType"); - - if (structure->pParametersAddInfo != nullptr) { - [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); - skip |= - ValidateArray(pParametersAddInfo_loc.dot(Field::stdVPSCount), pParametersAddInfo_loc.dot(Field::pStdVPSs), - structure->pParametersAddInfo->stdVPSCount, &structure->pParametersAddInfo->pStdVPSs, false, - true, kVUIDUndefined, "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdVPSs-parameter"); - - skip |= - ValidateArray(pParametersAddInfo_loc.dot(Field::stdSPSCount), pParametersAddInfo_loc.dot(Field::pStdSPSs), - structure->pParametersAddInfo->stdSPSCount, &structure->pParametersAddInfo->pStdSPSs, false, - true, kVUIDUndefined, "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdSPSs-parameter"); - - skip |= - ValidateArray(pParametersAddInfo_loc.dot(Field::stdPPSCount), pParametersAddInfo_loc.dot(Field::pStdPPSs), - structure->pParametersAddInfo->stdPPSCount, &structure->pParametersAddInfo->pStdPPSs, false, - true, kVUIDUndefined, "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdPPSs-parameter"); + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_multiview_per_view_render_areas)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM, but when " + "creating VkDevice, the parent extension " + "(VK_QCOM_multiview_per_view_render_areas) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM* structure = + (VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewPerViewRenderAreas), structure->multiviewPerViewRenderAreas); } } break; - // Validation code for VkVideoDecodeH265PictureInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR: { // Covers VUID-VkVideoDecodeH265PictureInfoKHR-sType-sType + // Validation code for VkPhysicalDevicePerStageDescriptorSetFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV: { // Covers + // VUID-VkPhysicalDevicePerStageDescriptorSetFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265PictureInfoKHR); - VkVideoDecodeH265PictureInfoKHR* structure = (VkVideoDecodeH265PictureInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, - "VUID-VkVideoDecodeH265PictureInfoKHR-pStdPictureInfo-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePerStageDescriptorSetFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_per_stage_descriptor_set)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDevicePerStageDescriptorSetFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_per_stage_descriptor_set) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDevicePerStageDescriptorSetFeaturesNV* structure = + (VkPhysicalDevicePerStageDescriptorSetFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::perStageDescriptorSet), structure->perStageDescriptorSet); - skip |= ValidateArray(pNext_loc.dot(Field::sliceSegmentCount), pNext_loc.dot(Field::pSliceSegmentOffsets), - structure->sliceSegmentCount, &structure->pSliceSegmentOffsets, true, true, - "VUID-VkVideoDecodeH265PictureInfoKHR-sliceSegmentCount-arraylength", - "VUID-VkVideoDecodeH265PictureInfoKHR-pSliceSegmentOffsets-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::dynamicPipelineLayout), structure->dynamicPipelineLayout); } } break; - // Validation code for VkVideoDecodeH265DpbSlotInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoDecodeH265DpbSlotInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceImageProcessing2FeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceImageProcessing2FeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265DpbSlotInfoKHR); - VkVideoDecodeH265DpbSlotInfoKHR* structure = (VkVideoDecodeH265DpbSlotInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, - "VUID-VkVideoDecodeH265DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageProcessing2FeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_image_processing2)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceImageProcessing2FeaturesQCOM, but when creating " + "VkDevice, the parent extension " + "(VK_QCOM_image_processing2) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceImageProcessing2FeaturesQCOM* structure = (VkPhysicalDeviceImageProcessing2FeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::textureBlockMatch2), structure->textureBlockMatch2); } - } break; - - // Validation code for VkDeviceQueueGlobalPriorityCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR: { // Covers - // VUID-VkDeviceQueueGlobalPriorityCreateInfoKHR-sType-sType + } break; + + // Validation code for VkPhysicalDeviceCubicWeightsFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceCubicWeightsFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceQueueGlobalPriorityCreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_global_priority) && - !IsExtEnabled(device_extensions.vk_ext_global_priority)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCubicWeightsFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_filter_cubic_weights)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_global_priority or VK_EXT_global_priority"); + "includes a pointer to a VkPhysicalDeviceCubicWeightsFeaturesQCOM, but when creating " + "VkDevice, the parent extension " + "(VK_QCOM_filter_cubic_weights) was not included in ppEnabledExtensionNames."); } - VkDeviceQueueGlobalPriorityCreateInfoKHR* structure = (VkDeviceQueueGlobalPriorityCreateInfoKHR*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::globalPriority), vvl::Enum::VkQueueGlobalPriorityKHR, - structure->globalPriority, - "VUID-VkDeviceQueueGlobalPriorityCreateInfoKHR-globalPriority-parameter"); + VkPhysicalDeviceCubicWeightsFeaturesQCOM* structure = (VkPhysicalDeviceCubicWeightsFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::selectableCubicWeights), structure->selectableCubicWeights); } } break; - // Validation code for VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceYcbcrDegammaFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceYcbcrDegammaFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_global_priority) && - !IsExtEnabled(device_extensions.vk_ext_global_priority_query)) { - skip |= LogError( - pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR, but when creating VkDevice, the " - "parent extension " - "(VK_KHR_global_priority or VK_EXT_global_priority_query) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceYcbcrDegammaFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_ycbcr_degamma)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceYcbcrDegammaFeaturesQCOM, but when creating " + "VkDevice, the parent extension " + "(VK_QCOM_ycbcr_degamma) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR* structure = (VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::globalPriorityQuery), structure->globalPriorityQuery); + VkPhysicalDeviceYcbcrDegammaFeaturesQCOM* structure = (VkPhysicalDeviceYcbcrDegammaFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::ycbcrDegamma), structure->ycbcrDegamma); } } break; - // No Validation code for VkQueueFamilyGlobalPriorityPropertiesKHR structure members -- Covers - // VUID-VkQueueFamilyGlobalPriorityPropertiesKHR-sType-sType - - // Validation code for VkFragmentShadingRateAttachmentInfoKHR structure members - case VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: { // Covers - // VUID-VkFragmentShadingRateAttachmentInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceCubicClampFeaturesQCOM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM: { // Covers + // VUID-VkPhysicalDeviceCubicClampFeaturesQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkFragmentShadingRateAttachmentInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_fragment_shading_rate)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCubicClampFeaturesQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_filter_cubic_clamp)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_fragment_shading_rate"); + "includes a pointer to a VkPhysicalDeviceCubicClampFeaturesQCOM, but when creating VkDevice, " + "the parent extension " + "(VK_QCOM_filter_cubic_clamp) was not included in ppEnabledExtensionNames."); } - VkFragmentShadingRateAttachmentInfoKHR* structure = (VkFragmentShadingRateAttachmentInfoKHR*)header; - skip |= ValidateStructType(pNext_loc.dot(Field::pFragmentShadingRateAttachment), - "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2", structure->pFragmentShadingRateAttachment, - VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, false, - "VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-parameter", - "VUID-VkAttachmentReference2-sType-sType"); + VkPhysicalDeviceCubicClampFeaturesQCOM* structure = (VkPhysicalDeviceCubicClampFeaturesQCOM*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::cubicRangeClamp), structure->cubicRangeClamp); + } + } break; - if (structure->pFragmentShadingRateAttachment != nullptr) { - [[maybe_unused]] const Location pFragmentShadingRateAttachment_loc = - pNext_loc.dot(Field::pFragmentShadingRateAttachment); - skip |= ValidateRangedEnum(pFragmentShadingRateAttachment_loc.dot(Field::layout), vvl::Enum::VkImageLayout, - structure->pFragmentShadingRateAttachment->layout, - "VUID-VkAttachmentReference2-layout-parameter"); + // Validation code for VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_attachment_feedback_loop_dynamic_state)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT, but when " + "creating VkDevice, the parent extension " + "(VK_EXT_attachment_feedback_loop_dynamic_state) was not included in ppEnabledExtensionNames."); } + VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT* structure = + (VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::attachmentFeedbackLoopDynamicState), + structure->attachmentFeedbackLoopDynamicState); } } break; +#ifdef VK_USE_PLATFORM_SCREEN_QNX - // No Validation code for VkPipelineFragmentShadingRateStateCreateInfoKHR structure members -- Covers - // VUID-VkPipelineFragmentShadingRateStateCreateInfoKHR-sType-sType - - // Validation code for VkPhysicalDeviceFragmentShadingRateFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceFragmentShadingRateFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX: { // Covers + // VUID-VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShadingRateFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_fragment_shading_rate)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX); + if (!IsExtEnabled(device_extensions.vk_qnx_external_memory_screen_buffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentShadingRateFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_fragment_shading_rate) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX, but when " + "creating VkDevice, the parent extension " + "(VK_QNX_external_memory_screen_buffer) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceFragmentShadingRateFeaturesKHR* structure = (VkPhysicalDeviceFragmentShadingRateFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineFragmentShadingRate), structure->pipelineFragmentShadingRate); - - skip |= ValidateBool32(pNext_loc.dot(Field::primitiveFragmentShadingRate), structure->primitiveFragmentShadingRate); - - skip |= - ValidateBool32(pNext_loc.dot(Field::attachmentFragmentShadingRate), structure->attachmentFragmentShadingRate); + VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX* structure = + (VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::screenBufferImport), structure->screenBufferImport); } } break; +#endif // VK_USE_PLATFORM_SCREEN_QNX - // No Validation code for VkPhysicalDeviceFragmentShadingRatePropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceFragmentShadingRatePropertiesKHR-sType-sType - - // Validation code for VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering_local_read)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_descriptor_pool_overallocation)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR, but when " + "includes a pointer to a VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV, but when " "creating VkDevice, the parent extension " - "(VK_KHR_dynamic_rendering_local_read) was not included in ppEnabledExtensionNames."); + "(VK_NV_descriptor_pool_overallocation) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR* structure = - (VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRenderingLocalRead), structure->dynamicRenderingLocalRead); + VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV* structure = + (VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorPoolOverallocation), structure->descriptorPoolOverallocation); } } break; - // No Validation code for VkRenderingAttachmentLocationInfoKHR structure members -- Covers - // VUID-VkRenderingAttachmentLocationInfoKHR-sType-sType - - // No Validation code for VkRenderingInputAttachmentIndexInfoKHR structure members -- Covers - // VUID-VkRenderingInputAttachmentIndexInfoKHR-sType-sType - - // Validation code for VkPhysicalDeviceShaderQuadControlFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderQuadControlFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceRawAccessChainsFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceRawAccessChainsFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderQuadControlFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_quad_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRawAccessChainsFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_raw_access_chains)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderQuadControlFeaturesKHR, but when creating " + "includes a pointer to a VkPhysicalDeviceRawAccessChainsFeaturesNV, but when creating " "VkDevice, the parent extension " - "(VK_KHR_shader_quad_control) was not included in ppEnabledExtensionNames."); + "(VK_NV_raw_access_chains) was not included in ppEnabledExtensionNames."); } - VkPhysicalDeviceShaderQuadControlFeaturesKHR* structure = (VkPhysicalDeviceShaderQuadControlFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderQuadControl), structure->shaderQuadControl); + VkPhysicalDeviceRawAccessChainsFeaturesNV* structure = (VkPhysicalDeviceRawAccessChainsFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderRawAccessChains), structure->shaderRawAccessChains); } } break; - // Validation code for VkSurfaceProtectedCapabilitiesKHR structure members - case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: { // Covers VUID-VkSurfaceProtectedCapabilitiesKHR-sType-sType + // Validation code for VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceProtectedCapabilitiesKHR); - VkSurfaceProtectedCapabilitiesKHR* structure = (VkSurfaceProtectedCapabilitiesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::supportsProtected), structure->supportsProtected); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_shader_atomic_float16_vector)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV, but when " + "creating VkDevice, the parent extension " + "(VK_NV_shader_atomic_float16_vector) was not included in ppEnabledExtensionNames."); + } + VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV* structure = + (VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat16VectorAtomics), structure->shaderFloat16VectorAtomics); } } break; - // Validation code for VkPhysicalDevicePresentWaitFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDevicePresentWaitFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceRayTracingValidationFeaturesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV: { // Covers + // VUID-VkPhysicalDeviceRayTracingValidationFeaturesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePresentWaitFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_present_wait)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingValidationFeaturesNV); + if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_validation)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePresentWaitFeaturesKHR, but when creating VkDevice, " - "the parent extension " - "(VK_KHR_present_wait) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceRayTracingValidationFeaturesNV, but when creating " + "VkDevice, the parent extension " + "(VK_NV_ray_tracing_validation) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePresentWaitFeaturesKHR* structure = (VkPhysicalDevicePresentWaitFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::presentWait), structure->presentWait); + VkPhysicalDeviceRayTracingValidationFeaturesNV* structure = (VkPhysicalDeviceRayTracingValidationFeaturesNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingValidation), structure->rayTracingValidation); } } break; - // Validation code for VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceAccelerationStructureFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceAccelerationStructureFeaturesKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_pipeline_executable_properties)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceAccelerationStructureFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_acceleration_structure)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_pipeline_executable_properties) was not included in ppEnabledExtensionNames."); + "includes a pointer to a VkPhysicalDeviceAccelerationStructureFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_acceleration_structure) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR* structure = - (VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineExecutableInfo), structure->pipelineExecutableInfo); + VkPhysicalDeviceAccelerationStructureFeaturesKHR* structure = + (VkPhysicalDeviceAccelerationStructureFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructure), structure->accelerationStructure); + + skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructureCaptureReplay), + structure->accelerationStructureCaptureReplay); + + skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructureIndirectBuild), + structure->accelerationStructureIndirectBuild); + + skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructureHostCommands), + structure->accelerationStructureHostCommands); + + skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingAccelerationStructureUpdateAfterBind), + structure->descriptorBindingAccelerationStructureUpdateAfterBind); } } break; - // Validation code for VkPipelineLibraryCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: { // Covers VUID-VkPipelineLibraryCreateInfoKHR-sType-sType + // Validation code for VkPhysicalDeviceRayTracingPipelineFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceRayTracingPipelineFeaturesKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineLibraryCreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_pipeline_library)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingPipelineFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_ray_tracing_pipeline)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_pipeline_library"); + "includes a pointer to a VkPhysicalDeviceRayTracingPipelineFeaturesKHR, but when creating " + "VkDevice, the parent extension " + "(VK_KHR_ray_tracing_pipeline) was not included in ppEnabledExtensionNames."); } - VkPipelineLibraryCreateInfoKHR* structure = (VkPipelineLibraryCreateInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::libraryCount), pNext_loc.dot(Field::pLibraries), structure->libraryCount, - &structure->pLibraries, false, true, kVUIDUndefined, - "VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-parameter"); + VkPhysicalDeviceRayTracingPipelineFeaturesKHR* structure = (VkPhysicalDeviceRayTracingPipelineFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipeline), structure->rayTracingPipeline); + + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineShaderGroupHandleCaptureReplay), + structure->rayTracingPipelineShaderGroupHandleCaptureReplay); + + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineShaderGroupHandleCaptureReplayMixed), + structure->rayTracingPipelineShaderGroupHandleCaptureReplayMixed); + + skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineTraceRaysIndirect), + structure->rayTracingPipelineTraceRaysIndirect); + + skip |= ValidateBool32(pNext_loc.dot(Field::rayTraversalPrimitiveCulling), structure->rayTraversalPrimitiveCulling); } } break; - // Validation code for VkPresentIdKHR structure members - case VK_STRUCTURE_TYPE_PRESENT_ID_KHR: { // Covers VUID-VkPresentIdKHR-sType-sType + // Validation code for VkPhysicalDeviceRayQueryFeaturesKHR structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: { // Covers + // VUID-VkPhysicalDeviceRayQueryFeaturesKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPresentIdKHR); - if (!IsExtEnabled(device_extensions.vk_khr_present_id)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_present_id"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayQueryFeaturesKHR); + if (!IsExtEnabled(device_extensions.vk_khr_ray_query)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a VkPhysicalDeviceRayQueryFeaturesKHR, but when creating VkDevice, the " + "parent extension " + "(VK_KHR_ray_query) was not included in ppEnabledExtensionNames."); } - VkPresentIdKHR* structure = (VkPresentIdKHR*)header; - skip |= - ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pPresentIds), - structure->swapchainCount, &structure->pPresentIds, true, false, - "VUID-VkPresentIdKHR-swapchainCount-arraylength", "VUID-VkPresentIdKHR-pPresentIds-parameter"); + VkPhysicalDeviceRayQueryFeaturesKHR* structure = (VkPhysicalDeviceRayQueryFeaturesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::rayQuery), structure->rayQuery); } } break; - // Validation code for VkPhysicalDevicePresentIdFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDevicePresentIdFeaturesKHR-sType-sType + // Validation code for VkPhysicalDeviceMeshShaderFeaturesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: { // Covers + // VUID-VkPhysicalDeviceMeshShaderFeaturesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePresentIdFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_present_id)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMeshShaderFeaturesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_mesh_shader)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePresentIdFeaturesKHR, but when creating VkDevice, " + "includes a pointer to a VkPhysicalDeviceMeshShaderFeaturesEXT, but when creating VkDevice, " "the parent extension " - "(VK_KHR_present_id) was not included in ppEnabledExtensionNames."); + "(VK_EXT_mesh_shader) was not included in ppEnabledExtensionNames."); } - VkPhysicalDevicePresentIdFeaturesKHR* structure = (VkPhysicalDevicePresentIdFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::presentId), structure->presentId); - } - } break; + VkPhysicalDeviceMeshShaderFeaturesEXT* structure = (VkPhysicalDeviceMeshShaderFeaturesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::taskShader), structure->taskShader); - // No Validation code for VkVideoEncodeCapabilitiesKHR structure members -- Covers - // VUID-VkVideoEncodeCapabilitiesKHR-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::meshShader), structure->meshShader); - // Validation code for VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR: { // Covers - // VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryPoolVideoEncodeFeedbackCreateInfoKHR); - VkQueryPoolVideoEncodeFeedbackCreateInfoKHR* structure = (VkQueryPoolVideoEncodeFeedbackCreateInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::encodeFeedbackFlags), vvl::FlagBitmask::VkVideoEncodeFeedbackFlagBitsKHR, - AllVkVideoEncodeFeedbackFlagBitsKHR, structure->encodeFeedbackFlags, kRequiredFlags, - "VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-encodeFeedbackFlags-parameter", - "VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-encodeFeedbackFlags-requiredbitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::multiviewMeshShader), structure->multiviewMeshShader); + + skip |= ValidateBool32(pNext_loc.dot(Field::primitiveFragmentShadingRateMeshShader), + structure->primitiveFragmentShadingRateMeshShader); + + skip |= ValidateBool32(pNext_loc.dot(Field::meshShaderQueries), structure->meshShaderQueries); } } break; - // Validation code for VkVideoEncodeUsageInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR: { // Covers VUID-VkVideoEncodeUsageInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeUsageInfoKHR); - VkVideoEncodeUsageInfoKHR* structure = (VkVideoEncodeUsageInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::videoUsageHints), vvl::FlagBitmask::VkVideoEncodeUsageFlagBitsKHR, - AllVkVideoEncodeUsageFlagBitsKHR, structure->videoUsageHints, kOptionalFlags, - "VUID-VkVideoEncodeUsageInfoKHR-videoUsageHints-parameter"); + default: + skip = false; + } + return skip; +} - skip |= ValidateFlags(pNext_loc.dot(Field::videoContentHints), vvl::FlagBitmask::VkVideoEncodeContentFlagBitsKHR, - AllVkVideoEncodeContentFlagBitsKHR, structure->videoContentHints, kOptionalFlags, - "VUID-VkVideoEncodeUsageInfoKHR-videoContentHints-parameter"); +bool StatelessValidation::ValidatePnextPropertyStructContents(const Location& loc, const VkBaseOutStructure* header, + const char* pnext_vuid, VkPhysicalDevice caller_physical_device, + bool is_const_param) const { + bool skip = false; + const bool is_physdev_api = caller_physical_device != VK_NULL_HANDLE; + switch (header->sType) { + // Validation code for VkPhysicalDeviceSubgroupProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: { // Covers VUID-VkPhysicalDeviceSubgroupProperties-sType-sType - skip |= ValidateRangedEnum(pNext_loc.dot(Field::tuningMode), vvl::Enum::VkVideoEncodeTuningModeKHR, - structure->tuningMode, "VUID-VkVideoEncodeUsageInfoKHR-tuningMode-parameter"); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_1) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES) " + "which was added in VK_API_VERSION_1_1 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } } } break; - // Validation code for VkVideoEncodeRateControlInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: { // Covers VUID-VkVideoEncodeRateControlInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeRateControlInfoKHR); - VkVideoEncodeRateControlInfoKHR* structure = (VkVideoEncodeRateControlInfoKHR*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkVideoEncodeRateControlInfoKHR-flags-zerobitmask"); + // Validation code for VkPhysicalDevicePointClippingProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: { // Covers + // VUID-VkPhysicalDevicePointClippingProperties-sType-sType - skip |= - ValidateFlags(pNext_loc.dot(Field::rateControlMode), vvl::FlagBitmask::VkVideoEncodeRateControlModeFlagBitsKHR, - AllVkVideoEncodeRateControlModeFlagBitsKHR, structure->rateControlMode, kOptionalSingleBit, - "VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-parameter"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES), but its parent extension " + "VK_KHR_maintenance2 has not been enabled."); + } + } break; - skip |= ValidateStructTypeArray(pNext_loc.dot(Field::layerCount), pNext_loc.dot(Field::pLayers), - "VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR", structure->layerCount, - structure->pLayers, VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR, - false, true, "VUID-VkVideoEncodeRateControlLayerInfoKHR-sType-sType", - "VUID-VkVideoEncodeRateControlInfoKHR-pLayers-parameter", kVUIDUndefined); + // Validation code for VkPhysicalDeviceMultiviewProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceMultiviewProperties-sType-sType - if (structure->pLayers != nullptr) { - for (uint32_t layerIndex = 0; layerIndex < structure->layerCount; ++layerIndex) { - [[maybe_unused]] const Location pLayers_loc = pNext_loc.dot(Field::pLayers, layerIndex); - } - } + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_multiview)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_multiview))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES), but its parent extension " + "VK_KHR_multiview has not been enabled."); } } break; - // No Validation code for VkVideoEncodeQualityLevelInfoKHR structure members -- Covers - // VUID-VkVideoEncodeQualityLevelInfoKHR-sType-sType - - // No Validation code for VkQueueFamilyCheckpointProperties2NV structure members -- Covers - // VUID-VkQueueFamilyCheckpointProperties2NV-sType-sType + // Validation code for VkPhysicalDeviceProtectedMemoryProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceProtectedMemoryProperties-sType-sType - // Validation code for VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_fragment_shader_barycentric) && - !IsExtEnabled(device_extensions.vk_nv_fragment_shader_barycentric)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_fragment_shader_barycentric or VK_NV_fragment_shader_barycentric) was not included " - "in ppEnabledExtensionNames."); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_1) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES) " + "which was added in VK_API_VERSION_1_1 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); } - VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR* structure = - (VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShaderBarycentric), structure->fragmentShaderBarycentric); } } break; - // No Validation code for VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR-sType-sType + // Validation code for VkPhysicalDeviceIDProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: { // Covers VUID-VkPhysicalDeviceIDProperties-sType-sType - // Validation code for VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_subgroup_uniform_control_flow)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR, but " - "when creating VkDevice, the parent extension " - "(VK_KHR_shader_subgroup_uniform_control_flow) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR* structure = - (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupUniformControlFlow), - structure->shaderSubgroupUniformControlFlow); + if (!IsExtEnabled(instance_extensions.vk_khr_external_fence_capabilities)) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES), but " + "its parent extension " + "VK_KHR_external_fence_capabilities has not been enabled."); } } break; - // Validation code for VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_workgroup_memory_explicit_layout)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_workgroup_memory_explicit_layout) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR* structure = - (VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR*)header; - skip |= - ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayout), structure->workgroupMemoryExplicitLayout); + // Validation code for VkPhysicalDeviceMaintenance3Properties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceMaintenance3Properties-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayoutScalarBlockLayout), - structure->workgroupMemoryExplicitLayoutScalarBlockLayout); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance3)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance3))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES), but its parent extension " + "VK_KHR_maintenance3 has not been enabled."); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayout8BitAccess), - structure->workgroupMemoryExplicitLayout8BitAccess); + // Validation code for VkPhysicalDeviceVulkan11Properties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceVulkan11Properties-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::workgroupMemoryExplicitLayout16BitAccess), - structure->workgroupMemoryExplicitLayout16BitAccess); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_2) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES) which " + "was added in VK_API_VERSION_1_2 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } } } break; - // Validation code for VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MAINTENANCE_1_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_ray_tracing_maintenance1)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_ray_tracing_maintenance1) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR* structure = - (VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingMaintenance1), structure->rayTracingMaintenance1); + // Validation code for VkPhysicalDeviceVulkan12Properties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceVulkan12Properties-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineTraceRaysIndirect2), - structure->rayTracingPipelineTraceRaysIndirect2); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_2) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES) which " + "was added in VK_API_VERSION_1_2 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } } } break; - // Validation code for VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_subgroup_rotate)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_shader_subgroup_rotate) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR* structure = - (VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSubgroupRotate), structure->shaderSubgroupRotate); + // Validation code for VkPhysicalDeviceDriverProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: { // Covers VUID-VkPhysicalDeviceDriverProperties-sType-sType - skip |= - ValidateBool32(pNext_loc.dot(Field::shaderSubgroupRotateClustered), structure->shaderSubgroupRotateClustered); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_driver_properties)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_driver_properties))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES), " + "but its parent extension " + "VK_KHR_driver_properties has not been enabled."); } } break; - // Validation code for VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_maximal_reconvergence)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_shader_maximal_reconvergence) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR* structure = - (VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderMaximalReconvergence), structure->shaderMaximalReconvergence); - } - } break; + // Validation code for VkPhysicalDeviceFloatControlsProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceFloatControlsProperties-sType-sType - // Validation code for VkPhysicalDeviceMaintenance5FeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceMaintenance5FeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMaintenance5FeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance5)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMaintenance5FeaturesKHR, but when creating VkDevice, " - "the parent extension " - "(VK_KHR_maintenance5) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceMaintenance5FeaturesKHR* structure = (VkPhysicalDeviceMaintenance5FeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::maintenance5), structure->maintenance5); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_float_controls)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_float_controls))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES), but its parent extension " + "VK_KHR_shader_float_controls has not been enabled."); } } break; - // No Validation code for VkPhysicalDeviceMaintenance5PropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceMaintenance5PropertiesKHR-sType-sType + // Validation code for VkPhysicalDeviceDescriptorIndexingProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceDescriptorIndexingProperties-sType-sType - // Validation code for VkPipelineCreateFlags2CreateInfoKHR structure members - case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR: { // Covers - // VUID-VkPipelineCreateFlags2CreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCreateFlags2CreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance5)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance5"); - } - VkPipelineCreateFlags2CreateInfoKHR* structure = (VkPipelineCreateFlags2CreateInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkPipelineCreateFlagBits2KHR, - AllVkPipelineCreateFlagBits2KHR, structure->flags, kRequiredFlags, - "VUID-VkPipelineCreateFlags2CreateInfoKHR-flags-parameter", - "VUID-VkPipelineCreateFlags2CreateInfoKHR-flags-requiredbitmask"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES), but its parent extension " + "VK_EXT_descriptor_indexing has not been enabled."); } } break; - // Validation code for VkBufferUsageFlags2CreateInfoKHR structure members - case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR: { // Covers VUID-VkBufferUsageFlags2CreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBufferUsageFlags2CreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance5)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance5"); - } - VkBufferUsageFlags2CreateInfoKHR* structure = (VkBufferUsageFlags2CreateInfoKHR*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::usage), vvl::FlagBitmask::VkBufferUsageFlagBits2KHR, - AllVkBufferUsageFlagBits2KHR, structure->usage, kRequiredFlags, - "VUID-VkBufferUsageFlags2CreateInfoKHR-usage-parameter", - "VUID-VkBufferUsageFlags2CreateInfoKHR-usage-requiredbitmask"); + // Validation code for VkPhysicalDeviceDepthStencilResolveProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceDepthStencilResolveProperties-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_depth_stencil_resolve)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_depth_stencil_resolve))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES), but its parent extension " + "VK_KHR_depth_stencil_resolve has not been enabled."); } } break; - // Validation code for VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_ray_tracing_position_fetch)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR, but when " - "creating VkDevice, the parent extension " - "(VK_KHR_ray_tracing_position_fetch) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR* structure = - (VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPositionFetch), structure->rayTracingPositionFetch); + // Validation code for VkPhysicalDeviceSamplerFilterMinmaxProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceSamplerFilterMinmaxProperties-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_sampler_filter_minmax)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_sampler_filter_minmax))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES), but its parent extension " + "VK_EXT_sampler_filter_minmax has not been enabled."); } } break; - // Validation code for VkPhysicalDeviceCooperativeMatrixFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceCooperativeMatrixFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCooperativeMatrixFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_cooperative_matrix)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCooperativeMatrixFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_cooperative_matrix) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceCooperativeMatrixFeaturesKHR* structure = (VkPhysicalDeviceCooperativeMatrixFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrix), structure->cooperativeMatrix); + // Validation code for VkPhysicalDeviceTimelineSemaphoreProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceTimelineSemaphoreProperties-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrixRobustBufferAccess), - structure->cooperativeMatrixRobustBufferAccess); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES), but its parent extension " + "VK_KHR_timeline_semaphore has not been enabled."); } } break; - // No Validation code for VkPhysicalDeviceCooperativeMatrixPropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceCooperativeMatrixPropertiesKHR-sType-sType + // Validation code for VkPhysicalDeviceVulkan13Properties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceVulkan13Properties-sType-sType - // Validation code for VkVideoDecodeAV1ProfileInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR: { // Covers VUID-VkVideoDecodeAV1ProfileInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1ProfileInfoKHR); - VkVideoDecodeAV1ProfileInfoKHR* structure = (VkVideoDecodeAV1ProfileInfoKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::filmGrainSupport), structure->filmGrainSupport); + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_3) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES) which " + "was added in VK_API_VERSION_1_3 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); + } } } break; - // No Validation code for VkVideoDecodeAV1CapabilitiesKHR structure members -- Covers - // VUID-VkVideoDecodeAV1CapabilitiesKHR-sType-sType + // Validation code for VkPhysicalDeviceSubgroupSizeControlProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceSubgroupSizeControlProperties-sType-sType - // Validation code for VkVideoDecodeAV1SessionParametersCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers - // VUID-VkVideoDecodeAV1SessionParametersCreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1SessionParametersCreateInfoKHR); - VkVideoDecodeAV1SessionParametersCreateInfoKHR* structure = (VkVideoDecodeAV1SessionParametersCreateInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdSequenceHeader), structure->pStdSequenceHeader, - "VUID-VkVideoDecodeAV1SessionParametersCreateInfoKHR-pStdSequenceHeader-parameter"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_subgroup_size_control)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_subgroup_size_control))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES), but its parent extension " + "VK_EXT_subgroup_size_control has not been enabled."); } } break; - // Validation code for VkVideoDecodeAV1PictureInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR: { // Covers VUID-VkVideoDecodeAV1PictureInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1PictureInfoKHR); - VkVideoDecodeAV1PictureInfoKHR* structure = (VkVideoDecodeAV1PictureInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, - "VUID-VkVideoDecodeAV1PictureInfoKHR-pStdPictureInfo-parameter"); + // Validation code for VkPhysicalDeviceInlineUniformBlockProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceInlineUniformBlockProperties-sType-sType - skip |= - ValidateArray(pNext_loc.dot(Field::tileCount), pNext_loc.dot(Field::pTileOffsets), structure->tileCount, - &structure->pTileOffsets, true, true, "VUID-VkVideoDecodeAV1PictureInfoKHR-tileCount-arraylength", - "VUID-VkVideoDecodeAV1PictureInfoKHR-pTileOffsets-parameter"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES), but its parent extension " + "VK_EXT_inline_uniform_block has not been enabled."); + } + } break; + // Validation code for VkPhysicalDeviceShaderIntegerDotProductProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceShaderIntegerDotProductProperties-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_shader_integer_dot_product)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_shader_integer_dot_product))) { skip |= - ValidateArray(pNext_loc.dot(Field::tileCount), pNext_loc.dot(Field::pTileSizes), structure->tileCount, - &structure->pTileSizes, true, true, "VUID-VkVideoDecodeAV1PictureInfoKHR-tileCount-arraylength", - "VUID-VkVideoDecodeAV1PictureInfoKHR-pTileSizes-parameter"); + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES), but its parent extension " + "VK_KHR_shader_integer_dot_product has not been enabled."); } } break; - // Validation code for VkVideoDecodeAV1DpbSlotInfoKHR structure members - case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoDecodeAV1DpbSlotInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1DpbSlotInfoKHR); - VkVideoDecodeAV1DpbSlotInfoKHR* structure = (VkVideoDecodeAV1DpbSlotInfoKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, - "VUID-VkVideoDecodeAV1DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + // Validation code for VkPhysicalDeviceTexelBufferAlignmentProperties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceTexelBufferAlignmentProperties-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_texel_buffer_alignment)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_texel_buffer_alignment))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES), but its parent extension " + "VK_EXT_texel_buffer_alignment has not been enabled."); } } break; - // Validation code for VkPhysicalDeviceVideoMaintenance1FeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceVideoMaintenance1FeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVideoMaintenance1FeaturesKHR); - VkPhysicalDeviceVideoMaintenance1FeaturesKHR* structure = (VkPhysicalDeviceVideoMaintenance1FeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::videoMaintenance1), structure->videoMaintenance1); + // Validation code for VkPhysicalDeviceMaintenance4Properties structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: { // Covers + // VUID-VkPhysicalDeviceMaintenance4Properties-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance4)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance4))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES), but its parent extension " + "VK_KHR_maintenance4 has not been enabled."); } } break; - // No Validation code for VkVideoInlineQueryInfoKHR structure members -- Covers VUID-VkVideoInlineQueryInfoKHR-sType-sType + // No Validation code for VkPhysicalDevicePushDescriptorPropertiesKHR structure members -- Covers + // VUID-VkPhysicalDevicePushDescriptorPropertiesKHR-sType-sType + + // No Validation code for VkPhysicalDevicePerformanceQueryPropertiesKHR structure members -- Covers + // VUID-VkPhysicalDevicePerformanceQueryPropertiesKHR-sType-sType +#ifdef VK_ENABLE_BETA_EXTENSIONS + + // No Validation code for VkPhysicalDevicePortabilitySubsetPropertiesKHR structure members -- Covers + // VUID-VkPhysicalDevicePortabilitySubsetPropertiesKHR-sType-sType +#endif // VK_ENABLE_BETA_EXTENSIONS + + // No Validation code for VkPhysicalDeviceFragmentShadingRatePropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceFragmentShadingRatePropertiesKHR-sType-sType + + // No Validation code for VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceFragmentShaderBarycentricPropertiesKHR-sType-sType + + // No Validation code for VkPhysicalDeviceMaintenance5PropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceMaintenance5PropertiesKHR-sType-sType + + // No Validation code for VkPhysicalDeviceCooperativeMatrixPropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceCooperativeMatrixPropertiesKHR-sType-sType // No Validation code for VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR structure members -- Covers // VUID-VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR-sType-sType - // Validation code for VkPipelineVertexInputDivisorStateCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR: { // Covers - // VUID-VkPipelineVertexInputDivisorStateCreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineVertexInputDivisorStateCreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_vertex_attribute_divisor) && - !IsExtEnabled(device_extensions.vk_ext_vertex_attribute_divisor)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_vertex_attribute_divisor or " - "VK_EXT_vertex_attribute_divisor"); - } - VkPipelineVertexInputDivisorStateCreateInfoKHR* structure = (VkPipelineVertexInputDivisorStateCreateInfoKHR*)header; - skip |= ValidateArray(pNext_loc.dot(Field::vertexBindingDivisorCount), pNext_loc.dot(Field::pVertexBindingDivisors), - structure->vertexBindingDivisorCount, &structure->pVertexBindingDivisors, true, true, - "VUID-VkPipelineVertexInputDivisorStateCreateInfoKHR-vertexBindingDivisorCount-arraylength", - "VUID-VkPipelineVertexInputDivisorStateCreateInfoKHR-pVertexBindingDivisors-parameter"); + // No Validation code for VkPhysicalDeviceLineRasterizationPropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceLineRasterizationPropertiesKHR-sType-sType - if (structure->pVertexBindingDivisors != nullptr) { - for (uint32_t vertexBindingDivisorIndex = 0; vertexBindingDivisorIndex < structure->vertexBindingDivisorCount; - ++vertexBindingDivisorIndex) { - [[maybe_unused]] const Location pVertexBindingDivisors_loc = - pNext_loc.dot(Field::pVertexBindingDivisors, vertexBindingDivisorIndex); - } - } - } - } break; + // No Validation code for VkPhysicalDeviceMaintenance6PropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceMaintenance6PropertiesKHR-sType-sType - // Validation code for VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_vertex_attribute_divisor) && - !IsExtEnabled(device_extensions.vk_ext_vertex_attribute_divisor)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_vertex_attribute_divisor or VK_EXT_vertex_attribute_divisor) was not included in " - "ppEnabledExtensionNames."); - } - VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR* structure = - (VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::vertexAttributeInstanceRateDivisor), - structure->vertexAttributeInstanceRateDivisor); + // No Validation code for VkPhysicalDeviceTransformFeedbackPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceTransformFeedbackPropertiesEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::vertexAttributeInstanceRateZeroDivisor), - structure->vertexAttributeInstanceRateZeroDivisor); - } - } break; + // No Validation code for VkPhysicalDevicePipelineRobustnessPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDevicePipelineRobustnessPropertiesEXT-sType-sType - // Validation code for VkPhysicalDeviceShaderFloatControls2FeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderFloatControls2FeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderFloatControls2FeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_float_controls2)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderFloatControls2FeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_shader_float_controls2) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderFloatControls2FeaturesKHR* structure = - (VkPhysicalDeviceShaderFloatControls2FeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloatControls2), structure->shaderFloatControls2); - } - } break; + // No Validation code for VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX structure members -- Covers + // VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-sType-sType - // Validation code for VkPhysicalDeviceIndexTypeUint8FeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceIndexTypeUint8FeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceIndexTypeUint8FeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_index_type_uint8) && - !IsExtEnabled(device_extensions.vk_ext_index_type_uint8)) { - skip |= LogError( - pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceIndexTypeUint8FeaturesKHR, but when creating VkDevice, the parent " - "extension " - "(VK_KHR_index_type_uint8 or VK_EXT_index_type_uint8) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceIndexTypeUint8FeaturesKHR* structure = (VkPhysicalDeviceIndexTypeUint8FeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::indexTypeUint8), structure->indexTypeUint8); - } - } break; + // No Validation code for VkPhysicalDeviceDiscardRectanglePropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-sType-sType - // Validation code for VkPhysicalDeviceLineRasterizationFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceLineRasterizationFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceLineRasterizationFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_line_rasterization) && - !IsExtEnabled(device_extensions.vk_ext_line_rasterization)) { - skip |= LogError( - pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceLineRasterizationFeaturesKHR, but when creating VkDevice, the " - "parent extension " - "(VK_KHR_line_rasterization or VK_EXT_line_rasterization) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceLineRasterizationFeaturesKHR* structure = (VkPhysicalDeviceLineRasterizationFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rectangularLines), structure->rectangularLines); + // No Validation code for VkPhysicalDeviceConservativeRasterizationPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceConservativeRasterizationPropertiesEXT-sType-sType +#ifdef VK_ENABLE_BETA_EXTENSIONS - skip |= ValidateBool32(pNext_loc.dot(Field::bresenhamLines), structure->bresenhamLines); + // No Validation code for VkPhysicalDeviceShaderEnqueuePropertiesAMDX structure members -- Covers + // VUID-VkPhysicalDeviceShaderEnqueuePropertiesAMDX-sType-sType +#endif // VK_ENABLE_BETA_EXTENSIONS - skip |= ValidateBool32(pNext_loc.dot(Field::smoothLines), structure->smoothLines); + // No Validation code for VkPhysicalDeviceSampleLocationsPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::stippledRectangularLines), structure->stippledRectangularLines); + // No Validation code for VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::stippledBresenhamLines), structure->stippledBresenhamLines); + // No Validation code for VkPhysicalDeviceShaderSMBuiltinsPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceShaderSMBuiltinsPropertiesNV-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::stippledSmoothLines), structure->stippledSmoothLines); - } - } break; + // No Validation code for VkPhysicalDeviceShadingRateImagePropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceShadingRateImagePropertiesNV-sType-sType - // No Validation code for VkPhysicalDeviceLineRasterizationPropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceLineRasterizationPropertiesKHR-sType-sType + // No Validation code for VkPhysicalDeviceRayTracingPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceRayTracingPropertiesNV-sType-sType - // Validation code for VkPipelineRasterizationLineStateCreateInfoKHR structure members - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR: { // Covers - // VUID-VkPipelineRasterizationLineStateCreateInfoKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationLineStateCreateInfoKHR); - if (!IsExtEnabled(device_extensions.vk_khr_line_rasterization) && - !IsExtEnabled(device_extensions.vk_ext_line_rasterization)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_KHR_line_rasterization or VK_EXT_line_rasterization"); - } - VkPipelineRasterizationLineStateCreateInfoKHR* structure = (VkPipelineRasterizationLineStateCreateInfoKHR*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::lineRasterizationMode), vvl::Enum::VkLineRasterizationModeKHR, - structure->lineRasterizationMode, - "VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-parameter"); + // No Validation code for VkPhysicalDeviceExternalMemoryHostPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceExternalMemoryHostPropertiesEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::stippledLineEnable), structure->stippledLineEnable); - } - } break; + // No Validation code for VkPhysicalDeviceShaderCorePropertiesAMD structure members -- Covers + // VUID-VkPhysicalDeviceShaderCorePropertiesAMD-sType-sType - // Validation code for VkPhysicalDeviceShaderExpectAssumeFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceShaderExpectAssumeFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderExpectAssumeFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_shader_expect_assume)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderExpectAssumeFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_shader_expect_assume) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderExpectAssumeFeaturesKHR* structure = (VkPhysicalDeviceShaderExpectAssumeFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderExpectAssume), structure->shaderExpectAssume); - } - } break; + // No Validation code for VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT-sType-sType - // Validation code for VkPhysicalDeviceMaintenance6FeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceMaintenance6FeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMaintenance6FeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance6)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMaintenance6FeaturesKHR, but when creating VkDevice, " - "the parent extension " - "(VK_KHR_maintenance6) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceMaintenance6FeaturesKHR* structure = (VkPhysicalDeviceMaintenance6FeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::maintenance6), structure->maintenance6); - } - } break; + // No Validation code for VkPhysicalDeviceMeshShaderPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceMeshShaderPropertiesNV-sType-sType - // No Validation code for VkPhysicalDeviceMaintenance6PropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceMaintenance6PropertiesKHR-sType-sType + // No Validation code for VkPhysicalDevicePCIBusInfoPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDevicePCIBusInfoPropertiesEXT-sType-sType - // Validation code for VkBindMemoryStatusKHR structure members - case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR: { // Covers VUID-VkBindMemoryStatusKHR-sType-sType + // No Validation code for VkPhysicalDeviceFragmentDensityMapPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceFragmentDensityMapPropertiesEXT-sType-sType + + // No Validation code for VkPhysicalDeviceShaderCoreProperties2AMD structure members -- Covers + // VUID-VkPhysicalDeviceShaderCoreProperties2AMD-sType-sType + + // No Validation code for VkPhysicalDeviceCooperativeMatrixPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceCooperativeMatrixPropertiesNV-sType-sType + + // No Validation code for VkPhysicalDeviceProvokingVertexPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceProvokingVertexPropertiesEXT-sType-sType + + // Validation code for VkPhysicalDeviceHostImageCopyPropertiesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT: { // Covers + // VUID-VkPhysicalDeviceHostImageCopyPropertiesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindMemoryStatusKHR); - if (!IsExtEnabled(device_extensions.vk_khr_maintenance6)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceHostImageCopyPropertiesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_host_image_copy)) { skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance6"); + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_host_image_copy"); } - VkBindMemoryStatusKHR* structure = (VkBindMemoryStatusKHR*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pResult), structure->pResult, - "VUID-VkBindMemoryStatusKHR-pResult-parameter"); + VkPhysicalDeviceHostImageCopyPropertiesEXT* structure = (VkPhysicalDeviceHostImageCopyPropertiesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::identicalMemoryTypeRequirements), + structure->identicalMemoryTypeRequirements); } } break; - // Validation code for VkDebugReportCallbackCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: { // Covers - // VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDebugReportCallbackCreateInfoEXT); - VkDebugReportCallbackCreateInfoEXT* structure = (VkDebugReportCallbackCreateInfoEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkDebugReportFlagBitsEXT, - AllVkDebugReportFlagBitsEXT, structure->flags, kOptionalFlags, - "VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter"); + // No Validation code for VkPhysicalDeviceMapMemoryPlacedPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceMapMemoryPlacedPropertiesEXT-sType-sType - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pfnCallback), - reinterpret_cast(structure->pfnCallback), - "VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-parameter"); - } - } break; + // No Validation code for VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV-sType-sType - // Validation code for VkPipelineRasterizationStateRasterizationOrderAMD structure members - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: { // Covers - // VUID-VkPipelineRasterizationStateRasterizationOrderAMD-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationStateRasterizationOrderAMD); - if (!IsExtEnabled(device_extensions.vk_amd_rasterization_order)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_AMD_rasterization_order"); - } - VkPipelineRasterizationStateRasterizationOrderAMD* structure = - (VkPipelineRasterizationStateRasterizationOrderAMD*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::rasterizationOrder), vvl::Enum::VkRasterizationOrderAMD, - structure->rasterizationOrder, - "VUID-VkPipelineRasterizationStateRasterizationOrderAMD-rasterizationOrder-parameter"); - } - } break; + // No Validation code for VkPhysicalDeviceRobustness2PropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceRobustness2PropertiesEXT-sType-sType - // Validation code for VkDedicatedAllocationImageCreateInfoNV structure members - case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: { // Covers - // VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType + // No Validation code for VkPhysicalDeviceCustomBorderColorPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceCustomBorderColorPropertiesEXT-sType-sType + + // No Validation code for VkPhysicalDeviceCudaKernelLaunchPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceCudaKernelLaunchPropertiesNV-sType-sType + + // No Validation code for VkPhysicalDeviceDescriptorBufferPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceDescriptorBufferPropertiesEXT-sType-sType + + // No Validation code for VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT-sType-sType + + // Validation code for VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: { // Covers + // VUID-VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDedicatedAllocationImageCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_dedicated_allocation)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_graphics_pipeline_library)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_dedicated_allocation"); + "extended struct requires the extensions VK_EXT_graphics_pipeline_library"); } - VkDedicatedAllocationImageCreateInfoNV* structure = (VkDedicatedAllocationImageCreateInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dedicatedAllocation), structure->dedicatedAllocation); + VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT* structure = + (VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::graphicsPipelineLibraryFastLinking), + structure->graphicsPipelineLibraryFastLinking); + + skip |= ValidateBool32(pNext_loc.dot(Field::graphicsPipelineLibraryIndependentInterpolationDecoration), + structure->graphicsPipelineLibraryIndependentInterpolationDecoration); } } break; - // Validation code for VkDedicatedAllocationBufferCreateInfoNV structure members - case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: { // Covers - // VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType + // Validation code for VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV: { // Covers + // VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDedicatedAllocationBufferCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_dedicated_allocation)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV); + if (!IsExtEnabled(device_extensions.vk_nv_fragment_shading_rate_enums)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_dedicated_allocation"); + "extended struct requires the extensions VK_NV_fragment_shading_rate_enums"); } - VkDedicatedAllocationBufferCreateInfoNV* structure = (VkDedicatedAllocationBufferCreateInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dedicatedAllocation), structure->dedicatedAllocation); + VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV* structure = + (VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV*)header; + skip |= ValidateFlags( + pNext_loc.dot(Field::maxFragmentShadingRateInvocationCount), vvl::FlagBitmask::VkSampleCountFlagBits, + AllVkSampleCountFlagBits, structure->maxFragmentShadingRateInvocationCount, kRequiredSingleBit, + "VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-maxFragmentShadingRateInvocationCount-parameter", + "VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-maxFragmentShadingRateInvocationCount-parameter"); } } break; - // No Validation code for VkDedicatedAllocationMemoryAllocateInfoNV structure members -- Covers - // VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType + // No Validation code for VkPhysicalDeviceFragmentDensityMap2PropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceFragmentDensityMap2PropertiesEXT-sType-sType - // Validation code for VkPhysicalDeviceTransformFeedbackFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceTransformFeedbackFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTransformFeedbackFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_transform_feedback)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceTransformFeedbackFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_transform_feedback) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceTransformFeedbackFeaturesEXT* structure = (VkPhysicalDeviceTransformFeedbackFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::transformFeedback), structure->transformFeedback); + // No Validation code for VkPhysicalDeviceDrmPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceDrmPropertiesEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::geometryStreams), structure->geometryStreams); - } - } break; + // No Validation code for VkPhysicalDeviceSubpassShadingPropertiesHUAWEI structure members -- Covers + // VUID-VkPhysicalDeviceSubpassShadingPropertiesHUAWEI-sType-sType - // No Validation code for VkPhysicalDeviceTransformFeedbackPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceTransformFeedbackPropertiesEXT-sType-sType + // No Validation code for VkPhysicalDeviceMultiDrawPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceMultiDrawPropertiesEXT-sType-sType - // Validation code for VkPipelineRasterizationStateStreamCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationStateStreamCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_transform_feedback)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_transform_feedback"); - } - VkPipelineRasterizationStateStreamCreateInfoEXT* structure = - (VkPipelineRasterizationStateStreamCreateInfoEXT*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-flags-zerobitmask"); - } - } break; + // No Validation code for VkPhysicalDeviceShaderTileImagePropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceShaderTileImagePropertiesEXT-sType-sType - // No Validation code for VkTextureLODGatherFormatPropertiesAMD structure members -- Covers - // VUID-VkTextureLODGatherFormatPropertiesAMD-sType-sType + // No Validation code for VkPhysicalDeviceOpacityMicromapPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceOpacityMicromapPropertiesEXT-sType-sType +#ifdef VK_ENABLE_BETA_EXTENSIONS - // Validation code for VkPhysicalDeviceCornerSampledImageFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceCornerSampledImageFeaturesNV-sType-sType + // No Validation code for VkPhysicalDeviceDisplacementMicromapPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceDisplacementMicromapPropertiesNV-sType-sType +#endif // VK_ENABLE_BETA_EXTENSIONS + + // No Validation code for VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI structure members -- Covers + // VUID-VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI-sType-sType + + // No Validation code for VkPhysicalDeviceShaderCorePropertiesARM structure members -- Covers + // VUID-VkPhysicalDeviceShaderCorePropertiesARM-sType-sType + + // Validation code for VkPhysicalDeviceSchedulingControlsPropertiesARM structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM: { // Covers + // VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCornerSampledImageFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_corner_sampled_image)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSchedulingControlsPropertiesARM); + if (!IsExtEnabled(device_extensions.vk_arm_scheduling_controls)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCornerSampledImageFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_corner_sampled_image) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_ARM_scheduling_controls"); } - VkPhysicalDeviceCornerSampledImageFeaturesNV* structure = (VkPhysicalDeviceCornerSampledImageFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::cornerSampledImage), structure->cornerSampledImage); + VkPhysicalDeviceSchedulingControlsPropertiesARM* structure = + (VkPhysicalDeviceSchedulingControlsPropertiesARM*)header; + skip |= ValidateFlags( + pNext_loc.dot(Field::schedulingControlsFlags), vvl::FlagBitmask::VkPhysicalDeviceSchedulingControlsFlagBitsARM, + AllVkPhysicalDeviceSchedulingControlsFlagBitsARM, structure->schedulingControlsFlags, kRequiredFlags, + "VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-schedulingControlsFlags-parameter", + "VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-schedulingControlsFlags-requiredbitmask"); } } break; - // Validation code for VkExternalMemoryImageCreateInfoNV structure members - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: { // Covers VUID-VkExternalMemoryImageCreateInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryImageCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_external_memory)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_external_memory"); - } - VkExternalMemoryImageCreateInfoNV* structure = (VkExternalMemoryImageCreateInfoNV*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBitsNV, - AllVkExternalMemoryHandleTypeFlagBitsNV, structure->handleTypes, kOptionalFlags, - "VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter"); - } - } break; + // No Validation code for VkPhysicalDeviceRenderPassStripedPropertiesARM structure members -- Covers + // VUID-VkPhysicalDeviceRenderPassStripedPropertiesARM-sType-sType - // Validation code for VkExportMemoryAllocateInfoNV structure members - case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: { // Covers VUID-VkExportMemoryAllocateInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMemoryAllocateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_external_memory)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_external_memory"); - } - VkExportMemoryAllocateInfoNV* structure = (VkExportMemoryAllocateInfoNV*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBitsNV, - AllVkExternalMemoryHandleTypeFlagBitsNV, structure->handleTypes, kOptionalFlags, - "VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter"); - } - } break; -#ifdef VK_USE_PLATFORM_WIN32_KHR + // No Validation code for VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM structure members -- Covers + // VUID-VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM-sType-sType - // Validation code for VkImportMemoryWin32HandleInfoNV structure members - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: { // Covers VUID-VkImportMemoryWin32HandleInfoNV-sType-sType + // No Validation code for VkPhysicalDeviceCopyMemoryIndirectPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceCopyMemoryIndirectPropertiesNV-sType-sType + + // No Validation code for VkPhysicalDeviceMemoryDecompressionPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceMemoryDecompressionPropertiesNV-sType-sType + + // No Validation code for VkPhysicalDeviceImageProcessingPropertiesQCOM structure members -- Covers + // VUID-VkPhysicalDeviceImageProcessingPropertiesQCOM-sType-sType + + // No Validation code for VkPhysicalDeviceNestedCommandBufferPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceNestedCommandBufferPropertiesEXT-sType-sType + + // Validation code for VkPhysicalDeviceExtendedDynamicState3PropertiesEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT: { // Covers + // VUID-VkPhysicalDeviceExtendedDynamicState3PropertiesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryWin32HandleInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_external_memory_win32)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicState3PropertiesEXT); + if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state3)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_external_memory_win32"); + "extended struct requires the extensions VK_EXT_extended_dynamic_state3"); } - VkImportMemoryWin32HandleInfoNV* structure = (VkImportMemoryWin32HandleInfoNV*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBitsNV, - AllVkExternalMemoryHandleTypeFlagBitsNV, structure->handleType, kOptionalFlags, - "VUID-VkImportMemoryWin32HandleInfoNV-handleType-parameter"); + VkPhysicalDeviceExtendedDynamicState3PropertiesEXT* structure = + (VkPhysicalDeviceExtendedDynamicState3PropertiesEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dynamicPrimitiveTopologyUnrestricted), + structure->dynamicPrimitiveTopologyUnrestricted); } } break; - // No Validation code for VkExportMemoryWin32HandleInfoNV structure members -- Covers - // VUID-VkExportMemoryWin32HandleInfoNV-sType-sType + // No Validation code for VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT-sType-sType - // Validation code for VkWin32KeyedMutexAcquireReleaseInfoNV structure members - case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: { // Covers - // VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWin32KeyedMutexAcquireReleaseInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_win32_keyed_mutex)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_win32_keyed_mutex"); - } - VkWin32KeyedMutexAcquireReleaseInfoNV* structure = (VkWin32KeyedMutexAcquireReleaseInfoNV*)header; - skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireSyncs), - structure->acquireCount, &structure->pAcquireSyncs, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireSyncs-parameter"); + // No Validation code for VkPhysicalDeviceOpticalFlowPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceOpticalFlowPropertiesNV-sType-sType +#ifdef VK_USE_PLATFORM_ANDROID_KHR - skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireKeys), - structure->acquireCount, &structure->pAcquireKeys, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireKeys-parameter"); + // No Validation code for VkPhysicalDeviceExternalFormatResolvePropertiesANDROID structure members -- Covers + // VUID-VkPhysicalDeviceExternalFormatResolvePropertiesANDROID-sType-sType +#endif // VK_USE_PLATFORM_ANDROID_KHR - skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireTimeoutMilliseconds), - structure->acquireCount, &structure->pAcquireTimeoutMilliseconds, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireTimeoutMilliseconds-parameter"); + // No Validation code for VkPhysicalDeviceShaderObjectPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceShaderObjectPropertiesEXT-sType-sType - skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseSyncs), - structure->releaseCount, &structure->pReleaseSyncs, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseSyncs-parameter"); + // No Validation code for VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV-sType-sType - skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseKeys), - structure->releaseCount, &structure->pReleaseKeys, false, true, kVUIDUndefined, - "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseKeys-parameter"); - } - } break; -#endif // VK_USE_PLATFORM_WIN32_KHR + // No Validation code for VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV structure members -- Covers + // VUID-VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV-sType-sType - // Validation code for VkValidationFlagsEXT structure members - case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: { // Covers VUID-VkValidationFlagsEXT-sType-sType + // No Validation code for VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM structure members -- Covers + // VUID-VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM-sType-sType + + // No Validation code for VkPhysicalDeviceImageProcessing2PropertiesQCOM structure members -- Covers + // VUID-VkPhysicalDeviceImageProcessing2PropertiesQCOM-sType-sType + + // No Validation code for VkPhysicalDeviceLayeredDriverPropertiesMSFT structure members -- Covers + // VUID-VkPhysicalDeviceLayeredDriverPropertiesMSFT-sType-sType + + // No Validation code for VkPhysicalDeviceAccelerationStructurePropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceAccelerationStructurePropertiesKHR-sType-sType + + // No Validation code for VkPhysicalDeviceRayTracingPipelinePropertiesKHR structure members -- Covers + // VUID-VkPhysicalDeviceRayTracingPipelinePropertiesKHR-sType-sType + + // No Validation code for VkPhysicalDeviceMeshShaderPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceMeshShaderPropertiesEXT-sType-sType + + default: + skip = false; + } + return skip; +} + +// All structs that are not a Feature or Property struct +bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const VkBaseOutStructure* header, const char* pnext_vuid, + VkPhysicalDevice caller_physical_device, bool is_const_param) const { + bool skip = false; + const bool is_physdev_api = caller_physical_device != VK_NULL_HANDLE; + switch (header->sType) { + // Validation code for VkShaderModuleCreateInfo structure members + case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: { // Covers VUID-VkShaderModuleCreateInfo-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkValidationFlagsEXT); - VkValidationFlagsEXT* structure = (VkValidationFlagsEXT*)header; - skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::disabledValidationCheckCount), - pNext_loc.dot(Field::pDisabledValidationChecks), vvl::Enum::VkValidationCheckEXT, - structure->disabledValidationCheckCount, structure->pDisabledValidationChecks, true, - true, "VUID-VkValidationFlagsEXT-disabledValidationCheckCount-arraylength", - "VUID-VkValidationFlagsEXT-pDisabledValidationChecks-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkShaderModuleCreateInfo); + VkShaderModuleCreateInfo* structure = (VkShaderModuleCreateInfo*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkShaderModuleCreateInfo-flags-zerobitmask"); + + skip |= ValidateArray(pNext_loc.dot(Field::codeSize), pNext_loc.dot(Field::pCode), structure->codeSize / 4, + &structure->pCode, true, true, "VUID-VkShaderModuleCreateInfo-codeSize-01085", + "VUID-VkShaderModuleCreateInfo-pCode-parameter"); } } break; - // Validation code for VkImageViewASTCDecodeModeEXT structure members - case VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT: { // Covers VUID-VkImageViewASTCDecodeModeEXT-sType-sType + // Validation code for VkPipelineLayoutCreateInfo structure members + case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: { // Covers VUID-VkPipelineLayoutCreateInfo-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageViewASTCDecodeModeEXT); - if (!IsExtEnabled(device_extensions.vk_ext_astc_decode_mode)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_astc_decode_mode"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineLayoutCreateInfo); + VkPipelineLayoutCreateInfo* structure = (VkPipelineLayoutCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkPipelineLayoutCreateFlagBits, + AllVkPipelineLayoutCreateFlagBits, structure->flags, kOptionalFlags, + "VUID-VkPipelineLayoutCreateInfo-flags-parameter"); + + skip |= ValidateArray(pNext_loc.dot(Field::pushConstantRangeCount), pNext_loc.dot(Field::pPushConstantRanges), + structure->pushConstantRangeCount, &structure->pPushConstantRanges, false, true, + kVUIDUndefined, "VUID-VkPipelineLayoutCreateInfo-pPushConstantRanges-parameter"); + + if (structure->pPushConstantRanges != nullptr) { + for (uint32_t pushConstantRangeIndex = 0; pushConstantRangeIndex < structure->pushConstantRangeCount; + ++pushConstantRangeIndex) { + [[maybe_unused]] const Location pPushConstantRanges_loc = + pNext_loc.dot(Field::pPushConstantRanges, pushConstantRangeIndex); + skip |= ValidateFlags(pPushConstantRanges_loc.dot(Field::stageFlags), + vvl::FlagBitmask::VkShaderStageFlagBits, AllVkShaderStageFlagBits, + structure->pPushConstantRanges[pushConstantRangeIndex].stageFlags, kRequiredFlags, + "VUID-VkPushConstantRange-stageFlags-parameter", + "VUID-VkPushConstantRange-stageFlags-requiredbitmask"); + } } - VkImageViewASTCDecodeModeEXT* structure = (VkImageViewASTCDecodeModeEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::decodeMode), vvl::Enum::VkFormat, structure->decodeMode, - "VUID-VkImageViewASTCDecodeModeEXT-decodeMode-parameter"); } } break; - // Validation code for VkPhysicalDeviceASTCDecodeFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceASTCDecodeFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceASTCDecodeFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_astc_decode_mode)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceASTCDecodeFeaturesEXT, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_astc_decode_mode) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceASTCDecodeFeaturesEXT* structure = (VkPhysicalDeviceASTCDecodeFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::decodeModeSharedExponent), structure->decodeModeSharedExponent); + // Validation code for VkMemoryDedicatedRequirements structure members + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: { // Covers VUID-VkMemoryDedicatedRequirements-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dedicated_allocation)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dedicated_allocation))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS), but " + "its parent extension " + "VK_KHR_dedicated_allocation has not been enabled."); } } break; - // Validation code for VkPhysicalDevicePipelineRobustnessFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePipelineRobustnessFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelineRobustnessFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_robustness)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePipelineRobustnessFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_pipeline_robustness) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDevicePipelineRobustnessFeaturesEXT* structure = (VkPhysicalDevicePipelineRobustnessFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineRobustness), structure->pipelineRobustness); + // Validation code for VkMemoryDedicatedAllocateInfo structure members + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: { // Covers VUID-VkMemoryDedicatedAllocateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dedicated_allocation)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dedicated_allocation))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO), but " + "its parent extension " + "VK_KHR_dedicated_allocation has not been enabled."); } } break; - // No Validation code for VkPhysicalDevicePipelineRobustnessPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDevicePipelineRobustnessPropertiesEXT-sType-sType + // Validation code for VkMemoryAllocateFlagsInfo structure members + case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: { // Covers VUID-VkMemoryAllocateFlagsInfo-sType-sType - // Validation code for VkPipelineRobustnessCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT: { // Covers VUID-VkPipelineRobustnessCreateInfoEXT-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO), but its " + "parent extension " + "VK_KHR_device_group has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRobustnessCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_robustness)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_pipeline_robustness"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMemoryAllocateFlagsInfo); + if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); } - VkPipelineRobustnessCreateInfoEXT* structure = (VkPipelineRobustnessCreateInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::storageBuffers), vvl::Enum::VkPipelineRobustnessBufferBehaviorEXT, - structure->storageBuffers, - "VUID-VkPipelineRobustnessCreateInfoEXT-storageBuffers-parameter"); + VkMemoryAllocateFlagsInfo* structure = (VkMemoryAllocateFlagsInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkMemoryAllocateFlagBits, + AllVkMemoryAllocateFlagBits, structure->flags, kOptionalFlags, + "VUID-VkMemoryAllocateFlagsInfo-flags-parameter"); + } + } break; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::uniformBuffers), vvl::Enum::VkPipelineRobustnessBufferBehaviorEXT, - structure->uniformBuffers, - "VUID-VkPipelineRobustnessCreateInfoEXT-uniformBuffers-parameter"); + // Validation code for VkDeviceGroupRenderPassBeginInfo structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: { // Covers VUID-VkDeviceGroupRenderPassBeginInfo-sType-sType - skip |= - ValidateRangedEnum(pNext_loc.dot(Field::vertexInputs), vvl::Enum::VkPipelineRobustnessBufferBehaviorEXT, - structure->vertexInputs, "VUID-VkPipelineRobustnessCreateInfoEXT-vertexInputs-parameter"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO), " + "but its parent extension " + "VK_KHR_device_group has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupRenderPassBeginInfo); + if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); + } + VkDeviceGroupRenderPassBeginInfo* structure = (VkDeviceGroupRenderPassBeginInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::deviceRenderAreaCount), pNext_loc.dot(Field::pDeviceRenderAreas), + structure->deviceRenderAreaCount, &structure->pDeviceRenderAreas, false, true, kVUIDUndefined, + "VUID-VkDeviceGroupRenderPassBeginInfo-pDeviceRenderAreas-parameter"); - skip |= ValidateRangedEnum(pNext_loc.dot(Field::images), vvl::Enum::VkPipelineRobustnessImageBehaviorEXT, - structure->images, "VUID-VkPipelineRobustnessCreateInfoEXT-images-parameter"); + if (structure->pDeviceRenderAreas != nullptr) { + for (uint32_t deviceRenderAreaIndex = 0; deviceRenderAreaIndex < structure->deviceRenderAreaCount; + ++deviceRenderAreaIndex) { + [[maybe_unused]] const Location pDeviceRenderAreas_loc = + pNext_loc.dot(Field::pDeviceRenderAreas, deviceRenderAreaIndex); + } + } } } break; - // Validation code for VkPhysicalDeviceConditionalRenderingFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceConditionalRenderingFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceConditionalRenderingFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_conditional_rendering)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceConditionalRenderingFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_conditional_rendering) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceConditionalRenderingFeaturesEXT* structure = - (VkPhysicalDeviceConditionalRenderingFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::conditionalRendering), structure->conditionalRendering); + // Validation code for VkDeviceGroupCommandBufferBeginInfo structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: { // Covers + // VUID-VkDeviceGroupCommandBufferBeginInfo-sType-sType - skip |= - ValidateBool32(pNext_loc.dot(Field::inheritedConditionalRendering), structure->inheritedConditionalRendering); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO), but its parent extension " + "VK_KHR_device_group has not been enabled."); } } break; - // Validation code for VkCommandBufferInheritanceConditionalRenderingInfoEXT structure members - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: { // Covers - // VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-sType-sType + // Validation code for VkDeviceGroupSubmitInfo structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: { // Covers VUID-VkDeviceGroupSubmitInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO), but its " + "parent extension " + "VK_KHR_device_group has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkCommandBufferInheritanceConditionalRenderingInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_conditional_rendering)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_conditional_rendering"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupSubmitInfo); + if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); } - VkCommandBufferInheritanceConditionalRenderingInfoEXT* structure = - (VkCommandBufferInheritanceConditionalRenderingInfoEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::conditionalRenderingEnable), structure->conditionalRenderingEnable); + VkDeviceGroupSubmitInfo* structure = (VkDeviceGroupSubmitInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::waitSemaphoreCount), pNext_loc.dot(Field::pWaitSemaphoreDeviceIndices), + structure->waitSemaphoreCount, &structure->pWaitSemaphoreDeviceIndices, false, true, + kVUIDUndefined, "VUID-VkDeviceGroupSubmitInfo-pWaitSemaphoreDeviceIndices-parameter"); + + skip |= ValidateArray(pNext_loc.dot(Field::commandBufferCount), pNext_loc.dot(Field::pCommandBufferDeviceMasks), + structure->commandBufferCount, &structure->pCommandBufferDeviceMasks, false, true, + kVUIDUndefined, "VUID-VkDeviceGroupSubmitInfo-pCommandBufferDeviceMasks-parameter"); + + skip |= + ValidateArray(pNext_loc.dot(Field::signalSemaphoreCount), pNext_loc.dot(Field::pSignalSemaphoreDeviceIndices), + structure->signalSemaphoreCount, &structure->pSignalSemaphoreDeviceIndices, false, true, + kVUIDUndefined, "VUID-VkDeviceGroupSubmitInfo-pSignalSemaphoreDeviceIndices-parameter"); } } break; - // Validation code for VkPipelineViewportWScalingStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineViewportWScalingStateCreateInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportWScalingStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_clip_space_w_scaling)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_clip_space_w_scaling"); - } - VkPipelineViewportWScalingStateCreateInfoNV* structure = (VkPipelineViewportWScalingStateCreateInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::viewportWScalingEnable), structure->viewportWScalingEnable); + // Validation code for VkDeviceGroupBindSparseInfo structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: { // Covers VUID-VkDeviceGroupBindSparseInfo-sType-sType - skip |= ValidateArray(pNext_loc.dot(Field::viewportCount), loc, structure->viewportCount, - &structure->pViewportWScalings, true, false, - "VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-arraylength", kVUIDUndefined); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO), but " + "its parent extension " + "VK_KHR_device_group has not been enabled."); } } break; - // Validation code for VkSwapchainCounterCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: { // Covers VUID-VkSwapchainCounterCreateInfoEXT-sType-sType + // Validation code for VkBindBufferMemoryDeviceGroupInfo structure members + case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: { // Covers VUID-VkBindBufferMemoryDeviceGroupInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO), but its parent extension " + "VK_KHR_device_group has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainCounterCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_display_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindBufferMemoryDeviceGroupInfo); + if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_display_control"); + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); } - VkSwapchainCounterCreateInfoEXT* structure = (VkSwapchainCounterCreateInfoEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::surfaceCounters), vvl::FlagBitmask::VkSurfaceCounterFlagBitsEXT, - AllVkSurfaceCounterFlagBitsEXT, structure->surfaceCounters, kOptionalFlags, - "VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-parameter"); + VkBindBufferMemoryDeviceGroupInfo* structure = (VkBindBufferMemoryDeviceGroupInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::deviceIndexCount), pNext_loc.dot(Field::pDeviceIndices), + structure->deviceIndexCount, &structure->pDeviceIndices, false, true, kVUIDUndefined, + "VUID-VkBindBufferMemoryDeviceGroupInfo-pDeviceIndices-parameter"); } } break; - // Validation code for VkPresentTimesInfoGOOGLE structure members - case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: { // Covers VUID-VkPresentTimesInfoGOOGLE-sType-sType + // Validation code for VkBindImageMemoryDeviceGroupInfo structure members + case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: { // Covers VUID-VkBindImageMemoryDeviceGroupInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_device_group)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_device_group))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO), " + "but its parent extension " + "VK_KHR_device_group has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPresentTimesInfoGOOGLE); - if (!IsExtEnabled(device_extensions.vk_google_display_timing)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_GOOGLE_display_timing"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindImageMemoryDeviceGroupInfo); + if (!IsExtEnabled(device_extensions.vk_khr_device_group)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_device_group"); } - VkPresentTimesInfoGOOGLE* structure = (VkPresentTimesInfoGOOGLE*)header; - skip |= ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pTimes), structure->swapchainCount, - &structure->pTimes, true, false, "VUID-VkPresentTimesInfoGOOGLE-swapchainCount-arraylength", - "VUID-VkPresentTimesInfoGOOGLE-pTimes-parameter"); + VkBindImageMemoryDeviceGroupInfo* structure = (VkBindImageMemoryDeviceGroupInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::deviceIndexCount), pNext_loc.dot(Field::pDeviceIndices), + structure->deviceIndexCount, &structure->pDeviceIndices, false, true, kVUIDUndefined, + "VUID-VkBindImageMemoryDeviceGroupInfo-pDeviceIndices-parameter"); - if (structure->pTimes != nullptr) { - for (uint32_t swapchainIndex = 0; swapchainIndex < structure->swapchainCount; ++swapchainIndex) { - [[maybe_unused]] const Location pTimes_loc = pNext_loc.dot(Field::pTimes, swapchainIndex); + skip |= ValidateArray(pNext_loc.dot(Field::splitInstanceBindRegionCount), + pNext_loc.dot(Field::pSplitInstanceBindRegions), structure->splitInstanceBindRegionCount, + &structure->pSplitInstanceBindRegions, false, true, kVUIDUndefined, + "VUID-VkBindImageMemoryDeviceGroupInfo-pSplitInstanceBindRegions-parameter"); + + if (structure->pSplitInstanceBindRegions != nullptr) { + for (uint32_t splitInstanceBindRegionIndex = 0; + splitInstanceBindRegionIndex < structure->splitInstanceBindRegionCount; ++splitInstanceBindRegionIndex) { + [[maybe_unused]] const Location pSplitInstanceBindRegions_loc = + pNext_loc.dot(Field::pSplitInstanceBindRegions, splitInstanceBindRegionIndex); } } } } break; - // No Validation code for VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX structure members -- Covers - // VUID-VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX-sType-sType + // Validation code for VkDeviceGroupDeviceCreateInfo structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: { // Covers VUID-VkDeviceGroupDeviceCreateInfo-sType-sType - // Validation code for VkPipelineViewportSwizzleStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType + if (!IsExtEnabled(instance_extensions.vk_khr_device_group_creation)) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO), but " + "its parent extension " + "VK_KHR_device_group_creation has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportSwizzleStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_viewport_swizzle)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_viewport_swizzle"); - } - VkPipelineViewportSwizzleStateCreateInfoNV* structure = (VkPipelineViewportSwizzleStateCreateInfoNV*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupDeviceCreateInfo); + VkDeviceGroupDeviceCreateInfo* structure = (VkDeviceGroupDeviceCreateInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::physicalDeviceCount), pNext_loc.dot(Field::pPhysicalDevices), + structure->physicalDeviceCount, &structure->pPhysicalDevices, false, true, kVUIDUndefined, + "VUID-VkDeviceGroupDeviceCreateInfo-pPhysicalDevices-parameter"); + } + } break; - skip |= ValidateArray(pNext_loc.dot(Field::viewportCount), pNext_loc.dot(Field::pViewportSwizzles), - structure->viewportCount, &structure->pViewportSwizzles, true, true, - "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength", - "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pViewportSwizzles-parameter"); + // Validation code for VkPhysicalDeviceFeatures2 structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: { // Covers VUID-VkPhysicalDeviceFeatures2-sType-sType - if (structure->pViewportSwizzles != nullptr) { - for (uint32_t viewportIndex = 0; viewportIndex < structure->viewportCount; ++viewportIndex) { - [[maybe_unused]] const Location pViewportSwizzles_loc = - pNext_loc.dot(Field::pViewportSwizzles, viewportIndex); - skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::x), vvl::Enum::VkViewportCoordinateSwizzleNV, - structure->pViewportSwizzles[viewportIndex].x, - "VUID-VkViewportSwizzleNV-x-parameter"); + if (!IsExtEnabled(instance_extensions.vk_khr_get_physical_device_properties2)) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2), but its " + "parent extension " + "VK_KHR_get_physical_device_properties2 has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFeatures2); + VkPhysicalDeviceFeatures2* structure = (VkPhysicalDeviceFeatures2*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::robustBufferAccess), structure->features.robustBufferAccess); - skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::y), vvl::Enum::VkViewportCoordinateSwizzleNV, - structure->pViewportSwizzles[viewportIndex].y, - "VUID-VkViewportSwizzleNV-y-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::fullDrawIndexUint32), structure->features.fullDrawIndexUint32); - skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::z), vvl::Enum::VkViewportCoordinateSwizzleNV, - structure->pViewportSwizzles[viewportIndex].z, - "VUID-VkViewportSwizzleNV-z-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::imageCubeArray), structure->features.imageCubeArray); - skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::w), vvl::Enum::VkViewportCoordinateSwizzleNV, - structure->pViewportSwizzles[viewportIndex].w, - "VUID-VkViewportSwizzleNV-w-parameter"); - } - } - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::independentBlend), structure->features.independentBlend); - // No Validation code for VkPhysicalDeviceDiscardRectanglePropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceDiscardRectanglePropertiesEXT-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::geometryShader), structure->features.geometryShader); + + skip |= ValidateBool32(pNext_loc.dot(Field::tessellationShader), structure->features.tessellationShader); + + skip |= ValidateBool32(pNext_loc.dot(Field::sampleRateShading), structure->features.sampleRateShading); + + skip |= ValidateBool32(pNext_loc.dot(Field::dualSrcBlend), structure->features.dualSrcBlend); + + skip |= ValidateBool32(pNext_loc.dot(Field::logicOp), structure->features.logicOp); + + skip |= ValidateBool32(pNext_loc.dot(Field::multiDrawIndirect), structure->features.multiDrawIndirect); + + skip |= + ValidateBool32(pNext_loc.dot(Field::drawIndirectFirstInstance), structure->features.drawIndirectFirstInstance); + + skip |= ValidateBool32(pNext_loc.dot(Field::depthClamp), structure->features.depthClamp); + + skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasClamp), structure->features.depthBiasClamp); + + skip |= ValidateBool32(pNext_loc.dot(Field::fillModeNonSolid), structure->features.fillModeNonSolid); + + skip |= ValidateBool32(pNext_loc.dot(Field::depthBounds), structure->features.depthBounds); + + skip |= ValidateBool32(pNext_loc.dot(Field::wideLines), structure->features.wideLines); + + skip |= ValidateBool32(pNext_loc.dot(Field::largePoints), structure->features.largePoints); + + skip |= ValidateBool32(pNext_loc.dot(Field::alphaToOne), structure->features.alphaToOne); + + skip |= ValidateBool32(pNext_loc.dot(Field::multiViewport), structure->features.multiViewport); + + skip |= ValidateBool32(pNext_loc.dot(Field::samplerAnisotropy), structure->features.samplerAnisotropy); + + skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionETC2), structure->features.textureCompressionETC2); + + skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionASTC_LDR), + structure->features.textureCompressionASTC_LDR); + + skip |= ValidateBool32(pNext_loc.dot(Field::textureCompressionBC), structure->features.textureCompressionBC); + + skip |= ValidateBool32(pNext_loc.dot(Field::occlusionQueryPrecise), structure->features.occlusionQueryPrecise); + + skip |= ValidateBool32(pNext_loc.dot(Field::pipelineStatisticsQuery), structure->features.pipelineStatisticsQuery); + + skip |= ValidateBool32(pNext_loc.dot(Field::vertexPipelineStoresAndAtomics), + structure->features.vertexPipelineStoresAndAtomics); + + skip |= + ValidateBool32(pNext_loc.dot(Field::fragmentStoresAndAtomics), structure->features.fragmentStoresAndAtomics); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderTessellationAndGeometryPointSize), + structure->features.shaderTessellationAndGeometryPointSize); + + skip |= + ValidateBool32(pNext_loc.dot(Field::shaderImageGatherExtended), structure->features.shaderImageGatherExtended); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageExtendedFormats), + structure->features.shaderStorageImageExtendedFormats); + + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageMultisample), + structure->features.shaderStorageImageMultisample); - // Validation code for VkPipelineDiscardRectangleStateCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineDiscardRectangleStateCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_discard_rectangles)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_discard_rectangles"); - } - VkPipelineDiscardRectangleStateCreateInfoEXT* structure = (VkPipelineDiscardRectangleStateCreateInfoEXT*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-flags-zerobitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageReadWithoutFormat), + structure->features.shaderStorageImageReadWithoutFormat); - skip |= ValidateRangedEnum(pNext_loc.dot(Field::discardRectangleMode), vvl::Enum::VkDiscardRectangleModeEXT, - structure->discardRectangleMode, - "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageWriteWithoutFormat), + structure->features.shaderStorageImageWriteWithoutFormat); - // No Validation code for VkPhysicalDeviceConservativeRasterizationPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceConservativeRasterizationPropertiesEXT-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::shaderUniformBufferArrayDynamicIndexing), + structure->features.shaderUniformBufferArrayDynamicIndexing); - // Validation code for VkPipelineRasterizationConservativeStateCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPipelineRasterizationConservativeStateCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_conservative_rasterization)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_conservative_rasterization"); - } - VkPipelineRasterizationConservativeStateCreateInfoEXT* structure = - (VkPipelineRasterizationConservativeStateCreateInfoEXT*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-flags-zerobitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderSampledImageArrayDynamicIndexing), + structure->features.shaderSampledImageArrayDynamicIndexing); - skip |= ValidateRangedEnum( - pNext_loc.dot(Field::conservativeRasterizationMode), vvl::Enum::VkConservativeRasterizationModeEXT, - structure->conservativeRasterizationMode, - "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-conservativeRasterizationMode-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageBufferArrayDynamicIndexing), + structure->features.shaderStorageBufferArrayDynamicIndexing); - // Validation code for VkPhysicalDeviceDepthClipEnableFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDepthClipEnableFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthClipEnableFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_enable)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDepthClipEnableFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_depth_clip_enable) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceDepthClipEnableFeaturesEXT* structure = (VkPhysicalDeviceDepthClipEnableFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::depthClipEnable), structure->depthClipEnable); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderStorageImageArrayDynamicIndexing), + structure->features.shaderStorageImageArrayDynamicIndexing); - // Validation code for VkPipelineRasterizationDepthClipStateCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineRasterizationDepthClipStateCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationDepthClipStateCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_enable)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_depth_clip_enable"); - } - VkPipelineRasterizationDepthClipStateCreateInfoEXT* structure = - (VkPipelineRasterizationDepthClipStateCreateInfoEXT*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineRasterizationDepthClipStateCreateInfoEXT-flags-zerobitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderClipDistance), structure->features.shaderClipDistance); - skip |= ValidateBool32(pNext_loc.dot(Field::depthClipEnable), structure->depthClipEnable); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderCullDistance), structure->features.shaderCullDistance); - // Validation code for VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RELAXED_LINE_RASTERIZATION_FEATURES_IMG: { // Covers - // VUID-VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG); - if (!IsExtEnabled(device_extensions.vk_img_relaxed_line_rasterization)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG, but when " - "creating VkDevice, the parent extension " - "(VK_IMG_relaxed_line_rasterization) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG* structure = - (VkPhysicalDeviceRelaxedLineRasterizationFeaturesIMG*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::relaxedLineRasterization), structure->relaxedLineRasterization); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat64), structure->features.shaderFloat64); - // Validation code for VkDebugUtilsObjectNameInfoEXT structure members - case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: { // Covers VUID-VkDebugUtilsObjectNameInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDebugUtilsObjectNameInfoEXT); - VkDebugUtilsObjectNameInfoEXT* structure = (VkDebugUtilsObjectNameInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::objectType), vvl::Enum::VkObjectType, structure->objectType, - "VUID-VkDebugUtilsObjectNameInfoEXT-objectType-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt64), structure->features.shaderInt64); - // Validation code for VkDebugUtilsMessengerCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: { // Covers - // VUID-VkDebugUtilsMessengerCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDebugUtilsMessengerCreateInfoEXT); - VkDebugUtilsMessengerCreateInfoEXT* structure = (VkDebugUtilsMessengerCreateInfoEXT*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkDebugUtilsMessengerCreateInfoEXT-flags-zerobitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderInt16), structure->features.shaderInt16); - skip |= - ValidateFlags(pNext_loc.dot(Field::messageSeverity), vvl::FlagBitmask::VkDebugUtilsMessageSeverityFlagBitsEXT, - AllVkDebugUtilsMessageSeverityFlagBitsEXT, structure->messageSeverity, kRequiredFlags, - "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageSeverity-parameter", - "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageSeverity-requiredbitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderResourceResidency), structure->features.shaderResourceResidency); - skip |= ValidateFlags(pNext_loc.dot(Field::messageType), vvl::FlagBitmask::VkDebugUtilsMessageTypeFlagBitsEXT, - AllVkDebugUtilsMessageTypeFlagBitsEXT, structure->messageType, kRequiredFlags, - "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter", - "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-requiredbitmask"); + skip |= ValidateBool32(pNext_loc.dot(Field::shaderResourceMinLod), structure->features.shaderResourceMinLod); - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pfnUserCallback), - reinterpret_cast(structure->pfnUserCallback), - "VUID-VkDebugUtilsMessengerCreateInfoEXT-pfnUserCallback-parameter"); - } - } break; -#ifdef VK_USE_PLATFORM_ANDROID_KHR + skip |= ValidateBool32(pNext_loc.dot(Field::sparseBinding), structure->features.sparseBinding); - // No Validation code for VkAndroidHardwareBufferUsageANDROID structure members -- Covers - // VUID-VkAndroidHardwareBufferUsageANDROID-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyBuffer), structure->features.sparseResidencyBuffer); - // No Validation code for VkAndroidHardwareBufferFormatPropertiesANDROID structure members -- Covers - // VUID-VkAndroidHardwareBufferFormatPropertiesANDROID-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyImage2D), structure->features.sparseResidencyImage2D); - // Validation code for VkImportAndroidHardwareBufferInfoANDROID structure members - case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: { // Covers - // VUID-VkImportAndroidHardwareBufferInfoANDROID-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportAndroidHardwareBufferInfoANDROID); - if (!IsExtEnabled(device_extensions.vk_android_external_memory_android_hardware_buffer)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_ANDROID_external_memory_android_hardware_buffer"); - } - VkImportAndroidHardwareBufferInfoANDROID* structure = (VkImportAndroidHardwareBufferInfoANDROID*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::buffer), structure->buffer, - "VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-parameter"); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyImage3D), structure->features.sparseResidencyImage3D); - // No Validation code for VkExternalFormatANDROID structure members -- Covers VUID-VkExternalFormatANDROID-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidency2Samples), structure->features.sparseResidency2Samples); - // No Validation code for VkAndroidHardwareBufferFormatProperties2ANDROID structure members -- Covers - // VUID-VkAndroidHardwareBufferFormatProperties2ANDROID-sType-sType -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_ENABLE_BETA_EXTENSIONS + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidency4Samples), structure->features.sparseResidency4Samples); - // Validation code for VkPhysicalDeviceShaderEnqueueFeaturesAMDX structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ENQUEUE_FEATURES_AMDX: { // Covers - // VUID-VkPhysicalDeviceShaderEnqueueFeaturesAMDX-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderEnqueueFeaturesAMDX); - if (!IsExtEnabled(device_extensions.vk_amdx_shader_enqueue)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderEnqueueFeaturesAMDX, but when creating " - "VkDevice, the parent extension " - "(VK_AMDX_shader_enqueue) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderEnqueueFeaturesAMDX* structure = (VkPhysicalDeviceShaderEnqueueFeaturesAMDX*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderEnqueue), structure->shaderEnqueue); - } - } break; + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidency8Samples), structure->features.sparseResidency8Samples); - // No Validation code for VkPhysicalDeviceShaderEnqueuePropertiesAMDX structure members -- Covers - // VUID-VkPhysicalDeviceShaderEnqueuePropertiesAMDX-sType-sType + skip |= + ValidateBool32(pNext_loc.dot(Field::sparseResidency16Samples), structure->features.sparseResidency16Samples); - // No Validation code for VkPipelineShaderStageNodeCreateInfoAMDX structure members -- Covers - // VUID-VkPipelineShaderStageNodeCreateInfoAMDX-sType-sType -#endif // VK_ENABLE_BETA_EXTENSIONS + skip |= ValidateBool32(pNext_loc.dot(Field::sparseResidencyAliased), structure->features.sparseResidencyAliased); - // Validation code for VkSampleLocationsInfoEXT structure members - case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: { // Covers VUID-VkSampleLocationsInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSampleLocationsInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_sample_locations)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_sample_locations"); - } - VkSampleLocationsInfoEXT* structure = (VkSampleLocationsInfoEXT*)header; - skip |= ValidateArray(pNext_loc.dot(Field::sampleLocationsCount), pNext_loc.dot(Field::pSampleLocations), - structure->sampleLocationsCount, &structure->pSampleLocations, false, true, kVUIDUndefined, - "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); + skip |= ValidateBool32(pNext_loc.dot(Field::variableMultisampleRate), structure->features.variableMultisampleRate); - if (structure->pSampleLocations != nullptr) { - for (uint32_t sampleLocationsIndex = 0; sampleLocationsIndex < structure->sampleLocationsCount; - ++sampleLocationsIndex) { - [[maybe_unused]] const Location pSampleLocations_loc = - pNext_loc.dot(Field::pSampleLocations, sampleLocationsIndex); - } - } + skip |= ValidateBool32(pNext_loc.dot(Field::inheritedQueries), structure->features.inheritedQueries); } } break; - // Validation code for VkRenderPassSampleLocationsBeginInfoEXT structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: { // Covers - // VUID-VkRenderPassSampleLocationsBeginInfoEXT-sType-sType + // Validation code for VkRenderPassInputAttachmentAspectCreateInfo structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: { // Covers + // VUID-VkRenderPassInputAttachmentAspectCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO), but its parent extension " + "VK_KHR_maintenance2 has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassSampleLocationsBeginInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_sample_locations)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_sample_locations"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassInputAttachmentAspectCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance2)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance2"); } - VkRenderPassSampleLocationsBeginInfoEXT* structure = (VkRenderPassSampleLocationsBeginInfoEXT*)header; - skip |= ValidateArray(pNext_loc.dot(Field::attachmentInitialSampleLocationsCount), - pNext_loc.dot(Field::pAttachmentInitialSampleLocations), - structure->attachmentInitialSampleLocationsCount, - &structure->pAttachmentInitialSampleLocations, false, true, kVUIDUndefined, - "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pAttachmentInitialSampleLocations-parameter"); - - if (structure->pAttachmentInitialSampleLocations != nullptr) { - for (uint32_t attachmentInitialSampleLocationsIndex = 0; - attachmentInitialSampleLocationsIndex < structure->attachmentInitialSampleLocationsCount; - ++attachmentInitialSampleLocationsIndex) { - [[maybe_unused]] const Location pAttachmentInitialSampleLocations_loc = - pNext_loc.dot(Field::pAttachmentInitialSampleLocations, attachmentInitialSampleLocationsIndex); - skip |= - ValidateStructType(pAttachmentInitialSampleLocations_loc.dot(Field::sampleLocationsInfo), - "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT", - &(structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] - .sampleLocationsInfo), - VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, false, kVUIDUndefined, - "VUID-VkSampleLocationsInfoEXT-sType-sType"); + VkRenderPassInputAttachmentAspectCreateInfo* structure = (VkRenderPassInputAttachmentAspectCreateInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::aspectReferenceCount), pNext_loc.dot(Field::pAspectReferences), + structure->aspectReferenceCount, &structure->pAspectReferences, true, true, + "VUID-VkRenderPassInputAttachmentAspectCreateInfo-aspectReferenceCount-arraylength", + "VUID-VkRenderPassInputAttachmentAspectCreateInfo-pAspectReferences-parameter"); + if (structure->pAspectReferences != nullptr) { + for (uint32_t aspectReferenceIndex = 0; aspectReferenceIndex < structure->aspectReferenceCount; + ++aspectReferenceIndex) { + [[maybe_unused]] const Location pAspectReferences_loc = + pNext_loc.dot(Field::pAspectReferences, aspectReferenceIndex); skip |= - ValidateArray(pAttachmentInitialSampleLocations_loc.dot(Field::sampleLocationsCount), - pAttachmentInitialSampleLocations_loc.dot(Field::pSampleLocations), - structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] - .sampleLocationsInfo.sampleLocationsCount, - &structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] - .sampleLocationsInfo.pSampleLocations, - false, true, kVUIDUndefined, "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); - - if (structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] - .sampleLocationsInfo.pSampleLocations != nullptr) { - for (uint32_t sampleLocationsIndex = 0; - sampleLocationsIndex < - structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] - .sampleLocationsInfo.sampleLocationsCount; - ++sampleLocationsIndex) { - [[maybe_unused]] const Location pSampleLocations_loc = - pAttachmentInitialSampleLocations_loc.dot(Field::pSampleLocations, sampleLocationsIndex); - } - } + ValidateFlags(pAspectReferences_loc.dot(Field::aspectMask), vvl::FlagBitmask::VkImageAspectFlagBits, + AllVkImageAspectFlagBits, structure->pAspectReferences[aspectReferenceIndex].aspectMask, + kRequiredFlags, "VUID-VkInputAttachmentAspectReference-aspectMask-parameter", + "VUID-VkInputAttachmentAspectReference-aspectMask-requiredbitmask"); } } + } + } break; - skip |= ValidateArray(pNext_loc.dot(Field::postSubpassSampleLocationsCount), - pNext_loc.dot(Field::pPostSubpassSampleLocations), structure->postSubpassSampleLocationsCount, - &structure->pPostSubpassSampleLocations, false, true, kVUIDUndefined, - "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pPostSubpassSampleLocations-parameter"); + // Validation code for VkImageViewUsageCreateInfo structure members + case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: { // Covers VUID-VkImageViewUsageCreateInfo-sType-sType - if (structure->pPostSubpassSampleLocations != nullptr) { - for (uint32_t postSubpassSampleLocationsIndex = 0; - postSubpassSampleLocationsIndex < structure->postSubpassSampleLocationsCount; - ++postSubpassSampleLocationsIndex) { - [[maybe_unused]] const Location pPostSubpassSampleLocations_loc = - pNext_loc.dot(Field::pPostSubpassSampleLocations, postSubpassSampleLocationsIndex); - skip |= ValidateStructType( - pPostSubpassSampleLocations_loc.dot(Field::sampleLocationsInfo), - "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT", - &(structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex].sampleLocationsInfo), - VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, false, kVUIDUndefined, - "VUID-VkSampleLocationsInfoEXT-sType-sType"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO), but " + "its parent extension " + "VK_KHR_maintenance2 has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageViewUsageCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance2)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance2"); + } + VkImageViewUsageCreateInfo* structure = (VkImageViewUsageCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::usage), vvl::FlagBitmask::VkImageUsageFlagBits, AllVkImageUsageFlagBits, + structure->usage, kRequiredFlags, "VUID-VkImageViewUsageCreateInfo-usage-parameter", + "VUID-VkImageViewUsageCreateInfo-usage-requiredbitmask"); + } + } break; - skip |= - ValidateArray(pPostSubpassSampleLocations_loc.dot(Field::sampleLocationsCount), - pPostSubpassSampleLocations_loc.dot(Field::pSampleLocations), - structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] - .sampleLocationsInfo.sampleLocationsCount, - &structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] - .sampleLocationsInfo.pSampleLocations, - false, true, kVUIDUndefined, "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); + // Validation code for VkPipelineTessellationDomainOriginStateCreateInfo structure members + case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: { // Covers + // VUID-VkPipelineTessellationDomainOriginStateCreateInfo-sType-sType - if (structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] - .sampleLocationsInfo.pSampleLocations != nullptr) { - for (uint32_t sampleLocationsIndex = 0; - sampleLocationsIndex < structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] - .sampleLocationsInfo.sampleLocationsCount; - ++sampleLocationsIndex) { - [[maybe_unused]] const Location pSampleLocations_loc = - pPostSubpassSampleLocations_loc.dot(Field::pSampleLocations, sampleLocationsIndex); - } - } - } + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_maintenance2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_maintenance2))) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO), but its parent extension " + "VK_KHR_maintenance2 has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineTessellationDomainOriginStateCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance2)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance2"); } + VkPipelineTessellationDomainOriginStateCreateInfo* structure = + (VkPipelineTessellationDomainOriginStateCreateInfo*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::domainOrigin), vvl::Enum::VkTessellationDomainOrigin, + structure->domainOrigin, + "VUID-VkPipelineTessellationDomainOriginStateCreateInfo-domainOrigin-parameter"); } } break; - // Validation code for VkPipelineSampleLocationsStateCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sType-sType + // Validation code for VkRenderPassMultiviewCreateInfo structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: { // Covers VUID-VkRenderPassMultiviewCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_multiview)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_multiview))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO), " + "but its parent extension " + "VK_KHR_multiview has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineSampleLocationsStateCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_sample_locations)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_sample_locations"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassMultiviewCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_multiview)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_multiview"); } - VkPipelineSampleLocationsStateCreateInfoEXT* structure = (VkPipelineSampleLocationsStateCreateInfoEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::sampleLocationsEnable), structure->sampleLocationsEnable); + VkRenderPassMultiviewCreateInfo* structure = (VkRenderPassMultiviewCreateInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::subpassCount), pNext_loc.dot(Field::pViewMasks), structure->subpassCount, + &structure->pViewMasks, false, true, kVUIDUndefined, + "VUID-VkRenderPassMultiviewCreateInfo-pViewMasks-parameter"); - skip |= ValidateStructType(pNext_loc.dot(Field::sampleLocationsInfo), "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT", - &(structure->sampleLocationsInfo), VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, false, - kVUIDUndefined, "VUID-VkSampleLocationsInfoEXT-sType-sType"); + skip |= ValidateArray(pNext_loc.dot(Field::dependencyCount), pNext_loc.dot(Field::pViewOffsets), + structure->dependencyCount, &structure->pViewOffsets, false, true, kVUIDUndefined, + "VUID-VkRenderPassMultiviewCreateInfo-pViewOffsets-parameter"); - skip |= ValidateArray(pNext_loc.dot(Field::sampleLocationsCount), pNext_loc.dot(Field::pSampleLocations), - structure->sampleLocationsInfo.sampleLocationsCount, - &structure->sampleLocationsInfo.pSampleLocations, false, true, kVUIDUndefined, - "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); + skip |= ValidateArray(pNext_loc.dot(Field::correlationMaskCount), pNext_loc.dot(Field::pCorrelationMasks), + structure->correlationMaskCount, &structure->pCorrelationMasks, false, true, kVUIDUndefined, + "VUID-VkRenderPassMultiviewCreateInfo-pCorrelationMasks-parameter"); + } + } break; - if (structure->sampleLocationsInfo.pSampleLocations != nullptr) { - for (uint32_t sampleLocationsIndex = 0; - sampleLocationsIndex < structure->sampleLocationsInfo.sampleLocationsCount; ++sampleLocationsIndex) { - [[maybe_unused]] const Location pSampleLocations_loc = - pNext_loc.dot(Field::pSampleLocations, sampleLocationsIndex); - } + // Validation code for VkProtectedSubmitInfo structure members + case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: { // Covers VUID-VkProtectedSubmitInfo-sType-sType + + if (is_physdev_api) { + VkPhysicalDeviceProperties device_properties = {}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < VK_API_VERSION_1_1) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO) which was " + "added in VK_API_VERSION_1_1 but the " + "current effective API version is %s.", + StringAPIVersion(api_version).c_str()); } } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkProtectedSubmitInfo); + VkProtectedSubmitInfo* structure = (VkProtectedSubmitInfo*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::protectedSubmit), structure->protectedSubmit); + } } break; - // No Validation code for VkPhysicalDeviceSampleLocationsPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceSampleLocationsPropertiesEXT-sType-sType + // Validation code for VkSamplerYcbcrConversionInfo structure members + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: { // Covers VUID-VkSamplerYcbcrConversionInfo-sType-sType - // Validation code for VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO), but " + "its parent extension " + "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_blend_operation_advanced)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerYcbcrConversionInfo); + if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_blend_operation_advanced) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_sampler_ycbcr_conversion"); } - VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* structure = - (VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::advancedBlendCoherentOperations), - structure->advancedBlendCoherentOperations); + VkSamplerYcbcrConversionInfo* structure = (VkSamplerYcbcrConversionInfo*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::conversion), structure->conversion); } } break; - // No Validation code for VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT-sType-sType + // Validation code for VkBindImagePlaneMemoryInfo structure members + case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: { // Covers VUID-VkBindImagePlaneMemoryInfo-sType-sType - // Validation code for VkPipelineColorBlendAdvancedStateCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO), but " + "its parent extension " + "VK_KHR_sampler_ycbcr_conversion has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineColorBlendAdvancedStateCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_blend_operation_advanced)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindImagePlaneMemoryInfo); + if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_blend_operation_advanced"); + "extended struct requires the extensions VK_KHR_sampler_ycbcr_conversion"); } - VkPipelineColorBlendAdvancedStateCreateInfoEXT* structure = (VkPipelineColorBlendAdvancedStateCreateInfoEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::srcPremultiplied), structure->srcPremultiplied); - - skip |= ValidateBool32(pNext_loc.dot(Field::dstPremultiplied), structure->dstPremultiplied); - - skip |= - ValidateRangedEnum(pNext_loc.dot(Field::blendOverlap), vvl::Enum::VkBlendOverlapEXT, structure->blendOverlap, - "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-parameter"); + VkBindImagePlaneMemoryInfo* structure = (VkBindImagePlaneMemoryInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::planeAspect), vvl::FlagBitmask::VkImageAspectFlagBits, + AllVkImageAspectFlagBits, structure->planeAspect, kRequiredSingleBit, + "VUID-VkBindImagePlaneMemoryInfo-planeAspect-parameter", + "VUID-VkBindImagePlaneMemoryInfo-planeAspect-parameter"); } } break; - // Validation code for VkPipelineCoverageToColorStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineCoverageToColorStateCreateInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCoverageToColorStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_fragment_coverage_to_color)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_fragment_coverage_to_color"); - } - VkPipelineCoverageToColorStateCreateInfoNV* structure = (VkPipelineCoverageToColorStateCreateInfoNV*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineCoverageToColorStateCreateInfoNV-flags-zerobitmask"); + // Validation code for VkImagePlaneMemoryRequirementsInfo structure members + case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: { // Covers + // VUID-VkImagePlaneMemoryRequirementsInfo-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::coverageToColorEnable), structure->coverageToColorEnable); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO), but its parent extension " + "VK_KHR_sampler_ycbcr_conversion has not been enabled."); } - } break; - - // Validation code for VkPipelineCoverageModulationStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineCoverageModulationStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCoverageModulationStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_framebuffer_mixed_samples)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImagePlaneMemoryRequirementsInfo); + if (!IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_framebuffer_mixed_samples"); + "extended struct requires the extensions VK_KHR_sampler_ycbcr_conversion"); } - VkPipelineCoverageModulationStateCreateInfoNV* structure = (VkPipelineCoverageModulationStateCreateInfoNV*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineCoverageModulationStateCreateInfoNV-flags-zerobitmask"); + VkImagePlaneMemoryRequirementsInfo* structure = (VkImagePlaneMemoryRequirementsInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::planeAspect), vvl::FlagBitmask::VkImageAspectFlagBits, + AllVkImageAspectFlagBits, structure->planeAspect, kRequiredSingleBit, + "VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-parameter", + "VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-parameter"); + } + } break; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::coverageModulationMode), vvl::Enum::VkCoverageModulationModeNV, - structure->coverageModulationMode, - "VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationMode-parameter"); + // Validation code for VkSamplerYcbcrConversionImageFormatProperties structure members + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: { // Covers + // VUID-VkSamplerYcbcrConversionImageFormatProperties-sType-sType - skip |= - ValidateBool32(pNext_loc.dot(Field::coverageModulationTableEnable), structure->coverageModulationTableEnable); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_sampler_ycbcr_conversion)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_sampler_ycbcr_conversion))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES), but its parent extension " + "VK_KHR_sampler_ycbcr_conversion has not been enabled."); } } break; - // No Validation code for VkPhysicalDeviceShaderSMBuiltinsPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceShaderSMBuiltinsPropertiesNV-sType-sType + // Validation code for VkPhysicalDeviceExternalImageFormatInfo structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: { // Covers + // VUID-VkPhysicalDeviceExternalImageFormatInfo-sType-sType - // Validation code for VkPhysicalDeviceShaderSMBuiltinsFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceShaderSMBuiltinsFeaturesNV-sType-sType + if (!IsExtEnabled(instance_extensions.vk_khr_external_memory_capabilities)) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO), but its parent extension " + "VK_KHR_external_memory_capabilities has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderSMBuiltinsFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_shader_sm_builtins)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderSMBuiltinsFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_shader_sm_builtins) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderSMBuiltinsFeaturesNV* structure = (VkPhysicalDeviceShaderSMBuiltinsFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSMBuiltins), structure->shaderSMBuiltins); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExternalImageFormatInfo); + VkPhysicalDeviceExternalImageFormatInfo* structure = (VkPhysicalDeviceExternalImageFormatInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, + "VUID-VkPhysicalDeviceExternalImageFormatInfo-handleType-parameter"); } } break; - // No Validation code for VkDrmFormatModifierPropertiesListEXT structure members -- Covers - // VUID-VkDrmFormatModifierPropertiesListEXT-sType-sType + // Validation code for VkExternalImageFormatProperties structure members + case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: { // Covers VUID-VkExternalImageFormatProperties-sType-sType - // Validation code for VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: { // Covers - // VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageDrmFormatModifierInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_drm_format_modifier)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_image_drm_format_modifier"); - } - VkPhysicalDeviceImageDrmFormatModifierInfoEXT* structure = (VkPhysicalDeviceImageDrmFormatModifierInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::sharingMode), vvl::Enum::VkSharingMode, structure->sharingMode, - "VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-parameter"); + if (!IsExtEnabled(instance_extensions.vk_khr_external_memory_capabilities)) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES), " + "but its parent extension " + "VK_KHR_external_memory_capabilities has not been enabled."); } } break; - // Validation code for VkImageDrmFormatModifierListCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: { // Covers - // VUID-VkImageDrmFormatModifierListCreateInfoEXT-sType-sType + // Validation code for VkExternalMemoryImageCreateInfo structure members + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: { // Covers VUID-VkExternalMemoryImageCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_memory)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_memory))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO), " + "but its parent extension " + "VK_KHR_external_memory has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageDrmFormatModifierListCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_drm_format_modifier)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_image_drm_format_modifier"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryImageCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_external_memory)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_memory"); } - VkImageDrmFormatModifierListCreateInfoEXT* structure = (VkImageDrmFormatModifierListCreateInfoEXT*)header; - skip |= ValidateArray(pNext_loc.dot(Field::drmFormatModifierCount), pNext_loc.dot(Field::pDrmFormatModifiers), - structure->drmFormatModifierCount, &structure->pDrmFormatModifiers, true, true, - "VUID-VkImageDrmFormatModifierListCreateInfoEXT-drmFormatModifierCount-arraylength", - "VUID-VkImageDrmFormatModifierListCreateInfoEXT-pDrmFormatModifiers-parameter"); + VkExternalMemoryImageCreateInfo* structure = (VkExternalMemoryImageCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, + "VUID-VkExternalMemoryImageCreateInfo-handleTypes-parameter"); } } break; - // Validation code for VkImageDrmFormatModifierExplicitCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: { // Covers - // VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-sType-sType + // Validation code for VkExternalMemoryBufferCreateInfo structure members + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: { // Covers VUID-VkExternalMemoryBufferCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_memory)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_memory))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO), " + "but its parent extension " + "VK_KHR_external_memory has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageDrmFormatModifierExplicitCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_drm_format_modifier)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_image_drm_format_modifier"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryBufferCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_external_memory)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_memory"); } - VkImageDrmFormatModifierExplicitCreateInfoEXT* structure = (VkImageDrmFormatModifierExplicitCreateInfoEXT*)header; - skip |= ValidateArray(pNext_loc.dot(Field::drmFormatModifierPlaneCount), pNext_loc.dot(Field::pPlaneLayouts), - structure->drmFormatModifierPlaneCount, &structure->pPlaneLayouts, true, true, - "VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifierPlaneCount-arraylength", - "VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-pPlaneLayouts-parameter"); + VkExternalMemoryBufferCreateInfo* structure = (VkExternalMemoryBufferCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, + "VUID-VkExternalMemoryBufferCreateInfo-handleTypes-parameter"); + } + } break; - if (structure->pPlaneLayouts != nullptr) { - for (uint32_t drmFormatModifierPlaneIndex = 0; - drmFormatModifierPlaneIndex < structure->drmFormatModifierPlaneCount; ++drmFormatModifierPlaneIndex) { - [[maybe_unused]] const Location pPlaneLayouts_loc = - pNext_loc.dot(Field::pPlaneLayouts, drmFormatModifierPlaneIndex); - } + // Validation code for VkExportMemoryAllocateInfo structure members + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: { // Covers VUID-VkExportMemoryAllocateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_memory)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_memory))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO), but its " + "parent extension " + "VK_KHR_external_memory has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMemoryAllocateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_external_memory)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_memory"); } + VkExportMemoryAllocateInfo* structure = (VkExportMemoryAllocateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, + "VUID-VkExportMemoryAllocateInfo-handleTypes-parameter"); } } break; - // No Validation code for VkDrmFormatModifierPropertiesList2EXT structure members -- Covers - // VUID-VkDrmFormatModifierPropertiesList2EXT-sType-sType + // Validation code for VkExportFenceCreateInfo structure members + case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: { // Covers VUID-VkExportFenceCreateInfo-sType-sType - // Validation code for VkShaderModuleValidationCacheCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: { // Covers - // VUID-VkShaderModuleValidationCacheCreateInfoEXT-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_fence)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_fence))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO), but its " + "parent extension " + "VK_KHR_external_fence has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkShaderModuleValidationCacheCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_validation_cache)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_validation_cache"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportFenceCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_external_fence)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_external_fence"); } - VkShaderModuleValidationCacheCreateInfoEXT* structure = (VkShaderModuleValidationCacheCreateInfoEXT*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::validationCache), structure->validationCache); + VkExportFenceCreateInfo* structure = (VkExportFenceCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalFenceHandleTypeFlagBits, + AllVkExternalFenceHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, + "VUID-VkExportFenceCreateInfo-handleTypes-parameter"); } } break; - // Validation code for VkPipelineViewportShadingRateImageStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineViewportShadingRateImageStateCreateInfoNV-sType-sType + // Validation code for VkExportSemaphoreCreateInfo structure members + case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: { // Covers VUID-VkExportSemaphoreCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_external_semaphore)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_external_semaphore))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO), but " + "its parent extension " + "VK_KHR_external_semaphore has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportShadingRateImageStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_shading_rate_image)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportSemaphoreCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_external_semaphore)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_shading_rate_image"); + "extended struct requires the extensions VK_KHR_external_semaphore"); } - VkPipelineViewportShadingRateImageStateCreateInfoNV* structure = - (VkPipelineViewportShadingRateImageStateCreateInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shadingRateImageEnable), structure->shadingRateImageEnable); + VkExportSemaphoreCreateInfo* structure = (VkExportSemaphoreCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalSemaphoreHandleTypeFlagBits, + AllVkExternalSemaphoreHandleTypeFlagBits, structure->handleTypes, kOptionalFlags, + "VUID-VkExportSemaphoreCreateInfo-handleTypes-parameter"); } } break; - // Validation code for VkPhysicalDeviceShadingRateImageFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceShadingRateImageFeaturesNV-sType-sType + // Validation code for VkImageFormatListCreateInfo structure members + case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: { // Covers VUID-VkImageFormatListCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_image_format_list)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_image_format_list))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO), but " + "its parent extension " + "VK_KHR_image_format_list has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShadingRateImageFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_shading_rate_image)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageFormatListCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_image_format_list)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShadingRateImageFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_shading_rate_image) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_image_format_list"); } - VkPhysicalDeviceShadingRateImageFeaturesNV* structure = (VkPhysicalDeviceShadingRateImageFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shadingRateImage), structure->shadingRateImage); - - skip |= ValidateBool32(pNext_loc.dot(Field::shadingRateCoarseSampleOrder), structure->shadingRateCoarseSampleOrder); + VkImageFormatListCreateInfo* structure = (VkImageFormatListCreateInfo*)header; + skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::viewFormatCount), pNext_loc.dot(Field::pViewFormats), + vvl::Enum::VkFormat, structure->viewFormatCount, structure->pViewFormats, false, + true, kVUIDUndefined, "VUID-VkImageFormatListCreateInfo-pViewFormats-parameter"); } } break; - // No Validation code for VkPhysicalDeviceShadingRateImagePropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceShadingRateImagePropertiesNV-sType-sType + // Validation code for VkDescriptorSetLayoutBindingFlagsCreateInfo structure members + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: { // Covers + // VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-sType-sType - // Validation code for VkPipelineViewportCoarseSampleOrderStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO), but its parent extension " + "VK_EXT_descriptor_indexing has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportCoarseSampleOrderStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_shading_rate_image)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDescriptorSetLayoutBindingFlagsCreateInfo); + if (!IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_shading_rate_image"); + "extended struct requires the extensions VK_EXT_descriptor_indexing"); } - VkPipelineViewportCoarseSampleOrderStateCreateInfoNV* structure = - (VkPipelineViewportCoarseSampleOrderStateCreateInfoNV*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::sampleOrderType), vvl::Enum::VkCoarseSampleOrderTypeNV, - structure->sampleOrderType, - "VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sampleOrderType-parameter"); - - skip |= - ValidateArray(pNext_loc.dot(Field::customSampleOrderCount), pNext_loc.dot(Field::pCustomSampleOrders), - structure->customSampleOrderCount, &structure->pCustomSampleOrders, false, true, kVUIDUndefined, - "VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-pCustomSampleOrders-parameter"); - - if (structure->pCustomSampleOrders != nullptr) { - for (uint32_t customSampleOrderIndex = 0; customSampleOrderIndex < structure->customSampleOrderCount; - ++customSampleOrderIndex) { - [[maybe_unused]] const Location pCustomSampleOrders_loc = - pNext_loc.dot(Field::pCustomSampleOrders, customSampleOrderIndex); - skip |= ValidateRangedEnum(pCustomSampleOrders_loc.dot(Field::shadingRate), - vvl::Enum::VkShadingRatePaletteEntryNV, - structure->pCustomSampleOrders[customSampleOrderIndex].shadingRate, - "VUID-VkCoarseSampleOrderCustomNV-shadingRate-parameter"); + VkDescriptorSetLayoutBindingFlagsCreateInfo* structure = (VkDescriptorSetLayoutBindingFlagsCreateInfo*)header; + skip |= ValidateFlagsArray(pNext_loc.dot(Field::bindingCount), pNext_loc.dot(Field::pBindingFlags), + vvl::FlagBitmask::VkDescriptorBindingFlagBits, AllVkDescriptorBindingFlagBits, + structure->bindingCount, structure->pBindingFlags, false, kVUIDUndefined, + "VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-pBindingFlags-parameter"); + } + } break; - skip |= ValidateArray(pCustomSampleOrders_loc.dot(Field::sampleLocationCount), - pCustomSampleOrders_loc.dot(Field::pSampleLocations), - structure->pCustomSampleOrders[customSampleOrderIndex].sampleLocationCount, - &structure->pCustomSampleOrders[customSampleOrderIndex].pSampleLocations, true, true, - "VUID-VkCoarseSampleOrderCustomNV-sampleLocationCount-arraylength", - "VUID-VkCoarseSampleOrderCustomNV-pSampleLocations-parameter"); + // Validation code for VkDescriptorSetVariableDescriptorCountAllocateInfo structure members + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: { // Covers + // VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-sType-sType - if (structure->pCustomSampleOrders[customSampleOrderIndex].pSampleLocations != nullptr) { - for (uint32_t sampleLocationIndex = 0; - sampleLocationIndex < structure->pCustomSampleOrders[customSampleOrderIndex].sampleLocationCount; - ++sampleLocationIndex) { - [[maybe_unused]] const Location pSampleLocations_loc = - pCustomSampleOrders_loc.dot(Field::pSampleLocations, sampleLocationIndex); - } - } - } + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { + skip |= + LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO), but its parent extension " + "VK_EXT_descriptor_indexing has not been enabled."); + } + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDescriptorSetVariableDescriptorCountAllocateInfo); + if (!IsExtEnabled(device_extensions.vk_ext_descriptor_indexing)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_descriptor_indexing"); } + VkDescriptorSetVariableDescriptorCountAllocateInfo* structure = + (VkDescriptorSetVariableDescriptorCountAllocateInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::descriptorSetCount), pNext_loc.dot(Field::pDescriptorCounts), + structure->descriptorSetCount, &structure->pDescriptorCounts, false, true, kVUIDUndefined, + "VUID-VkDescriptorSetVariableDescriptorCountAllocateInfo-pDescriptorCounts-parameter"); } } break; - // Validation code for VkWriteDescriptorSetAccelerationStructureNV structure members - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: { // Covers - // VUID-VkWriteDescriptorSetAccelerationStructureNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWriteDescriptorSetAccelerationStructureNV); - if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_ray_tracing"); - } - VkWriteDescriptorSetAccelerationStructureNV* structure = (VkWriteDescriptorSetAccelerationStructureNV*)header; - skip |= - ValidateArray(pNext_loc.dot(Field::accelerationStructureCount), pNext_loc.dot(Field::pAccelerationStructures), - structure->accelerationStructureCount, &structure->pAccelerationStructures, true, false, - "VUID-VkWriteDescriptorSetAccelerationStructureNV-accelerationStructureCount-arraylength", - "VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-parameter"); + // Validation code for VkDescriptorSetVariableDescriptorCountLayoutSupport structure members + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: { // Covers + // VUID-VkDescriptorSetVariableDescriptorCountLayoutSupport-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_descriptor_indexing)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_descriptor_indexing))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT), but its parent extension " + "VK_EXT_descriptor_indexing has not been enabled."); } } break; - // No Validation code for VkPhysicalDeviceRayTracingPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceRayTracingPropertiesNV-sType-sType + // Validation code for VkSubpassDescriptionDepthStencilResolve structure members + case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: { // Covers + // VUID-VkSubpassDescriptionDepthStencilResolve-sType-sType - // Validation code for VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_depth_stencil_resolve)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_depth_stencil_resolve))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE), but its parent extension " + "VK_KHR_depth_stencil_resolve has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_representative_fragment_test)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSubpassDescriptionDepthStencilResolve); + if (!IsExtEnabled(device_extensions.vk_khr_depth_stencil_resolve)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_representative_fragment_test) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_depth_stencil_resolve"); + } + VkSubpassDescriptionDepthStencilResolve* structure = (VkSubpassDescriptionDepthStencilResolve*)header; + skip |= ValidateStructType(pNext_loc.dot(Field::pDepthStencilResolveAttachment), + "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2", structure->pDepthStencilResolveAttachment, + VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, false, + "VUID-VkSubpassDescriptionDepthStencilResolve-pDepthStencilResolveAttachment-parameter", + "VUID-VkAttachmentReference2-sType-sType"); + + if (structure->pDepthStencilResolveAttachment != nullptr) { + [[maybe_unused]] const Location pDepthStencilResolveAttachment_loc = + pNext_loc.dot(Field::pDepthStencilResolveAttachment); + skip |= ValidateRangedEnum(pDepthStencilResolveAttachment_loc.dot(Field::layout), vvl::Enum::VkImageLayout, + structure->pDepthStencilResolveAttachment->layout, + "VUID-VkAttachmentReference2-layout-parameter"); } - VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV* structure = - (VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::representativeFragmentTest), structure->representativeFragmentTest); } } break; - // Validation code for VkPipelineRepresentativeFragmentTestStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineRepresentativeFragmentTestStateCreateInfoNV-sType-sType + // Validation code for VkImageStencilUsageCreateInfo structure members + case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: { // Covers VUID-VkImageStencilUsageCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_separate_stencil_usage)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_separate_stencil_usage))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO), but " + "its parent extension " + "VK_EXT_separate_stencil_usage has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPipelineRepresentativeFragmentTestStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_representative_fragment_test)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageStencilUsageCreateInfo); + if (!IsExtEnabled(device_extensions.vk_ext_separate_stencil_usage)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_representative_fragment_test"); + "extended struct requires the extensions VK_EXT_separate_stencil_usage"); } - VkPipelineRepresentativeFragmentTestStateCreateInfoNV* structure = - (VkPipelineRepresentativeFragmentTestStateCreateInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::representativeFragmentTestEnable), - structure->representativeFragmentTestEnable); + VkImageStencilUsageCreateInfo* structure = (VkImageStencilUsageCreateInfo*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::stencilUsage), vvl::FlagBitmask::VkImageUsageFlagBits, + AllVkImageUsageFlagBits, structure->stencilUsage, kRequiredFlags, + "VUID-VkImageStencilUsageCreateInfo-stencilUsage-parameter", + "VUID-VkImageStencilUsageCreateInfo-stencilUsage-requiredbitmask"); } } break; - // Validation code for VkPhysicalDeviceImageViewImageFormatInfoEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT: { // Covers - // VUID-VkPhysicalDeviceImageViewImageFormatInfoEXT-sType-sType + // Validation code for VkSamplerReductionModeCreateInfo structure members + case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: { // Covers VUID-VkSamplerReductionModeCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_sampler_filter_minmax)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_sampler_filter_minmax))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO), " + "but its parent extension " + "VK_EXT_sampler_filter_minmax has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageViewImageFormatInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_filter_cubic)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_filter_cubic"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerReductionModeCreateInfo); + if (!IsExtEnabled(device_extensions.vk_ext_sampler_filter_minmax)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_sampler_filter_minmax"); } - VkPhysicalDeviceImageViewImageFormatInfoEXT* structure = (VkPhysicalDeviceImageViewImageFormatInfoEXT*)header; + VkSamplerReductionModeCreateInfo* structure = (VkSamplerReductionModeCreateInfo*)header; skip |= - ValidateRangedEnum(pNext_loc.dot(Field::imageViewType), vvl::Enum::VkImageViewType, structure->imageViewType, - "VUID-VkPhysicalDeviceImageViewImageFormatInfoEXT-imageViewType-parameter"); + ValidateRangedEnum(pNext_loc.dot(Field::reductionMode), vvl::Enum::VkSamplerReductionMode, + structure->reductionMode, "VUID-VkSamplerReductionModeCreateInfo-reductionMode-parameter"); } } break; - // No Validation code for VkFilterCubicImageViewImageFormatPropertiesEXT structure members -- Covers - // VUID-VkFilterCubicImageViewImageFormatPropertiesEXT-sType-sType + // Validation code for VkFramebufferAttachmentsCreateInfo structure members + case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: { // Covers VUID-VkFramebufferAttachmentsCreateInfo-sType-sType - // Validation code for VkImportMemoryHostPointerInfoEXT structure members - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: { // Covers VUID-VkImportMemoryHostPointerInfoEXT-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_imageless_framebuffer)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO), " + "but its parent extension " + "VK_KHR_imageless_framebuffer has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryHostPointerInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_external_memory_host)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkFramebufferAttachmentsCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_external_memory_host"); + "extended struct requires the extensions VK_KHR_imageless_framebuffer"); + } + VkFramebufferAttachmentsCreateInfo* structure = (VkFramebufferAttachmentsCreateInfo*)header; + skip |= ValidateStructTypeArray( + pNext_loc.dot(Field::attachmentImageInfoCount), pNext_loc.dot(Field::pAttachmentImageInfos), + "VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO", structure->attachmentImageInfoCount, + structure->pAttachmentImageInfos, VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENT_IMAGE_INFO, false, true, + "VUID-VkFramebufferAttachmentImageInfo-sType-sType", + "VUID-VkFramebufferAttachmentsCreateInfo-pAttachmentImageInfos-parameter", kVUIDUndefined); + + if (structure->pAttachmentImageInfos != nullptr) { + for (uint32_t attachmentImageInfoIndex = 0; attachmentImageInfoIndex < structure->attachmentImageInfoCount; + ++attachmentImageInfoIndex) { + [[maybe_unused]] const Location pAttachmentImageInfos_loc = + pNext_loc.dot(Field::pAttachmentImageInfos, attachmentImageInfoIndex); + skip |= ValidateFlags(pAttachmentImageInfos_loc.dot(Field::flags), vvl::FlagBitmask::VkImageCreateFlagBits, + AllVkImageCreateFlagBits, + structure->pAttachmentImageInfos[attachmentImageInfoIndex].flags, kOptionalFlags, + "VUID-VkFramebufferAttachmentImageInfo-flags-parameter"); + + skip |= + ValidateFlags(pAttachmentImageInfos_loc.dot(Field::usage), vvl::FlagBitmask::VkImageUsageFlagBits, + AllVkImageUsageFlagBits, structure->pAttachmentImageInfos[attachmentImageInfoIndex].usage, + kRequiredFlags, "VUID-VkFramebufferAttachmentImageInfo-usage-parameter", + "VUID-VkFramebufferAttachmentImageInfo-usage-requiredbitmask"); + + skip |= ValidateRangedEnumArray(pAttachmentImageInfos_loc.dot(Field::viewFormatCount), + pAttachmentImageInfos_loc.dot(Field::pViewFormats), vvl::Enum::VkFormat, + structure->pAttachmentImageInfos[attachmentImageInfoIndex].viewFormatCount, + structure->pAttachmentImageInfos[attachmentImageInfoIndex].pViewFormats, + false, true, kVUIDUndefined, + "VUID-VkFramebufferAttachmentImageInfo-pViewFormats-parameter"); + } } - VkImportMemoryHostPointerInfoEXT* structure = (VkImportMemoryHostPointerInfoEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kRequiredSingleBit, - "VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter", - "VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter"); - - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pHostPointer), structure->pHostPointer, - "VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-parameter"); } } break; - // No Validation code for VkPhysicalDeviceExternalMemoryHostPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceExternalMemoryHostPropertiesEXT-sType-sType + // Validation code for VkRenderPassAttachmentBeginInfo structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: { // Covers VUID-VkRenderPassAttachmentBeginInfo-sType-sType - // Validation code for VkPipelineCompilerControlCreateInfoAMD structure members - case VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD: { // Covers - // VUID-VkPipelineCompilerControlCreateInfoAMD-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_imageless_framebuffer)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO), " + "but its parent extension " + "VK_KHR_imageless_framebuffer has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCompilerControlCreateInfoAMD); - if (!IsExtEnabled(device_extensions.vk_amd_pipeline_compiler_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassAttachmentBeginInfo); + if (!IsExtEnabled(device_extensions.vk_khr_imageless_framebuffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_AMD_pipeline_compiler_control"); + "extended struct requires the extensions VK_KHR_imageless_framebuffer"); } - VkPipelineCompilerControlCreateInfoAMD* structure = (VkPipelineCompilerControlCreateInfoAMD*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::compilerControlFlags), structure->compilerControlFlags, - "VUID-VkPipelineCompilerControlCreateInfoAMD-compilerControlFlags-zerobitmask"); + VkRenderPassAttachmentBeginInfo* structure = (VkRenderPassAttachmentBeginInfo*)header; + skip |= ValidateArray(pNext_loc.dot(Field::attachmentCount), pNext_loc.dot(Field::pAttachments), + structure->attachmentCount, &structure->pAttachments, false, true, kVUIDUndefined, + "VUID-VkRenderPassAttachmentBeginInfo-pAttachments-parameter"); } } break; - // No Validation code for VkPhysicalDeviceShaderCorePropertiesAMD structure members -- Covers - // VUID-VkPhysicalDeviceShaderCorePropertiesAMD-sType-sType + // Validation code for VkAttachmentReferenceStencilLayout structure members + case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: { // Covers VUID-VkAttachmentReferenceStencilLayout-sType-sType - // Validation code for VkDeviceMemoryOverallocationCreateInfoAMD structure members - case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: { // Covers - // VUID-VkDeviceMemoryOverallocationCreateInfoAMD-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_separate_depth_stencil_layouts)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT), " + "but its parent extension " + "VK_KHR_separate_depth_stencil_layouts has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceMemoryOverallocationCreateInfoAMD); - if (!IsExtEnabled(device_extensions.vk_amd_memory_overallocation_behavior)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAttachmentReferenceStencilLayout); + if (!IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_AMD_memory_overallocation_behavior"); + "extended struct requires the extensions VK_KHR_separate_depth_stencil_layouts"); } - VkDeviceMemoryOverallocationCreateInfoAMD* structure = (VkDeviceMemoryOverallocationCreateInfoAMD*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::overallocationBehavior), - vvl::Enum::VkMemoryOverallocationBehaviorAMD, structure->overallocationBehavior, - "VUID-VkDeviceMemoryOverallocationCreateInfoAMD-overallocationBehavior-parameter"); + VkAttachmentReferenceStencilLayout* structure = (VkAttachmentReferenceStencilLayout*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilLayout), vvl::Enum::VkImageLayout, structure->stencilLayout, + "VUID-VkAttachmentReferenceStencilLayout-stencilLayout-parameter"); } } break; - // No Validation code for VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT-sType-sType -#ifdef VK_USE_PLATFORM_GGP - - // No Validation code for VkPresentFrameTokenGGP structure members -- Covers VUID-VkPresentFrameTokenGGP-sType-sType -#endif // VK_USE_PLATFORM_GGP + // Validation code for VkAttachmentDescriptionStencilLayout structure members + case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: { // Covers + // VUID-VkAttachmentDescriptionStencilLayout-sType-sType - // Validation code for VkPhysicalDeviceComputeShaderDerivativesFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceComputeShaderDerivativesFeaturesNV-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_separate_depth_stencil_layouts)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT), but its parent extension " + "VK_KHR_separate_depth_stencil_layouts has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceComputeShaderDerivativesFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_compute_shader_derivatives)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAttachmentDescriptionStencilLayout); + if (!IsExtEnabled(device_extensions.vk_khr_separate_depth_stencil_layouts)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceComputeShaderDerivativesFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_compute_shader_derivatives) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_separate_depth_stencil_layouts"); } - VkPhysicalDeviceComputeShaderDerivativesFeaturesNV* structure = - (VkPhysicalDeviceComputeShaderDerivativesFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::computeDerivativeGroupQuads), structure->computeDerivativeGroupQuads); + VkAttachmentDescriptionStencilLayout* structure = (VkAttachmentDescriptionStencilLayout*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilInitialLayout), vvl::Enum::VkImageLayout, + structure->stencilInitialLayout, + "VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::computeDerivativeGroupLinear), structure->computeDerivativeGroupLinear); + skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilFinalLayout), vvl::Enum::VkImageLayout, + structure->stencilFinalLayout, + "VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-parameter"); } } break; - // Validation code for VkPhysicalDeviceMeshShaderFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceMeshShaderFeaturesNV-sType-sType + // Validation code for VkSemaphoreTypeCreateInfo structure members + case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: { // Covers VUID-VkSemaphoreTypeCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO), but its " + "parent extension " + "VK_KHR_timeline_semaphore has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMeshShaderFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_mesh_shader)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSemaphoreTypeCreateInfo); + if (!IsExtEnabled(device_extensions.vk_khr_timeline_semaphore)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMeshShaderFeaturesNV, but when creating VkDevice, " - "the parent extension " - "(VK_NV_mesh_shader) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_timeline_semaphore"); } - VkPhysicalDeviceMeshShaderFeaturesNV* structure = (VkPhysicalDeviceMeshShaderFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::taskShader), structure->taskShader); - - skip |= ValidateBool32(pNext_loc.dot(Field::meshShader), structure->meshShader); + VkSemaphoreTypeCreateInfo* structure = (VkSemaphoreTypeCreateInfo*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::semaphoreType), vvl::Enum::VkSemaphoreType, + structure->semaphoreType, "VUID-VkSemaphoreTypeCreateInfo-semaphoreType-parameter"); } } break; - // No Validation code for VkPhysicalDeviceMeshShaderPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceMeshShaderPropertiesNV-sType-sType + // Validation code for VkTimelineSemaphoreSubmitInfo structure members + case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: { // Covers VUID-VkTimelineSemaphoreSubmitInfo-sType-sType - // Validation code for VkPhysicalDeviceShaderImageFootprintFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceShaderImageFootprintFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderImageFootprintFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_shader_image_footprint)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderImageFootprintFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_shader_image_footprint) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderImageFootprintFeaturesNV* structure = (VkPhysicalDeviceShaderImageFootprintFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::imageFootprint), structure->imageFootprint); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_timeline_semaphore)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_timeline_semaphore))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO), but " + "its parent extension " + "VK_KHR_timeline_semaphore has not been enabled."); } } break; - // No Validation code for VkPipelineViewportExclusiveScissorStateCreateInfoNV structure members -- Covers - // VUID-VkPipelineViewportExclusiveScissorStateCreateInfoNV-sType-sType + // Validation code for VkBufferOpaqueCaptureAddressCreateInfo structure members + case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: { // Covers + // VUID-VkBufferOpaqueCaptureAddressCreateInfo-sType-sType - // Validation code for VkPhysicalDeviceExclusiveScissorFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceExclusiveScissorFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExclusiveScissorFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_scissor_exclusive)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExclusiveScissorFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_scissor_exclusive) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceExclusiveScissorFeaturesNV* structure = (VkPhysicalDeviceExclusiveScissorFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::exclusiveScissor), structure->exclusiveScissor); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_buffer_device_address)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_buffer_device_address))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO), but its parent extension " + "VK_KHR_buffer_device_address has not been enabled."); } } break; - // No Validation code for VkQueueFamilyCheckpointPropertiesNV structure members -- Covers - // VUID-VkQueueFamilyCheckpointPropertiesNV-sType-sType + // Validation code for VkMemoryOpaqueCaptureAddressAllocateInfo structure members + case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: { // Covers + // VUID-VkMemoryOpaqueCaptureAddressAllocateInfo-sType-sType - // Validation code for VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL: { // Covers - // VUID-VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL); - if (!IsExtEnabled(device_extensions.vk_intel_shader_integer_functions2)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL, but when " - "creating VkDevice, the parent extension " - "(VK_INTEL_shader_integer_functions2) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL* structure = - (VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderIntegerFunctions2), structure->shaderIntegerFunctions2); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_buffer_device_address)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_buffer_device_address))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO), but its parent extension " + "VK_KHR_buffer_device_address has not been enabled."); } } break; - // Validation code for VkQueryPoolPerformanceQueryCreateInfoINTEL structure members - case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL: { // Covers - // VUID-VkQueryPoolPerformanceQueryCreateInfoINTEL-sType-sType + // Validation code for VkPipelineCreationFeedbackCreateInfo structure members + case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: { // Covers + // VUID-VkPipelineCreationFeedbackCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_pipeline_creation_feedback)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_pipeline_creation_feedback))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO), but its parent extension " + "VK_EXT_pipeline_creation_feedback has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryPoolPerformanceQueryCreateInfoINTEL); - if (!IsExtEnabled(device_extensions.vk_intel_performance_query)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCreationFeedbackCreateInfo); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_creation_feedback)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_INTEL_performance_query"); + "extended struct requires the extensions VK_EXT_pipeline_creation_feedback"); } - VkQueryPoolPerformanceQueryCreateInfoINTEL* structure = (VkQueryPoolPerformanceQueryCreateInfoINTEL*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::performanceCountersSampling), - vvl::Enum::VkQueryPoolSamplingModeINTEL, structure->performanceCountersSampling, - "VUID-VkQueryPoolPerformanceQueryCreateInfoINTEL-performanceCountersSampling-parameter"); - } - } break; + VkPipelineCreationFeedbackCreateInfo* structure = (VkPipelineCreationFeedbackCreateInfo*)header; + skip |= + ValidateRequiredPointer(pNext_loc.dot(Field::pPipelineCreationFeedback), structure->pPipelineCreationFeedback, + "VUID-VkPipelineCreationFeedbackCreateInfo-pPipelineCreationFeedback-parameter"); - // No Validation code for VkPhysicalDevicePCIBusInfoPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDevicePCIBusInfoPropertiesEXT-sType-sType + if (structure->pPipelineCreationFeedback != nullptr) { + [[maybe_unused]] const Location pPipelineCreationFeedback_loc = pNext_loc.dot(Field::pPipelineCreationFeedback); + } - // No Validation code for VkDisplayNativeHdrSurfaceCapabilitiesAMD structure members -- Covers - // VUID-VkDisplayNativeHdrSurfaceCapabilitiesAMD-sType-sType + skip |= ValidateArray( + pNext_loc.dot(Field::pipelineStageCreationFeedbackCount), pNext_loc.dot(Field::pPipelineStageCreationFeedbacks), + structure->pipelineStageCreationFeedbackCount, &structure->pPipelineStageCreationFeedbacks, false, true, + kVUIDUndefined, "VUID-VkPipelineCreationFeedbackCreateInfo-pPipelineStageCreationFeedbacks-parameter"); - // Validation code for VkSwapchainDisplayNativeHdrCreateInfoAMD structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD: { // Covers - // VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainDisplayNativeHdrCreateInfoAMD); - if (!IsExtEnabled(device_extensions.vk_amd_display_native_hdr)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_AMD_display_native_hdr"); + if (structure->pPipelineStageCreationFeedbacks != nullptr) { + for (uint32_t pipelineStageCreationFeedbackIndex = 0; + pipelineStageCreationFeedbackIndex < structure->pipelineStageCreationFeedbackCount; + ++pipelineStageCreationFeedbackIndex) { + [[maybe_unused]] const Location pPipelineStageCreationFeedbacks_loc = + pNext_loc.dot(Field::pPipelineStageCreationFeedbacks, pipelineStageCreationFeedbackIndex); + } } - VkSwapchainDisplayNativeHdrCreateInfoAMD* structure = (VkSwapchainDisplayNativeHdrCreateInfoAMD*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::localDimmingEnable), structure->localDimmingEnable); } } break; - // Validation code for VkPhysicalDeviceFragmentDensityMapFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceFragmentDensityMapFeaturesEXT-sType-sType + // Validation code for VkDevicePrivateDataCreateInfo structure members + case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: { // Covers VUID-VkDevicePrivateDataCreateInfo-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_private_data)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_private_data))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO), but " + "its parent extension " + "VK_EXT_private_data has not been enabled."); + } + } break; + + // Validation code for VkMemoryBarrier2 structure members + case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: { // Covers VUID-VkMemoryBarrier2-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_synchronization2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_synchronization2))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_MEMORY_BARRIER_2), but its parent extension " + "VK_KHR_synchronization2 has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentDensityMapFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_fragment_density_map)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMemoryBarrier2); + if (!IsExtEnabled(device_extensions.vk_khr_synchronization2)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentDensityMapFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_fragment_density_map) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_synchronization2"); } - VkPhysicalDeviceFragmentDensityMapFeaturesEXT* structure = (VkPhysicalDeviceFragmentDensityMapFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMap), structure->fragmentDensityMap); + VkMemoryBarrier2* structure = (VkMemoryBarrier2*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::srcStageMask), vvl::FlagBitmask::VkPipelineStageFlagBits2, + AllVkPipelineStageFlagBits2, structure->srcStageMask, kOptionalFlags, + "VUID-VkMemoryBarrier2-srcStageMask-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapDynamic), structure->fragmentDensityMapDynamic); + skip |= + ValidateFlags(pNext_loc.dot(Field::srcAccessMask), vvl::FlagBitmask::VkAccessFlagBits2, AllVkAccessFlagBits2, + structure->srcAccessMask, kOptionalFlags, "VUID-VkMemoryBarrier2-srcAccessMask-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapNonSubsampledImages), - structure->fragmentDensityMapNonSubsampledImages); + skip |= ValidateFlags(pNext_loc.dot(Field::dstStageMask), vvl::FlagBitmask::VkPipelineStageFlagBits2, + AllVkPipelineStageFlagBits2, structure->dstStageMask, kOptionalFlags, + "VUID-VkMemoryBarrier2-dstStageMask-parameter"); + + skip |= + ValidateFlags(pNext_loc.dot(Field::dstAccessMask), vvl::FlagBitmask::VkAccessFlagBits2, AllVkAccessFlagBits2, + structure->dstAccessMask, kOptionalFlags, "VUID-VkMemoryBarrier2-dstAccessMask-parameter"); } } break; - // No Validation code for VkPhysicalDeviceFragmentDensityMapPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceFragmentDensityMapPropertiesEXT-sType-sType + // Validation code for VkPipelineShaderStageRequiredSubgroupSizeCreateInfo structure members + case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: { // Covers + // VUID-VkPipelineShaderStageRequiredSubgroupSizeCreateInfo-sType-sType - // Validation code for VkRenderPassFragmentDensityMapCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT: { // Covers - // VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassFragmentDensityMapCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_fragment_density_map)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_fragment_density_map"); - } - VkRenderPassFragmentDensityMapCreateInfoEXT* structure = (VkRenderPassFragmentDensityMapCreateInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::layout), vvl::Enum::VkImageLayout, - structure->fragmentDensityMapAttachment.layout, - "VUID-VkAttachmentReference-layout-parameter"); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_subgroup_size_control)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_subgroup_size_control))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO), but its parent extension " + "VK_EXT_subgroup_size_control has not been enabled."); } } break; - // No Validation code for VkPhysicalDeviceShaderCoreProperties2AMD structure members -- Covers - // VUID-VkPhysicalDeviceShaderCoreProperties2AMD-sType-sType + // Validation code for VkWriteDescriptorSetInlineUniformBlock structure members + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: { // Covers + // VUID-VkWriteDescriptorSetInlineUniformBlock-sType-sType - // Validation code for VkPhysicalDeviceCoherentMemoryFeaturesAMD structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD: { // Covers - // VUID-VkPhysicalDeviceCoherentMemoryFeaturesAMD-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK), but its parent extension " + "VK_EXT_inline_uniform_block has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCoherentMemoryFeaturesAMD); - if (!IsExtEnabled(device_extensions.vk_amd_device_coherent_memory)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWriteDescriptorSetInlineUniformBlock); + if (!IsExtEnabled(device_extensions.vk_ext_inline_uniform_block)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCoherentMemoryFeaturesAMD, but when creating " - "VkDevice, the parent extension " - "(VK_AMD_device_coherent_memory) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_inline_uniform_block"); } - VkPhysicalDeviceCoherentMemoryFeaturesAMD* structure = (VkPhysicalDeviceCoherentMemoryFeaturesAMD*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::deviceCoherentMemory), structure->deviceCoherentMemory); + VkWriteDescriptorSetInlineUniformBlock* structure = (VkWriteDescriptorSetInlineUniformBlock*)header; + skip |= + ValidateArray(pNext_loc.dot(Field::dataSize), pNext_loc.dot(Field::pData), structure->dataSize, + &structure->pData, true, true, "VUID-VkWriteDescriptorSetInlineUniformBlock-dataSize-arraylength", + "VUID-VkWriteDescriptorSetInlineUniformBlock-pData-parameter"); } } break; - // Validation code for VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_image_atomic_int64)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_shader_image_atomic_int64) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT* structure = - (VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderImageInt64Atomics), structure->shaderImageInt64Atomics); + // Validation code for VkDescriptorPoolInlineUniformBlockCreateInfo structure members + case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: { // Covers + // VUID-VkDescriptorPoolInlineUniformBlockCreateInfo-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::sparseImageInt64Atomics), structure->sparseImageInt64Atomics); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_EXT_inline_uniform_block)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_ext_inline_uniform_block))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO), but its parent extension " + "VK_EXT_inline_uniform_block has not been enabled."); } } break; - // No Validation code for VkPhysicalDeviceMemoryBudgetPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceMemoryBudgetPropertiesEXT-sType-sType + // Validation code for VkPipelineRenderingCreateInfo structure members + case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: { // Covers VUID-VkPipelineRenderingCreateInfo-sType-sType - // Validation code for VkPhysicalDeviceMemoryPriorityFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceMemoryPriorityFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMemoryPriorityFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_memory_priority)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMemoryPriorityFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_memory_priority) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceMemoryPriorityFeaturesEXT* structure = (VkPhysicalDeviceMemoryPriorityFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::memoryPriority), structure->memoryPriority); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO), but " + "its parent extension " + "VK_KHR_dynamic_rendering has not been enabled."); } } break; - // No Validation code for VkMemoryPriorityAllocateInfoEXT structure members -- Covers - // VUID-VkMemoryPriorityAllocateInfoEXT-sType-sType + // Validation code for VkCommandBufferInheritanceRenderingInfo structure members + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: { // Covers + // VUID-VkCommandBufferInheritanceRenderingInfo-sType-sType - // Validation code for VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEDICATED_ALLOCATION_IMAGE_ALIASING_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV-sType-sType + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType " + "(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO), but its parent extension " + "VK_KHR_dynamic_rendering has not been enabled."); + } if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_dedicated_allocation_image_aliasing)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkCommandBufferInheritanceRenderingInfo); + if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_dedicated_allocation_image_aliasing) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_dynamic_rendering"); } - VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV* structure = - (VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dedicatedAllocationImageAliasing), - structure->dedicatedAllocationImageAliasing); + VkCommandBufferInheritanceRenderingInfo* structure = (VkCommandBufferInheritanceRenderingInfo*)header; + skip |= + ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkRenderingFlagBits, AllVkRenderingFlagBits, + structure->flags, kOptionalFlags, "VUID-VkCommandBufferInheritanceRenderingInfo-flags-parameter"); + + skip |= ValidateRangedEnumArray( + pNext_loc.dot(Field::colorAttachmentCount), pNext_loc.dot(Field::pColorAttachmentFormats), vvl::Enum::VkFormat, + structure->colorAttachmentCount, structure->pColorAttachmentFormats, false, true, kVUIDUndefined, + "VUID-VkCommandBufferInheritanceRenderingInfo-pColorAttachmentFormats-parameter"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::depthAttachmentFormat), vvl::Enum::VkFormat, + structure->depthAttachmentFormat, + "VUID-VkCommandBufferInheritanceRenderingInfo-depthAttachmentFormat-parameter"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::stencilAttachmentFormat), vvl::Enum::VkFormat, + structure->stencilAttachmentFormat, + "VUID-VkCommandBufferInheritanceRenderingInfo-stencilAttachmentFormat-parameter"); + + skip |= ValidateFlags(pNext_loc.dot(Field::rasterizationSamples), vvl::FlagBitmask::VkSampleCountFlagBits, + AllVkSampleCountFlagBits, structure->rasterizationSamples, kOptionalSingleBit, + "VUID-VkCommandBufferInheritanceRenderingInfo-rasterizationSamples-parameter"); } } break; - // Validation code for VkPhysicalDeviceBufferDeviceAddressFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceBufferDeviceAddressFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBufferDeviceAddressFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_buffer_device_address)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceBufferDeviceAddressFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_buffer_device_address) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceBufferDeviceAddressFeaturesEXT* structure = (VkPhysicalDeviceBufferDeviceAddressFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddress), structure->bufferDeviceAddress); - - skip |= ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressCaptureReplay), - structure->bufferDeviceAddressCaptureReplay); + // Validation code for VkFormatProperties3 structure members + case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: { // Covers VUID-VkFormatProperties3-sType-sType - skip |= - ValidateBool32(pNext_loc.dot(Field::bufferDeviceAddressMultiDevice), structure->bufferDeviceAddressMultiDevice); + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_format_feature_flags2)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_format_feature_flags2))) { + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3), but its parent extension " + "VK_KHR_format_feature_flags2 has not been enabled."); } } break; - // No Validation code for VkBufferDeviceAddressCreateInfoEXT structure members -- Covers - // VUID-VkBufferDeviceAddressCreateInfoEXT-sType-sType + // No Validation code for VkImageSwapchainCreateInfoKHR structure members -- Covers + // VUID-VkImageSwapchainCreateInfoKHR-sType-sType - // Validation code for VkValidationFeaturesEXT structure members - case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: { // Covers VUID-VkValidationFeaturesEXT-sType-sType + // Validation code for VkBindImageMemorySwapchainInfoKHR structure members + case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: { // Covers VUID-VkBindImageMemorySwapchainInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkValidationFeaturesEXT); - VkValidationFeaturesEXT* structure = (VkValidationFeaturesEXT*)header; - skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::enabledValidationFeatureCount), - pNext_loc.dot(Field::pEnabledValidationFeatures), - vvl::Enum::VkValidationFeatureEnableEXT, structure->enabledValidationFeatureCount, - structure->pEnabledValidationFeatures, false, true, kVUIDUndefined, - "VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-parameter"); - - skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::disabledValidationFeatureCount), - pNext_loc.dot(Field::pDisabledValidationFeatures), - vvl::Enum::VkValidationFeatureDisableEXT, structure->disabledValidationFeatureCount, - structure->pDisabledValidationFeatures, false, true, kVUIDUndefined, - "VUID-VkValidationFeaturesEXT-pDisabledValidationFeatures-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindImageMemorySwapchainInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_swapchain) && !IsExtEnabled(device_extensions.vk_khr_device_group)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_KHR_swapchain or VK_KHR_device_group"); + } + VkBindImageMemorySwapchainInfoKHR* structure = (VkBindImageMemorySwapchainInfoKHR*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::swapchain), structure->swapchain); } } break; - // Validation code for VkPhysicalDeviceCooperativeMatrixFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceCooperativeMatrixFeaturesNV-sType-sType + // Validation code for VkDeviceGroupPresentInfoKHR structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: { // Covers VUID-VkDeviceGroupPresentInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCooperativeMatrixFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_cooperative_matrix)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupPresentInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_swapchain) && !IsExtEnabled(device_extensions.vk_khr_device_group)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCooperativeMatrixFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_cooperative_matrix) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_swapchain or VK_KHR_device_group"); } - VkPhysicalDeviceCooperativeMatrixFeaturesNV* structure = (VkPhysicalDeviceCooperativeMatrixFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrix), structure->cooperativeMatrix); + VkDeviceGroupPresentInfoKHR* structure = (VkDeviceGroupPresentInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pDeviceMasks), + structure->swapchainCount, &structure->pDeviceMasks, false, true, kVUIDUndefined, + "VUID-VkDeviceGroupPresentInfoKHR-pDeviceMasks-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::cooperativeMatrixRobustBufferAccess), - structure->cooperativeMatrixRobustBufferAccess); + skip |= ValidateFlags(pNext_loc.dot(Field::mode), vvl::FlagBitmask::VkDeviceGroupPresentModeFlagBitsKHR, + AllVkDeviceGroupPresentModeFlagBitsKHR, structure->mode, kRequiredSingleBit, + "VUID-VkDeviceGroupPresentInfoKHR-mode-parameter", + "VUID-VkDeviceGroupPresentInfoKHR-mode-parameter"); } } break; - // No Validation code for VkPhysicalDeviceCooperativeMatrixPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceCooperativeMatrixPropertiesNV-sType-sType - - // Validation code for VkPhysicalDeviceCoverageReductionModeFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COVERAGE_REDUCTION_MODE_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceCoverageReductionModeFeaturesNV-sType-sType + // Validation code for VkDeviceGroupSwapchainCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: { // Covers + // VUID-VkDeviceGroupSwapchainCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCoverageReductionModeFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_coverage_reduction_mode)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceGroupSwapchainCreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_swapchain) && !IsExtEnabled(device_extensions.vk_khr_device_group)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCoverageReductionModeFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_coverage_reduction_mode) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_swapchain or VK_KHR_device_group"); } - VkPhysicalDeviceCoverageReductionModeFeaturesNV* structure = - (VkPhysicalDeviceCoverageReductionModeFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::coverageReductionMode), structure->coverageReductionMode); + VkDeviceGroupSwapchainCreateInfoKHR* structure = (VkDeviceGroupSwapchainCreateInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::modes), vvl::FlagBitmask::VkDeviceGroupPresentModeFlagBitsKHR, + AllVkDeviceGroupPresentModeFlagBitsKHR, structure->modes, kRequiredFlags, + "VUID-VkDeviceGroupSwapchainCreateInfoKHR-modes-parameter", + "VUID-VkDeviceGroupSwapchainCreateInfoKHR-modes-requiredbitmask"); } } break; - // Validation code for VkPipelineCoverageReductionStateCreateInfoNV structure members - case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV: { // Covers - // VUID-VkPipelineCoverageReductionStateCreateInfoNV-sType-sType + // Validation code for VkDisplayPresentInfoKHR structure members + case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: { // Covers VUID-VkDisplayPresentInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCoverageReductionStateCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_coverage_reduction_mode)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDisplayPresentInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_display_swapchain)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_coverage_reduction_mode"); + "extended struct requires the extensions VK_KHR_display_swapchain"); } - VkPipelineCoverageReductionStateCreateInfoNV* structure = (VkPipelineCoverageReductionStateCreateInfoNV*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkPipelineCoverageReductionStateCreateInfoNV-flags-zerobitmask"); - - skip |= ValidateRangedEnum(pNext_loc.dot(Field::coverageReductionMode), vvl::Enum::VkCoverageReductionModeNV, - structure->coverageReductionMode, - "VUID-VkPipelineCoverageReductionStateCreateInfoNV-coverageReductionMode-parameter"); + VkDisplayPresentInfoKHR* structure = (VkDisplayPresentInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::persistent), structure->persistent); } } break; - // Validation code for VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_INTERLOCK_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT-sType-sType + // No Validation code for VkQueueFamilyQueryResultStatusPropertiesKHR structure members -- Covers + // VUID-VkQueueFamilyQueryResultStatusPropertiesKHR-sType-sType + + // No Validation code for VkQueueFamilyVideoPropertiesKHR structure members -- Covers + // VUID-VkQueueFamilyVideoPropertiesKHR-sType-sType + + // Validation code for VkVideoProfileInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR: { // Covers VUID-VkVideoProfileInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_fragment_shader_interlock)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_fragment_shader_interlock) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT* structure = - (VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT*)header; + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoProfileInfoKHR); + VkVideoProfileInfoKHR* structure = (VkVideoProfileInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::videoCodecOperation), vvl::FlagBitmask::VkVideoCodecOperationFlagBitsKHR, + AllVkVideoCodecOperationFlagBitsKHR, structure->videoCodecOperation, kRequiredSingleBit, + "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter", + "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter"); + skip |= - ValidateBool32(pNext_loc.dot(Field::fragmentShaderSampleInterlock), structure->fragmentShaderSampleInterlock); + ValidateFlags(pNext_loc.dot(Field::chromaSubsampling), vvl::FlagBitmask::VkVideoChromaSubsamplingFlagBitsKHR, + AllVkVideoChromaSubsamplingFlagBitsKHR, structure->chromaSubsampling, kRequiredFlags, + "VUID-VkVideoProfileInfoKHR-chromaSubsampling-parameter", + "VUID-VkVideoProfileInfoKHR-chromaSubsampling-requiredbitmask"); - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShaderPixelInterlock), structure->fragmentShaderPixelInterlock); + skip |= ValidateFlags(pNext_loc.dot(Field::lumaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, + AllVkVideoComponentBitDepthFlagBitsKHR, structure->lumaBitDepth, kRequiredFlags, + "VUID-VkVideoProfileInfoKHR-lumaBitDepth-parameter", + "VUID-VkVideoProfileInfoKHR-lumaBitDepth-requiredbitmask"); - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShaderShadingRateInterlock), - structure->fragmentShaderShadingRateInterlock); + skip |= ValidateFlags(pNext_loc.dot(Field::chromaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, + AllVkVideoComponentBitDepthFlagBitsKHR, structure->chromaBitDepth, kOptionalFlags, + "VUID-VkVideoProfileInfoKHR-chromaBitDepth-parameter"); } } break; - // Validation code for VkPhysicalDeviceYcbcrImageArraysFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_IMAGE_ARRAYS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceYcbcrImageArraysFeaturesEXT-sType-sType + // Validation code for VkVideoProfileListInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR: { // Covers VUID-VkVideoProfileListInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceYcbcrImageArraysFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_ycbcr_image_arrays)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceYcbcrImageArraysFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_ycbcr_image_arrays) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoProfileListInfoKHR); + VkVideoProfileListInfoKHR* structure = (VkVideoProfileListInfoKHR*)header; + skip |= ValidateStructTypeArray( + pNext_loc.dot(Field::profileCount), pNext_loc.dot(Field::pProfiles), "VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR", + structure->profileCount, structure->pProfiles, VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR, false, true, + "VUID-VkVideoProfileInfoKHR-sType-sType", "VUID-VkVideoProfileListInfoKHR-pProfiles-parameter", kVUIDUndefined); + + if (structure->pProfiles != nullptr) { + for (uint32_t profileIndex = 0; profileIndex < structure->profileCount; ++profileIndex) { + [[maybe_unused]] const Location pProfiles_loc = pNext_loc.dot(Field::pProfiles, profileIndex); + skip |= ValidateFlags( + pProfiles_loc.dot(Field::videoCodecOperation), vvl::FlagBitmask::VkVideoCodecOperationFlagBitsKHR, + AllVkVideoCodecOperationFlagBitsKHR, structure->pProfiles[profileIndex].videoCodecOperation, + kRequiredSingleBit, "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter", + "VUID-VkVideoProfileInfoKHR-videoCodecOperation-parameter"); + + skip |= ValidateFlags( + pProfiles_loc.dot(Field::chromaSubsampling), vvl::FlagBitmask::VkVideoChromaSubsamplingFlagBitsKHR, + AllVkVideoChromaSubsamplingFlagBitsKHR, structure->pProfiles[profileIndex].chromaSubsampling, + kRequiredFlags, "VUID-VkVideoProfileInfoKHR-chromaSubsampling-parameter", + "VUID-VkVideoProfileInfoKHR-chromaSubsampling-requiredbitmask"); + + skip |= ValidateFlags( + pProfiles_loc.dot(Field::lumaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, + AllVkVideoComponentBitDepthFlagBitsKHR, structure->pProfiles[profileIndex].lumaBitDepth, kRequiredFlags, + "VUID-VkVideoProfileInfoKHR-lumaBitDepth-parameter", + "VUID-VkVideoProfileInfoKHR-lumaBitDepth-requiredbitmask"); + + skip |= ValidateFlags( + pProfiles_loc.dot(Field::chromaBitDepth), vvl::FlagBitmask::VkVideoComponentBitDepthFlagBitsKHR, + AllVkVideoComponentBitDepthFlagBitsKHR, structure->pProfiles[profileIndex].chromaBitDepth, + kOptionalFlags, "VUID-VkVideoProfileInfoKHR-chromaBitDepth-parameter"); + } } - VkPhysicalDeviceYcbcrImageArraysFeaturesEXT* structure = (VkPhysicalDeviceYcbcrImageArraysFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::ycbcrImageArrays), structure->ycbcrImageArrays); } } break; - // Validation code for VkPhysicalDeviceProvokingVertexFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceProvokingVertexFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceProvokingVertexFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_provoking_vertex)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceProvokingVertexFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_provoking_vertex) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceProvokingVertexFeaturesEXT* structure = (VkPhysicalDeviceProvokingVertexFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::provokingVertexLast), structure->provokingVertexLast); + // No Validation code for VkVideoDecodeCapabilitiesKHR structure members -- Covers + // VUID-VkVideoDecodeCapabilitiesKHR-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::transformFeedbackPreservesProvokingVertex), - structure->transformFeedbackPreservesProvokingVertex); + // Validation code for VkVideoDecodeUsageInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_USAGE_INFO_KHR: { // Covers VUID-VkVideoDecodeUsageInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeUsageInfoKHR); + VkVideoDecodeUsageInfoKHR* structure = (VkVideoDecodeUsageInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::videoUsageHints), vvl::FlagBitmask::VkVideoDecodeUsageFlagBitsKHR, + AllVkVideoDecodeUsageFlagBitsKHR, structure->videoUsageHints, kOptionalFlags, + "VUID-VkVideoDecodeUsageInfoKHR-videoUsageHints-parameter"); } } break; - // No Validation code for VkPhysicalDeviceProvokingVertexPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceProvokingVertexPropertiesEXT-sType-sType + // No Validation code for VkVideoEncodeH264CapabilitiesKHR structure members -- Covers + // VUID-VkVideoEncodeH264CapabilitiesKHR-sType-sType - // Validation code for VkPipelineRasterizationProvokingVertexStateCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-sType-sType + // No Validation code for VkVideoEncodeH264QualityLevelPropertiesKHR structure members -- Covers + // VUID-VkVideoEncodeH264QualityLevelPropertiesKHR-sType-sType + + // Validation code for VkVideoEncodeH264SessionCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH264SessionCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPipelineRasterizationProvokingVertexStateCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_provoking_vertex)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_provoking_vertex"); - } - VkPipelineRasterizationProvokingVertexStateCreateInfoEXT* structure = - (VkPipelineRasterizationProvokingVertexStateCreateInfoEXT*)header; - skip |= ValidateRangedEnum( - pNext_loc.dot(Field::provokingVertexMode), vvl::Enum::VkProvokingVertexModeEXT, structure->provokingVertexMode, - "VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-provokingVertexMode-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264SessionCreateInfoKHR); + VkVideoEncodeH264SessionCreateInfoKHR* structure = (VkVideoEncodeH264SessionCreateInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::useMaxLevelIdc), structure->useMaxLevelIdc); } } break; -#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkSurfaceFullScreenExclusiveInfoEXT structure members - case VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT: { // Covers - // VUID-VkSurfaceFullScreenExclusiveInfoEXT-sType-sType + // No Validation code for VkVideoEncodeH264SessionParametersAddInfoKHR structure members -- Covers + // VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-sType-sType + + // Validation code for VkVideoEncodeH264SessionParametersCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH264SessionParametersCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceFullScreenExclusiveInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_full_screen_exclusive)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_full_screen_exclusive"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264SessionParametersCreateInfoKHR); + VkVideoEncodeH264SessionParametersCreateInfoKHR* structure = + (VkVideoEncodeH264SessionParametersCreateInfoKHR*)header; + skip |= ValidateStructType( + pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR", + structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, false, + "VUID-VkVideoEncodeH264SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", + "VUID-VkVideoEncodeH264SessionParametersAddInfoKHR-sType-sType"); + + if (structure->pParametersAddInfo != nullptr) { + [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); } - VkSurfaceFullScreenExclusiveInfoEXT* structure = (VkSurfaceFullScreenExclusiveInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::fullScreenExclusive), vvl::Enum::VkFullScreenExclusiveEXT, - structure->fullScreenExclusive, - "VUID-VkSurfaceFullScreenExclusiveInfoEXT-fullScreenExclusive-parameter"); } } break; - // Validation code for VkSurfaceCapabilitiesFullScreenExclusiveEXT structure members - case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT: { // Covers - // VUID-VkSurfaceCapabilitiesFullScreenExclusiveEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceCapabilitiesFullScreenExclusiveEXT); - if (!IsExtEnabled(device_extensions.vk_ext_full_screen_exclusive)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_full_screen_exclusive"); - } - VkSurfaceCapabilitiesFullScreenExclusiveEXT* structure = (VkSurfaceCapabilitiesFullScreenExclusiveEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::fullScreenExclusiveSupported), structure->fullScreenExclusiveSupported); + // Validation code for VkVideoEncodeH264SessionParametersGetInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH264SessionParametersGetInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264SessionParametersGetInfoKHR); + VkVideoEncodeH264SessionParametersGetInfoKHR* structure = (VkVideoEncodeH264SessionParametersGetInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::writeStdSPS), structure->writeStdSPS); + + skip |= ValidateBool32(pNext_loc.dot(Field::writeStdPPS), structure->writeStdPPS); } } break; - // No Validation code for VkSurfaceFullScreenExclusiveWin32InfoEXT structure members -- Covers - // VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-sType-sType -#endif // VK_USE_PLATFORM_WIN32_KHR + // No Validation code for VkVideoEncodeH264SessionParametersFeedbackInfoKHR structure members -- Covers + // VUID-VkVideoEncodeH264SessionParametersFeedbackInfoKHR-sType-sType - // Validation code for VkPhysicalDeviceShaderAtomicFloatFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceShaderAtomicFloatFeaturesEXT-sType-sType + // Validation code for VkVideoEncodeH264PictureInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR: { // Covers VUID-VkVideoEncodeH264PictureInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicFloatFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_atomic_float)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderAtomicFloatFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_shader_atomic_float) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderAtomicFloatFeaturesEXT* structure = (VkPhysicalDeviceShaderAtomicFloatFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat32Atomics), structure->shaderBufferFloat32Atomics); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat32AtomicAdd), structure->shaderBufferFloat32AtomicAdd); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat64Atomics), structure->shaderBufferFloat64Atomics); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264PictureInfoKHR); + VkVideoEncodeH264PictureInfoKHR* structure = (VkVideoEncodeH264PictureInfoKHR*)header; + skip |= ValidateStructTypeArray(pNext_loc.dot(Field::naluSliceEntryCount), pNext_loc.dot(Field::pNaluSliceEntries), + "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR", + structure->naluSliceEntryCount, structure->pNaluSliceEntries, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR, true, true, + "VUID-VkVideoEncodeH264NaluSliceInfoKHR-sType-sType", + "VUID-VkVideoEncodeH264PictureInfoKHR-pNaluSliceEntries-parameter", + "VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-arraylength"); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat64AtomicAdd), structure->shaderBufferFloat64AtomicAdd); + if (structure->pNaluSliceEntries != nullptr) { + for (uint32_t naluSliceEntryIndex = 0; naluSliceEntryIndex < structure->naluSliceEntryCount; + ++naluSliceEntryIndex) { + [[maybe_unused]] const Location pNaluSliceEntries_loc = + pNext_loc.dot(Field::pNaluSliceEntries, naluSliceEntryIndex); + skip |= ValidateRequiredPointer(pNaluSliceEntries_loc.dot(Field::pStdSliceHeader), + structure->pNaluSliceEntries[naluSliceEntryIndex].pStdSliceHeader, + "VUID-VkVideoEncodeH264NaluSliceInfoKHR-pStdSliceHeader-parameter"); + } + } - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat32Atomics), structure->shaderSharedFloat32Atomics); + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, + "VUID-VkVideoEncodeH264PictureInfoKHR-pStdPictureInfo-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat32AtomicAdd), structure->shaderSharedFloat32AtomicAdd); + skip |= ValidateBool32(pNext_loc.dot(Field::generatePrefixNalu), structure->generatePrefixNalu); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat64Atomics), structure->shaderSharedFloat64Atomics); + // Validation code for VkVideoEncodeH264DpbSlotInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoEncodeH264DpbSlotInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264DpbSlotInfoKHR); + VkVideoEncodeH264DpbSlotInfoKHR* structure = (VkVideoEncodeH264DpbSlotInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, + "VUID-VkVideoEncodeH264DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat64AtomicAdd), structure->shaderSharedFloat64AtomicAdd); + // No Validation code for VkVideoEncodeH264ProfileInfoKHR structure members -- Covers + // VUID-VkVideoEncodeH264ProfileInfoKHR-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderImageFloat32Atomics), structure->shaderImageFloat32Atomics); + // Validation code for VkVideoEncodeH264RateControlInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH264RateControlInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264RateControlInfoKHR); + VkVideoEncodeH264RateControlInfoKHR* structure = (VkVideoEncodeH264RateControlInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkVideoEncodeH264RateControlFlagBitsKHR, + AllVkVideoEncodeH264RateControlFlagBitsKHR, structure->flags, kOptionalFlags, + "VUID-VkVideoEncodeH264RateControlInfoKHR-flags-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderImageFloat32AtomicAdd), structure->shaderImageFloat32AtomicAdd); + // Validation code for VkVideoEncodeH264RateControlLayerInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH264RateControlLayerInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264RateControlLayerInfoKHR); + VkVideoEncodeH264RateControlLayerInfoKHR* structure = (VkVideoEncodeH264RateControlLayerInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::useMinQp), structure->useMinQp); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseImageFloat32Atomics), structure->sparseImageFloat32Atomics); + skip |= ValidateBool32(pNext_loc.dot(Field::useMaxQp), structure->useMaxQp); - skip |= ValidateBool32(pNext_loc.dot(Field::sparseImageFloat32AtomicAdd), structure->sparseImageFloat32AtomicAdd); + skip |= ValidateBool32(pNext_loc.dot(Field::useMaxFrameSize), structure->useMaxFrameSize); } } break; - // Validation code for VkPhysicalDeviceExtendedDynamicStateFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceExtendedDynamicStateFeaturesEXT-sType-sType + // Validation code for VkVideoEncodeH264GopRemainingFrameInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH264GopRemainingFrameInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicStateFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExtendedDynamicStateFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_extended_dynamic_state) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceExtendedDynamicStateFeaturesEXT* structure = - (VkPhysicalDeviceExtendedDynamicStateFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState), structure->extendedDynamicState); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH264GopRemainingFrameInfoKHR); + VkVideoEncodeH264GopRemainingFrameInfoKHR* structure = (VkVideoEncodeH264GopRemainingFrameInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::useGopRemainingFrames), structure->useGopRemainingFrames); } } break; - // Validation code for VkPhysicalDeviceHostImageCopyFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceHostImageCopyFeaturesEXT-sType-sType + // No Validation code for VkVideoEncodeH265CapabilitiesKHR structure members -- Covers + // VUID-VkVideoEncodeH265CapabilitiesKHR-sType-sType + + // Validation code for VkVideoEncodeH265SessionCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH265SessionCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceHostImageCopyFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_host_image_copy)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceHostImageCopyFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_host_image_copy) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceHostImageCopyFeaturesEXT* structure = (VkPhysicalDeviceHostImageCopyFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::hostImageCopy), structure->hostImageCopy); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265SessionCreateInfoKHR); + VkVideoEncodeH265SessionCreateInfoKHR* structure = (VkVideoEncodeH265SessionCreateInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::useMaxLevelIdc), structure->useMaxLevelIdc); } } break; - // Validation code for VkPhysicalDeviceHostImageCopyPropertiesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT: { // Covers - // VUID-VkPhysicalDeviceHostImageCopyPropertiesEXT-sType-sType + // No Validation code for VkVideoEncodeH265QualityLevelPropertiesKHR structure members -- Covers + // VUID-VkVideoEncodeH265QualityLevelPropertiesKHR-sType-sType + + // No Validation code for VkVideoEncodeH265SessionParametersAddInfoKHR structure members -- Covers + // VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-sType-sType + + // Validation code for VkVideoEncodeH265SessionParametersCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH265SessionParametersCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceHostImageCopyPropertiesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_host_image_copy)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_host_image_copy"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265SessionParametersCreateInfoKHR); + VkVideoEncodeH265SessionParametersCreateInfoKHR* structure = + (VkVideoEncodeH265SessionParametersCreateInfoKHR*)header; + skip |= ValidateStructType( + pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR", + structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, false, + "VUID-VkVideoEncodeH265SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", + "VUID-VkVideoEncodeH265SessionParametersAddInfoKHR-sType-sType"); + + if (structure->pParametersAddInfo != nullptr) { + [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); } - VkPhysicalDeviceHostImageCopyPropertiesEXT* structure = (VkPhysicalDeviceHostImageCopyPropertiesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::identicalMemoryTypeRequirements), - structure->identicalMemoryTypeRequirements); } } break; - // No Validation code for VkSubresourceHostMemcpySizeEXT structure members -- Covers - // VUID-VkSubresourceHostMemcpySizeEXT-sType-sType - - // No Validation code for VkHostImageCopyDevicePerformanceQueryEXT structure members -- Covers - // VUID-VkHostImageCopyDevicePerformanceQueryEXT-sType-sType - - // Validation code for VkPhysicalDeviceMapMemoryPlacedFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceMapMemoryPlacedFeaturesEXT-sType-sType + // Validation code for VkVideoEncodeH265SessionParametersGetInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH265SessionParametersGetInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMapMemoryPlacedFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_map_memory_placed)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMapMemoryPlacedFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_map_memory_placed) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceMapMemoryPlacedFeaturesEXT* structure = (VkPhysicalDeviceMapMemoryPlacedFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::memoryMapPlaced), structure->memoryMapPlaced); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265SessionParametersGetInfoKHR); + VkVideoEncodeH265SessionParametersGetInfoKHR* structure = (VkVideoEncodeH265SessionParametersGetInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::writeStdVPS), structure->writeStdVPS); - skip |= ValidateBool32(pNext_loc.dot(Field::memoryMapRangePlaced), structure->memoryMapRangePlaced); + skip |= ValidateBool32(pNext_loc.dot(Field::writeStdSPS), structure->writeStdSPS); - skip |= ValidateBool32(pNext_loc.dot(Field::memoryUnmapReserve), structure->memoryUnmapReserve); + skip |= ValidateBool32(pNext_loc.dot(Field::writeStdPPS), structure->writeStdPPS); } } break; - // No Validation code for VkPhysicalDeviceMapMemoryPlacedPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceMapMemoryPlacedPropertiesEXT-sType-sType - - // No Validation code for VkMemoryMapPlacedInfoEXT structure members -- Covers VUID-VkMemoryMapPlacedInfoEXT-sType-sType + // No Validation code for VkVideoEncodeH265SessionParametersFeedbackInfoKHR structure members -- Covers + // VUID-VkVideoEncodeH265SessionParametersFeedbackInfoKHR-sType-sType - // Validation code for VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_2_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT-sType-sType + // Validation code for VkVideoEncodeH265PictureInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR: { // Covers VUID-VkVideoEncodeH265PictureInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_atomic_float2)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_shader_atomic_float2) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT* structure = (VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat16Atomics), structure->shaderBufferFloat16Atomics); - - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat16AtomicAdd), structure->shaderBufferFloat16AtomicAdd); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265PictureInfoKHR); + VkVideoEncodeH265PictureInfoKHR* structure = (VkVideoEncodeH265PictureInfoKHR*)header; + skip |= ValidateStructTypeArray( + pNext_loc.dot(Field::naluSliceSegmentEntryCount), pNext_loc.dot(Field::pNaluSliceSegmentEntries), + "VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR", structure->naluSliceSegmentEntryCount, + structure->pNaluSliceSegmentEntries, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR, true, + true, "VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-sType-sType", + "VUID-VkVideoEncodeH265PictureInfoKHR-pNaluSliceSegmentEntries-parameter", + "VUID-VkVideoEncodeH265PictureInfoKHR-naluSliceSegmentEntryCount-arraylength"); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat16AtomicMinMax), - structure->shaderBufferFloat16AtomicMinMax); + if (structure->pNaluSliceSegmentEntries != nullptr) { + for (uint32_t naluSliceSegmentEntryIndex = 0; + naluSliceSegmentEntryIndex < structure->naluSliceSegmentEntryCount; ++naluSliceSegmentEntryIndex) { + [[maybe_unused]] const Location pNaluSliceSegmentEntries_loc = + pNext_loc.dot(Field::pNaluSliceSegmentEntries, naluSliceSegmentEntryIndex); + skip |= ValidateRequiredPointer( + pNaluSliceSegmentEntries_loc.dot(Field::pStdSliceSegmentHeader), + structure->pNaluSliceSegmentEntries[naluSliceSegmentEntryIndex].pStdSliceSegmentHeader, + "VUID-VkVideoEncodeH265NaluSliceSegmentInfoKHR-pStdSliceSegmentHeader-parameter"); + } + } - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat32AtomicMinMax), - structure->shaderBufferFloat32AtomicMinMax); + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, + "VUID-VkVideoEncodeH265PictureInfoKHR-pStdPictureInfo-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderBufferFloat64AtomicMinMax), - structure->shaderBufferFloat64AtomicMinMax); + // Validation code for VkVideoEncodeH265DpbSlotInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoEncodeH265DpbSlotInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265DpbSlotInfoKHR); + VkVideoEncodeH265DpbSlotInfoKHR* structure = (VkVideoEncodeH265DpbSlotInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, + "VUID-VkVideoEncodeH265DpbSlotInfoKHR-pStdReferenceInfo-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat16Atomics), structure->shaderSharedFloat16Atomics); + // No Validation code for VkVideoEncodeH265ProfileInfoKHR structure members -- Covers + // VUID-VkVideoEncodeH265ProfileInfoKHR-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat16AtomicAdd), structure->shaderSharedFloat16AtomicAdd); + // Validation code for VkVideoEncodeH265RateControlInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH265RateControlInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265RateControlInfoKHR); + VkVideoEncodeH265RateControlInfoKHR* structure = (VkVideoEncodeH265RateControlInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkVideoEncodeH265RateControlFlagBitsKHR, + AllVkVideoEncodeH265RateControlFlagBitsKHR, structure->flags, kOptionalFlags, + "VUID-VkVideoEncodeH265RateControlInfoKHR-flags-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat16AtomicMinMax), - structure->shaderSharedFloat16AtomicMinMax); + // Validation code for VkVideoEncodeH265RateControlLayerInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH265RateControlLayerInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265RateControlLayerInfoKHR); + VkVideoEncodeH265RateControlLayerInfoKHR* structure = (VkVideoEncodeH265RateControlLayerInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::useMinQp), structure->useMinQp); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat32AtomicMinMax), - structure->shaderSharedFloat32AtomicMinMax); + skip |= ValidateBool32(pNext_loc.dot(Field::useMaxQp), structure->useMaxQp); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderSharedFloat64AtomicMinMax), - structure->shaderSharedFloat64AtomicMinMax); + skip |= ValidateBool32(pNext_loc.dot(Field::useMaxFrameSize), structure->useMaxFrameSize); + } + } break; - skip |= - ValidateBool32(pNext_loc.dot(Field::shaderImageFloat32AtomicMinMax), structure->shaderImageFloat32AtomicMinMax); + // Validation code for VkVideoEncodeH265GopRemainingFrameInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR: { // Covers + // VUID-VkVideoEncodeH265GopRemainingFrameInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeH265GopRemainingFrameInfoKHR); + VkVideoEncodeH265GopRemainingFrameInfoKHR* structure = (VkVideoEncodeH265GopRemainingFrameInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::useGopRemainingFrames), structure->useGopRemainingFrames); + } + } break; + // Validation code for VkVideoDecodeH264ProfileInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR: { // Covers VUID-VkVideoDecodeH264ProfileInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264ProfileInfoKHR); + VkVideoDecodeH264ProfileInfoKHR* structure = (VkVideoDecodeH264ProfileInfoKHR*)header; skip |= - ValidateBool32(pNext_loc.dot(Field::sparseImageFloat32AtomicMinMax), structure->sparseImageFloat32AtomicMinMax); + ValidateFlags(pNext_loc.dot(Field::pictureLayout), vvl::FlagBitmask::VkVideoDecodeH264PictureLayoutFlagBitsKHR, + AllVkVideoDecodeH264PictureLayoutFlagBitsKHR, structure->pictureLayout, kOptionalSingleBit, + "VUID-VkVideoDecodeH264ProfileInfoKHR-pictureLayout-parameter"); } } break; - // Validation code for VkSurfacePresentModeEXT structure members - case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT: { // Covers VUID-VkSurfacePresentModeEXT-sType-sType + // No Validation code for VkVideoDecodeH264CapabilitiesKHR structure members -- Covers + // VUID-VkVideoDecodeH264CapabilitiesKHR-sType-sType + + // Validation code for VkVideoDecodeH264SessionParametersAddInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR: { // Covers + // VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfacePresentModeEXT); - VkSurfacePresentModeEXT* structure = (VkSurfacePresentModeEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::presentMode), vvl::Enum::VkPresentModeKHR, structure->presentMode, - "VUID-VkSurfacePresentModeEXT-presentMode-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264SessionParametersAddInfoKHR); + VkVideoDecodeH264SessionParametersAddInfoKHR* structure = (VkVideoDecodeH264SessionParametersAddInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::stdSPSCount), pNext_loc.dot(Field::pStdSPSs), structure->stdSPSCount, + &structure->pStdSPSs, false, true, kVUIDUndefined, + "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdSPSs-parameter"); + + skip |= ValidateArray(pNext_loc.dot(Field::stdPPSCount), pNext_loc.dot(Field::pStdPPSs), structure->stdPPSCount, + &structure->pStdPPSs, false, true, kVUIDUndefined, + "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdPPSs-parameter"); } } break; - // Validation code for VkSurfacePresentScalingCapabilitiesEXT structure members - case VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT: { // Covers - // VUID-VkSurfacePresentScalingCapabilitiesEXT-sType-sType + // Validation code for VkVideoDecodeH264SessionParametersCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoDecodeH264SessionParametersCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfacePresentScalingCapabilitiesEXT); - VkSurfacePresentScalingCapabilitiesEXT* structure = (VkSurfacePresentScalingCapabilitiesEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::supportedPresentScaling), vvl::FlagBitmask::VkPresentScalingFlagBitsEXT, - AllVkPresentScalingFlagBitsEXT, structure->supportedPresentScaling, kOptionalFlags, - "VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentScaling-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264SessionParametersCreateInfoKHR); + VkVideoDecodeH264SessionParametersCreateInfoKHR* structure = + (VkVideoDecodeH264SessionParametersCreateInfoKHR*)header; + skip |= ValidateStructType( + pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR", + structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, false, + "VUID-VkVideoDecodeH264SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", + "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-sType-sType"); - skip |= ValidateFlags(pNext_loc.dot(Field::supportedPresentGravityX), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, - AllVkPresentGravityFlagBitsEXT, structure->supportedPresentGravityX, kOptionalFlags, - "VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentGravityX-parameter"); + if (structure->pParametersAddInfo != nullptr) { + [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); + skip |= + ValidateArray(pParametersAddInfo_loc.dot(Field::stdSPSCount), pParametersAddInfo_loc.dot(Field::pStdSPSs), + structure->pParametersAddInfo->stdSPSCount, &structure->pParametersAddInfo->pStdSPSs, false, + true, kVUIDUndefined, "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdSPSs-parameter"); - skip |= ValidateFlags(pNext_loc.dot(Field::supportedPresentGravityY), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, - AllVkPresentGravityFlagBitsEXT, structure->supportedPresentGravityY, kOptionalFlags, - "VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentGravityY-parameter"); + skip |= + ValidateArray(pParametersAddInfo_loc.dot(Field::stdPPSCount), pParametersAddInfo_loc.dot(Field::pStdPPSs), + structure->pParametersAddInfo->stdPPSCount, &structure->pParametersAddInfo->pStdPPSs, false, + true, kVUIDUndefined, "VUID-VkVideoDecodeH264SessionParametersAddInfoKHR-pStdPPSs-parameter"); + } } } break; - // No Validation code for VkSurfacePresentModeCompatibilityEXT structure members -- Covers - // VUID-VkSurfacePresentModeCompatibilityEXT-sType-sType + // Validation code for VkVideoDecodeH264PictureInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR: { // Covers VUID-VkVideoDecodeH264PictureInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264PictureInfoKHR); + VkVideoDecodeH264PictureInfoKHR* structure = (VkVideoDecodeH264PictureInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, + "VUID-VkVideoDecodeH264PictureInfoKHR-pStdPictureInfo-parameter"); - // Validation code for VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT-sType-sType + skip |= ValidateArray(pNext_loc.dot(Field::sliceCount), pNext_loc.dot(Field::pSliceOffsets), structure->sliceCount, + &structure->pSliceOffsets, true, true, + "VUID-VkVideoDecodeH264PictureInfoKHR-sliceCount-arraylength", + "VUID-VkVideoDecodeH264PictureInfoKHR-pSliceOffsets-parameter"); + } + } break; + + // Validation code for VkVideoDecodeH264DpbSlotInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoDecodeH264DpbSlotInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_swapchain_maintenance1) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT* structure = - (VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::swapchainMaintenance1), structure->swapchainMaintenance1); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH264DpbSlotInfoKHR); + VkVideoDecodeH264DpbSlotInfoKHR* structure = (VkVideoDecodeH264DpbSlotInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, + "VUID-VkVideoDecodeH264DpbSlotInfoKHR-pStdReferenceInfo-parameter"); } } break; - // Validation code for VkSwapchainPresentFenceInfoEXT structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: { // Covers VUID-VkSwapchainPresentFenceInfoEXT-sType-sType + // Validation code for VkRenderingFragmentShadingRateAttachmentInfoKHR structure members + case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: { // Covers + // VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentFenceInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderingFragmentShadingRateAttachmentInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); + "extended struct requires the extensions VK_KHR_dynamic_rendering"); } - VkSwapchainPresentFenceInfoEXT* structure = (VkSwapchainPresentFenceInfoEXT*)header; - skip |= ValidateHandleArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pFences), - structure->swapchainCount, structure->pFences, true, true, - "VUID-VkSwapchainPresentFenceInfoEXT-swapchainCount-arraylength"); + VkRenderingFragmentShadingRateAttachmentInfoKHR* structure = + (VkRenderingFragmentShadingRateAttachmentInfoKHR*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::imageLayout), vvl::Enum::VkImageLayout, structure->imageLayout, + "VUID-VkRenderingFragmentShadingRateAttachmentInfoKHR-imageLayout-parameter"); } } break; - // Validation code for VkSwapchainPresentModesCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT: { // Covers - // VUID-VkSwapchainPresentModesCreateInfoEXT-sType-sType + // Validation code for VkRenderingFragmentDensityMapAttachmentInfoEXT structure members + case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: { // Covers + // VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentModesCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderingFragmentDensityMapAttachmentInfoEXT); + if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); + "extended struct requires the extensions VK_KHR_dynamic_rendering"); } - VkSwapchainPresentModesCreateInfoEXT* structure = (VkSwapchainPresentModesCreateInfoEXT*)header; - skip |= - ValidateRangedEnumArray(pNext_loc.dot(Field::presentModeCount), pNext_loc.dot(Field::pPresentModes), - vvl::Enum::VkPresentModeKHR, structure->presentModeCount, structure->pPresentModes, - true, true, "VUID-VkSwapchainPresentModesCreateInfoEXT-presentModeCount-arraylength", - "VUID-VkSwapchainPresentModesCreateInfoEXT-pPresentModes-parameter"); + VkRenderingFragmentDensityMapAttachmentInfoEXT* structure = (VkRenderingFragmentDensityMapAttachmentInfoEXT*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::imageView), structure->imageView); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::imageLayout), vvl::Enum::VkImageLayout, structure->imageLayout, + "VUID-VkRenderingFragmentDensityMapAttachmentInfoEXT-imageLayout-parameter"); } } break; - // Validation code for VkSwapchainPresentModeInfoEXT structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT: { // Covers VUID-VkSwapchainPresentModeInfoEXT-sType-sType + // Validation code for VkAttachmentSampleCountInfoAMD structure members + case VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD: { // Covers VUID-VkAttachmentSampleCountInfoAMD-sType-sType + + if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_VK_KHR_dynamic_rendering)) || + (!is_physdev_api && !IsExtEnabled(device_extensions.vk_khr_dynamic_rendering))) { + skip |= LogError(pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType (VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD), " + "but its parent extension " + "VK_KHR_dynamic_rendering has not been enabled."); + } + } break; + + // Validation code for VkMultiviewPerViewAttributesInfoNVX structure members + case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX: { // Covers + // VUID-VkMultiviewPerViewAttributesInfoNVX-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentModeInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMultiviewPerViewAttributesInfoNVX); + if (!IsExtEnabled(device_extensions.vk_khr_dynamic_rendering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); + "extended struct requires the extensions VK_KHR_dynamic_rendering"); } - VkSwapchainPresentModeInfoEXT* structure = (VkSwapchainPresentModeInfoEXT*)header; - skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pPresentModes), - vvl::Enum::VkPresentModeKHR, structure->swapchainCount, structure->pPresentModes, - true, true, "VUID-VkSwapchainPresentModeInfoEXT-swapchainCount-arraylength", - "VUID-VkSwapchainPresentModeInfoEXT-pPresentModes-parameter"); + VkMultiviewPerViewAttributesInfoNVX* structure = (VkMultiviewPerViewAttributesInfoNVX*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::perViewAttributes), structure->perViewAttributes); + + skip |= + ValidateBool32(pNext_loc.dot(Field::perViewAttributesPositionXOnly), structure->perViewAttributesPositionXOnly); } } break; +#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkSwapchainPresentScalingCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT: { // Covers - // VUID-VkSwapchainPresentScalingCreateInfoEXT-sType-sType + // Validation code for VkImportMemoryWin32HandleInfoKHR structure members + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: { // Covers VUID-VkImportMemoryWin32HandleInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentScalingCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryWin32HandleInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_external_memory_win32)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); + "extended struct requires the extensions VK_KHR_external_memory_win32"); } - VkSwapchainPresentScalingCreateInfoEXT* structure = (VkSwapchainPresentScalingCreateInfoEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::scalingBehavior), vvl::FlagBitmask::VkPresentScalingFlagBitsEXT, - AllVkPresentScalingFlagBitsEXT, structure->scalingBehavior, kOptionalFlags, - "VUID-VkSwapchainPresentScalingCreateInfoEXT-scalingBehavior-parameter"); - - skip |= ValidateFlags(pNext_loc.dot(Field::presentGravityX), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, - AllVkPresentGravityFlagBitsEXT, structure->presentGravityX, kOptionalFlags, - "VUID-VkSwapchainPresentScalingCreateInfoEXT-presentGravityX-parameter"); - - skip |= ValidateFlags(pNext_loc.dot(Field::presentGravityY), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, - AllVkPresentGravityFlagBitsEXT, structure->presentGravityY, kOptionalFlags, - "VUID-VkSwapchainPresentScalingCreateInfoEXT-presentGravityY-parameter"); + VkImportMemoryWin32HandleInfoKHR* structure = (VkImportMemoryWin32HandleInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, + "VUID-VkImportMemoryWin32HandleInfoKHR-handleType-parameter"); } } break; - // No Validation code for VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV-sType-sType + // No Validation code for VkExportMemoryWin32HandleInfoKHR structure members -- Covers + // VUID-VkExportMemoryWin32HandleInfoKHR-sType-sType +#endif // VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_device_generated_commands)) { + // Validation code for VkImportMemoryFdInfoKHR structure members + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: { // Covers VUID-VkImportMemoryFdInfoKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryFdInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_external_memory_fd)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_device_generated_commands) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_external_memory_fd"); } - VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV* structure = - (VkPhysicalDeviceDeviceGeneratedCommandsFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedCommands), structure->deviceGeneratedCommands); + VkImportMemoryFdInfoKHR* structure = (VkImportMemoryFdInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, + "VUID-VkImportMemoryFdInfoKHR-handleType-parameter"); } } break; +#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkGraphicsPipelineShaderGroupsCreateInfoNV structure members - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV: { // Covers - // VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-sType-sType + // Validation code for VkWin32KeyedMutexAcquireReleaseInfoKHR structure members + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: { // Covers + // VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkGraphicsPipelineShaderGroupsCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_device_generated_commands)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWin32KeyedMutexAcquireReleaseInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_win32_keyed_mutex)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_device_generated_commands"); + "extended struct requires the extensions VK_KHR_win32_keyed_mutex"); } - VkGraphicsPipelineShaderGroupsCreateInfoNV* structure = (VkGraphicsPipelineShaderGroupsCreateInfoNV*)header; - skip |= - ValidateStructTypeArray(pNext_loc.dot(Field::groupCount), pNext_loc.dot(Field::pGroups), - "VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV", structure->groupCount, - structure->pGroups, VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV, false, true, - "VUID-VkGraphicsShaderGroupCreateInfoNV-sType-sType", - "VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-parameter", kVUIDUndefined); + VkWin32KeyedMutexAcquireReleaseInfoKHR* structure = (VkWin32KeyedMutexAcquireReleaseInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireSyncs), + structure->acquireCount, &structure->pAcquireSyncs, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireSyncs-parameter"); - if (structure->pGroups != nullptr) { - for (uint32_t groupIndex = 0; groupIndex < structure->groupCount; ++groupIndex) { - [[maybe_unused]] const Location pGroups_loc = pNext_loc.dot(Field::pGroups, groupIndex); - skip |= ValidateStructTypeArray( - pGroups_loc.dot(Field::stageCount), pGroups_loc.dot(Field::pStages), - "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO", structure->pGroups[groupIndex].stageCount, - structure->pGroups[groupIndex].pStages, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, true, true, - "VUID-VkPipelineShaderStageCreateInfo-sType-sType", - "VUID-VkGraphicsShaderGroupCreateInfoNV-pStages-parameter", - "VUID-VkGraphicsShaderGroupCreateInfoNV-stageCount-arraylength"); + skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireKeys), + structure->acquireCount, &structure->pAcquireKeys, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireKeys-parameter"); - if (structure->pGroups[groupIndex].pStages != nullptr) { - for (uint32_t stageIndex = 0; stageIndex < structure->pGroups[groupIndex].stageCount; ++stageIndex) { - [[maybe_unused]] const Location pStages_loc = pGroups_loc.dot(Field::pStages, stageIndex); - skip |= ValidateFlags(pStages_loc.dot(Field::flags), - vvl::FlagBitmask::VkPipelineShaderStageCreateFlagBits, - AllVkPipelineShaderStageCreateFlagBits, - structure->pGroups[groupIndex].pStages[stageIndex].flags, kOptionalFlags, - "VUID-VkPipelineShaderStageCreateInfo-flags-parameter"); + skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireTimeouts), + structure->acquireCount, &structure->pAcquireTimeouts, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pAcquireTimeouts-parameter"); - skip |= ValidateFlags(pStages_loc.dot(Field::stage), vvl::FlagBitmask::VkShaderStageFlagBits, - AllVkShaderStageFlagBits, - structure->pGroups[groupIndex].pStages[stageIndex].stage, kRequiredSingleBit, - "VUID-VkPipelineShaderStageCreateInfo-stage-parameter", - "VUID-VkPipelineShaderStageCreateInfo-stage-parameter"); + skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseSyncs), + structure->releaseCount, &structure->pReleaseSyncs, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseSyncs-parameter"); - skip |= ValidateRequiredPointer(pStages_loc.dot(Field::pName), - structure->pGroups[groupIndex].pStages[stageIndex].pName, - "VUID-VkPipelineShaderStageCreateInfo-pName-parameter"); + skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseKeys), + structure->releaseCount, &structure->pReleaseKeys, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoKHR-pReleaseKeys-parameter"); + } + } break; - if (structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo != nullptr) { - [[maybe_unused]] const Location pSpecializationInfo_loc = - pStages_loc.dot(Field::pSpecializationInfo); - skip |= ValidateArray( - pSpecializationInfo_loc.dot(Field::mapEntryCount), - pSpecializationInfo_loc.dot(Field::pMapEntries), - structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->mapEntryCount, - &structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->pMapEntries, false, - true, kVUIDUndefined, "VUID-VkSpecializationInfo-pMapEntries-parameter"); + // No Validation code for VkExportSemaphoreWin32HandleInfoKHR structure members -- Covers + // VUID-VkExportSemaphoreWin32HandleInfoKHR-sType-sType - if (structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->pMapEntries != - nullptr) { - for (uint32_t mapEntryIndex = 0; - mapEntryIndex < - structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->mapEntryCount; - ++mapEntryIndex) { - [[maybe_unused]] const Location pMapEntries_loc = - pSpecializationInfo_loc.dot(Field::pMapEntries, mapEntryIndex); - } - } + // No Validation code for VkD3D12FenceSubmitInfoKHR structure members -- Covers VUID-VkD3D12FenceSubmitInfoKHR-sType-sType +#endif // VK_USE_PLATFORM_WIN32_KHR - skip |= ValidateArray( - pSpecializationInfo_loc.dot(Field::dataSize), pSpecializationInfo_loc.dot(Field::pData), - structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->dataSize, - &structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->pData, false, true, - kVUIDUndefined, "VUID-VkSpecializationInfo-pData-parameter"); - } + // Validation code for VkPresentRegionsKHR structure members + case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: { // Covers VUID-VkPresentRegionsKHR-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPresentRegionsKHR); + if (!IsExtEnabled(device_extensions.vk_khr_incremental_present)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_KHR_incremental_present"); + } + VkPresentRegionsKHR* structure = (VkPresentRegionsKHR*)header; + skip |= + ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pRegions), structure->swapchainCount, + &structure->pRegions, true, false, "VUID-VkPresentRegionsKHR-swapchainCount-arraylength", + "VUID-VkPresentRegionsKHR-pRegions-parameter"); + + if (structure->pRegions != nullptr) { + for (uint32_t swapchainIndex = 0; swapchainIndex < structure->swapchainCount; ++swapchainIndex) { + [[maybe_unused]] const Location pRegions_loc = pNext_loc.dot(Field::pRegions, swapchainIndex); + if (structure->pRegions[swapchainIndex].pRectangles != nullptr) { + for (uint32_t rectangleIndex = 0; rectangleIndex < structure->pRegions[swapchainIndex].rectangleCount; + ++rectangleIndex) { + [[maybe_unused]] const Location pRectangles_loc = + pRegions_loc.dot(Field::pRectangles, rectangleIndex); } } } } - - skip |= ValidateArray(pNext_loc.dot(Field::pipelineCount), pNext_loc.dot(Field::pPipelines), - structure->pipelineCount, &structure->pPipelines, false, true, kVUIDUndefined, - "VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pPipelines-parameter"); } } break; - // Validation code for VkPhysicalDeviceInheritedViewportScissorFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INHERITED_VIEWPORT_SCISSOR_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceInheritedViewportScissorFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceInheritedViewportScissorFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_inherited_viewport_scissor)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceInheritedViewportScissorFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_inherited_viewport_scissor) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceInheritedViewportScissorFeaturesNV* structure = - (VkPhysicalDeviceInheritedViewportScissorFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::inheritedViewportScissor2D), structure->inheritedViewportScissor2D); - } - } break; + // No Validation code for VkSharedPresentSurfaceCapabilitiesKHR structure members -- Covers + // VUID-VkSharedPresentSurfaceCapabilitiesKHR-sType-sType +#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkCommandBufferInheritanceViewportScissorInfoNV structure members - case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV: { // Covers - // VUID-VkCommandBufferInheritanceViewportScissorInfoNV-sType-sType + // No Validation code for VkExportFenceWin32HandleInfoKHR structure members -- Covers + // VUID-VkExportFenceWin32HandleInfoKHR-sType-sType +#endif // VK_USE_PLATFORM_WIN32_KHR + + // Validation code for VkQueryPoolPerformanceCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR: { // Covers + // VUID-VkQueryPoolPerformanceCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkCommandBufferInheritanceViewportScissorInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_inherited_viewport_scissor)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryPoolPerformanceCreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_performance_query)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_inherited_viewport_scissor"); + "extended struct requires the extensions VK_KHR_performance_query"); } - VkCommandBufferInheritanceViewportScissorInfoNV* structure = - (VkCommandBufferInheritanceViewportScissorInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::viewportScissor2D), structure->viewportScissor2D); + VkQueryPoolPerformanceCreateInfoKHR* structure = (VkQueryPoolPerformanceCreateInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::counterIndexCount), pNext_loc.dot(Field::pCounterIndices), + structure->counterIndexCount, &structure->pCounterIndices, true, true, + "VUID-VkQueryPoolPerformanceCreateInfoKHR-counterIndexCount-arraylength", + "VUID-VkQueryPoolPerformanceCreateInfoKHR-pCounterIndices-parameter"); } } break; - // Validation code for VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT-sType-sType + // No Validation code for VkPerformanceQuerySubmitInfoKHR structure members -- Covers + // VUID-VkPerformanceQuerySubmitInfoKHR-sType-sType + + // No Validation code for VkVideoDecodeH265ProfileInfoKHR structure members -- Covers + // VUID-VkVideoDecodeH265ProfileInfoKHR-sType-sType + + // No Validation code for VkVideoDecodeH265CapabilitiesKHR structure members -- Covers + // VUID-VkVideoDecodeH265CapabilitiesKHR-sType-sType + + // Validation code for VkVideoDecodeH265SessionParametersAddInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR: { // Covers + // VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_texel_buffer_alignment)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_texel_buffer_alignment) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT* structure = - (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::texelBufferAlignment), structure->texelBufferAlignment); - } - } break; + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265SessionParametersAddInfoKHR); + VkVideoDecodeH265SessionParametersAddInfoKHR* structure = (VkVideoDecodeH265SessionParametersAddInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::stdVPSCount), pNext_loc.dot(Field::pStdVPSs), structure->stdVPSCount, + &structure->pStdVPSs, false, true, kVUIDUndefined, + "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdVPSs-parameter"); - // No Validation code for VkRenderPassTransformBeginInfoQCOM structure members -- Covers - // VUID-VkRenderPassTransformBeginInfoQCOM-sType-sType + skip |= ValidateArray(pNext_loc.dot(Field::stdSPSCount), pNext_loc.dot(Field::pStdSPSs), structure->stdSPSCount, + &structure->pStdSPSs, false, true, kVUIDUndefined, + "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdSPSs-parameter"); - // No Validation code for VkCommandBufferInheritanceRenderPassTransformInfoQCOM structure members -- Covers - // VUID-VkCommandBufferInheritanceRenderPassTransformInfoQCOM-sType-sType + skip |= ValidateArray(pNext_loc.dot(Field::stdPPSCount), pNext_loc.dot(Field::pStdPPSs), structure->stdPPSCount, + &structure->pStdPPSs, false, true, kVUIDUndefined, + "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdPPSs-parameter"); + } + } break; - // Validation code for VkPhysicalDeviceDepthBiasControlFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_BIAS_CONTROL_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDepthBiasControlFeaturesEXT-sType-sType + // Validation code for VkVideoDecodeH265SessionParametersCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoDecodeH265SessionParametersCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthBiasControlFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_bias_control)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDepthBiasControlFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_depth_bias_control) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceDepthBiasControlFeaturesEXT* structure = (VkPhysicalDeviceDepthBiasControlFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasControl), structure->depthBiasControl); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265SessionParametersCreateInfoKHR); + VkVideoDecodeH265SessionParametersCreateInfoKHR* structure = + (VkVideoDecodeH265SessionParametersCreateInfoKHR*)header; + skip |= ValidateStructType( + pNext_loc.dot(Field::pParametersAddInfo), "VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR", + structure->pParametersAddInfo, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, false, + "VUID-VkVideoDecodeH265SessionParametersCreateInfoKHR-pParametersAddInfo-parameter", + "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-sType-sType"); - skip |= ValidateBool32(pNext_loc.dot(Field::leastRepresentableValueForceUnormRepresentation), - structure->leastRepresentableValueForceUnormRepresentation); + if (structure->pParametersAddInfo != nullptr) { + [[maybe_unused]] const Location pParametersAddInfo_loc = pNext_loc.dot(Field::pParametersAddInfo); + skip |= + ValidateArray(pParametersAddInfo_loc.dot(Field::stdVPSCount), pParametersAddInfo_loc.dot(Field::pStdVPSs), + structure->pParametersAddInfo->stdVPSCount, &structure->pParametersAddInfo->pStdVPSs, false, + true, kVUIDUndefined, "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdVPSs-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::floatRepresentation), structure->floatRepresentation); + skip |= + ValidateArray(pParametersAddInfo_loc.dot(Field::stdSPSCount), pParametersAddInfo_loc.dot(Field::pStdSPSs), + structure->pParametersAddInfo->stdSPSCount, &structure->pParametersAddInfo->pStdSPSs, false, + true, kVUIDUndefined, "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdSPSs-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasExact), structure->depthBiasExact); + skip |= + ValidateArray(pParametersAddInfo_loc.dot(Field::stdPPSCount), pParametersAddInfo_loc.dot(Field::pStdPPSs), + structure->pParametersAddInfo->stdPPSCount, &structure->pParametersAddInfo->pStdPPSs, false, + true, kVUIDUndefined, "VUID-VkVideoDecodeH265SessionParametersAddInfoKHR-pStdPPSs-parameter"); + } } } break; - // Validation code for VkDepthBiasRepresentationInfoEXT structure members - case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: { // Covers VUID-VkDepthBiasRepresentationInfoEXT-sType-sType + // Validation code for VkVideoDecodeH265PictureInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR: { // Covers VUID-VkVideoDecodeH265PictureInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDepthBiasRepresentationInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_bias_control)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_depth_bias_control"); - } - VkDepthBiasRepresentationInfoEXT* structure = (VkDepthBiasRepresentationInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::depthBiasRepresentation), vvl::Enum::VkDepthBiasRepresentationEXT, - structure->depthBiasRepresentation, - "VUID-VkDepthBiasRepresentationInfoEXT-depthBiasRepresentation-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265PictureInfoKHR); + VkVideoDecodeH265PictureInfoKHR* structure = (VkVideoDecodeH265PictureInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, + "VUID-VkVideoDecodeH265PictureInfoKHR-pStdPictureInfo-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasExact), structure->depthBiasExact); + skip |= ValidateArray(pNext_loc.dot(Field::sliceSegmentCount), pNext_loc.dot(Field::pSliceSegmentOffsets), + structure->sliceSegmentCount, &structure->pSliceSegmentOffsets, true, true, + "VUID-VkVideoDecodeH265PictureInfoKHR-sliceSegmentCount-arraylength", + "VUID-VkVideoDecodeH265PictureInfoKHR-pSliceSegmentOffsets-parameter"); } } break; - // Validation code for VkPhysicalDeviceDeviceMemoryReportFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDeviceMemoryReportFeaturesEXT-sType-sType + // Validation code for VkVideoDecodeH265DpbSlotInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoDecodeH265DpbSlotInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDeviceMemoryReportFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_device_memory_report)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_device_memory_report) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceDeviceMemoryReportFeaturesEXT* structure = (VkPhysicalDeviceDeviceMemoryReportFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::deviceMemoryReport), structure->deviceMemoryReport); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeH265DpbSlotInfoKHR); + VkVideoDecodeH265DpbSlotInfoKHR* structure = (VkVideoDecodeH265DpbSlotInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, + "VUID-VkVideoDecodeH265DpbSlotInfoKHR-pStdReferenceInfo-parameter"); } } break; - // Validation code for VkDeviceDeviceMemoryReportCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: { // Covers - // VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-sType-sType + // Validation code for VkDeviceQueueGlobalPriorityCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR: { // Covers + // VUID-VkDeviceQueueGlobalPriorityCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceDeviceMemoryReportCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_device_memory_report)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceQueueGlobalPriorityCreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_global_priority) && + !IsExtEnabled(device_extensions.vk_ext_global_priority)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_device_memory_report"); + "extended struct requires the extensions VK_KHR_global_priority or VK_EXT_global_priority"); } - VkDeviceDeviceMemoryReportCreateInfoEXT* structure = (VkDeviceDeviceMemoryReportCreateInfoEXT*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-flags-zerobitmask"); - - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pfnUserCallback), - reinterpret_cast(structure->pfnUserCallback), - "VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pfnUserCallback-parameter"); - - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pUserData), structure->pUserData, - "VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pUserData-parameter"); + VkDeviceQueueGlobalPriorityCreateInfoKHR* structure = (VkDeviceQueueGlobalPriorityCreateInfoKHR*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::globalPriority), vvl::Enum::VkQueueGlobalPriorityKHR, + structure->globalPriority, + "VUID-VkDeviceQueueGlobalPriorityCreateInfoKHR-globalPriority-parameter"); } } break; - // Validation code for VkPhysicalDeviceRobustness2FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceRobustness2FeaturesEXT-sType-sType + // No Validation code for VkQueueFamilyGlobalPriorityPropertiesKHR structure members -- Covers + // VUID-VkQueueFamilyGlobalPriorityPropertiesKHR-sType-sType + + // Validation code for VkFragmentShadingRateAttachmentInfoKHR structure members + case VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: { // Covers + // VUID-VkFragmentShadingRateAttachmentInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRobustness2FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_robustness2)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkFragmentShadingRateAttachmentInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_fragment_shading_rate)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRobustness2FeaturesEXT, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_robustness2) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_fragment_shading_rate"); } - VkPhysicalDeviceRobustness2FeaturesEXT* structure = (VkPhysicalDeviceRobustness2FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::robustBufferAccess2), structure->robustBufferAccess2); - - skip |= ValidateBool32(pNext_loc.dot(Field::robustImageAccess2), structure->robustImageAccess2); + VkFragmentShadingRateAttachmentInfoKHR* structure = (VkFragmentShadingRateAttachmentInfoKHR*)header; + skip |= ValidateStructType(pNext_loc.dot(Field::pFragmentShadingRateAttachment), + "VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2", structure->pFragmentShadingRateAttachment, + VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, false, + "VUID-VkFragmentShadingRateAttachmentInfoKHR-pFragmentShadingRateAttachment-parameter", + "VUID-VkAttachmentReference2-sType-sType"); - skip |= ValidateBool32(pNext_loc.dot(Field::nullDescriptor), structure->nullDescriptor); + if (structure->pFragmentShadingRateAttachment != nullptr) { + [[maybe_unused]] const Location pFragmentShadingRateAttachment_loc = + pNext_loc.dot(Field::pFragmentShadingRateAttachment); + skip |= ValidateRangedEnum(pFragmentShadingRateAttachment_loc.dot(Field::layout), vvl::Enum::VkImageLayout, + structure->pFragmentShadingRateAttachment->layout, + "VUID-VkAttachmentReference2-layout-parameter"); + } } } break; - // No Validation code for VkPhysicalDeviceRobustness2PropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceRobustness2PropertiesEXT-sType-sType + // No Validation code for VkPipelineFragmentShadingRateStateCreateInfoKHR structure members -- Covers + // VUID-VkPipelineFragmentShadingRateStateCreateInfoKHR-sType-sType - // Validation code for VkSamplerCustomBorderColorCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: { // Covers - // VUID-VkSamplerCustomBorderColorCreateInfoEXT-sType-sType + // No Validation code for VkRenderingAttachmentLocationInfoKHR structure members -- Covers + // VUID-VkRenderingAttachmentLocationInfoKHR-sType-sType + + // No Validation code for VkRenderingInputAttachmentIndexInfoKHR structure members -- Covers + // VUID-VkRenderingInputAttachmentIndexInfoKHR-sType-sType + + // Validation code for VkSurfaceProtectedCapabilitiesKHR structure members + case VK_STRUCTURE_TYPE_SURFACE_PROTECTED_CAPABILITIES_KHR: { // Covers VUID-VkSurfaceProtectedCapabilitiesKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerCustomBorderColorCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_custom_border_color)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_custom_border_color"); - } - VkSamplerCustomBorderColorCreateInfoEXT* structure = (VkSamplerCustomBorderColorCreateInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::format), vvl::Enum::VkFormat, structure->format, - "VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceProtectedCapabilitiesKHR); + VkSurfaceProtectedCapabilitiesKHR* structure = (VkSurfaceProtectedCapabilitiesKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::supportsProtected), structure->supportsProtected); } } break; - // No Validation code for VkPhysicalDeviceCustomBorderColorPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceCustomBorderColorPropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceCustomBorderColorFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceCustomBorderColorFeaturesEXT-sType-sType + // Validation code for VkPipelineLibraryCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: { // Covers VUID-VkPipelineLibraryCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCustomBorderColorFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_custom_border_color)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineLibraryCreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_pipeline_library)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCustomBorderColorFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_custom_border_color) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_KHR_pipeline_library"); } - VkPhysicalDeviceCustomBorderColorFeaturesEXT* structure = (VkPhysicalDeviceCustomBorderColorFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::customBorderColors), structure->customBorderColors); - - skip |= - ValidateBool32(pNext_loc.dot(Field::customBorderColorWithoutFormat), structure->customBorderColorWithoutFormat); + VkPipelineLibraryCreateInfoKHR* structure = (VkPipelineLibraryCreateInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::libraryCount), pNext_loc.dot(Field::pLibraries), structure->libraryCount, + &structure->pLibraries, false, true, kVUIDUndefined, + "VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-parameter"); } } break; - // Validation code for VkPhysicalDevicePresentBarrierFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_BARRIER_FEATURES_NV: { // Covers - // VUID-VkPhysicalDevicePresentBarrierFeaturesNV-sType-sType + // Validation code for VkPresentIdKHR structure members + case VK_STRUCTURE_TYPE_PRESENT_ID_KHR: { // Covers VUID-VkPresentIdKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePresentBarrierFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_present_barrier)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePresentBarrierFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_present_barrier) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPresentIdKHR); + if (!IsExtEnabled(device_extensions.vk_khr_present_id)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_present_id"); } - VkPhysicalDevicePresentBarrierFeaturesNV* structure = (VkPhysicalDevicePresentBarrierFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::presentBarrier), structure->presentBarrier); + VkPresentIdKHR* structure = (VkPresentIdKHR*)header; + skip |= + ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pPresentIds), + structure->swapchainCount, &structure->pPresentIds, true, false, + "VUID-VkPresentIdKHR-swapchainCount-arraylength", "VUID-VkPresentIdKHR-pPresentIds-parameter"); } } break; - // Validation code for VkSurfaceCapabilitiesPresentBarrierNV structure members - case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV: { // Covers - // VUID-VkSurfaceCapabilitiesPresentBarrierNV-sType-sType + // No Validation code for VkVideoEncodeCapabilitiesKHR structure members -- Covers + // VUID-VkVideoEncodeCapabilitiesKHR-sType-sType + + // Validation code for VkQueryPoolVideoEncodeFeedbackCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR: { // Covers + // VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceCapabilitiesPresentBarrierNV); - if (!IsExtEnabled(device_extensions.vk_nv_present_barrier)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_present_barrier"); - } - VkSurfaceCapabilitiesPresentBarrierNV* structure = (VkSurfaceCapabilitiesPresentBarrierNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::presentBarrierSupported), structure->presentBarrierSupported); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryPoolVideoEncodeFeedbackCreateInfoKHR); + VkQueryPoolVideoEncodeFeedbackCreateInfoKHR* structure = (VkQueryPoolVideoEncodeFeedbackCreateInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::encodeFeedbackFlags), vvl::FlagBitmask::VkVideoEncodeFeedbackFlagBitsKHR, + AllVkVideoEncodeFeedbackFlagBitsKHR, structure->encodeFeedbackFlags, kRequiredFlags, + "VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-encodeFeedbackFlags-parameter", + "VUID-VkQueryPoolVideoEncodeFeedbackCreateInfoKHR-encodeFeedbackFlags-requiredbitmask"); } } break; - // Validation code for VkSwapchainPresentBarrierCreateInfoNV structure members - case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV: { // Covers - // VUID-VkSwapchainPresentBarrierCreateInfoNV-sType-sType + // Validation code for VkVideoEncodeUsageInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR: { // Covers VUID-VkVideoEncodeUsageInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentBarrierCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_present_barrier)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_present_barrier"); - } - VkSwapchainPresentBarrierCreateInfoNV* structure = (VkSwapchainPresentBarrierCreateInfoNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::presentBarrierEnable), structure->presentBarrierEnable); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeUsageInfoKHR); + VkVideoEncodeUsageInfoKHR* structure = (VkVideoEncodeUsageInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::videoUsageHints), vvl::FlagBitmask::VkVideoEncodeUsageFlagBitsKHR, + AllVkVideoEncodeUsageFlagBitsKHR, structure->videoUsageHints, kOptionalFlags, + "VUID-VkVideoEncodeUsageInfoKHR-videoUsageHints-parameter"); + + skip |= ValidateFlags(pNext_loc.dot(Field::videoContentHints), vvl::FlagBitmask::VkVideoEncodeContentFlagBitsKHR, + AllVkVideoEncodeContentFlagBitsKHR, structure->videoContentHints, kOptionalFlags, + "VUID-VkVideoEncodeUsageInfoKHR-videoContentHints-parameter"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::tuningMode), vvl::Enum::VkVideoEncodeTuningModeKHR, + structure->tuningMode, "VUID-VkVideoEncodeUsageInfoKHR-tuningMode-parameter"); } } break; - // Validation code for VkPhysicalDeviceDiagnosticsConfigFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceDiagnosticsConfigFeaturesNV-sType-sType + // Validation code for VkVideoEncodeRateControlInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: { // Covers VUID-VkVideoEncodeRateControlInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDiagnosticsConfigFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_device_diagnostics_config)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDiagnosticsConfigFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_device_diagnostics_config) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoEncodeRateControlInfoKHR); + VkVideoEncodeRateControlInfoKHR* structure = (VkVideoEncodeRateControlInfoKHR*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkVideoEncodeRateControlInfoKHR-flags-zerobitmask"); + + skip |= + ValidateFlags(pNext_loc.dot(Field::rateControlMode), vvl::FlagBitmask::VkVideoEncodeRateControlModeFlagBitsKHR, + AllVkVideoEncodeRateControlModeFlagBitsKHR, structure->rateControlMode, kOptionalSingleBit, + "VUID-VkVideoEncodeRateControlInfoKHR-rateControlMode-parameter"); + + skip |= ValidateStructTypeArray(pNext_loc.dot(Field::layerCount), pNext_loc.dot(Field::pLayers), + "VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR", structure->layerCount, + structure->pLayers, VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR, + false, true, "VUID-VkVideoEncodeRateControlLayerInfoKHR-sType-sType", + "VUID-VkVideoEncodeRateControlInfoKHR-pLayers-parameter", kVUIDUndefined); + + if (structure->pLayers != nullptr) { + for (uint32_t layerIndex = 0; layerIndex < structure->layerCount; ++layerIndex) { + [[maybe_unused]] const Location pLayers_loc = pNext_loc.dot(Field::pLayers, layerIndex); + } } - VkPhysicalDeviceDiagnosticsConfigFeaturesNV* structure = (VkPhysicalDeviceDiagnosticsConfigFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::diagnosticsConfig), structure->diagnosticsConfig); } } break; - // Validation code for VkDeviceDiagnosticsConfigCreateInfoNV structure members - case VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV: { // Covers - // VUID-VkDeviceDiagnosticsConfigCreateInfoNV-sType-sType + // No Validation code for VkVideoEncodeQualityLevelInfoKHR structure members -- Covers + // VUID-VkVideoEncodeQualityLevelInfoKHR-sType-sType + + // No Validation code for VkQueueFamilyCheckpointProperties2NV structure members -- Covers + // VUID-VkQueueFamilyCheckpointProperties2NV-sType-sType + + // Validation code for VkPipelineCreateFlags2CreateInfoKHR structure members + case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR: { // Covers + // VUID-VkPipelineCreateFlags2CreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceDiagnosticsConfigCreateInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_device_diagnostics_config)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_device_diagnostics_config"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCreateFlags2CreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance5)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance5"); } - VkDeviceDiagnosticsConfigCreateInfoNV* structure = (VkDeviceDiagnosticsConfigCreateInfoNV*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkDeviceDiagnosticsConfigFlagBitsNV, - AllVkDeviceDiagnosticsConfigFlagBitsNV, structure->flags, kOptionalFlags, - "VUID-VkDeviceDiagnosticsConfigCreateInfoNV-flags-parameter"); + VkPipelineCreateFlags2CreateInfoKHR* structure = (VkPipelineCreateFlags2CreateInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkPipelineCreateFlagBits2KHR, + AllVkPipelineCreateFlagBits2KHR, structure->flags, kRequiredFlags, + "VUID-VkPipelineCreateFlags2CreateInfoKHR-flags-parameter", + "VUID-VkPipelineCreateFlags2CreateInfoKHR-flags-requiredbitmask"); } } break; - // Validation code for VkPhysicalDeviceCudaKernelLaunchFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUDA_KERNEL_LAUNCH_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceCudaKernelLaunchFeaturesNV-sType-sType + // Validation code for VkBufferUsageFlags2CreateInfoKHR structure members + case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR: { // Covers VUID-VkBufferUsageFlags2CreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCudaKernelLaunchFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_cuda_kernel_launch)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCudaKernelLaunchFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_cuda_kernel_launch) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBufferUsageFlags2CreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance5)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance5"); } - VkPhysicalDeviceCudaKernelLaunchFeaturesNV* structure = (VkPhysicalDeviceCudaKernelLaunchFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::cudaKernelLaunchFeatures), structure->cudaKernelLaunchFeatures); + VkBufferUsageFlags2CreateInfoKHR* structure = (VkBufferUsageFlags2CreateInfoKHR*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::usage), vvl::FlagBitmask::VkBufferUsageFlagBits2KHR, + AllVkBufferUsageFlagBits2KHR, structure->usage, kRequiredFlags, + "VUID-VkBufferUsageFlags2CreateInfoKHR-usage-parameter", + "VUID-VkBufferUsageFlags2CreateInfoKHR-usage-requiredbitmask"); } } break; - // No Validation code for VkPhysicalDeviceCudaKernelLaunchPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceCudaKernelLaunchPropertiesNV-sType-sType - - // Validation code for VkQueryLowLatencySupportNV structure members - case VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV: { // Covers VUID-VkQueryLowLatencySupportNV-sType-sType + // Validation code for VkVideoDecodeAV1ProfileInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR: { // Covers VUID-VkVideoDecodeAV1ProfileInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryLowLatencySupportNV); - if (!IsExtEnabled(device_extensions.vk_nv_low_latency)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_low_latency"); - } - VkQueryLowLatencySupportNV* structure = (VkQueryLowLatencySupportNV*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pQueriedLowLatencyData), structure->pQueriedLowLatencyData, - "VUID-VkQueryLowLatencySupportNV-pQueriedLowLatencyData-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1ProfileInfoKHR); + VkVideoDecodeAV1ProfileInfoKHR* structure = (VkVideoDecodeAV1ProfileInfoKHR*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::filmGrainSupport), structure->filmGrainSupport); } } break; -#ifdef VK_USE_PLATFORM_METAL_EXT - // Validation code for VkExportMetalObjectCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT: { // Covers VUID-VkExportMetalObjectCreateInfoEXT-sType-sType + // No Validation code for VkVideoDecodeAV1CapabilitiesKHR structure members -- Covers + // VUID-VkVideoDecodeAV1CapabilitiesKHR-sType-sType + + // Validation code for VkVideoDecodeAV1SessionParametersCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR: { // Covers + // VUID-VkVideoDecodeAV1SessionParametersCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalObjectCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); - } - VkExportMetalObjectCreateInfoEXT* structure = (VkExportMetalObjectCreateInfoEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::exportObjectType), vvl::FlagBitmask::VkExportMetalObjectTypeFlagBitsEXT, - AllVkExportMetalObjectTypeFlagBitsEXT, structure->exportObjectType, kOptionalSingleBit, - "VUID-VkExportMetalObjectCreateInfoEXT-exportObjectType-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1SessionParametersCreateInfoKHR); + VkVideoDecodeAV1SessionParametersCreateInfoKHR* structure = (VkVideoDecodeAV1SessionParametersCreateInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdSequenceHeader), structure->pStdSequenceHeader, + "VUID-VkVideoDecodeAV1SessionParametersCreateInfoKHR-pStdSequenceHeader-parameter"); } } break; - // No Validation code for VkExportMetalDeviceInfoEXT structure members -- Covers - // VUID-VkExportMetalDeviceInfoEXT-sType-sType - - // Validation code for VkExportMetalCommandQueueInfoEXT structure members - case VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT: { // Covers VUID-VkExportMetalCommandQueueInfoEXT-sType-sType + // Validation code for VkVideoDecodeAV1PictureInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR: { // Covers VUID-VkVideoDecodeAV1PictureInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalCommandQueueInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); - } - VkExportMetalCommandQueueInfoEXT* structure = (VkExportMetalCommandQueueInfoEXT*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::queue), structure->queue); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1PictureInfoKHR); + VkVideoDecodeAV1PictureInfoKHR* structure = (VkVideoDecodeAV1PictureInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdPictureInfo), structure->pStdPictureInfo, + "VUID-VkVideoDecodeAV1PictureInfoKHR-pStdPictureInfo-parameter"); + + skip |= + ValidateArray(pNext_loc.dot(Field::tileCount), pNext_loc.dot(Field::pTileOffsets), structure->tileCount, + &structure->pTileOffsets, true, true, "VUID-VkVideoDecodeAV1PictureInfoKHR-tileCount-arraylength", + "VUID-VkVideoDecodeAV1PictureInfoKHR-pTileOffsets-parameter"); + + skip |= + ValidateArray(pNext_loc.dot(Field::tileCount), pNext_loc.dot(Field::pTileSizes), structure->tileCount, + &structure->pTileSizes, true, true, "VUID-VkVideoDecodeAV1PictureInfoKHR-tileCount-arraylength", + "VUID-VkVideoDecodeAV1PictureInfoKHR-pTileSizes-parameter"); } } break; - // Validation code for VkExportMetalBufferInfoEXT structure members - case VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT: { // Covers VUID-VkExportMetalBufferInfoEXT-sType-sType + // Validation code for VkVideoDecodeAV1DpbSlotInfoKHR structure members + case VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR: { // Covers VUID-VkVideoDecodeAV1DpbSlotInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalBufferInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); - } - VkExportMetalBufferInfoEXT* structure = (VkExportMetalBufferInfoEXT*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::memory), structure->memory); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkVideoDecodeAV1DpbSlotInfoKHR); + VkVideoDecodeAV1DpbSlotInfoKHR* structure = (VkVideoDecodeAV1DpbSlotInfoKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pStdReferenceInfo), structure->pStdReferenceInfo, + "VUID-VkVideoDecodeAV1DpbSlotInfoKHR-pStdReferenceInfo-parameter"); } } break; - // No Validation code for VkImportMetalBufferInfoEXT structure members -- Covers - // VUID-VkImportMetalBufferInfoEXT-sType-sType + // No Validation code for VkVideoInlineQueryInfoKHR structure members -- Covers VUID-VkVideoInlineQueryInfoKHR-sType-sType - // Validation code for VkExportMetalTextureInfoEXT structure members - case VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT: { // Covers VUID-VkExportMetalTextureInfoEXT-sType-sType + // Validation code for VkPipelineVertexInputDivisorStateCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR: { // Covers + // VUID-VkPipelineVertexInputDivisorStateCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalTextureInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineVertexInputDivisorStateCreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_vertex_attribute_divisor) && + !IsExtEnabled(device_extensions.vk_ext_vertex_attribute_divisor)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_KHR_vertex_attribute_divisor or " + "VK_EXT_vertex_attribute_divisor"); + } + VkPipelineVertexInputDivisorStateCreateInfoKHR* structure = (VkPipelineVertexInputDivisorStateCreateInfoKHR*)header; + skip |= ValidateArray(pNext_loc.dot(Field::vertexBindingDivisorCount), pNext_loc.dot(Field::pVertexBindingDivisors), + structure->vertexBindingDivisorCount, &structure->pVertexBindingDivisors, true, true, + "VUID-VkPipelineVertexInputDivisorStateCreateInfoKHR-vertexBindingDivisorCount-arraylength", + "VUID-VkPipelineVertexInputDivisorStateCreateInfoKHR-pVertexBindingDivisors-parameter"); + + if (structure->pVertexBindingDivisors != nullptr) { + for (uint32_t vertexBindingDivisorIndex = 0; vertexBindingDivisorIndex < structure->vertexBindingDivisorCount; + ++vertexBindingDivisorIndex) { + [[maybe_unused]] const Location pVertexBindingDivisors_loc = + pNext_loc.dot(Field::pVertexBindingDivisors, vertexBindingDivisorIndex); + } } - VkExportMetalTextureInfoEXT* structure = (VkExportMetalTextureInfoEXT*)header; - skip |= - ValidateFlags(pNext_loc.dot(Field::plane), vvl::FlagBitmask::VkImageAspectFlagBits, AllVkImageAspectFlagBits, - structure->plane, kRequiredSingleBit, "VUID-VkExportMetalTextureInfoEXT-plane-parameter", - "VUID-VkExportMetalTextureInfoEXT-plane-parameter"); } } break; - // Validation code for VkImportMetalTextureInfoEXT structure members - case VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT: { // Covers VUID-VkImportMetalTextureInfoEXT-sType-sType + // Validation code for VkPipelineRasterizationLineStateCreateInfoKHR structure members + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR: { // Covers + // VUID-VkPipelineRasterizationLineStateCreateInfoKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMetalTextureInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationLineStateCreateInfoKHR); + if (!IsExtEnabled(device_extensions.vk_khr_line_rasterization) && + !IsExtEnabled(device_extensions.vk_ext_line_rasterization)) { skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); + LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_KHR_line_rasterization or VK_EXT_line_rasterization"); } - VkImportMetalTextureInfoEXT* structure = (VkImportMetalTextureInfoEXT*)header; - skip |= - ValidateFlags(pNext_loc.dot(Field::plane), vvl::FlagBitmask::VkImageAspectFlagBits, AllVkImageAspectFlagBits, - structure->plane, kRequiredSingleBit, "VUID-VkImportMetalTextureInfoEXT-plane-parameter", - "VUID-VkImportMetalTextureInfoEXT-plane-parameter"); + VkPipelineRasterizationLineStateCreateInfoKHR* structure = (VkPipelineRasterizationLineStateCreateInfoKHR*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::lineRasterizationMode), vvl::Enum::VkLineRasterizationModeKHR, + structure->lineRasterizationMode, + "VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-parameter"); + + skip |= ValidateBool32(pNext_loc.dot(Field::stippledLineEnable), structure->stippledLineEnable); } } break; - // Validation code for VkExportMetalIOSurfaceInfoEXT structure members - case VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT: { // Covers VUID-VkExportMetalIOSurfaceInfoEXT-sType-sType + // Validation code for VkBindMemoryStatusKHR structure members + case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR: { // Covers VUID-VkBindMemoryStatusKHR-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalIOSurfaceInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBindMemoryStatusKHR); + if (!IsExtEnabled(device_extensions.vk_khr_maintenance6)) { skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_KHR_maintenance6"); } - VkExportMetalIOSurfaceInfoEXT* structure = (VkExportMetalIOSurfaceInfoEXT*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::image), structure->image); + VkBindMemoryStatusKHR* structure = (VkBindMemoryStatusKHR*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pResult), structure->pResult, + "VUID-VkBindMemoryStatusKHR-pResult-parameter"); } } break; - // No Validation code for VkImportMetalIOSurfaceInfoEXT structure members -- Covers - // VUID-VkImportMetalIOSurfaceInfoEXT-sType-sType - - // No Validation code for VkExportMetalSharedEventInfoEXT structure members -- Covers - // VUID-VkExportMetalSharedEventInfoEXT-sType-sType - - // No Validation code for VkImportMetalSharedEventInfoEXT structure members -- Covers - // VUID-VkImportMetalSharedEventInfoEXT-sType-sType -#endif // VK_USE_PLATFORM_METAL_EXT - - // No Validation code for VkPhysicalDeviceDescriptorBufferPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceDescriptorBufferPropertiesEXT-sType-sType - - // No Validation code for VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceDescriptorBufferFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_BUFFER_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDescriptorBufferFeaturesEXT-sType-sType + // Validation code for VkDebugReportCallbackCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: { // Covers + // VUID-VkDebugReportCallbackCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDescriptorBufferFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDescriptorBufferFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_descriptor_buffer) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceDescriptorBufferFeaturesEXT* structure = (VkPhysicalDeviceDescriptorBufferFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBuffer), structure->descriptorBuffer); - - skip |= - ValidateBool32(pNext_loc.dot(Field::descriptorBufferCaptureReplay), structure->descriptorBufferCaptureReplay); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBufferImageLayoutIgnored), - structure->descriptorBufferImageLayoutIgnored); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDebugReportCallbackCreateInfoEXT); + VkDebugReportCallbackCreateInfoEXT* structure = (VkDebugReportCallbackCreateInfoEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkDebugReportFlagBitsEXT, + AllVkDebugReportFlagBitsEXT, structure->flags, kOptionalFlags, + "VUID-VkDebugReportCallbackCreateInfoEXT-flags-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBufferPushDescriptors), - structure->descriptorBufferPushDescriptors); + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pfnCallback), + reinterpret_cast(structure->pfnCallback), + "VUID-VkDebugReportCallbackCreateInfoEXT-pfnCallback-parameter"); } } break; - // Validation code for VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure members - case VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT: { // Covers - // VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-sType-sType + // Validation code for VkPipelineRasterizationStateRasterizationOrderAMD structure members + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: { // Covers + // VUID-VkPipelineRasterizationStateRasterizationOrderAMD-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkDescriptorBufferBindingPushDescriptorBufferHandleEXT); - if (!IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationStateRasterizationOrderAMD); + if (!IsExtEnabled(device_extensions.vk_amd_rasterization_order)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_descriptor_buffer"); + "extended struct requires the extensions VK_AMD_rasterization_order"); } - VkDescriptorBufferBindingPushDescriptorBufferHandleEXT* structure = - (VkDescriptorBufferBindingPushDescriptorBufferHandleEXT*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::buffer), structure->buffer); + VkPipelineRasterizationStateRasterizationOrderAMD* structure = + (VkPipelineRasterizationStateRasterizationOrderAMD*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::rasterizationOrder), vvl::Enum::VkRasterizationOrderAMD, + structure->rasterizationOrder, + "VUID-VkPipelineRasterizationStateRasterizationOrderAMD-rasterizationOrder-parameter"); } } break; - // Validation code for VkOpaqueCaptureDescriptorDataCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT: { // Covers - // VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-sType-sType + // Validation code for VkDedicatedAllocationImageCreateInfoNV structure members + case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: { // Covers + // VUID-VkDedicatedAllocationImageCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkOpaqueCaptureDescriptorDataCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDedicatedAllocationImageCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_dedicated_allocation)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_descriptor_buffer"); + "extended struct requires the extensions VK_NV_dedicated_allocation"); } - VkOpaqueCaptureDescriptorDataCreateInfoEXT* structure = (VkOpaqueCaptureDescriptorDataCreateInfoEXT*)header; - skip |= ValidateRequiredPointer( - pNext_loc.dot(Field::opaqueCaptureDescriptorData), structure->opaqueCaptureDescriptorData, - "VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-opaqueCaptureDescriptorData-parameter"); + VkDedicatedAllocationImageCreateInfoNV* structure = (VkDedicatedAllocationImageCreateInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dedicatedAllocation), structure->dedicatedAllocation); } } break; - // Validation code for VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT-sType-sType + // Validation code for VkDedicatedAllocationBufferCreateInfoNV structure members + case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: { // Covers + // VUID-VkDedicatedAllocationBufferCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_graphics_pipeline_library)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDedicatedAllocationBufferCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_dedicated_allocation)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_graphics_pipeline_library) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_dedicated_allocation"); } - VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT* structure = - (VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::graphicsPipelineLibrary), structure->graphicsPipelineLibrary); + VkDedicatedAllocationBufferCreateInfoNV* structure = (VkDedicatedAllocationBufferCreateInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::dedicatedAllocation), structure->dedicatedAllocation); } } break; - // Validation code for VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: { // Covers - // VUID-VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT-sType-sType + // No Validation code for VkDedicatedAllocationMemoryAllocateInfoNV structure members -- Covers + // VUID-VkDedicatedAllocationMemoryAllocateInfoNV-sType-sType + + // Validation code for VkPipelineRasterizationStateStreamCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_graphics_pipeline_library)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationStateStreamCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_transform_feedback)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_graphics_pipeline_library"); + "extended struct requires the extensions VK_EXT_transform_feedback"); } - VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT* structure = - (VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::graphicsPipelineLibraryFastLinking), - structure->graphicsPipelineLibraryFastLinking); - - skip |= ValidateBool32(pNext_loc.dot(Field::graphicsPipelineLibraryIndependentInterpolationDecoration), - structure->graphicsPipelineLibraryIndependentInterpolationDecoration); + VkPipelineRasterizationStateStreamCreateInfoEXT* structure = + (VkPipelineRasterizationStateStreamCreateInfoEXT*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineRasterizationStateStreamCreateInfoEXT-flags-zerobitmask"); } } break; - // Validation code for VkGraphicsPipelineLibraryCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: { // Covers - // VUID-VkGraphicsPipelineLibraryCreateInfoEXT-sType-sType + // No Validation code for VkTextureLODGatherFormatPropertiesAMD structure members -- Covers + // VUID-VkTextureLODGatherFormatPropertiesAMD-sType-sType + + // Validation code for VkExternalMemoryImageCreateInfoNV structure members + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: { // Covers VUID-VkExternalMemoryImageCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkGraphicsPipelineLibraryCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_graphics_pipeline_library)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_graphics_pipeline_library"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryImageCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_external_memory)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_external_memory"); } - VkGraphicsPipelineLibraryCreateInfoEXT* structure = (VkGraphicsPipelineLibraryCreateInfoEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkGraphicsPipelineLibraryFlagBitsEXT, - AllVkGraphicsPipelineLibraryFlagBitsEXT, structure->flags, kRequiredFlags, - "VUID-VkGraphicsPipelineLibraryCreateInfoEXT-flags-parameter", - "VUID-VkGraphicsPipelineLibraryCreateInfoEXT-flags-requiredbitmask"); + VkExternalMemoryImageCreateInfoNV* structure = (VkExternalMemoryImageCreateInfoNV*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBitsNV, + AllVkExternalMemoryHandleTypeFlagBitsNV, structure->handleTypes, kOptionalFlags, + "VUID-VkExternalMemoryImageCreateInfoNV-handleTypes-parameter"); } } break; - // Validation code for VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EARLY_AND_LATE_FRAGMENT_TESTS_FEATURES_AMD: { // Covers - // VUID-VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD-sType-sType + // Validation code for VkExportMemoryAllocateInfoNV structure members + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: { // Covers VUID-VkExportMemoryAllocateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD); - if (!IsExtEnabled(device_extensions.vk_amd_shader_early_and_late_fragment_tests)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD, but when " - "creating VkDevice, the parent extension " - "(VK_AMD_shader_early_and_late_fragment_tests) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMemoryAllocateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_external_memory)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_external_memory"); } - VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD* structure = - (VkPhysicalDeviceShaderEarlyAndLateFragmentTestsFeaturesAMD*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderEarlyAndLateFragmentTests), - structure->shaderEarlyAndLateFragmentTests); + VkExportMemoryAllocateInfoNV* structure = (VkExportMemoryAllocateInfoNV*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleTypes), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBitsNV, + AllVkExternalMemoryHandleTypeFlagBitsNV, structure->handleTypes, kOptionalFlags, + "VUID-VkExportMemoryAllocateInfoNV-handleTypes-parameter"); } } break; +#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV-sType-sType + // Validation code for VkImportMemoryWin32HandleInfoNV structure members + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: { // Covers VUID-VkImportMemoryWin32HandleInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_fragment_shading_rate_enums)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryWin32HandleInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_external_memory_win32)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_fragment_shading_rate_enums) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_external_memory_win32"); } - VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV* structure = - (VkPhysicalDeviceFragmentShadingRateEnumsFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentShadingRateEnums), structure->fragmentShadingRateEnums); - - skip |= ValidateBool32(pNext_loc.dot(Field::supersampleFragmentShadingRates), - structure->supersampleFragmentShadingRates); - - skip |= ValidateBool32(pNext_loc.dot(Field::noInvocationFragmentShadingRates), - structure->noInvocationFragmentShadingRates); + VkImportMemoryWin32HandleInfoNV* structure = (VkImportMemoryWin32HandleInfoNV*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBitsNV, + AllVkExternalMemoryHandleTypeFlagBitsNV, structure->handleType, kOptionalFlags, + "VUID-VkImportMemoryWin32HandleInfoNV-handleType-parameter"); } } break; - // Validation code for VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_ENUMS_PROPERTIES_NV: { // Covers - // VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-sType-sType + // No Validation code for VkExportMemoryWin32HandleInfoNV structure members -- Covers + // VUID-VkExportMemoryWin32HandleInfoNV-sType-sType + + // Validation code for VkWin32KeyedMutexAcquireReleaseInfoNV structure members + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: { // Covers + // VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV); - if (!IsExtEnabled(device_extensions.vk_nv_fragment_shading_rate_enums)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWin32KeyedMutexAcquireReleaseInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_win32_keyed_mutex)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_fragment_shading_rate_enums"); + "extended struct requires the extensions VK_NV_win32_keyed_mutex"); } - VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV* structure = - (VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV*)header; - skip |= ValidateFlags( - pNext_loc.dot(Field::maxFragmentShadingRateInvocationCount), vvl::FlagBitmask::VkSampleCountFlagBits, - AllVkSampleCountFlagBits, structure->maxFragmentShadingRateInvocationCount, kRequiredSingleBit, - "VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-maxFragmentShadingRateInvocationCount-parameter", - "VUID-VkPhysicalDeviceFragmentShadingRateEnumsPropertiesNV-maxFragmentShadingRateInvocationCount-parameter"); - } - } break; + VkWin32KeyedMutexAcquireReleaseInfoNV* structure = (VkWin32KeyedMutexAcquireReleaseInfoNV*)header; + skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireSyncs), + structure->acquireCount, &structure->pAcquireSyncs, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireSyncs-parameter"); - // No Validation code for VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure members -- Covers - // VUID-VkPipelineFragmentShadingRateEnumStateCreateInfoNV-sType-sType + skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireKeys), + structure->acquireCount, &structure->pAcquireKeys, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireKeys-parameter"); - // No Validation code for VkAccelerationStructureGeometryMotionTrianglesDataNV structure members -- Covers - // VUID-VkAccelerationStructureGeometryMotionTrianglesDataNV-sType-sType + skip |= ValidateArray(pNext_loc.dot(Field::acquireCount), pNext_loc.dot(Field::pAcquireTimeoutMilliseconds), + structure->acquireCount, &structure->pAcquireTimeoutMilliseconds, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pAcquireTimeoutMilliseconds-parameter"); - // Validation code for VkAccelerationStructureMotionInfoNV structure members - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV: { // Covers - // VUID-VkAccelerationStructureMotionInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAccelerationStructureMotionInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_motion_blur)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_ray_tracing_motion_blur"); - } - VkAccelerationStructureMotionInfoNV* structure = (VkAccelerationStructureMotionInfoNV*)header; - skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, - "VUID-VkAccelerationStructureMotionInfoNV-flags-zerobitmask"); + skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseSyncs), + structure->releaseCount, &structure->pReleaseSyncs, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseSyncs-parameter"); + + skip |= ValidateArray(pNext_loc.dot(Field::releaseCount), pNext_loc.dot(Field::pReleaseKeys), + structure->releaseCount, &structure->pReleaseKeys, false, true, kVUIDUndefined, + "VUID-VkWin32KeyedMutexAcquireReleaseInfoNV-pReleaseKeys-parameter"); } } break; +#endif // VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkPhysicalDeviceRayTracingMotionBlurFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_MOTION_BLUR_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceRayTracingMotionBlurFeaturesNV-sType-sType + // Validation code for VkValidationFlagsEXT structure members + case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: { // Covers VUID-VkValidationFlagsEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingMotionBlurFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_motion_blur)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayTracingMotionBlurFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_ray_tracing_motion_blur) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRayTracingMotionBlurFeaturesNV* structure = (VkPhysicalDeviceRayTracingMotionBlurFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingMotionBlur), structure->rayTracingMotionBlur); - - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingMotionBlurPipelineTraceRaysIndirect), - structure->rayTracingMotionBlurPipelineTraceRaysIndirect); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkValidationFlagsEXT); + VkValidationFlagsEXT* structure = (VkValidationFlagsEXT*)header; + skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::disabledValidationCheckCount), + pNext_loc.dot(Field::pDisabledValidationChecks), vvl::Enum::VkValidationCheckEXT, + structure->disabledValidationCheckCount, structure->pDisabledValidationChecks, true, + true, "VUID-VkValidationFlagsEXT-disabledValidationCheckCount-arraylength", + "VUID-VkValidationFlagsEXT-pDisabledValidationChecks-parameter"); } } break; - // Validation code for VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT-sType-sType + // Validation code for VkImageViewASTCDecodeModeEXT structure members + case VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT: { // Covers VUID-VkImageViewASTCDecodeModeEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_ycbcr_2plane_444_formats)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageViewASTCDecodeModeEXT); + if (!IsExtEnabled(device_extensions.vk_ext_astc_decode_mode)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_ycbcr_2plane_444_formats) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_astc_decode_mode"); } - VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT* structure = - (VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::ycbcr2plane444Formats), structure->ycbcr2plane444Formats); + VkImageViewASTCDecodeModeEXT* structure = (VkImageViewASTCDecodeModeEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::decodeMode), vvl::Enum::VkFormat, structure->decodeMode, + "VUID-VkImageViewASTCDecodeModeEXT-decodeMode-parameter"); } } break; - // Validation code for VkPhysicalDeviceFragmentDensityMap2FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_2_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceFragmentDensityMap2FeaturesEXT-sType-sType + // Validation code for VkPipelineRobustnessCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT: { // Covers VUID-VkPipelineRobustnessCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentDensityMap2FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_fragment_density_map2)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRobustnessCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_pipeline_robustness)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentDensityMap2FeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_fragment_density_map2) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_pipeline_robustness"); } - VkPhysicalDeviceFragmentDensityMap2FeaturesEXT* structure = (VkPhysicalDeviceFragmentDensityMap2FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapDeferred), structure->fragmentDensityMapDeferred); - } - } break; + VkPipelineRobustnessCreateInfoEXT* structure = (VkPipelineRobustnessCreateInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::storageBuffers), vvl::Enum::VkPipelineRobustnessBufferBehaviorEXT, + structure->storageBuffers, + "VUID-VkPipelineRobustnessCreateInfoEXT-storageBuffers-parameter"); - // No Validation code for VkPhysicalDeviceFragmentDensityMap2PropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceFragmentDensityMap2PropertiesEXT-sType-sType + skip |= ValidateRangedEnum(pNext_loc.dot(Field::uniformBuffers), vvl::Enum::VkPipelineRobustnessBufferBehaviorEXT, + structure->uniformBuffers, + "VUID-VkPipelineRobustnessCreateInfoEXT-uniformBuffers-parameter"); - // No Validation code for VkCopyCommandTransformInfoQCOM structure members -- Covers - // VUID-VkCopyCommandTransformInfoQCOM-sType-sType + skip |= + ValidateRangedEnum(pNext_loc.dot(Field::vertexInputs), vvl::Enum::VkPipelineRobustnessBufferBehaviorEXT, + structure->vertexInputs, "VUID-VkPipelineRobustnessCreateInfoEXT-vertexInputs-parameter"); - // Validation code for VkPhysicalDeviceImageCompressionControlFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceImageCompressionControlFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageCompressionControlFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_compression_control)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageCompressionControlFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_image_compression_control) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceImageCompressionControlFeaturesEXT* structure = - (VkPhysicalDeviceImageCompressionControlFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::imageCompressionControl), structure->imageCompressionControl); + skip |= ValidateRangedEnum(pNext_loc.dot(Field::images), vvl::Enum::VkPipelineRobustnessImageBehaviorEXT, + structure->images, "VUID-VkPipelineRobustnessCreateInfoEXT-images-parameter"); } } break; - // No Validation code for VkImageCompressionControlEXT structure members -- Covers - // VUID-VkImageCompressionControlEXT-sType-sType - - // No Validation code for VkImageCompressionPropertiesEXT structure members -- Covers - // VUID-VkImageCompressionPropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_LAYOUT_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT-sType-sType + // Validation code for VkCommandBufferInheritanceConditionalRenderingInfoEXT structure members + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: { // Covers + // VUID-VkCommandBufferInheritanceConditionalRenderingInfoEXT-sType-sType if (is_const_param) { [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_attachment_feedback_loop_layout)) { + loc.pNext(Struct::VkCommandBufferInheritanceConditionalRenderingInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_conditional_rendering)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_attachment_feedback_loop_layout) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_conditional_rendering"); } - VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT* structure = - (VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::attachmentFeedbackLoopLayout), structure->attachmentFeedbackLoopLayout); + VkCommandBufferInheritanceConditionalRenderingInfoEXT* structure = + (VkCommandBufferInheritanceConditionalRenderingInfoEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::conditionalRenderingEnable), structure->conditionalRenderingEnable); } } break; - // Validation code for VkPhysicalDevice4444FormatsFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevice4444FormatsFeaturesEXT-sType-sType + // Validation code for VkPipelineViewportWScalingStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineViewportWScalingStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevice4444FormatsFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_4444_formats)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportWScalingStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_clip_space_w_scaling)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevice4444FormatsFeaturesEXT, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_4444_formats) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_clip_space_w_scaling"); } - VkPhysicalDevice4444FormatsFeaturesEXT* structure = (VkPhysicalDevice4444FormatsFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::formatA4R4G4B4), structure->formatA4R4G4B4); + VkPipelineViewportWScalingStateCreateInfoNV* structure = (VkPipelineViewportWScalingStateCreateInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::viewportWScalingEnable), structure->viewportWScalingEnable); - skip |= ValidateBool32(pNext_loc.dot(Field::formatA4B4G4R4), structure->formatA4B4G4R4); + skip |= ValidateArray(pNext_loc.dot(Field::viewportCount), loc, structure->viewportCount, + &structure->pViewportWScalings, true, false, + "VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-arraylength", kVUIDUndefined); } } break; - // Validation code for VkPhysicalDeviceFaultFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT: { // Covers VUID-VkPhysicalDeviceFaultFeaturesEXT-sType-sType + // Validation code for VkSwapchainCounterCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: { // Covers VUID-VkSwapchainCounterCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFaultFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_device_fault)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFaultFeaturesEXT, but when creating VkDevice, the " - "parent extension " - "(VK_EXT_device_fault) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainCounterCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_display_control)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_display_control"); } - VkPhysicalDeviceFaultFeaturesEXT* structure = (VkPhysicalDeviceFaultFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::deviceFault), structure->deviceFault); - - skip |= ValidateBool32(pNext_loc.dot(Field::deviceFaultVendorBinary), structure->deviceFaultVendorBinary); + VkSwapchainCounterCreateInfoEXT* structure = (VkSwapchainCounterCreateInfoEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::surfaceCounters), vvl::FlagBitmask::VkSurfaceCounterFlagBitsEXT, + AllVkSurfaceCounterFlagBitsEXT, structure->surfaceCounters, kOptionalFlags, + "VUID-VkSwapchainCounterCreateInfoEXT-surfaceCounters-parameter"); } } break; - // Validation code for VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT-sType-sType + // Validation code for VkPresentTimesInfoGOOGLE structure members + case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: { // Covers VUID-VkPresentTimesInfoGOOGLE-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_arm_rasterization_order_attachment_access) && - !IsExtEnabled(device_extensions.vk_ext_rasterization_order_attachment_access)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPresentTimesInfoGOOGLE); + if (!IsExtEnabled(device_extensions.vk_google_display_timing)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT, but " - "when creating VkDevice, the parent extension " - "(VK_ARM_rasterization_order_attachment_access or " - "VK_EXT_rasterization_order_attachment_access) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_GOOGLE_display_timing"); } - VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT* structure = - (VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rasterizationOrderColorAttachmentAccess), - structure->rasterizationOrderColorAttachmentAccess); - - skip |= ValidateBool32(pNext_loc.dot(Field::rasterizationOrderDepthAttachmentAccess), - structure->rasterizationOrderDepthAttachmentAccess); + VkPresentTimesInfoGOOGLE* structure = (VkPresentTimesInfoGOOGLE*)header; + skip |= ValidateArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pTimes), structure->swapchainCount, + &structure->pTimes, true, false, "VUID-VkPresentTimesInfoGOOGLE-swapchainCount-arraylength", + "VUID-VkPresentTimesInfoGOOGLE-pTimes-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::rasterizationOrderStencilAttachmentAccess), - structure->rasterizationOrderStencilAttachmentAccess); + if (structure->pTimes != nullptr) { + for (uint32_t swapchainIndex = 0; swapchainIndex < structure->swapchainCount; ++swapchainIndex) { + [[maybe_unused]] const Location pTimes_loc = pNext_loc.dot(Field::pTimes, swapchainIndex); + } + } } } break; - // Validation code for VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT-sType-sType + // Validation code for VkPipelineViewportSwizzleStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_rgba10x6_formats)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_rgba10x6_formats) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportSwizzleStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_viewport_swizzle)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_viewport_swizzle"); } - VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT* structure = (VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::formatRgba10x6WithoutYCbCrSampler), - structure->formatRgba10x6WithoutYCbCrSampler); - } - } break; + VkPipelineViewportSwizzleStateCreateInfoNV* structure = (VkPipelineViewportSwizzleStateCreateInfoNV*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask"); - // Validation code for VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_valve_mutable_descriptor_type) && - !IsExtEnabled(device_extensions.vk_ext_mutable_descriptor_type)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_VALVE_mutable_descriptor_type or VK_EXT_mutable_descriptor_type) was not included in " - "ppEnabledExtensionNames."); + skip |= ValidateArray(pNext_loc.dot(Field::viewportCount), pNext_loc.dot(Field::pViewportSwizzles), + structure->viewportCount, &structure->pViewportSwizzles, true, true, + "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength", + "VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pViewportSwizzles-parameter"); + + if (structure->pViewportSwizzles != nullptr) { + for (uint32_t viewportIndex = 0; viewportIndex < structure->viewportCount; ++viewportIndex) { + [[maybe_unused]] const Location pViewportSwizzles_loc = + pNext_loc.dot(Field::pViewportSwizzles, viewportIndex); + skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::x), vvl::Enum::VkViewportCoordinateSwizzleNV, + structure->pViewportSwizzles[viewportIndex].x, + "VUID-VkViewportSwizzleNV-x-parameter"); + + skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::y), vvl::Enum::VkViewportCoordinateSwizzleNV, + structure->pViewportSwizzles[viewportIndex].y, + "VUID-VkViewportSwizzleNV-y-parameter"); + + skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::z), vvl::Enum::VkViewportCoordinateSwizzleNV, + structure->pViewportSwizzles[viewportIndex].z, + "VUID-VkViewportSwizzleNV-z-parameter"); + + skip |= ValidateRangedEnum(pViewportSwizzles_loc.dot(Field::w), vvl::Enum::VkViewportCoordinateSwizzleNV, + structure->pViewportSwizzles[viewportIndex].w, + "VUID-VkViewportSwizzleNV-w-parameter"); + } } - VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT* structure = - (VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::mutableDescriptorType), structure->mutableDescriptorType); } } break; - // Validation code for VkMutableDescriptorTypeCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: { // Covers - // VUID-VkMutableDescriptorTypeCreateInfoEXT-sType-sType + // Validation code for VkPipelineDiscardRectangleStateCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMutableDescriptorTypeCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_valve_mutable_descriptor_type) && - !IsExtEnabled(device_extensions.vk_ext_mutable_descriptor_type)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_VALVE_mutable_descriptor_type or " - "VK_EXT_mutable_descriptor_type"); - } - VkMutableDescriptorTypeCreateInfoEXT* structure = (VkMutableDescriptorTypeCreateInfoEXT*)header; - skip |= ValidateArray(pNext_loc.dot(Field::mutableDescriptorTypeListCount), - pNext_loc.dot(Field::pMutableDescriptorTypeLists), structure->mutableDescriptorTypeListCount, - &structure->pMutableDescriptorTypeLists, false, true, kVUIDUndefined, - "VUID-VkMutableDescriptorTypeCreateInfoEXT-pMutableDescriptorTypeLists-parameter"); - - if (structure->pMutableDescriptorTypeLists != nullptr) { - for (uint32_t mutableDescriptorTypeListIndex = 0; - mutableDescriptorTypeListIndex < structure->mutableDescriptorTypeListCount; - ++mutableDescriptorTypeListIndex) { - [[maybe_unused]] const Location pMutableDescriptorTypeLists_loc = - pNext_loc.dot(Field::pMutableDescriptorTypeLists, mutableDescriptorTypeListIndex); - skip |= ValidateRangedEnumArray( - pMutableDescriptorTypeLists_loc.dot(Field::descriptorTypeCount), - pMutableDescriptorTypeLists_loc.dot(Field::pDescriptorTypes), vvl::Enum::VkDescriptorType, - structure->pMutableDescriptorTypeLists[mutableDescriptorTypeListIndex].descriptorTypeCount, - structure->pMutableDescriptorTypeLists[mutableDescriptorTypeListIndex].pDescriptorTypes, false, true, - kVUIDUndefined, "VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-parameter"); - } + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineDiscardRectangleStateCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_discard_rectangles)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_discard_rectangles"); } + VkPipelineDiscardRectangleStateCreateInfoEXT* structure = (VkPipelineDiscardRectangleStateCreateInfoEXT*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-flags-zerobitmask"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::discardRectangleMode), vvl::Enum::VkDiscardRectangleModeEXT, + structure->discardRectangleMode, + "VUID-VkPipelineDiscardRectangleStateCreateInfoEXT-discardRectangleMode-parameter"); } } break; - // Validation code for VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_INPUT_DYNAMIC_STATE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT-sType-sType + // Validation code for VkPipelineRasterizationConservativeStateCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_vertex_input_dynamic_state)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPipelineRasterizationConservativeStateCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_conservative_rasterization)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_vertex_input_dynamic_state) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_conservative_rasterization"); } - VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT* structure = - (VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::vertexInputDynamicState), structure->vertexInputDynamicState); + VkPipelineRasterizationConservativeStateCreateInfoEXT* structure = + (VkPipelineRasterizationConservativeStateCreateInfoEXT*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-flags-zerobitmask"); + + skip |= ValidateRangedEnum( + pNext_loc.dot(Field::conservativeRasterizationMode), vvl::Enum::VkConservativeRasterizationModeEXT, + structure->conservativeRasterizationMode, + "VUID-VkPipelineRasterizationConservativeStateCreateInfoEXT-conservativeRasterizationMode-parameter"); } } break; - // No Validation code for VkPhysicalDeviceDrmPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceDrmPropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceAddressBindingReportFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ADDRESS_BINDING_REPORT_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceAddressBindingReportFeaturesEXT-sType-sType + // Validation code for VkPipelineRasterizationDepthClipStateCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineRasterizationDepthClipStateCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceAddressBindingReportFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_device_address_binding_report)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineRasterizationDepthClipStateCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_enable)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceAddressBindingReportFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_device_address_binding_report) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_depth_clip_enable"); } - VkPhysicalDeviceAddressBindingReportFeaturesEXT* structure = - (VkPhysicalDeviceAddressBindingReportFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::reportAddressBinding), structure->reportAddressBinding); + VkPipelineRasterizationDepthClipStateCreateInfoEXT* structure = + (VkPipelineRasterizationDepthClipStateCreateInfoEXT*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineRasterizationDepthClipStateCreateInfoEXT-flags-zerobitmask"); + + skip |= ValidateBool32(pNext_loc.dot(Field::depthClipEnable), structure->depthClipEnable); } } break; - // Validation code for VkDeviceAddressBindingCallbackDataEXT structure members - case VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT: { // Covers - // VUID-VkDeviceAddressBindingCallbackDataEXT-sType-sType + // Validation code for VkDebugUtilsObjectNameInfoEXT structure members + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: { // Covers VUID-VkDebugUtilsObjectNameInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceAddressBindingCallbackDataEXT); - if (!IsExtEnabled(device_extensions.vk_ext_device_address_binding_report)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_device_address_binding_report"); - } - VkDeviceAddressBindingCallbackDataEXT* structure = (VkDeviceAddressBindingCallbackDataEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkDeviceAddressBindingFlagBitsEXT, - AllVkDeviceAddressBindingFlagBitsEXT, structure->flags, kOptionalFlags, - "VUID-VkDeviceAddressBindingCallbackDataEXT-flags-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDebugUtilsObjectNameInfoEXT); + VkDebugUtilsObjectNameInfoEXT* structure = (VkDebugUtilsObjectNameInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::objectType), vvl::Enum::VkObjectType, structure->objectType, + "VUID-VkDebugUtilsObjectNameInfoEXT-objectType-parameter"); + } + } break; + + // Validation code for VkDebugUtilsMessengerCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: { // Covers + // VUID-VkDebugUtilsMessengerCreateInfoEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDebugUtilsMessengerCreateInfoEXT); + VkDebugUtilsMessengerCreateInfoEXT* structure = (VkDebugUtilsMessengerCreateInfoEXT*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkDebugUtilsMessengerCreateInfoEXT-flags-zerobitmask"); skip |= - ValidateRangedEnum(pNext_loc.dot(Field::bindingType), vvl::Enum::VkDeviceAddressBindingTypeEXT, - structure->bindingType, "VUID-VkDeviceAddressBindingCallbackDataEXT-bindingType-parameter"); + ValidateFlags(pNext_loc.dot(Field::messageSeverity), vvl::FlagBitmask::VkDebugUtilsMessageSeverityFlagBitsEXT, + AllVkDebugUtilsMessageSeverityFlagBitsEXT, structure->messageSeverity, kRequiredFlags, + "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageSeverity-parameter", + "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageSeverity-requiredbitmask"); + + skip |= ValidateFlags(pNext_loc.dot(Field::messageType), vvl::FlagBitmask::VkDebugUtilsMessageTypeFlagBitsEXT, + AllVkDebugUtilsMessageTypeFlagBitsEXT, structure->messageType, kRequiredFlags, + "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-parameter", + "VUID-VkDebugUtilsMessengerCreateInfoEXT-messageType-requiredbitmask"); + + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pfnUserCallback), + reinterpret_cast(structure->pfnUserCallback), + "VUID-VkDebugUtilsMessengerCreateInfoEXT-pfnUserCallback-parameter"); } } break; +#ifdef VK_USE_PLATFORM_ANDROID_KHR - // Validation code for VkPhysicalDeviceDepthClipControlFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDepthClipControlFeaturesEXT-sType-sType + // No Validation code for VkAndroidHardwareBufferUsageANDROID structure members -- Covers + // VUID-VkAndroidHardwareBufferUsageANDROID-sType-sType + + // No Validation code for VkAndroidHardwareBufferFormatPropertiesANDROID structure members -- Covers + // VUID-VkAndroidHardwareBufferFormatPropertiesANDROID-sType-sType + + // Validation code for VkImportAndroidHardwareBufferInfoANDROID structure members + case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: { // Covers + // VUID-VkImportAndroidHardwareBufferInfoANDROID-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthClipControlFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportAndroidHardwareBufferInfoANDROID); + if (!IsExtEnabled(device_extensions.vk_android_external_memory_android_hardware_buffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDepthClipControlFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_depth_clip_control) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_ANDROID_external_memory_android_hardware_buffer"); } - VkPhysicalDeviceDepthClipControlFeaturesEXT* structure = (VkPhysicalDeviceDepthClipControlFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::depthClipControl), structure->depthClipControl); + VkImportAndroidHardwareBufferInfoANDROID* structure = (VkImportAndroidHardwareBufferInfoANDROID*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::buffer), structure->buffer, + "VUID-VkImportAndroidHardwareBufferInfoANDROID-buffer-parameter"); } } break; - // Validation code for VkPipelineViewportDepthClipControlCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineViewportDepthClipControlCreateInfoEXT-sType-sType + // No Validation code for VkExternalFormatANDROID structure members -- Covers VUID-VkExternalFormatANDROID-sType-sType + + // No Validation code for VkAndroidHardwareBufferFormatProperties2ANDROID structure members -- Covers + // VUID-VkAndroidHardwareBufferFormatProperties2ANDROID-sType-sType +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_ENABLE_BETA_EXTENSIONS + + // No Validation code for VkPipelineShaderStageNodeCreateInfoAMDX structure members -- Covers + // VUID-VkPipelineShaderStageNodeCreateInfoAMDX-sType-sType +#endif // VK_ENABLE_BETA_EXTENSIONS + + // Validation code for VkSampleLocationsInfoEXT structure members + case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: { // Covers VUID-VkSampleLocationsInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportDepthClipControlCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_control)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSampleLocationsInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_sample_locations)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_depth_clip_control"); + "extended struct requires the extensions VK_EXT_sample_locations"); + } + VkSampleLocationsInfoEXT* structure = (VkSampleLocationsInfoEXT*)header; + skip |= ValidateArray(pNext_loc.dot(Field::sampleLocationsCount), pNext_loc.dot(Field::pSampleLocations), + structure->sampleLocationsCount, &structure->pSampleLocations, false, true, kVUIDUndefined, + "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); + + if (structure->pSampleLocations != nullptr) { + for (uint32_t sampleLocationsIndex = 0; sampleLocationsIndex < structure->sampleLocationsCount; + ++sampleLocationsIndex) { + [[maybe_unused]] const Location pSampleLocations_loc = + pNext_loc.dot(Field::pSampleLocations, sampleLocationsIndex); + } } - VkPipelineViewportDepthClipControlCreateInfoEXT* structure = - (VkPipelineViewportDepthClipControlCreateInfoEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::negativeOneToOne), structure->negativeOneToOne); } } break; - // Validation code for VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT-sType-sType + // Validation code for VkRenderPassSampleLocationsBeginInfoEXT structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: { // Covers + // VUID-VkRenderPassSampleLocationsBeginInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_primitive_topology_list_restart)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassSampleLocationsBeginInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_sample_locations)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_primitive_topology_list_restart) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_sample_locations"); } - VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT* structure = - (VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::primitiveTopologyListRestart), structure->primitiveTopologyListRestart); + VkRenderPassSampleLocationsBeginInfoEXT* structure = (VkRenderPassSampleLocationsBeginInfoEXT*)header; + skip |= ValidateArray(pNext_loc.dot(Field::attachmentInitialSampleLocationsCount), + pNext_loc.dot(Field::pAttachmentInitialSampleLocations), + structure->attachmentInitialSampleLocationsCount, + &structure->pAttachmentInitialSampleLocations, false, true, kVUIDUndefined, + "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pAttachmentInitialSampleLocations-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::primitiveTopologyPatchListRestart), - structure->primitiveTopologyPatchListRestart); - } - } break; -#ifdef VK_USE_PLATFORM_FUCHSIA + if (structure->pAttachmentInitialSampleLocations != nullptr) { + for (uint32_t attachmentInitialSampleLocationsIndex = 0; + attachmentInitialSampleLocationsIndex < structure->attachmentInitialSampleLocationsCount; + ++attachmentInitialSampleLocationsIndex) { + [[maybe_unused]] const Location pAttachmentInitialSampleLocations_loc = + pNext_loc.dot(Field::pAttachmentInitialSampleLocations, attachmentInitialSampleLocationsIndex); + skip |= + ValidateStructType(pAttachmentInitialSampleLocations_loc.dot(Field::sampleLocationsInfo), + "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT", + &(structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] + .sampleLocationsInfo), + VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, false, kVUIDUndefined, + "VUID-VkSampleLocationsInfoEXT-sType-sType"); + + skip |= + ValidateArray(pAttachmentInitialSampleLocations_loc.dot(Field::sampleLocationsCount), + pAttachmentInitialSampleLocations_loc.dot(Field::pSampleLocations), + structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] + .sampleLocationsInfo.sampleLocationsCount, + &structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] + .sampleLocationsInfo.pSampleLocations, + false, true, kVUIDUndefined, "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); + + if (structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] + .sampleLocationsInfo.pSampleLocations != nullptr) { + for (uint32_t sampleLocationsIndex = 0; + sampleLocationsIndex < + structure->pAttachmentInitialSampleLocations[attachmentInitialSampleLocationsIndex] + .sampleLocationsInfo.sampleLocationsCount; + ++sampleLocationsIndex) { + [[maybe_unused]] const Location pSampleLocations_loc = + pAttachmentInitialSampleLocations_loc.dot(Field::pSampleLocations, sampleLocationsIndex); + } + } + } + } + + skip |= ValidateArray(pNext_loc.dot(Field::postSubpassSampleLocationsCount), + pNext_loc.dot(Field::pPostSubpassSampleLocations), structure->postSubpassSampleLocationsCount, + &structure->pPostSubpassSampleLocations, false, true, kVUIDUndefined, + "VUID-VkRenderPassSampleLocationsBeginInfoEXT-pPostSubpassSampleLocations-parameter"); + + if (structure->pPostSubpassSampleLocations != nullptr) { + for (uint32_t postSubpassSampleLocationsIndex = 0; + postSubpassSampleLocationsIndex < structure->postSubpassSampleLocationsCount; + ++postSubpassSampleLocationsIndex) { + [[maybe_unused]] const Location pPostSubpassSampleLocations_loc = + pNext_loc.dot(Field::pPostSubpassSampleLocations, postSubpassSampleLocationsIndex); + skip |= ValidateStructType( + pPostSubpassSampleLocations_loc.dot(Field::sampleLocationsInfo), + "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT", + &(structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex].sampleLocationsInfo), + VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, false, kVUIDUndefined, + "VUID-VkSampleLocationsInfoEXT-sType-sType"); + + skip |= + ValidateArray(pPostSubpassSampleLocations_loc.dot(Field::sampleLocationsCount), + pPostSubpassSampleLocations_loc.dot(Field::pSampleLocations), + structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] + .sampleLocationsInfo.sampleLocationsCount, + &structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] + .sampleLocationsInfo.pSampleLocations, + false, true, kVUIDUndefined, "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); - // Validation code for VkImportMemoryZirconHandleInfoFUCHSIA structure members - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA: { // Covers - // VUID-VkImportMemoryZirconHandleInfoFUCHSIA-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryZirconHandleInfoFUCHSIA); - if (!IsExtEnabled(device_extensions.vk_fuchsia_external_memory)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_FUCHSIA_external_memory"); + if (structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] + .sampleLocationsInfo.pSampleLocations != nullptr) { + for (uint32_t sampleLocationsIndex = 0; + sampleLocationsIndex < structure->pPostSubpassSampleLocations[postSubpassSampleLocationsIndex] + .sampleLocationsInfo.sampleLocationsCount; + ++sampleLocationsIndex) { + [[maybe_unused]] const Location pSampleLocations_loc = + pPostSubpassSampleLocations_loc.dot(Field::pSampleLocations, sampleLocationsIndex); + } + } + } } - VkImportMemoryZirconHandleInfoFUCHSIA* structure = (VkImportMemoryZirconHandleInfoFUCHSIA*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, - AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, - "VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handleType-parameter"); } } break; - // Validation code for VkImportMemoryBufferCollectionFUCHSIA structure members - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA: { // Covers - // VUID-VkImportMemoryBufferCollectionFUCHSIA-sType-sType + // Validation code for VkPipelineSampleLocationsStateCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineSampleLocationsStateCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryBufferCollectionFUCHSIA); - if (!IsExtEnabled(device_extensions.vk_fuchsia_buffer_collection)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineSampleLocationsStateCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_sample_locations)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_FUCHSIA_buffer_collection"); + "extended struct requires the extensions VK_EXT_sample_locations"); } - VkImportMemoryBufferCollectionFUCHSIA* structure = (VkImportMemoryBufferCollectionFUCHSIA*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::collection), structure->collection); - } - } break; + VkPipelineSampleLocationsStateCreateInfoEXT* structure = (VkPipelineSampleLocationsStateCreateInfoEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::sampleLocationsEnable), structure->sampleLocationsEnable); - // Validation code for VkBufferCollectionImageCreateInfoFUCHSIA structure members - case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA: { // Covers - // VUID-VkBufferCollectionImageCreateInfoFUCHSIA-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBufferCollectionImageCreateInfoFUCHSIA); - if (!IsExtEnabled(device_extensions.vk_fuchsia_buffer_collection)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_FUCHSIA_buffer_collection"); - } - VkBufferCollectionImageCreateInfoFUCHSIA* structure = (VkBufferCollectionImageCreateInfoFUCHSIA*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::collection), structure->collection); - } - } break; + skip |= ValidateStructType(pNext_loc.dot(Field::sampleLocationsInfo), "VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT", + &(structure->sampleLocationsInfo), VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, false, + kVUIDUndefined, "VUID-VkSampleLocationsInfoEXT-sType-sType"); - // Validation code for VkBufferCollectionBufferCreateInfoFUCHSIA structure members - case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA: { // Covers - // VUID-VkBufferCollectionBufferCreateInfoFUCHSIA-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBufferCollectionBufferCreateInfoFUCHSIA); - if (!IsExtEnabled(device_extensions.vk_fuchsia_buffer_collection)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_FUCHSIA_buffer_collection"); - } - VkBufferCollectionBufferCreateInfoFUCHSIA* structure = (VkBufferCollectionBufferCreateInfoFUCHSIA*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::collection), structure->collection); - } - } break; -#endif // VK_USE_PLATFORM_FUCHSIA + skip |= ValidateArray(pNext_loc.dot(Field::sampleLocationsCount), pNext_loc.dot(Field::pSampleLocations), + structure->sampleLocationsInfo.sampleLocationsCount, + &structure->sampleLocationsInfo.pSampleLocations, false, true, kVUIDUndefined, + "VUID-VkSampleLocationsInfoEXT-pSampleLocations-parameter"); - // Validation code for VkSubpassShadingPipelineCreateInfoHUAWEI structure members - case VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: { // Covers - // VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSubpassShadingPipelineCreateInfoHUAWEI); - if (!IsExtEnabled(device_extensions.vk_huawei_subpass_shading)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_HUAWEI_subpass_shading"); + if (structure->sampleLocationsInfo.pSampleLocations != nullptr) { + for (uint32_t sampleLocationsIndex = 0; + sampleLocationsIndex < structure->sampleLocationsInfo.sampleLocationsCount; ++sampleLocationsIndex) { + [[maybe_unused]] const Location pSampleLocations_loc = + pNext_loc.dot(Field::pSampleLocations, sampleLocationsIndex); + } } - VkSubpassShadingPipelineCreateInfoHUAWEI* structure = (VkSubpassShadingPipelineCreateInfoHUAWEI*)header; - skip |= ValidateRequiredHandle(pNext_loc.dot(Field::renderPass), structure->renderPass); } } break; - // Validation code for VkPhysicalDeviceSubpassShadingFeaturesHUAWEI structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI: { // Covers - // VUID-VkPhysicalDeviceSubpassShadingFeaturesHUAWEI-sType-sType + // Validation code for VkPipelineColorBlendAdvancedStateCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSubpassShadingFeaturesHUAWEI); - if (!IsExtEnabled(device_extensions.vk_huawei_subpass_shading)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineColorBlendAdvancedStateCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_blend_operation_advanced)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSubpassShadingFeaturesHUAWEI, but when creating " - "VkDevice, the parent extension " - "(VK_HUAWEI_subpass_shading) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_blend_operation_advanced"); } - VkPhysicalDeviceSubpassShadingFeaturesHUAWEI* structure = (VkPhysicalDeviceSubpassShadingFeaturesHUAWEI*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::subpassShading), structure->subpassShading); - } - } break; + VkPipelineColorBlendAdvancedStateCreateInfoEXT* structure = (VkPipelineColorBlendAdvancedStateCreateInfoEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::srcPremultiplied), structure->srcPremultiplied); - // No Validation code for VkPhysicalDeviceSubpassShadingPropertiesHUAWEI structure members -- Covers - // VUID-VkPhysicalDeviceSubpassShadingPropertiesHUAWEI-sType-sType + skip |= ValidateBool32(pNext_loc.dot(Field::dstPremultiplied), structure->dstPremultiplied); - // Validation code for VkPhysicalDeviceInvocationMaskFeaturesHUAWEI structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INVOCATION_MASK_FEATURES_HUAWEI: { // Covers - // VUID-VkPhysicalDeviceInvocationMaskFeaturesHUAWEI-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceInvocationMaskFeaturesHUAWEI); - if (!IsExtEnabled(device_extensions.vk_huawei_invocation_mask)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceInvocationMaskFeaturesHUAWEI, but when creating " - "VkDevice, the parent extension " - "(VK_HUAWEI_invocation_mask) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceInvocationMaskFeaturesHUAWEI* structure = (VkPhysicalDeviceInvocationMaskFeaturesHUAWEI*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::invocationMask), structure->invocationMask); + skip |= + ValidateRangedEnum(pNext_loc.dot(Field::blendOverlap), vvl::Enum::VkBlendOverlapEXT, structure->blendOverlap, + "VUID-VkPipelineColorBlendAdvancedStateCreateInfoEXT-blendOverlap-parameter"); } } break; - // Validation code for VkPhysicalDeviceExternalMemoryRDMAFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_RDMA_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceExternalMemoryRDMAFeaturesNV-sType-sType + // Validation code for VkPipelineCoverageToColorStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineCoverageToColorStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExternalMemoryRDMAFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_external_memory_rdma)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCoverageToColorStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_fragment_coverage_to_color)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExternalMemoryRDMAFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_external_memory_rdma) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_fragment_coverage_to_color"); } - VkPhysicalDeviceExternalMemoryRDMAFeaturesNV* structure = (VkPhysicalDeviceExternalMemoryRDMAFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::externalMemoryRDMA), structure->externalMemoryRDMA); - } - } break; + VkPipelineCoverageToColorStateCreateInfoNV* structure = (VkPipelineCoverageToColorStateCreateInfoNV*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineCoverageToColorStateCreateInfoNV-flags-zerobitmask"); - // Validation code for VkPhysicalDevicePipelinePropertiesFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROPERTIES_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePipelinePropertiesFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelinePropertiesFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_properties)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePipelinePropertiesFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_pipeline_properties) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDevicePipelinePropertiesFeaturesEXT* structure = (VkPhysicalDevicePipelinePropertiesFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelinePropertiesIdentifier), structure->pipelinePropertiesIdentifier); + skip |= ValidateBool32(pNext_loc.dot(Field::coverageToColorEnable), structure->coverageToColorEnable); } } break; - // Validation code for VkPhysicalDeviceFrameBoundaryFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceFrameBoundaryFeaturesEXT-sType-sType + // Validation code for VkPipelineCoverageModulationStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineCoverageModulationStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFrameBoundaryFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_frame_boundary)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCoverageModulationStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_framebuffer_mixed_samples)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFrameBoundaryFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_frame_boundary) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_framebuffer_mixed_samples"); } - VkPhysicalDeviceFrameBoundaryFeaturesEXT* structure = (VkPhysicalDeviceFrameBoundaryFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::frameBoundary), structure->frameBoundary); - } - } break; + VkPipelineCoverageModulationStateCreateInfoNV* structure = (VkPipelineCoverageModulationStateCreateInfoNV*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineCoverageModulationStateCreateInfoNV-flags-zerobitmask"); - // Validation code for VkFrameBoundaryEXT structure members - case VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT: { // Covers VUID-VkFrameBoundaryEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkFrameBoundaryEXT); - if (!IsExtEnabled(device_extensions.vk_ext_frame_boundary)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_frame_boundary"); - } - VkFrameBoundaryEXT* structure = (VkFrameBoundaryEXT*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkFrameBoundaryFlagBitsEXT, - AllVkFrameBoundaryFlagBitsEXT, structure->flags, kOptionalFlags, - "VUID-VkFrameBoundaryEXT-flags-parameter"); + skip |= ValidateRangedEnum(pNext_loc.dot(Field::coverageModulationMode), vvl::Enum::VkCoverageModulationModeNV, + structure->coverageModulationMode, + "VUID-VkPipelineCoverageModulationStateCreateInfoNV-coverageModulationMode-parameter"); + + skip |= + ValidateBool32(pNext_loc.dot(Field::coverageModulationTableEnable), structure->coverageModulationTableEnable); } } break; - // Validation code for VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT-sType-sType + // No Validation code for VkDrmFormatModifierPropertiesListEXT structure members -- Covers + // VUID-VkDrmFormatModifierPropertiesListEXT-sType-sType + + // Validation code for VkPhysicalDeviceImageDrmFormatModifierInfoEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: { // Covers + // VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_multisampled_render_to_single_sampled)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageDrmFormatModifierInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_drm_format_modifier)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT, but " - "when creating VkDevice, the parent extension " - "(VK_EXT_multisampled_render_to_single_sampled) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_image_drm_format_modifier"); } - VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT* structure = - (VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::multisampledRenderToSingleSampled), - structure->multisampledRenderToSingleSampled); + VkPhysicalDeviceImageDrmFormatModifierInfoEXT* structure = (VkPhysicalDeviceImageDrmFormatModifierInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::sharingMode), vvl::Enum::VkSharingMode, structure->sharingMode, + "VUID-VkPhysicalDeviceImageDrmFormatModifierInfoEXT-sharingMode-parameter"); } } break; - // No Validation code for VkSubpassResolvePerformanceQueryEXT structure members -- Covers - // VUID-VkSubpassResolvePerformanceQueryEXT-sType-sType - - // Validation code for VkMultisampledRenderToSingleSampledInfoEXT structure members - case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: { // Covers - // VUID-VkMultisampledRenderToSingleSampledInfoEXT-sType-sType + // Validation code for VkImageDrmFormatModifierListCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: { // Covers + // VUID-VkImageDrmFormatModifierListCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMultisampledRenderToSingleSampledInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_multisampled_render_to_single_sampled)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_multisampled_render_to_single_sampled"); - } - VkMultisampledRenderToSingleSampledInfoEXT* structure = (VkMultisampledRenderToSingleSampledInfoEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::multisampledRenderToSingleSampledEnable), - structure->multisampledRenderToSingleSampledEnable); - - skip |= ValidateFlags(pNext_loc.dot(Field::rasterizationSamples), vvl::FlagBitmask::VkSampleCountFlagBits, - AllVkSampleCountFlagBits, structure->rasterizationSamples, kRequiredSingleBit, - "VUID-VkMultisampledRenderToSingleSampledInfoEXT-rasterizationSamples-parameter", - "VUID-VkMultisampledRenderToSingleSampledInfoEXT-rasterizationSamples-parameter"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageDrmFormatModifierListCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_drm_format_modifier)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_image_drm_format_modifier"); + } + VkImageDrmFormatModifierListCreateInfoEXT* structure = (VkImageDrmFormatModifierListCreateInfoEXT*)header; + skip |= ValidateArray(pNext_loc.dot(Field::drmFormatModifierCount), pNext_loc.dot(Field::pDrmFormatModifiers), + structure->drmFormatModifierCount, &structure->pDrmFormatModifiers, true, true, + "VUID-VkImageDrmFormatModifierListCreateInfoEXT-drmFormatModifierCount-arraylength", + "VUID-VkImageDrmFormatModifierListCreateInfoEXT-pDrmFormatModifiers-parameter"); } } break; - // Validation code for VkPhysicalDeviceExtendedDynamicState2FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceExtendedDynamicState2FeaturesEXT-sType-sType + // Validation code for VkImageDrmFormatModifierExplicitCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: { // Covers + // VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicState2FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state2)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImageDrmFormatModifierExplicitCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_image_drm_format_modifier)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExtendedDynamicState2FeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_extended_dynamic_state2) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_image_drm_format_modifier"); } - VkPhysicalDeviceExtendedDynamicState2FeaturesEXT* structure = - (VkPhysicalDeviceExtendedDynamicState2FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState2), structure->extendedDynamicState2); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState2LogicOp), structure->extendedDynamicState2LogicOp); + VkImageDrmFormatModifierExplicitCreateInfoEXT* structure = (VkImageDrmFormatModifierExplicitCreateInfoEXT*)header; + skip |= ValidateArray(pNext_loc.dot(Field::drmFormatModifierPlaneCount), pNext_loc.dot(Field::pPlaneLayouts), + structure->drmFormatModifierPlaneCount, &structure->pPlaneLayouts, true, true, + "VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-drmFormatModifierPlaneCount-arraylength", + "VUID-VkImageDrmFormatModifierExplicitCreateInfoEXT-pPlaneLayouts-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState2PatchControlPoints), - structure->extendedDynamicState2PatchControlPoints); + if (structure->pPlaneLayouts != nullptr) { + for (uint32_t drmFormatModifierPlaneIndex = 0; + drmFormatModifierPlaneIndex < structure->drmFormatModifierPlaneCount; ++drmFormatModifierPlaneIndex) { + [[maybe_unused]] const Location pPlaneLayouts_loc = + pNext_loc.dot(Field::pPlaneLayouts, drmFormatModifierPlaneIndex); + } + } } } break; - // Validation code for VkPhysicalDeviceColorWriteEnableFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceColorWriteEnableFeaturesEXT-sType-sType + // No Validation code for VkDrmFormatModifierPropertiesList2EXT structure members -- Covers + // VUID-VkDrmFormatModifierPropertiesList2EXT-sType-sType + + // Validation code for VkShaderModuleValidationCacheCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: { // Covers + // VUID-VkShaderModuleValidationCacheCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceColorWriteEnableFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_color_write_enable)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkShaderModuleValidationCacheCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_validation_cache)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceColorWriteEnableFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_color_write_enable) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_validation_cache"); } - VkPhysicalDeviceColorWriteEnableFeaturesEXT* structure = (VkPhysicalDeviceColorWriteEnableFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::colorWriteEnable), structure->colorWriteEnable); + VkShaderModuleValidationCacheCreateInfoEXT* structure = (VkShaderModuleValidationCacheCreateInfoEXT*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::validationCache), structure->validationCache); } } break; - // Validation code for VkPipelineColorWriteCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: { // Covers VUID-VkPipelineColorWriteCreateInfoEXT-sType-sType + // Validation code for VkPipelineViewportShadingRateImageStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineViewportShadingRateImageStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineColorWriteCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_color_write_enable)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportShadingRateImageStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_shading_rate_image)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_color_write_enable"); + "extended struct requires the extensions VK_NV_shading_rate_image"); } - VkPipelineColorWriteCreateInfoEXT* structure = (VkPipelineColorWriteCreateInfoEXT*)header; - skip |= ValidateBool32Array(pNext_loc.dot(Field::attachmentCount), pNext_loc.dot(Field::pColorWriteEnables), - structure->attachmentCount, structure->pColorWriteEnables, false, true, kVUIDUndefined, - "VUID-VkPipelineColorWriteCreateInfoEXT-pColorWriteEnables-parameter"); + VkPipelineViewportShadingRateImageStateCreateInfoNV* structure = + (VkPipelineViewportShadingRateImageStateCreateInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::shadingRateImageEnable), structure->shadingRateImageEnable); } } break; - // Validation code for VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT-sType-sType + // Validation code for VkPipelineViewportCoarseSampleOrderStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_primitives_generated_query)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportCoarseSampleOrderStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_shading_rate_image)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_primitives_generated_query) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_shading_rate_image"); } - VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT* structure = - (VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::primitivesGeneratedQuery), structure->primitivesGeneratedQuery); + VkPipelineViewportCoarseSampleOrderStateCreateInfoNV* structure = + (VkPipelineViewportCoarseSampleOrderStateCreateInfoNV*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::sampleOrderType), vvl::Enum::VkCoarseSampleOrderTypeNV, + structure->sampleOrderType, + "VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-sampleOrderType-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::primitivesGeneratedQueryWithRasterizerDiscard), - structure->primitivesGeneratedQueryWithRasterizerDiscard); + skip |= + ValidateArray(pNext_loc.dot(Field::customSampleOrderCount), pNext_loc.dot(Field::pCustomSampleOrders), + structure->customSampleOrderCount, &structure->pCustomSampleOrders, false, true, kVUIDUndefined, + "VUID-VkPipelineViewportCoarseSampleOrderStateCreateInfoNV-pCustomSampleOrders-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::primitivesGeneratedQueryWithNonZeroStreams), - structure->primitivesGeneratedQueryWithNonZeroStreams); + if (structure->pCustomSampleOrders != nullptr) { + for (uint32_t customSampleOrderIndex = 0; customSampleOrderIndex < structure->customSampleOrderCount; + ++customSampleOrderIndex) { + [[maybe_unused]] const Location pCustomSampleOrders_loc = + pNext_loc.dot(Field::pCustomSampleOrders, customSampleOrderIndex); + skip |= ValidateRangedEnum(pCustomSampleOrders_loc.dot(Field::shadingRate), + vvl::Enum::VkShadingRatePaletteEntryNV, + structure->pCustomSampleOrders[customSampleOrderIndex].shadingRate, + "VUID-VkCoarseSampleOrderCustomNV-shadingRate-parameter"); + + skip |= ValidateArray(pCustomSampleOrders_loc.dot(Field::sampleLocationCount), + pCustomSampleOrders_loc.dot(Field::pSampleLocations), + structure->pCustomSampleOrders[customSampleOrderIndex].sampleLocationCount, + &structure->pCustomSampleOrders[customSampleOrderIndex].pSampleLocations, true, true, + "VUID-VkCoarseSampleOrderCustomNV-sampleLocationCount-arraylength", + "VUID-VkCoarseSampleOrderCustomNV-pSampleLocations-parameter"); + + if (structure->pCustomSampleOrders[customSampleOrderIndex].pSampleLocations != nullptr) { + for (uint32_t sampleLocationIndex = 0; + sampleLocationIndex < structure->pCustomSampleOrders[customSampleOrderIndex].sampleLocationCount; + ++sampleLocationIndex) { + [[maybe_unused]] const Location pSampleLocations_loc = + pCustomSampleOrders_loc.dot(Field::pSampleLocations, sampleLocationIndex); + } + } + } + } } } break; - // Validation code for VkPhysicalDeviceImageViewMinLodFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceImageViewMinLodFeaturesEXT-sType-sType + // Validation code for VkWriteDescriptorSetAccelerationStructureNV structure members + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: { // Covers + // VUID-VkWriteDescriptorSetAccelerationStructureNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageViewMinLodFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_view_min_lod)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageViewMinLodFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_image_view_min_lod) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkWriteDescriptorSetAccelerationStructureNV); + if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_ray_tracing"); } - VkPhysicalDeviceImageViewMinLodFeaturesEXT* structure = (VkPhysicalDeviceImageViewMinLodFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::minLod), structure->minLod); + VkWriteDescriptorSetAccelerationStructureNV* structure = (VkWriteDescriptorSetAccelerationStructureNV*)header; + skip |= + ValidateArray(pNext_loc.dot(Field::accelerationStructureCount), pNext_loc.dot(Field::pAccelerationStructures), + structure->accelerationStructureCount, &structure->pAccelerationStructures, true, false, + "VUID-VkWriteDescriptorSetAccelerationStructureNV-accelerationStructureCount-arraylength", + "VUID-VkWriteDescriptorSetAccelerationStructureNV-pAccelerationStructures-parameter"); } } break; - // No Validation code for VkImageViewMinLodCreateInfoEXT structure members -- Covers - // VUID-VkImageViewMinLodCreateInfoEXT-sType-sType - - // Validation code for VkPhysicalDeviceMultiDrawFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceMultiDrawFeaturesEXT-sType-sType + // Validation code for VkPipelineRepresentativeFragmentTestStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineRepresentativeFragmentTestStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMultiDrawFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_multi_draw)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPipelineRepresentativeFragmentTestStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_representative_fragment_test)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMultiDrawFeaturesEXT, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_multi_draw) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_representative_fragment_test"); } - VkPhysicalDeviceMultiDrawFeaturesEXT* structure = (VkPhysicalDeviceMultiDrawFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::multiDraw), structure->multiDraw); + VkPipelineRepresentativeFragmentTestStateCreateInfoNV* structure = + (VkPipelineRepresentativeFragmentTestStateCreateInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::representativeFragmentTestEnable), + structure->representativeFragmentTestEnable); } } break; - // No Validation code for VkPhysicalDeviceMultiDrawPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceMultiDrawPropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceImage2DViewOf3DFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceImage2DViewOf3DFeaturesEXT-sType-sType + // Validation code for VkPhysicalDeviceImageViewImageFormatInfoEXT structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT: { // Covers + // VUID-VkPhysicalDeviceImageViewImageFormatInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImage2DViewOf3DFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_2d_view_of_3d)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImage2DViewOf3DFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_image_2d_view_of_3d) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageViewImageFormatInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_filter_cubic)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_filter_cubic"); } - VkPhysicalDeviceImage2DViewOf3DFeaturesEXT* structure = (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::image2DViewOf3D), structure->image2DViewOf3D); - - skip |= ValidateBool32(pNext_loc.dot(Field::sampler2DViewOf3D), structure->sampler2DViewOf3D); + VkPhysicalDeviceImageViewImageFormatInfoEXT* structure = (VkPhysicalDeviceImageViewImageFormatInfoEXT*)header; + skip |= + ValidateRangedEnum(pNext_loc.dot(Field::imageViewType), vvl::Enum::VkImageViewType, structure->imageViewType, + "VUID-VkPhysicalDeviceImageViewImageFormatInfoEXT-imageViewType-parameter"); } } break; - // Validation code for VkPhysicalDeviceShaderTileImageFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TILE_IMAGE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceShaderTileImageFeaturesEXT-sType-sType + // No Validation code for VkFilterCubicImageViewImageFormatPropertiesEXT structure members -- Covers + // VUID-VkFilterCubicImageViewImageFormatPropertiesEXT-sType-sType + + // Validation code for VkImportMemoryHostPointerInfoEXT structure members + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: { // Covers VUID-VkImportMemoryHostPointerInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderTileImageFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_tile_image)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryHostPointerInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_external_memory_host)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderTileImageFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_shader_tile_image) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_external_memory_host"); } - VkPhysicalDeviceShaderTileImageFeaturesEXT* structure = (VkPhysicalDeviceShaderTileImageFeaturesEXT*)header; - skip |= - ValidateBool32(pNext_loc.dot(Field::shaderTileImageColorReadAccess), structure->shaderTileImageColorReadAccess); - - skip |= - ValidateBool32(pNext_loc.dot(Field::shaderTileImageDepthReadAccess), structure->shaderTileImageDepthReadAccess); + VkImportMemoryHostPointerInfoEXT* structure = (VkImportMemoryHostPointerInfoEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kRequiredSingleBit, + "VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter", + "VUID-VkImportMemoryHostPointerInfoEXT-handleType-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::shaderTileImageStencilReadAccess), - structure->shaderTileImageStencilReadAccess); + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pHostPointer), structure->pHostPointer, + "VUID-VkImportMemoryHostPointerInfoEXT-pHostPointer-parameter"); } } break; - // No Validation code for VkPhysicalDeviceShaderTileImagePropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceShaderTileImagePropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceOpacityMicromapFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPACITY_MICROMAP_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceOpacityMicromapFeaturesEXT-sType-sType + // Validation code for VkPipelineCompilerControlCreateInfoAMD structure members + case VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD: { // Covers + // VUID-VkPipelineCompilerControlCreateInfoAMD-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceOpacityMicromapFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_opacity_micromap)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCompilerControlCreateInfoAMD); + if (!IsExtEnabled(device_extensions.vk_amd_pipeline_compiler_control)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceOpacityMicromapFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_opacity_micromap) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_AMD_pipeline_compiler_control"); } - VkPhysicalDeviceOpacityMicromapFeaturesEXT* structure = (VkPhysicalDeviceOpacityMicromapFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::micromap), structure->micromap); - - skip |= ValidateBool32(pNext_loc.dot(Field::micromapCaptureReplay), structure->micromapCaptureReplay); - - skip |= ValidateBool32(pNext_loc.dot(Field::micromapHostCommands), structure->micromapHostCommands); + VkPipelineCompilerControlCreateInfoAMD* structure = (VkPipelineCompilerControlCreateInfoAMD*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::compilerControlFlags), structure->compilerControlFlags, + "VUID-VkPipelineCompilerControlCreateInfoAMD-compilerControlFlags-zerobitmask"); } } break; - // No Validation code for VkPhysicalDeviceOpacityMicromapPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceOpacityMicromapPropertiesEXT-sType-sType - - // Validation code for VkAccelerationStructureTrianglesOpacityMicromapEXT structure members - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT: { // Covers - // VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-sType-sType + // Validation code for VkDeviceMemoryOverallocationCreateInfoAMD structure members + case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: { // Covers + // VUID-VkDeviceMemoryOverallocationCreateInfoAMD-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAccelerationStructureTrianglesOpacityMicromapEXT); - if (!IsExtEnabled(device_extensions.vk_ext_opacity_micromap)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceMemoryOverallocationCreateInfoAMD); + if (!IsExtEnabled(device_extensions.vk_amd_memory_overallocation_behavior)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_opacity_micromap"); + "extended struct requires the extensions VK_AMD_memory_overallocation_behavior"); } - VkAccelerationStructureTrianglesOpacityMicromapEXT* structure = - (VkAccelerationStructureTrianglesOpacityMicromapEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::indexType), vvl::Enum::VkIndexType, structure->indexType, - "VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-parameter"); + VkDeviceMemoryOverallocationCreateInfoAMD* structure = (VkDeviceMemoryOverallocationCreateInfoAMD*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::overallocationBehavior), + vvl::Enum::VkMemoryOverallocationBehaviorAMD, structure->overallocationBehavior, + "VUID-VkDeviceMemoryOverallocationCreateInfoAMD-overallocationBehavior-parameter"); + } + } break; +#ifdef VK_USE_PLATFORM_GGP - if (structure->pUsageCounts != nullptr) { - for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { - [[maybe_unused]] const Location pUsageCounts_loc = pNext_loc.dot(Field::pUsageCounts, usageIndexsIndex); - } - } + // No Validation code for VkPresentFrameTokenGGP structure members -- Covers VUID-VkPresentFrameTokenGGP-sType-sType +#endif // VK_USE_PLATFORM_GGP - if (structure->ppUsageCounts != nullptr) { - for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { - [[maybe_unused]] const Location ppUsageCounts_loc = pNext_loc.dot(Field::ppUsageCounts, usageIndexsIndex); - } + // No Validation code for VkPipelineViewportExclusiveScissorStateCreateInfoNV structure members -- Covers + // VUID-VkPipelineViewportExclusiveScissorStateCreateInfoNV-sType-sType + + // No Validation code for VkQueueFamilyCheckpointPropertiesNV structure members -- Covers + // VUID-VkQueueFamilyCheckpointPropertiesNV-sType-sType + + // Validation code for VkQueryPoolPerformanceQueryCreateInfoINTEL structure members + case VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL: { // Covers + // VUID-VkQueryPoolPerformanceQueryCreateInfoINTEL-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryPoolPerformanceQueryCreateInfoINTEL); + if (!IsExtEnabled(device_extensions.vk_intel_performance_query)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_INTEL_performance_query"); } + VkQueryPoolPerformanceQueryCreateInfoINTEL* structure = (VkQueryPoolPerformanceQueryCreateInfoINTEL*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::performanceCountersSampling), + vvl::Enum::VkQueryPoolSamplingModeINTEL, structure->performanceCountersSampling, + "VUID-VkQueryPoolPerformanceQueryCreateInfoINTEL-performanceCountersSampling-parameter"); } } break; -#ifdef VK_ENABLE_BETA_EXTENSIONS - // Validation code for VkPhysicalDeviceDisplacementMicromapFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceDisplacementMicromapFeaturesNV-sType-sType + // No Validation code for VkDisplayNativeHdrSurfaceCapabilitiesAMD structure members -- Covers + // VUID-VkDisplayNativeHdrSurfaceCapabilitiesAMD-sType-sType + + // Validation code for VkSwapchainDisplayNativeHdrCreateInfoAMD structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_DISPLAY_NATIVE_HDR_CREATE_INFO_AMD: { // Covers + // VUID-VkSwapchainDisplayNativeHdrCreateInfoAMD-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDisplacementMicromapFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_displacement_micromap)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainDisplayNativeHdrCreateInfoAMD); + if (!IsExtEnabled(device_extensions.vk_amd_display_native_hdr)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDisplacementMicromapFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_displacement_micromap) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_AMD_display_native_hdr"); } - VkPhysicalDeviceDisplacementMicromapFeaturesNV* structure = (VkPhysicalDeviceDisplacementMicromapFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::displacementMicromap), structure->displacementMicromap); + VkSwapchainDisplayNativeHdrCreateInfoAMD* structure = (VkSwapchainDisplayNativeHdrCreateInfoAMD*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::localDimmingEnable), structure->localDimmingEnable); } } break; - // No Validation code for VkPhysicalDeviceDisplacementMicromapPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceDisplacementMicromapPropertiesNV-sType-sType - - // Validation code for VkAccelerationStructureTrianglesDisplacementMicromapNV structure members - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV: { // Covers - // VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-sType-sType + // Validation code for VkRenderPassFragmentDensityMapCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT: { // Covers + // VUID-VkRenderPassFragmentDensityMapCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkAccelerationStructureTrianglesDisplacementMicromapNV); - if (!IsExtEnabled(device_extensions.vk_nv_displacement_micromap)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassFragmentDensityMapCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_fragment_density_map)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_NV_displacement_micromap"); + "extended struct requires the extensions VK_EXT_fragment_density_map"); } - VkAccelerationStructureTrianglesDisplacementMicromapNV* structure = - (VkAccelerationStructureTrianglesDisplacementMicromapNV*)header; - skip |= ValidateRangedEnum( - pNext_loc.dot(Field::displacementBiasAndScaleFormat), vvl::Enum::VkFormat, - structure->displacementBiasAndScaleFormat, - "VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementBiasAndScaleFormat-parameter"); + VkRenderPassFragmentDensityMapCreateInfoEXT* structure = (VkRenderPassFragmentDensityMapCreateInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::layout), vvl::Enum::VkImageLayout, + structure->fragmentDensityMapAttachment.layout, + "VUID-VkAttachmentReference-layout-parameter"); + } + } break; - skip |= ValidateRangedEnum( - pNext_loc.dot(Field::displacementVectorFormat), vvl::Enum::VkFormat, structure->displacementVectorFormat, - "VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementVectorFormat-parameter"); + // No Validation code for VkPhysicalDeviceMemoryBudgetPropertiesEXT structure members -- Covers + // VUID-VkPhysicalDeviceMemoryBudgetPropertiesEXT-sType-sType - skip |= ValidateRangedEnum(pNext_loc.dot(Field::indexType), vvl::Enum::VkIndexType, structure->indexType, - "VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-indexType-parameter"); + // No Validation code for VkMemoryPriorityAllocateInfoEXT structure members -- Covers + // VUID-VkMemoryPriorityAllocateInfoEXT-sType-sType - if (structure->pUsageCounts != nullptr) { - for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { - [[maybe_unused]] const Location pUsageCounts_loc = pNext_loc.dot(Field::pUsageCounts, usageIndexsIndex); - } - } + // No Validation code for VkBufferDeviceAddressCreateInfoEXT structure members -- Covers + // VUID-VkBufferDeviceAddressCreateInfoEXT-sType-sType - if (structure->ppUsageCounts != nullptr) { - for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { - [[maybe_unused]] const Location ppUsageCounts_loc = pNext_loc.dot(Field::ppUsageCounts, usageIndexsIndex); - } - } + // Validation code for VkValidationFeaturesEXT structure members + case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: { // Covers VUID-VkValidationFeaturesEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkValidationFeaturesEXT); + VkValidationFeaturesEXT* structure = (VkValidationFeaturesEXT*)header; + skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::enabledValidationFeatureCount), + pNext_loc.dot(Field::pEnabledValidationFeatures), + vvl::Enum::VkValidationFeatureEnableEXT, structure->enabledValidationFeatureCount, + structure->pEnabledValidationFeatures, false, true, kVUIDUndefined, + "VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-parameter"); + + skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::disabledValidationFeatureCount), + pNext_loc.dot(Field::pDisabledValidationFeatures), + vvl::Enum::VkValidationFeatureDisableEXT, structure->disabledValidationFeatureCount, + structure->pDisabledValidationFeatures, false, true, kVUIDUndefined, + "VUID-VkValidationFeaturesEXT-pDisabledValidationFeatures-parameter"); } } break; -#endif // VK_ENABLE_BETA_EXTENSIONS - // Validation code for VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_FEATURES_HUAWEI: { // Covers - // VUID-VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI-sType-sType + // Validation code for VkPipelineCoverageReductionStateCreateInfoNV structure members + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_REDUCTION_STATE_CREATE_INFO_NV: { // Covers + // VUID-VkPipelineCoverageReductionStateCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI); - if (!IsExtEnabled(device_extensions.vk_huawei_cluster_culling_shader)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineCoverageReductionStateCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_coverage_reduction_mode)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI, but when " - "creating VkDevice, the parent extension " - "(VK_HUAWEI_cluster_culling_shader) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_coverage_reduction_mode"); } - VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI* structure = - (VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::clustercullingShader), structure->clustercullingShader); + VkPipelineCoverageReductionStateCreateInfoNV* structure = (VkPipelineCoverageReductionStateCreateInfoNV*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkPipelineCoverageReductionStateCreateInfoNV-flags-zerobitmask"); - skip |= - ValidateBool32(pNext_loc.dot(Field::multiviewClusterCullingShader), structure->multiviewClusterCullingShader); + skip |= ValidateRangedEnum(pNext_loc.dot(Field::coverageReductionMode), vvl::Enum::VkCoverageReductionModeNV, + structure->coverageReductionMode, + "VUID-VkPipelineCoverageReductionStateCreateInfoNV-coverageReductionMode-parameter"); } } break; - // No Validation code for VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI structure members -- Covers - // VUID-VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI-sType-sType - - // Validation code for VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI: { // Covers - // VUID-VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI-sType-sType + // Validation code for VkPipelineRasterizationProvokingVertexStateCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-sType-sType if (is_const_param) { [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI); - if (!IsExtEnabled(device_extensions.vk_huawei_cluster_culling_shader)) { + loc.pNext(Struct::VkPipelineRasterizationProvokingVertexStateCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_provoking_vertex)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_HUAWEI_cluster_culling_shader"); + "extended struct requires the extensions VK_EXT_provoking_vertex"); } - VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI* structure = - (VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::clusterShadingRate), structure->clusterShadingRate); + VkPipelineRasterizationProvokingVertexStateCreateInfoEXT* structure = + (VkPipelineRasterizationProvokingVertexStateCreateInfoEXT*)header; + skip |= ValidateRangedEnum( + pNext_loc.dot(Field::provokingVertexMode), vvl::Enum::VkProvokingVertexModeEXT, structure->provokingVertexMode, + "VUID-VkPipelineRasterizationProvokingVertexStateCreateInfoEXT-provokingVertexMode-parameter"); } } break; +#ifdef VK_USE_PLATFORM_WIN32_KHR - // Validation code for VkPhysicalDeviceBorderColorSwizzleFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceBorderColorSwizzleFeaturesEXT-sType-sType + // Validation code for VkSurfaceFullScreenExclusiveInfoEXT structure members + case VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT: { // Covers + // VUID-VkSurfaceFullScreenExclusiveInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceBorderColorSwizzleFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_border_color_swizzle)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceFullScreenExclusiveInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_full_screen_exclusive)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceBorderColorSwizzleFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_border_color_swizzle) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_full_screen_exclusive"); } - VkPhysicalDeviceBorderColorSwizzleFeaturesEXT* structure = (VkPhysicalDeviceBorderColorSwizzleFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::borderColorSwizzle), structure->borderColorSwizzle); - - skip |= ValidateBool32(pNext_loc.dot(Field::borderColorSwizzleFromImage), structure->borderColorSwizzleFromImage); + VkSurfaceFullScreenExclusiveInfoEXT* structure = (VkSurfaceFullScreenExclusiveInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::fullScreenExclusive), vvl::Enum::VkFullScreenExclusiveEXT, + structure->fullScreenExclusive, + "VUID-VkSurfaceFullScreenExclusiveInfoEXT-fullScreenExclusive-parameter"); } } break; - // Validation code for VkSamplerBorderColorComponentMappingCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT: { // Covers - // VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-sType-sType + // Validation code for VkSurfaceCapabilitiesFullScreenExclusiveEXT structure members + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT: { // Covers + // VUID-VkSurfaceCapabilitiesFullScreenExclusiveEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerBorderColorComponentMappingCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_border_color_swizzle)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceCapabilitiesFullScreenExclusiveEXT); + if (!IsExtEnabled(device_extensions.vk_ext_full_screen_exclusive)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_border_color_swizzle"); + "extended struct requires the extensions VK_EXT_full_screen_exclusive"); } - VkSamplerBorderColorComponentMappingCreateInfoEXT* structure = - (VkSamplerBorderColorComponentMappingCreateInfoEXT*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::r), vvl::Enum::VkComponentSwizzle, structure->components.r, - "VUID-VkComponentMapping-r-parameter"); + VkSurfaceCapabilitiesFullScreenExclusiveEXT* structure = (VkSurfaceCapabilitiesFullScreenExclusiveEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::fullScreenExclusiveSupported), structure->fullScreenExclusiveSupported); + } + } break; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::g), vvl::Enum::VkComponentSwizzle, structure->components.g, - "VUID-VkComponentMapping-g-parameter"); + // No Validation code for VkSurfaceFullScreenExclusiveWin32InfoEXT structure members -- Covers + // VUID-VkSurfaceFullScreenExclusiveWin32InfoEXT-sType-sType +#endif // VK_USE_PLATFORM_WIN32_KHR + + // No Validation code for VkSubresourceHostMemcpySizeEXT structure members -- Covers + // VUID-VkSubresourceHostMemcpySizeEXT-sType-sType - skip |= ValidateRangedEnum(pNext_loc.dot(Field::b), vvl::Enum::VkComponentSwizzle, structure->components.b, - "VUID-VkComponentMapping-b-parameter"); + // No Validation code for VkHostImageCopyDevicePerformanceQueryEXT structure members -- Covers + // VUID-VkHostImageCopyDevicePerformanceQueryEXT-sType-sType - skip |= ValidateRangedEnum(pNext_loc.dot(Field::a), vvl::Enum::VkComponentSwizzle, structure->components.a, - "VUID-VkComponentMapping-a-parameter"); + // No Validation code for VkMemoryMapPlacedInfoEXT structure members -- Covers VUID-VkMemoryMapPlacedInfoEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::srgb), structure->srgb); + // Validation code for VkSurfacePresentModeEXT structure members + case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT: { // Covers VUID-VkSurfacePresentModeEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfacePresentModeEXT); + VkSurfacePresentModeEXT* structure = (VkSurfacePresentModeEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::presentMode), vvl::Enum::VkPresentModeKHR, structure->presentMode, + "VUID-VkSurfacePresentModeEXT-presentMode-parameter"); } } break; - // Validation code for VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT-sType-sType + // Validation code for VkSurfacePresentScalingCapabilitiesEXT structure members + case VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT: { // Covers + // VUID-VkSurfacePresentScalingCapabilitiesEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_pageable_device_local_memory)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_pageable_device_local_memory) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT* structure = - (VkPhysicalDevicePageableDeviceLocalMemoryFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pageableDeviceLocalMemory), structure->pageableDeviceLocalMemory); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfacePresentScalingCapabilitiesEXT); + VkSurfacePresentScalingCapabilitiesEXT* structure = (VkSurfacePresentScalingCapabilitiesEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::supportedPresentScaling), vvl::FlagBitmask::VkPresentScalingFlagBitsEXT, + AllVkPresentScalingFlagBitsEXT, structure->supportedPresentScaling, kOptionalFlags, + "VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentScaling-parameter"); + + skip |= ValidateFlags(pNext_loc.dot(Field::supportedPresentGravityX), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, + AllVkPresentGravityFlagBitsEXT, structure->supportedPresentGravityX, kOptionalFlags, + "VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentGravityX-parameter"); + + skip |= ValidateFlags(pNext_loc.dot(Field::supportedPresentGravityY), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, + AllVkPresentGravityFlagBitsEXT, structure->supportedPresentGravityY, kOptionalFlags, + "VUID-VkSurfacePresentScalingCapabilitiesEXT-supportedPresentGravityY-parameter"); } } break; - // No Validation code for VkPhysicalDeviceShaderCorePropertiesARM structure members -- Covers - // VUID-VkPhysicalDeviceShaderCorePropertiesARM-sType-sType - - // No Validation code for VkDeviceQueueShaderCoreControlCreateInfoARM structure members -- Covers - // VUID-VkDeviceQueueShaderCoreControlCreateInfoARM-sType-sType + // No Validation code for VkSurfacePresentModeCompatibilityEXT structure members -- Covers + // VUID-VkSurfacePresentModeCompatibilityEXT-sType-sType - // Validation code for VkPhysicalDeviceSchedulingControlsFeaturesARM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM: { // Covers - // VUID-VkPhysicalDeviceSchedulingControlsFeaturesARM-sType-sType + // Validation code for VkSwapchainPresentFenceInfoEXT structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: { // Covers VUID-VkSwapchainPresentFenceInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSchedulingControlsFeaturesARM); - if (!IsExtEnabled(device_extensions.vk_arm_scheduling_controls)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentFenceInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSchedulingControlsFeaturesARM, but when creating " - "VkDevice, the parent extension " - "(VK_ARM_scheduling_controls) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); } - VkPhysicalDeviceSchedulingControlsFeaturesARM* structure = (VkPhysicalDeviceSchedulingControlsFeaturesARM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::schedulingControls), structure->schedulingControls); + VkSwapchainPresentFenceInfoEXT* structure = (VkSwapchainPresentFenceInfoEXT*)header; + skip |= ValidateHandleArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pFences), + structure->swapchainCount, structure->pFences, true, true, + "VUID-VkSwapchainPresentFenceInfoEXT-swapchainCount-arraylength"); } } break; - // Validation code for VkPhysicalDeviceSchedulingControlsPropertiesARM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM: { // Covers - // VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-sType-sType + // Validation code for VkSwapchainPresentModesCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT: { // Covers + // VUID-VkSwapchainPresentModesCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSchedulingControlsPropertiesARM); - if (!IsExtEnabled(device_extensions.vk_arm_scheduling_controls)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentModesCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_ARM_scheduling_controls"); + "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); } - VkPhysicalDeviceSchedulingControlsPropertiesARM* structure = - (VkPhysicalDeviceSchedulingControlsPropertiesARM*)header; - skip |= ValidateFlags( - pNext_loc.dot(Field::schedulingControlsFlags), vvl::FlagBitmask::VkPhysicalDeviceSchedulingControlsFlagBitsARM, - AllVkPhysicalDeviceSchedulingControlsFlagBitsARM, structure->schedulingControlsFlags, kRequiredFlags, - "VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-schedulingControlsFlags-parameter", - "VUID-VkPhysicalDeviceSchedulingControlsPropertiesARM-schedulingControlsFlags-requiredbitmask"); + VkSwapchainPresentModesCreateInfoEXT* structure = (VkSwapchainPresentModesCreateInfoEXT*)header; + skip |= + ValidateRangedEnumArray(pNext_loc.dot(Field::presentModeCount), pNext_loc.dot(Field::pPresentModes), + vvl::Enum::VkPresentModeKHR, structure->presentModeCount, structure->pPresentModes, + true, true, "VUID-VkSwapchainPresentModesCreateInfoEXT-presentModeCount-arraylength", + "VUID-VkSwapchainPresentModesCreateInfoEXT-pPresentModes-parameter"); } } break; - // Validation code for VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_SLICED_VIEW_OF_3D_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT-sType-sType + // Validation code for VkSwapchainPresentModeInfoEXT structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT: { // Covers VUID-VkSwapchainPresentModeInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_sliced_view_of_3d)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentModeInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_image_sliced_view_of_3d) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); } - VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT* structure = (VkPhysicalDeviceImageSlicedViewOf3DFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::imageSlicedViewOf3D), structure->imageSlicedViewOf3D); + VkSwapchainPresentModeInfoEXT* structure = (VkSwapchainPresentModeInfoEXT*)header; + skip |= ValidateRangedEnumArray(pNext_loc.dot(Field::swapchainCount), pNext_loc.dot(Field::pPresentModes), + vvl::Enum::VkPresentModeKHR, structure->swapchainCount, structure->pPresentModes, + true, true, "VUID-VkSwapchainPresentModeInfoEXT-swapchainCount-arraylength", + "VUID-VkSwapchainPresentModeInfoEXT-pPresentModes-parameter"); } } break; - // No Validation code for VkImageViewSlicedCreateInfoEXT structure members -- Covers - // VUID-VkImageViewSlicedCreateInfoEXT-sType-sType - - // Validation code for VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_SET_HOST_MAPPING_FEATURES_VALVE: { // Covers - // VUID-VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE-sType-sType + // Validation code for VkSwapchainPresentScalingCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT: { // Covers + // VUID-VkSwapchainPresentScalingCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE); - if (!IsExtEnabled(device_extensions.vk_valve_descriptor_set_host_mapping)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentScalingCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_swapchain_maintenance1)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE, but when " - "creating VkDevice, the parent extension " - "(VK_VALVE_descriptor_set_host_mapping) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_swapchain_maintenance1"); } - VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE* structure = - (VkPhysicalDeviceDescriptorSetHostMappingFeaturesVALVE*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorSetHostMapping), structure->descriptorSetHostMapping); + VkSwapchainPresentScalingCreateInfoEXT* structure = (VkSwapchainPresentScalingCreateInfoEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::scalingBehavior), vvl::FlagBitmask::VkPresentScalingFlagBitsEXT, + AllVkPresentScalingFlagBitsEXT, structure->scalingBehavior, kOptionalFlags, + "VUID-VkSwapchainPresentScalingCreateInfoEXT-scalingBehavior-parameter"); + + skip |= ValidateFlags(pNext_loc.dot(Field::presentGravityX), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, + AllVkPresentGravityFlagBitsEXT, structure->presentGravityX, kOptionalFlags, + "VUID-VkSwapchainPresentScalingCreateInfoEXT-presentGravityX-parameter"); + + skip |= ValidateFlags(pNext_loc.dot(Field::presentGravityY), vvl::FlagBitmask::VkPresentGravityFlagBitsEXT, + AllVkPresentGravityFlagBitsEXT, structure->presentGravityY, kOptionalFlags, + "VUID-VkSwapchainPresentScalingCreateInfoEXT-presentGravityY-parameter"); } } break; - // Validation code for VkPhysicalDeviceDepthClampZeroOneFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDepthClampZeroOneFeaturesEXT-sType-sType + // Validation code for VkGraphicsPipelineShaderGroupsCreateInfoNV structure members + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV: { // Covers + // VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceDepthClampZeroOneFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_depth_clamp_zero_one)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkGraphicsPipelineShaderGroupsCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_device_generated_commands)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDepthClampZeroOneFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_depth_clamp_zero_one) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_device_generated_commands"); } - VkPhysicalDeviceDepthClampZeroOneFeaturesEXT* structure = (VkPhysicalDeviceDepthClampZeroOneFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::depthClampZeroOne), structure->depthClampZeroOne); + VkGraphicsPipelineShaderGroupsCreateInfoNV* structure = (VkGraphicsPipelineShaderGroupsCreateInfoNV*)header; + skip |= + ValidateStructTypeArray(pNext_loc.dot(Field::groupCount), pNext_loc.dot(Field::pGroups), + "VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV", structure->groupCount, + structure->pGroups, VK_STRUCTURE_TYPE_GRAPHICS_SHADER_GROUP_CREATE_INFO_NV, false, true, + "VUID-VkGraphicsShaderGroupCreateInfoNV-sType-sType", + "VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pGroups-parameter", kVUIDUndefined); + + if (structure->pGroups != nullptr) { + for (uint32_t groupIndex = 0; groupIndex < structure->groupCount; ++groupIndex) { + [[maybe_unused]] const Location pGroups_loc = pNext_loc.dot(Field::pGroups, groupIndex); + skip |= ValidateStructTypeArray( + pGroups_loc.dot(Field::stageCount), pGroups_loc.dot(Field::pStages), + "VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO", structure->pGroups[groupIndex].stageCount, + structure->pGroups[groupIndex].pStages, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, true, true, + "VUID-VkPipelineShaderStageCreateInfo-sType-sType", + "VUID-VkGraphicsShaderGroupCreateInfoNV-pStages-parameter", + "VUID-VkGraphicsShaderGroupCreateInfoNV-stageCount-arraylength"); + + if (structure->pGroups[groupIndex].pStages != nullptr) { + for (uint32_t stageIndex = 0; stageIndex < structure->pGroups[groupIndex].stageCount; ++stageIndex) { + [[maybe_unused]] const Location pStages_loc = pGroups_loc.dot(Field::pStages, stageIndex); + skip |= ValidateFlags(pStages_loc.dot(Field::flags), + vvl::FlagBitmask::VkPipelineShaderStageCreateFlagBits, + AllVkPipelineShaderStageCreateFlagBits, + structure->pGroups[groupIndex].pStages[stageIndex].flags, kOptionalFlags, + "VUID-VkPipelineShaderStageCreateInfo-flags-parameter"); + + skip |= ValidateFlags(pStages_loc.dot(Field::stage), vvl::FlagBitmask::VkShaderStageFlagBits, + AllVkShaderStageFlagBits, + structure->pGroups[groupIndex].pStages[stageIndex].stage, kRequiredSingleBit, + "VUID-VkPipelineShaderStageCreateInfo-stage-parameter", + "VUID-VkPipelineShaderStageCreateInfo-stage-parameter"); + + skip |= ValidateRequiredPointer(pStages_loc.dot(Field::pName), + structure->pGroups[groupIndex].pStages[stageIndex].pName, + "VUID-VkPipelineShaderStageCreateInfo-pName-parameter"); + + if (structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo != nullptr) { + [[maybe_unused]] const Location pSpecializationInfo_loc = + pStages_loc.dot(Field::pSpecializationInfo); + skip |= ValidateArray( + pSpecializationInfo_loc.dot(Field::mapEntryCount), + pSpecializationInfo_loc.dot(Field::pMapEntries), + structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->mapEntryCount, + &structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->pMapEntries, false, + true, kVUIDUndefined, "VUID-VkSpecializationInfo-pMapEntries-parameter"); + + if (structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->pMapEntries != + nullptr) { + for (uint32_t mapEntryIndex = 0; + mapEntryIndex < + structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->mapEntryCount; + ++mapEntryIndex) { + [[maybe_unused]] const Location pMapEntries_loc = + pSpecializationInfo_loc.dot(Field::pMapEntries, mapEntryIndex); + } + } + + skip |= ValidateArray( + pSpecializationInfo_loc.dot(Field::dataSize), pSpecializationInfo_loc.dot(Field::pData), + structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->dataSize, + &structure->pGroups[groupIndex].pStages[stageIndex].pSpecializationInfo->pData, false, true, + kVUIDUndefined, "VUID-VkSpecializationInfo-pData-parameter"); + } + } + } + } + } + + skip |= ValidateArray(pNext_loc.dot(Field::pipelineCount), pNext_loc.dot(Field::pPipelines), + structure->pipelineCount, &structure->pPipelines, false, true, kVUIDUndefined, + "VUID-VkGraphicsPipelineShaderGroupsCreateInfoNV-pPipelines-parameter"); } } break; - // Validation code for VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT-sType-sType + // Validation code for VkCommandBufferInheritanceViewportScissorInfoNV structure members + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_VIEWPORT_SCISSOR_INFO_NV: { // Covers + // VUID-VkCommandBufferInheritanceViewportScissorInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_non_seamless_cube_map)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkCommandBufferInheritanceViewportScissorInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_inherited_viewport_scissor)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_non_seamless_cube_map) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_inherited_viewport_scissor"); } - VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT* structure = (VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::nonSeamlessCubeMap), structure->nonSeamlessCubeMap); + VkCommandBufferInheritanceViewportScissorInfoNV* structure = + (VkCommandBufferInheritanceViewportScissorInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::viewportScissor2D), structure->viewportScissor2D); } } break; - // Validation code for VkPhysicalDeviceRenderPassStripedFeaturesARM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RENDER_PASS_STRIPED_FEATURES_ARM: { // Covers - // VUID-VkPhysicalDeviceRenderPassStripedFeaturesARM-sType-sType + // No Validation code for VkRenderPassTransformBeginInfoQCOM structure members -- Covers + // VUID-VkRenderPassTransformBeginInfoQCOM-sType-sType + + // No Validation code for VkCommandBufferInheritanceRenderPassTransformInfoQCOM structure members -- Covers + // VUID-VkCommandBufferInheritanceRenderPassTransformInfoQCOM-sType-sType + + // Validation code for VkDepthBiasRepresentationInfoEXT structure members + case VK_STRUCTURE_TYPE_DEPTH_BIAS_REPRESENTATION_INFO_EXT: { // Covers VUID-VkDepthBiasRepresentationInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRenderPassStripedFeaturesARM); - if (!IsExtEnabled(device_extensions.vk_arm_render_pass_striped)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDepthBiasRepresentationInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_bias_control)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRenderPassStripedFeaturesARM, but when creating " - "VkDevice, the parent extension " - "(VK_ARM_render_pass_striped) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_depth_bias_control"); } - VkPhysicalDeviceRenderPassStripedFeaturesARM* structure = (VkPhysicalDeviceRenderPassStripedFeaturesARM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::renderPassStriped), structure->renderPassStriped); + VkDepthBiasRepresentationInfoEXT* structure = (VkDepthBiasRepresentationInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::depthBiasRepresentation), vvl::Enum::VkDepthBiasRepresentationEXT, + structure->depthBiasRepresentation, + "VUID-VkDepthBiasRepresentationInfoEXT-depthBiasRepresentation-parameter"); + + skip |= ValidateBool32(pNext_loc.dot(Field::depthBiasExact), structure->depthBiasExact); } } break; - // No Validation code for VkPhysicalDeviceRenderPassStripedPropertiesARM structure members -- Covers - // VUID-VkPhysicalDeviceRenderPassStripedPropertiesARM-sType-sType - - // Validation code for VkRenderPassStripeBeginInfoARM structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM: { // Covers VUID-VkRenderPassStripeBeginInfoARM-sType-sType + // Validation code for VkDeviceDeviceMemoryReportCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: { // Covers + // VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassStripeBeginInfoARM); - if (!IsExtEnabled(device_extensions.vk_arm_render_pass_striped)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceDeviceMemoryReportCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_device_memory_report)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_ARM_render_pass_striped"); + "extended struct requires the extensions VK_EXT_device_memory_report"); } - VkRenderPassStripeBeginInfoARM* structure = (VkRenderPassStripeBeginInfoARM*)header; - skip |= ValidateStructTypeArray(pNext_loc.dot(Field::stripeInfoCount), pNext_loc.dot(Field::pStripeInfos), - "VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM", structure->stripeInfoCount, - structure->pStripeInfos, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM, true, true, - "VUID-VkRenderPassStripeInfoARM-sType-sType", - "VUID-VkRenderPassStripeBeginInfoARM-pStripeInfos-parameter", - "VUID-VkRenderPassStripeBeginInfoARM-stripeInfoCount-arraylength"); + VkDeviceDeviceMemoryReportCreateInfoEXT* structure = (VkDeviceDeviceMemoryReportCreateInfoEXT*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-flags-zerobitmask"); - if (structure->pStripeInfos != nullptr) { - for (uint32_t stripeInfoIndex = 0; stripeInfoIndex < structure->stripeInfoCount; ++stripeInfoIndex) { - [[maybe_unused]] const Location pStripeInfos_loc = pNext_loc.dot(Field::pStripeInfos, stripeInfoIndex); - } - } + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pfnUserCallback), + reinterpret_cast(structure->pfnUserCallback), + "VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pfnUserCallback-parameter"); + + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pUserData), structure->pUserData, + "VUID-VkDeviceDeviceMemoryReportCreateInfoEXT-pUserData-parameter"); } } break; - // Validation code for VkRenderPassStripeSubmitInfoARM structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM: { // Covers VUID-VkRenderPassStripeSubmitInfoARM-sType-sType + // Validation code for VkSamplerCustomBorderColorCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: { // Covers + // VUID-VkSamplerCustomBorderColorCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassStripeSubmitInfoARM); - if (!IsExtEnabled(device_extensions.vk_arm_render_pass_striped)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerCustomBorderColorCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_custom_border_color)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_ARM_render_pass_striped"); + "extended struct requires the extensions VK_EXT_custom_border_color"); } - VkRenderPassStripeSubmitInfoARM* structure = (VkRenderPassStripeSubmitInfoARM*)header; - skip |= ValidateStructTypeArray(pNext_loc.dot(Field::stripeSemaphoreInfoCount), - pNext_loc.dot(Field::pStripeSemaphoreInfos), - "VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO", structure->stripeSemaphoreInfoCount, - structure->pStripeSemaphoreInfos, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, true, - true, "VUID-VkSemaphoreSubmitInfo-sType-sType", - "VUID-VkRenderPassStripeSubmitInfoARM-pStripeSemaphoreInfos-parameter", - "VUID-VkRenderPassStripeSubmitInfoARM-stripeSemaphoreInfoCount-arraylength"); - - if (structure->pStripeSemaphoreInfos != nullptr) { - for (uint32_t stripeSemaphoreInfoIndex = 0; stripeSemaphoreInfoIndex < structure->stripeSemaphoreInfoCount; - ++stripeSemaphoreInfoIndex) { - [[maybe_unused]] const Location pStripeSemaphoreInfos_loc = - pNext_loc.dot(Field::pStripeSemaphoreInfos, stripeSemaphoreInfoIndex); - skip |= ValidateRequiredHandle(pStripeSemaphoreInfos_loc.dot(Field::semaphore), - structure->pStripeSemaphoreInfos[stripeSemaphoreInfoIndex].semaphore); + VkSamplerCustomBorderColorCreateInfoEXT* structure = (VkSamplerCustomBorderColorCreateInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::format), vvl::Enum::VkFormat, structure->format, + "VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-parameter"); + } + } break; - skip |= ValidateFlags(pStripeSemaphoreInfos_loc.dot(Field::stageMask), - vvl::FlagBitmask::VkPipelineStageFlagBits2, AllVkPipelineStageFlagBits2, - structure->pStripeSemaphoreInfos[stripeSemaphoreInfoIndex].stageMask, kOptionalFlags, - "VUID-VkSemaphoreSubmitInfo-stageMask-parameter"); - } + // Validation code for VkSurfaceCapabilitiesPresentBarrierNV structure members + case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_PRESENT_BARRIER_NV: { // Covers + // VUID-VkSurfaceCapabilitiesPresentBarrierNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSurfaceCapabilitiesPresentBarrierNV); + if (!IsExtEnabled(device_extensions.vk_nv_present_barrier)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_present_barrier"); } + VkSurfaceCapabilitiesPresentBarrierNV* structure = (VkSurfaceCapabilitiesPresentBarrierNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::presentBarrierSupported), structure->presentBarrierSupported); } } break; - // Validation code for VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_OFFSET_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM-sType-sType + // Validation code for VkSwapchainPresentBarrierCreateInfoNV structure members + case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV: { // Covers + // VUID-VkSwapchainPresentBarrierCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_fragment_density_map_offset)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM, but when " - "creating VkDevice, the parent extension " - "(VK_QCOM_fragment_density_map_offset) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSwapchainPresentBarrierCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_present_barrier)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_present_barrier"); } - VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM* structure = - (VkPhysicalDeviceFragmentDensityMapOffsetFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::fragmentDensityMapOffset), structure->fragmentDensityMapOffset); + VkSwapchainPresentBarrierCreateInfoNV* structure = (VkSwapchainPresentBarrierCreateInfoNV*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::presentBarrierEnable), structure->presentBarrierEnable); } } break; - // No Validation code for VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM structure members -- Covers - // VUID-VkPhysicalDeviceFragmentDensityMapOffsetPropertiesQCOM-sType-sType - - // Validation code for VkSubpassFragmentDensityMapOffsetEndInfoQCOM structure members - case VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM: { // Covers - // VUID-VkSubpassFragmentDensityMapOffsetEndInfoQCOM-sType-sType + // Validation code for VkDeviceDiagnosticsConfigCreateInfoNV structure members + case VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV: { // Covers + // VUID-VkDeviceDiagnosticsConfigCreateInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSubpassFragmentDensityMapOffsetEndInfoQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_fragment_density_map_offset)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceDiagnosticsConfigCreateInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_device_diagnostics_config)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_QCOM_fragment_density_map_offset"); + "extended struct requires the extensions VK_NV_device_diagnostics_config"); } - VkSubpassFragmentDensityMapOffsetEndInfoQCOM* structure = (VkSubpassFragmentDensityMapOffsetEndInfoQCOM*)header; - skip |= ValidateArray(pNext_loc.dot(Field::fragmentDensityOffsetCount), - pNext_loc.dot(Field::pFragmentDensityOffsets), structure->fragmentDensityOffsetCount, - &structure->pFragmentDensityOffsets, false, true, kVUIDUndefined, - "VUID-VkSubpassFragmentDensityMapOffsetEndInfoQCOM-pFragmentDensityOffsets-parameter"); + VkDeviceDiagnosticsConfigCreateInfoNV* structure = (VkDeviceDiagnosticsConfigCreateInfoNV*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkDeviceDiagnosticsConfigFlagBitsNV, + AllVkDeviceDiagnosticsConfigFlagBitsNV, structure->flags, kOptionalFlags, + "VUID-VkDeviceDiagnosticsConfigCreateInfoNV-flags-parameter"); + } + } break; - if (structure->pFragmentDensityOffsets != nullptr) { - for (uint32_t fragmentDensityOffsetIndex = 0; - fragmentDensityOffsetIndex < structure->fragmentDensityOffsetCount; ++fragmentDensityOffsetIndex) { - [[maybe_unused]] const Location pFragmentDensityOffsets_loc = - pNext_loc.dot(Field::pFragmentDensityOffsets, fragmentDensityOffsetIndex); - } + // Validation code for VkQueryLowLatencySupportNV structure members + case VK_STRUCTURE_TYPE_QUERY_LOW_LATENCY_SUPPORT_NV: { // Covers VUID-VkQueryLowLatencySupportNV-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkQueryLowLatencySupportNV); + if (!IsExtEnabled(device_extensions.vk_nv_low_latency)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_low_latency"); } + VkQueryLowLatencySupportNV* structure = (VkQueryLowLatencySupportNV*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pQueriedLowLatencyData), structure->pQueriedLowLatencyData, + "VUID-VkQueryLowLatencySupportNV-pQueriedLowLatencyData-parameter"); } } break; +#ifdef VK_USE_PLATFORM_METAL_EXT - // Validation code for VkPhysicalDeviceCopyMemoryIndirectFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceCopyMemoryIndirectFeaturesNV-sType-sType + // Validation code for VkExportMetalObjectCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT: { // Covers VUID-VkExportMetalObjectCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCopyMemoryIndirectFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_copy_memory_indirect)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCopyMemoryIndirectFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_copy_memory_indirect) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalObjectCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); } - VkPhysicalDeviceCopyMemoryIndirectFeaturesNV* structure = (VkPhysicalDeviceCopyMemoryIndirectFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::indirectCopy), structure->indirectCopy); + VkExportMetalObjectCreateInfoEXT* structure = (VkExportMetalObjectCreateInfoEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::exportObjectType), vvl::FlagBitmask::VkExportMetalObjectTypeFlagBitsEXT, + AllVkExportMetalObjectTypeFlagBitsEXT, structure->exportObjectType, kOptionalSingleBit, + "VUID-VkExportMetalObjectCreateInfoEXT-exportObjectType-parameter"); } } break; - // No Validation code for VkPhysicalDeviceCopyMemoryIndirectPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceCopyMemoryIndirectPropertiesNV-sType-sType + // No Validation code for VkExportMetalDeviceInfoEXT structure members -- Covers + // VUID-VkExportMetalDeviceInfoEXT-sType-sType - // Validation code for VkPhysicalDeviceMemoryDecompressionFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_DECOMPRESSION_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceMemoryDecompressionFeaturesNV-sType-sType + // Validation code for VkExportMetalCommandQueueInfoEXT structure members + case VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT: { // Covers VUID-VkExportMetalCommandQueueInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMemoryDecompressionFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_memory_decompression)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMemoryDecompressionFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_memory_decompression) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalCommandQueueInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); } - VkPhysicalDeviceMemoryDecompressionFeaturesNV* structure = (VkPhysicalDeviceMemoryDecompressionFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::memoryDecompression), structure->memoryDecompression); + VkExportMetalCommandQueueInfoEXT* structure = (VkExportMetalCommandQueueInfoEXT*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::queue), structure->queue); } } break; - // No Validation code for VkPhysicalDeviceMemoryDecompressionPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceMemoryDecompressionPropertiesNV-sType-sType - - // Validation code for VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_GENERATED_COMMANDS_COMPUTE_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV-sType-sType + // Validation code for VkExportMetalBufferInfoEXT structure members + case VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT: { // Covers VUID-VkExportMetalBufferInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_device_generated_commands_compute)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_device_generated_commands_compute) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalBufferInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); } - VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV* structure = - (VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedCompute), structure->deviceGeneratedCompute); + VkExportMetalBufferInfoEXT* structure = (VkExportMetalBufferInfoEXT*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::memory), structure->memory); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedComputePipelines), - structure->deviceGeneratedComputePipelines); + // No Validation code for VkImportMetalBufferInfoEXT structure members -- Covers + // VUID-VkImportMetalBufferInfoEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::deviceGeneratedComputeCaptureReplay), - structure->deviceGeneratedComputeCaptureReplay); + // Validation code for VkExportMetalTextureInfoEXT structure members + case VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT: { // Covers VUID-VkExportMetalTextureInfoEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalTextureInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); + } + VkExportMetalTextureInfoEXT* structure = (VkExportMetalTextureInfoEXT*)header; + skip |= + ValidateFlags(pNext_loc.dot(Field::plane), vvl::FlagBitmask::VkImageAspectFlagBits, AllVkImageAspectFlagBits, + structure->plane, kRequiredSingleBit, "VUID-VkExportMetalTextureInfoEXT-plane-parameter", + "VUID-VkExportMetalTextureInfoEXT-plane-parameter"); } } break; - // No Validation code for VkComputePipelineIndirectBufferInfoNV structure members -- Covers - // VUID-VkComputePipelineIndirectBufferInfoNV-sType-sType - - // Validation code for VkPhysicalDeviceLinearColorAttachmentFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceLinearColorAttachmentFeaturesNV-sType-sType + // Validation code for VkImportMetalTextureInfoEXT structure members + case VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT: { // Covers VUID-VkImportMetalTextureInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceLinearColorAttachmentFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_linear_color_attachment)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceLinearColorAttachmentFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_linear_color_attachment) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMetalTextureInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); } - VkPhysicalDeviceLinearColorAttachmentFeaturesNV* structure = - (VkPhysicalDeviceLinearColorAttachmentFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::linearColorAttachment), structure->linearColorAttachment); + VkImportMetalTextureInfoEXT* structure = (VkImportMetalTextureInfoEXT*)header; + skip |= + ValidateFlags(pNext_loc.dot(Field::plane), vvl::FlagBitmask::VkImageAspectFlagBits, AllVkImageAspectFlagBits, + structure->plane, kRequiredSingleBit, "VUID-VkImportMetalTextureInfoEXT-plane-parameter", + "VUID-VkImportMetalTextureInfoEXT-plane-parameter"); } } break; - // Validation code for VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT-sType-sType + // Validation code for VkExportMetalIOSurfaceInfoEXT structure members + case VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT: { // Covers VUID-VkExportMetalIOSurfaceInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_image_compression_control_swapchain)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT, but " - "when creating VkDevice, the parent extension " - "(VK_EXT_image_compression_control_swapchain) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExportMetalIOSurfaceInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_metal_objects)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_metal_objects"); } - VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT* structure = - (VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::imageCompressionControlSwapchain), - structure->imageCompressionControlSwapchain); + VkExportMetalIOSurfaceInfoEXT* structure = (VkExportMetalIOSurfaceInfoEXT*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::image), structure->image); } } break; - // No Validation code for VkImageViewSampleWeightCreateInfoQCOM structure members -- Covers - // VUID-VkImageViewSampleWeightCreateInfoQCOM-sType-sType + // No Validation code for VkImportMetalIOSurfaceInfoEXT structure members -- Covers + // VUID-VkImportMetalIOSurfaceInfoEXT-sType-sType - // Validation code for VkPhysicalDeviceImageProcessingFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceImageProcessingFeaturesQCOM-sType-sType + // No Validation code for VkExportMetalSharedEventInfoEXT structure members -- Covers + // VUID-VkExportMetalSharedEventInfoEXT-sType-sType + + // No Validation code for VkImportMetalSharedEventInfoEXT structure members -- Covers + // VUID-VkImportMetalSharedEventInfoEXT-sType-sType +#endif // VK_USE_PLATFORM_METAL_EXT + + // Validation code for VkDescriptorBufferBindingPushDescriptorBufferHandleEXT structure members + case VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT: { // Covers + // VUID-VkDescriptorBufferBindingPushDescriptorBufferHandleEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageProcessingFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_image_processing)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkDescriptorBufferBindingPushDescriptorBufferHandleEXT); + if (!IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageProcessingFeaturesQCOM, but when creating " - "VkDevice, the parent extension " - "(VK_QCOM_image_processing) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_descriptor_buffer"); } - VkPhysicalDeviceImageProcessingFeaturesQCOM* structure = (VkPhysicalDeviceImageProcessingFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::textureSampleWeighted), structure->textureSampleWeighted); - - skip |= ValidateBool32(pNext_loc.dot(Field::textureBoxFilter), structure->textureBoxFilter); - - skip |= ValidateBool32(pNext_loc.dot(Field::textureBlockMatch), structure->textureBlockMatch); + VkDescriptorBufferBindingPushDescriptorBufferHandleEXT* structure = + (VkDescriptorBufferBindingPushDescriptorBufferHandleEXT*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::buffer), structure->buffer); } } break; - // No Validation code for VkPhysicalDeviceImageProcessingPropertiesQCOM structure members -- Covers - // VUID-VkPhysicalDeviceImageProcessingPropertiesQCOM-sType-sType - - // Validation code for VkPhysicalDeviceNestedCommandBufferFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NESTED_COMMAND_BUFFER_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceNestedCommandBufferFeaturesEXT-sType-sType + // Validation code for VkOpaqueCaptureDescriptorDataCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT: { // Covers + // VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceNestedCommandBufferFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_nested_command_buffer)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkOpaqueCaptureDescriptorDataCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_descriptor_buffer)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceNestedCommandBufferFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_nested_command_buffer) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_descriptor_buffer"); } - VkPhysicalDeviceNestedCommandBufferFeaturesEXT* structure = (VkPhysicalDeviceNestedCommandBufferFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::nestedCommandBuffer), structure->nestedCommandBuffer); - - skip |= ValidateBool32(pNext_loc.dot(Field::nestedCommandBufferRendering), structure->nestedCommandBufferRendering); - - skip |= ValidateBool32(pNext_loc.dot(Field::nestedCommandBufferSimultaneousUse), - structure->nestedCommandBufferSimultaneousUse); + VkOpaqueCaptureDescriptorDataCreateInfoEXT* structure = (VkOpaqueCaptureDescriptorDataCreateInfoEXT*)header; + skip |= ValidateRequiredPointer( + pNext_loc.dot(Field::opaqueCaptureDescriptorData), structure->opaqueCaptureDescriptorData, + "VUID-VkOpaqueCaptureDescriptorDataCreateInfoEXT-opaqueCaptureDescriptorData-parameter"); } } break; - // No Validation code for VkPhysicalDeviceNestedCommandBufferPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceNestedCommandBufferPropertiesEXT-sType-sType - - // Validation code for VkExternalMemoryAcquireUnmodifiedEXT structure members - case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: { // Covers - // VUID-VkExternalMemoryAcquireUnmodifiedEXT-sType-sType + // Validation code for VkGraphicsPipelineLibraryCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: { // Covers + // VUID-VkGraphicsPipelineLibraryCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryAcquireUnmodifiedEXT); - if (!IsExtEnabled(device_extensions.vk_ext_external_memory_acquire_unmodified)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkGraphicsPipelineLibraryCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_graphics_pipeline_library)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_external_memory_acquire_unmodified"); + "extended struct requires the extensions VK_EXT_graphics_pipeline_library"); } - VkExternalMemoryAcquireUnmodifiedEXT* structure = (VkExternalMemoryAcquireUnmodifiedEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::acquireUnmodifiedMemory), structure->acquireUnmodifiedMemory); + VkGraphicsPipelineLibraryCreateInfoEXT* structure = (VkGraphicsPipelineLibraryCreateInfoEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkGraphicsPipelineLibraryFlagBitsEXT, + AllVkGraphicsPipelineLibraryFlagBitsEXT, structure->flags, kRequiredFlags, + "VUID-VkGraphicsPipelineLibraryCreateInfoEXT-flags-parameter", + "VUID-VkGraphicsPipelineLibraryCreateInfoEXT-flags-requiredbitmask"); } } break; - // Validation code for VkPhysicalDeviceExtendedDynamicState3FeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceExtendedDynamicState3FeaturesEXT-sType-sType + // No Validation code for VkPipelineFragmentShadingRateEnumStateCreateInfoNV structure members -- Covers + // VUID-VkPipelineFragmentShadingRateEnumStateCreateInfoNV-sType-sType + + // No Validation code for VkAccelerationStructureGeometryMotionTrianglesDataNV structure members -- Covers + // VUID-VkAccelerationStructureGeometryMotionTrianglesDataNV-sType-sType + + // Validation code for VkAccelerationStructureMotionInfoNV structure members + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MOTION_INFO_NV: { // Covers + // VUID-VkAccelerationStructureMotionInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicState3FeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state3)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAccelerationStructureMotionInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_motion_blur)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExtendedDynamicState3FeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_extended_dynamic_state3) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_NV_ray_tracing_motion_blur"); } - VkPhysicalDeviceExtendedDynamicState3FeaturesEXT* structure = - (VkPhysicalDeviceExtendedDynamicState3FeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3TessellationDomainOrigin), - structure->extendedDynamicState3TessellationDomainOrigin); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3DepthClampEnable), - structure->extendedDynamicState3DepthClampEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3PolygonMode), - structure->extendedDynamicState3PolygonMode); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3RasterizationSamples), - structure->extendedDynamicState3RasterizationSamples); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3SampleMask), - structure->extendedDynamicState3SampleMask); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3AlphaToCoverageEnable), - structure->extendedDynamicState3AlphaToCoverageEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3AlphaToOneEnable), - structure->extendedDynamicState3AlphaToOneEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3LogicOpEnable), - structure->extendedDynamicState3LogicOpEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorBlendEnable), - structure->extendedDynamicState3ColorBlendEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorBlendEquation), - structure->extendedDynamicState3ColorBlendEquation); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorWriteMask), - structure->extendedDynamicState3ColorWriteMask); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3RasterizationStream), - structure->extendedDynamicState3RasterizationStream); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ConservativeRasterizationMode), - structure->extendedDynamicState3ConservativeRasterizationMode); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ExtraPrimitiveOverestimationSize), - structure->extendedDynamicState3ExtraPrimitiveOverestimationSize); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3DepthClipEnable), - structure->extendedDynamicState3DepthClipEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3SampleLocationsEnable), - structure->extendedDynamicState3SampleLocationsEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ColorBlendAdvanced), - structure->extendedDynamicState3ColorBlendAdvanced); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ProvokingVertexMode), - structure->extendedDynamicState3ProvokingVertexMode); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3LineRasterizationMode), - structure->extendedDynamicState3LineRasterizationMode); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3LineStippleEnable), - structure->extendedDynamicState3LineStippleEnable); - - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3DepthClipNegativeOneToOne), - structure->extendedDynamicState3DepthClipNegativeOneToOne); + VkAccelerationStructureMotionInfoNV* structure = (VkAccelerationStructureMotionInfoNV*)header; + skip |= ValidateReservedFlags(pNext_loc.dot(Field::flags), structure->flags, + "VUID-VkAccelerationStructureMotionInfoNV-flags-zerobitmask"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ViewportWScalingEnable), - structure->extendedDynamicState3ViewportWScalingEnable); + // No Validation code for VkCopyCommandTransformInfoQCOM structure members -- Covers + // VUID-VkCopyCommandTransformInfoQCOM-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ViewportSwizzle), - structure->extendedDynamicState3ViewportSwizzle); + // No Validation code for VkImageCompressionControlEXT structure members -- Covers + // VUID-VkImageCompressionControlEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageToColorEnable), - structure->extendedDynamicState3CoverageToColorEnable); + // No Validation code for VkImageCompressionPropertiesEXT structure members -- Covers + // VUID-VkImageCompressionPropertiesEXT-sType-sType - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageToColorLocation), - structure->extendedDynamicState3CoverageToColorLocation); + // Validation code for VkMutableDescriptorTypeCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT: { // Covers + // VUID-VkMutableDescriptorTypeCreateInfoEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMutableDescriptorTypeCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_valve_mutable_descriptor_type) && + !IsExtEnabled(device_extensions.vk_ext_mutable_descriptor_type)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_VALVE_mutable_descriptor_type or " + "VK_EXT_mutable_descriptor_type"); + } + VkMutableDescriptorTypeCreateInfoEXT* structure = (VkMutableDescriptorTypeCreateInfoEXT*)header; + skip |= ValidateArray(pNext_loc.dot(Field::mutableDescriptorTypeListCount), + pNext_loc.dot(Field::pMutableDescriptorTypeLists), structure->mutableDescriptorTypeListCount, + &structure->pMutableDescriptorTypeLists, false, true, kVUIDUndefined, + "VUID-VkMutableDescriptorTypeCreateInfoEXT-pMutableDescriptorTypeLists-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageModulationMode), - structure->extendedDynamicState3CoverageModulationMode); + if (structure->pMutableDescriptorTypeLists != nullptr) { + for (uint32_t mutableDescriptorTypeListIndex = 0; + mutableDescriptorTypeListIndex < structure->mutableDescriptorTypeListCount; + ++mutableDescriptorTypeListIndex) { + [[maybe_unused]] const Location pMutableDescriptorTypeLists_loc = + pNext_loc.dot(Field::pMutableDescriptorTypeLists, mutableDescriptorTypeListIndex); + skip |= ValidateRangedEnumArray( + pMutableDescriptorTypeLists_loc.dot(Field::descriptorTypeCount), + pMutableDescriptorTypeLists_loc.dot(Field::pDescriptorTypes), vvl::Enum::VkDescriptorType, + structure->pMutableDescriptorTypeLists[mutableDescriptorTypeListIndex].descriptorTypeCount, + structure->pMutableDescriptorTypeLists[mutableDescriptorTypeListIndex].pDescriptorTypes, false, true, + kVUIDUndefined, "VUID-VkMutableDescriptorTypeListEXT-pDescriptorTypes-parameter"); + } + } + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageModulationTableEnable), - structure->extendedDynamicState3CoverageModulationTableEnable); + // Validation code for VkDeviceAddressBindingCallbackDataEXT structure members + case VK_STRUCTURE_TYPE_DEVICE_ADDRESS_BINDING_CALLBACK_DATA_EXT: { // Covers + // VUID-VkDeviceAddressBindingCallbackDataEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDeviceAddressBindingCallbackDataEXT); + if (!IsExtEnabled(device_extensions.vk_ext_device_address_binding_report)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_device_address_binding_report"); + } + VkDeviceAddressBindingCallbackDataEXT* structure = (VkDeviceAddressBindingCallbackDataEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkDeviceAddressBindingFlagBitsEXT, + AllVkDeviceAddressBindingFlagBitsEXT, structure->flags, kOptionalFlags, + "VUID-VkDeviceAddressBindingCallbackDataEXT-flags-parameter"); - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageModulationTable), - structure->extendedDynamicState3CoverageModulationTable); + skip |= + ValidateRangedEnum(pNext_loc.dot(Field::bindingType), vvl::Enum::VkDeviceAddressBindingTypeEXT, + structure->bindingType, "VUID-VkDeviceAddressBindingCallbackDataEXT-bindingType-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3CoverageReductionMode), - structure->extendedDynamicState3CoverageReductionMode); + // Validation code for VkPipelineViewportDepthClipControlCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineViewportDepthClipControlCreateInfoEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineViewportDepthClipControlCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_depth_clip_control)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_depth_clip_control"); + } + VkPipelineViewportDepthClipControlCreateInfoEXT* structure = + (VkPipelineViewportDepthClipControlCreateInfoEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::negativeOneToOne), structure->negativeOneToOne); + } + } break; +#ifdef VK_USE_PLATFORM_FUCHSIA - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3RepresentativeFragmentTestEnable), - structure->extendedDynamicState3RepresentativeFragmentTestEnable); + // Validation code for VkImportMemoryZirconHandleInfoFUCHSIA structure members + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA: { // Covers + // VUID-VkImportMemoryZirconHandleInfoFUCHSIA-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryZirconHandleInfoFUCHSIA); + if (!IsExtEnabled(device_extensions.vk_fuchsia_external_memory)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_FUCHSIA_external_memory"); + } + VkImportMemoryZirconHandleInfoFUCHSIA* structure = (VkImportMemoryZirconHandleInfoFUCHSIA*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::handleType), vvl::FlagBitmask::VkExternalMemoryHandleTypeFlagBits, + AllVkExternalMemoryHandleTypeFlagBits, structure->handleType, kOptionalSingleBit, + "VUID-VkImportMemoryZirconHandleInfoFUCHSIA-handleType-parameter"); + } + } break; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedDynamicState3ShadingRateImageEnable), - structure->extendedDynamicState3ShadingRateImageEnable); + // Validation code for VkImportMemoryBufferCollectionFUCHSIA structure members + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA: { // Covers + // VUID-VkImportMemoryBufferCollectionFUCHSIA-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkImportMemoryBufferCollectionFUCHSIA); + if (!IsExtEnabled(device_extensions.vk_fuchsia_buffer_collection)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_FUCHSIA_buffer_collection"); + } + VkImportMemoryBufferCollectionFUCHSIA* structure = (VkImportMemoryBufferCollectionFUCHSIA*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::collection), structure->collection); } } break; - // Validation code for VkPhysicalDeviceExtendedDynamicState3PropertiesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_PROPERTIES_EXT: { // Covers - // VUID-VkPhysicalDeviceExtendedDynamicState3PropertiesEXT-sType-sType + // Validation code for VkBufferCollectionImageCreateInfoFUCHSIA structure members + case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA: { // Covers + // VUID-VkBufferCollectionImageCreateInfoFUCHSIA-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedDynamicState3PropertiesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_extended_dynamic_state3)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBufferCollectionImageCreateInfoFUCHSIA); + if (!IsExtEnabled(device_extensions.vk_fuchsia_buffer_collection)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_extended_dynamic_state3"); + "extended struct requires the extensions VK_FUCHSIA_buffer_collection"); } - VkPhysicalDeviceExtendedDynamicState3PropertiesEXT* structure = - (VkPhysicalDeviceExtendedDynamicState3PropertiesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dynamicPrimitiveTopologyUnrestricted), - structure->dynamicPrimitiveTopologyUnrestricted); + VkBufferCollectionImageCreateInfoFUCHSIA* structure = (VkBufferCollectionImageCreateInfoFUCHSIA*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::collection), structure->collection); } } break; - // Validation code for VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_MERGE_FEEDBACK_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT-sType-sType + // Validation code for VkBufferCollectionBufferCreateInfoFUCHSIA structure members + case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA: { // Covers + // VUID-VkBufferCollectionBufferCreateInfoFUCHSIA-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkBufferCollectionBufferCreateInfoFUCHSIA); + if (!IsExtEnabled(device_extensions.vk_fuchsia_buffer_collection)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_subpass_merge_feedback) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_FUCHSIA_buffer_collection"); } - VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT* structure = - (VkPhysicalDeviceSubpassMergeFeedbackFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::subpassMergeFeedback), structure->subpassMergeFeedback); + VkBufferCollectionBufferCreateInfoFUCHSIA* structure = (VkBufferCollectionBufferCreateInfoFUCHSIA*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::collection), structure->collection); } } break; +#endif // VK_USE_PLATFORM_FUCHSIA - // Validation code for VkRenderPassCreationControlEXT structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT: { // Covers VUID-VkRenderPassCreationControlEXT-sType-sType + // Validation code for VkSubpassShadingPipelineCreateInfoHUAWEI structure members + case VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: { // Covers + // VUID-VkSubpassShadingPipelineCreateInfoHUAWEI-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassCreationControlEXT); - if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSubpassShadingPipelineCreateInfoHUAWEI); + if (!IsExtEnabled(device_extensions.vk_huawei_subpass_shading)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_subpass_merge_feedback"); + "extended struct requires the extensions VK_HUAWEI_subpass_shading"); } - VkRenderPassCreationControlEXT* structure = (VkRenderPassCreationControlEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::disallowMerging), structure->disallowMerging); + VkSubpassShadingPipelineCreateInfoHUAWEI* structure = (VkSubpassShadingPipelineCreateInfoHUAWEI*)header; + skip |= ValidateRequiredHandle(pNext_loc.dot(Field::renderPass), structure->renderPass); } } break; - // Validation code for VkRenderPassCreationFeedbackCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT: { // Covers - // VUID-VkRenderPassCreationFeedbackCreateInfoEXT-sType-sType + // Validation code for VkFrameBoundaryEXT structure members + case VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT: { // Covers VUID-VkFrameBoundaryEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassCreationFeedbackCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkFrameBoundaryEXT); + if (!IsExtEnabled(device_extensions.vk_ext_frame_boundary)) { + skip |= + LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_EXT_frame_boundary"); + } + VkFrameBoundaryEXT* structure = (VkFrameBoundaryEXT*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::flags), vvl::FlagBitmask::VkFrameBoundaryFlagBitsEXT, + AllVkFrameBoundaryFlagBitsEXT, structure->flags, kOptionalFlags, + "VUID-VkFrameBoundaryEXT-flags-parameter"); + } + } break; + + // No Validation code for VkSubpassResolvePerformanceQueryEXT structure members -- Covers + // VUID-VkSubpassResolvePerformanceQueryEXT-sType-sType + + // Validation code for VkMultisampledRenderToSingleSampledInfoEXT structure members + case VK_STRUCTURE_TYPE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_INFO_EXT: { // Covers + // VUID-VkMultisampledRenderToSingleSampledInfoEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkMultisampledRenderToSingleSampledInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_multisampled_render_to_single_sampled)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_subpass_merge_feedback"); + "extended struct requires the extensions VK_EXT_multisampled_render_to_single_sampled"); } - VkRenderPassCreationFeedbackCreateInfoEXT* structure = (VkRenderPassCreationFeedbackCreateInfoEXT*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pRenderPassFeedback), structure->pRenderPassFeedback, - "VUID-VkRenderPassCreationFeedbackCreateInfoEXT-pRenderPassFeedback-parameter"); + VkMultisampledRenderToSingleSampledInfoEXT* structure = (VkMultisampledRenderToSingleSampledInfoEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::multisampledRenderToSingleSampledEnable), + structure->multisampledRenderToSingleSampledEnable); - if (structure->pRenderPassFeedback != nullptr) { - [[maybe_unused]] const Location pRenderPassFeedback_loc = pNext_loc.dot(Field::pRenderPassFeedback); + skip |= ValidateFlags(pNext_loc.dot(Field::rasterizationSamples), vvl::FlagBitmask::VkSampleCountFlagBits, + AllVkSampleCountFlagBits, structure->rasterizationSamples, kRequiredSingleBit, + "VUID-VkMultisampledRenderToSingleSampledInfoEXT-rasterizationSamples-parameter", + "VUID-VkMultisampledRenderToSingleSampledInfoEXT-rasterizationSamples-parameter"); + } + } break; + + // Validation code for VkPipelineColorWriteCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: { // Covers VUID-VkPipelineColorWriteCreateInfoEXT-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineColorWriteCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_color_write_enable)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_EXT_color_write_enable"); } + VkPipelineColorWriteCreateInfoEXT* structure = (VkPipelineColorWriteCreateInfoEXT*)header; + skip |= ValidateBool32Array(pNext_loc.dot(Field::attachmentCount), pNext_loc.dot(Field::pColorWriteEnables), + structure->attachmentCount, structure->pColorWriteEnables, false, true, kVUIDUndefined, + "VUID-VkPipelineColorWriteCreateInfoEXT-pColorWriteEnables-parameter"); } } break; - // Validation code for VkRenderPassSubpassFeedbackCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT: { // Covers - // VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-sType-sType + // No Validation code for VkImageViewMinLodCreateInfoEXT structure members -- Covers + // VUID-VkImageViewMinLodCreateInfoEXT-sType-sType + + // Validation code for VkAccelerationStructureTrianglesOpacityMicromapEXT structure members + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT: { // Covers + // VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassSubpassFeedbackCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkAccelerationStructureTrianglesOpacityMicromapEXT); + if (!IsExtEnabled(device_extensions.vk_ext_opacity_micromap)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_subpass_merge_feedback"); + "extended struct requires the extensions VK_EXT_opacity_micromap"); } - VkRenderPassSubpassFeedbackCreateInfoEXT* structure = (VkRenderPassSubpassFeedbackCreateInfoEXT*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pSubpassFeedback), structure->pSubpassFeedback, - "VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-pSubpassFeedback-parameter"); + VkAccelerationStructureTrianglesOpacityMicromapEXT* structure = + (VkAccelerationStructureTrianglesOpacityMicromapEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::indexType), vvl::Enum::VkIndexType, structure->indexType, + "VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-parameter"); - if (structure->pSubpassFeedback != nullptr) { - [[maybe_unused]] const Location pSubpassFeedback_loc = pNext_loc.dot(Field::pSubpassFeedback); + if (structure->pUsageCounts != nullptr) { + for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { + [[maybe_unused]] const Location pUsageCounts_loc = pNext_loc.dot(Field::pUsageCounts, usageIndexsIndex); + } + } + + if (structure->ppUsageCounts != nullptr) { + for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { + [[maybe_unused]] const Location ppUsageCounts_loc = pNext_loc.dot(Field::ppUsageCounts, usageIndexsIndex); + } } } } break; +#ifdef VK_ENABLE_BETA_EXTENSIONS - // Validation code for VkDirectDriverLoadingListLUNARG structure members - case VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG: { // Covers VUID-VkDirectDriverLoadingListLUNARG-sType-sType + // Validation code for VkAccelerationStructureTrianglesDisplacementMicromapNV structure members + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV: { // Covers + // VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDirectDriverLoadingListLUNARG); - VkDirectDriverLoadingListLUNARG* structure = (VkDirectDriverLoadingListLUNARG*)header; - skip |= ValidateRangedEnum(pNext_loc.dot(Field::mode), vvl::Enum::VkDirectDriverLoadingModeLUNARG, structure->mode, - "VUID-VkDirectDriverLoadingListLUNARG-mode-parameter"); + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkAccelerationStructureTrianglesDisplacementMicromapNV); + if (!IsExtEnabled(device_extensions.vk_nv_displacement_micromap)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_NV_displacement_micromap"); + } + VkAccelerationStructureTrianglesDisplacementMicromapNV* structure = + (VkAccelerationStructureTrianglesDisplacementMicromapNV*)header; + skip |= ValidateRangedEnum( + pNext_loc.dot(Field::displacementBiasAndScaleFormat), vvl::Enum::VkFormat, + structure->displacementBiasAndScaleFormat, + "VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementBiasAndScaleFormat-parameter"); + + skip |= ValidateRangedEnum( + pNext_loc.dot(Field::displacementVectorFormat), vvl::Enum::VkFormat, structure->displacementVectorFormat, + "VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-displacementVectorFormat-parameter"); - skip |= ValidateStructTypeArray(pNext_loc.dot(Field::driverCount), pNext_loc.dot(Field::pDrivers), - "VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG", structure->driverCount, - structure->pDrivers, VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG, true, - true, "VUID-VkDirectDriverLoadingInfoLUNARG-sType-sType", - "VUID-VkDirectDriverLoadingListLUNARG-pDrivers-parameter", - "VUID-VkDirectDriverLoadingListLUNARG-driverCount-arraylength"); + skip |= ValidateRangedEnum(pNext_loc.dot(Field::indexType), vvl::Enum::VkIndexType, structure->indexType, + "VUID-VkAccelerationStructureTrianglesDisplacementMicromapNV-indexType-parameter"); - if (structure->pDrivers != nullptr) { - for (uint32_t driverIndex = 0; driverIndex < structure->driverCount; ++driverIndex) { - [[maybe_unused]] const Location pDrivers_loc = pNext_loc.dot(Field::pDrivers, driverIndex); - skip |= ValidateReservedFlags(pDrivers_loc.dot(Field::flags), structure->pDrivers[driverIndex].flags, - "VUID-VkDirectDriverLoadingInfoLUNARG-flags-zerobitmask"); + if (structure->pUsageCounts != nullptr) { + for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { + [[maybe_unused]] const Location pUsageCounts_loc = pNext_loc.dot(Field::pUsageCounts, usageIndexsIndex); } } - } - } break; - // Validation code for VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_module_identifier)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_shader_module_identifier) was not included in ppEnabledExtensionNames."); + if (structure->ppUsageCounts != nullptr) { + for (uint32_t usageIndexsIndex = 0; usageIndexsIndex < structure->usageCountsCount; ++usageIndexsIndex) { + [[maybe_unused]] const Location ppUsageCounts_loc = pNext_loc.dot(Field::ppUsageCounts, usageIndexsIndex); + } } - VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT* structure = - (VkPhysicalDeviceShaderModuleIdentifierFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderModuleIdentifier), structure->shaderModuleIdentifier); } } break; +#endif // VK_ENABLE_BETA_EXTENSIONS - // No Validation code for VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT-sType-sType - - // Validation code for VkPipelineShaderStageModuleIdentifierCreateInfoEXT structure members - case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT: { // Covers - // VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-sType-sType + // Validation code for VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI structure members + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CLUSTER_CULLING_SHADER_VRS_FEATURES_HUAWEI: { // Covers + // VUID-VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineShaderStageModuleIdentifierCreateInfoEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_module_identifier)) { + [[maybe_unused]] const Location pNext_loc = + loc.pNext(Struct::VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI); + if (!IsExtEnabled(device_extensions.vk_huawei_cluster_culling_shader)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "extended struct requires the extensions VK_EXT_shader_module_identifier"); + "extended struct requires the extensions VK_HUAWEI_cluster_culling_shader"); } - VkPipelineShaderStageModuleIdentifierCreateInfoEXT* structure = - (VkPipelineShaderStageModuleIdentifierCreateInfoEXT*)header; - skip |= ValidateArray(pNext_loc.dot(Field::identifierSize), pNext_loc.dot(Field::pIdentifier), - structure->identifierSize, &structure->pIdentifier, false, true, kVUIDUndefined, - "VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pIdentifier-parameter"); + VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI* structure = + (VkPhysicalDeviceClusterCullingShaderVrsFeaturesHUAWEI*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::clusterShadingRate), structure->clusterShadingRate); } } break; - // Validation code for VkPhysicalDeviceOpticalFlowFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceOpticalFlowFeaturesNV-sType-sType + // Validation code for VkSamplerBorderColorComponentMappingCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT: { // Covers + // VUID-VkSamplerBorderColorComponentMappingCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceOpticalFlowFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_optical_flow)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSamplerBorderColorComponentMappingCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_border_color_swizzle)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceOpticalFlowFeaturesNV, but when creating VkDevice, " - "the parent extension " - "(VK_NV_optical_flow) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_border_color_swizzle"); } - VkPhysicalDeviceOpticalFlowFeaturesNV* structure = (VkPhysicalDeviceOpticalFlowFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::opticalFlow), structure->opticalFlow); + VkSamplerBorderColorComponentMappingCreateInfoEXT* structure = + (VkSamplerBorderColorComponentMappingCreateInfoEXT*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::r), vvl::Enum::VkComponentSwizzle, structure->components.r, + "VUID-VkComponentMapping-r-parameter"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::g), vvl::Enum::VkComponentSwizzle, structure->components.g, + "VUID-VkComponentMapping-g-parameter"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::b), vvl::Enum::VkComponentSwizzle, structure->components.b, + "VUID-VkComponentMapping-b-parameter"); + + skip |= ValidateRangedEnum(pNext_loc.dot(Field::a), vvl::Enum::VkComponentSwizzle, structure->components.a, + "VUID-VkComponentMapping-a-parameter"); + + skip |= ValidateBool32(pNext_loc.dot(Field::srgb), structure->srgb); } } break; - // No Validation code for VkPhysicalDeviceOpticalFlowPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceOpticalFlowPropertiesNV-sType-sType + // No Validation code for VkDeviceQueueShaderCoreControlCreateInfoARM structure members -- Covers + // VUID-VkDeviceQueueShaderCoreControlCreateInfoARM-sType-sType - // Validation code for VkOpticalFlowImageFormatInfoNV structure members - case VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV: { // Covers VUID-VkOpticalFlowImageFormatInfoNV-sType-sType + // No Validation code for VkImageViewSlicedCreateInfoEXT structure members -- Covers + // VUID-VkImageViewSlicedCreateInfoEXT-sType-sType + + // Validation code for VkRenderPassStripeBeginInfoARM structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_BEGIN_INFO_ARM: { // Covers VUID-VkRenderPassStripeBeginInfoARM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkOpticalFlowImageFormatInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_optical_flow)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_optical_flow"); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassStripeBeginInfoARM); + if (!IsExtEnabled(device_extensions.vk_arm_render_pass_striped)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, + "extended struct requires the extensions VK_ARM_render_pass_striped"); } - VkOpticalFlowImageFormatInfoNV* structure = (VkOpticalFlowImageFormatInfoNV*)header; - skip |= ValidateFlags(pNext_loc.dot(Field::usage), vvl::FlagBitmask::VkOpticalFlowUsageFlagBitsNV, - AllVkOpticalFlowUsageFlagBitsNV, structure->usage, kRequiredFlags, - "VUID-VkOpticalFlowImageFormatInfoNV-usage-parameter", - "VUID-VkOpticalFlowImageFormatInfoNV-usage-requiredbitmask"); - } - } break; + VkRenderPassStripeBeginInfoARM* structure = (VkRenderPassStripeBeginInfoARM*)header; + skip |= ValidateStructTypeArray(pNext_loc.dot(Field::stripeInfoCount), pNext_loc.dot(Field::pStripeInfos), + "VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM", structure->stripeInfoCount, + structure->pStripeInfos, VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_INFO_ARM, true, true, + "VUID-VkRenderPassStripeInfoARM-sType-sType", + "VUID-VkRenderPassStripeBeginInfoARM-pStripeInfos-parameter", + "VUID-VkRenderPassStripeBeginInfoARM-stripeInfoCount-arraylength"); - // Validation code for VkOpticalFlowSessionCreatePrivateDataInfoNV structure members - case VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV: { // Covers - // VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkOpticalFlowSessionCreatePrivateDataInfoNV); - if (!IsExtEnabled(device_extensions.vk_nv_optical_flow)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_optical_flow"); + if (structure->pStripeInfos != nullptr) { + for (uint32_t stripeInfoIndex = 0; stripeInfoIndex < structure->stripeInfoCount; ++stripeInfoIndex) { + [[maybe_unused]] const Location pStripeInfos_loc = pNext_loc.dot(Field::pStripeInfos, stripeInfoIndex); + } } - VkOpticalFlowSessionCreatePrivateDataInfoNV* structure = (VkOpticalFlowSessionCreatePrivateDataInfoNV*)header; - skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pPrivateData), structure->pPrivateData, - "VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-pPrivateData-parameter"); } } break; - // Validation code for VkPhysicalDeviceLegacyDitheringFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceLegacyDitheringFeaturesEXT-sType-sType + // Validation code for VkRenderPassStripeSubmitInfoARM structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM: { // Covers VUID-VkRenderPassStripeSubmitInfoARM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceLegacyDitheringFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_legacy_dithering)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassStripeSubmitInfoARM); + if (!IsExtEnabled(device_extensions.vk_arm_render_pass_striped)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceLegacyDitheringFeaturesEXT, but when creating " - "VkDevice, the parent extension " - "(VK_EXT_legacy_dithering) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_ARM_render_pass_striped"); + } + VkRenderPassStripeSubmitInfoARM* structure = (VkRenderPassStripeSubmitInfoARM*)header; + skip |= ValidateStructTypeArray(pNext_loc.dot(Field::stripeSemaphoreInfoCount), + pNext_loc.dot(Field::pStripeSemaphoreInfos), + "VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO", structure->stripeSemaphoreInfoCount, + structure->pStripeSemaphoreInfos, VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO, true, + true, "VUID-VkSemaphoreSubmitInfo-sType-sType", + "VUID-VkRenderPassStripeSubmitInfoARM-pStripeSemaphoreInfos-parameter", + "VUID-VkRenderPassStripeSubmitInfoARM-stripeSemaphoreInfoCount-arraylength"); + + if (structure->pStripeSemaphoreInfos != nullptr) { + for (uint32_t stripeSemaphoreInfoIndex = 0; stripeSemaphoreInfoIndex < structure->stripeSemaphoreInfoCount; + ++stripeSemaphoreInfoIndex) { + [[maybe_unused]] const Location pStripeSemaphoreInfos_loc = + pNext_loc.dot(Field::pStripeSemaphoreInfos, stripeSemaphoreInfoIndex); + skip |= ValidateRequiredHandle(pStripeSemaphoreInfos_loc.dot(Field::semaphore), + structure->pStripeSemaphoreInfos[stripeSemaphoreInfoIndex].semaphore); + + skip |= ValidateFlags(pStripeSemaphoreInfos_loc.dot(Field::stageMask), + vvl::FlagBitmask::VkPipelineStageFlagBits2, AllVkPipelineStageFlagBits2, + structure->pStripeSemaphoreInfos[stripeSemaphoreInfoIndex].stageMask, kOptionalFlags, + "VUID-VkSemaphoreSubmitInfo-stageMask-parameter"); + } } - VkPhysicalDeviceLegacyDitheringFeaturesEXT* structure = (VkPhysicalDeviceLegacyDitheringFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::legacyDithering), structure->legacyDithering); } } break; - // Validation code for VkPhysicalDevicePipelineProtectedAccessFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePipelineProtectedAccessFeaturesEXT-sType-sType + // Validation code for VkSubpassFragmentDensityMapOffsetEndInfoQCOM structure members + case VK_STRUCTURE_TYPE_SUBPASS_FRAGMENT_DENSITY_MAP_OFFSET_END_INFO_QCOM: { // Covers + // VUID-VkSubpassFragmentDensityMapOffsetEndInfoQCOM-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePipelineProtectedAccessFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_protected_access)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkSubpassFragmentDensityMapOffsetEndInfoQCOM); + if (!IsExtEnabled(device_extensions.vk_qcom_fragment_density_map_offset)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePipelineProtectedAccessFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_pipeline_protected_access) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_QCOM_fragment_density_map_offset"); + } + VkSubpassFragmentDensityMapOffsetEndInfoQCOM* structure = (VkSubpassFragmentDensityMapOffsetEndInfoQCOM*)header; + skip |= ValidateArray(pNext_loc.dot(Field::fragmentDensityOffsetCount), + pNext_loc.dot(Field::pFragmentDensityOffsets), structure->fragmentDensityOffsetCount, + &structure->pFragmentDensityOffsets, false, true, kVUIDUndefined, + "VUID-VkSubpassFragmentDensityMapOffsetEndInfoQCOM-pFragmentDensityOffsets-parameter"); + + if (structure->pFragmentDensityOffsets != nullptr) { + for (uint32_t fragmentDensityOffsetIndex = 0; + fragmentDensityOffsetIndex < structure->fragmentDensityOffsetCount; ++fragmentDensityOffsetIndex) { + [[maybe_unused]] const Location pFragmentDensityOffsets_loc = + pNext_loc.dot(Field::pFragmentDensityOffsets, fragmentDensityOffsetIndex); + } } - VkPhysicalDevicePipelineProtectedAccessFeaturesEXT* structure = - (VkPhysicalDevicePipelineProtectedAccessFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineProtectedAccess), structure->pipelineProtectedAccess); } } break; -#ifdef VK_USE_PLATFORM_ANDROID_KHR - // Validation code for VkPhysicalDeviceExternalFormatResolveFeaturesANDROID structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID: { // Covers - // VUID-VkPhysicalDeviceExternalFormatResolveFeaturesANDROID-sType-sType + // No Validation code for VkComputePipelineIndirectBufferInfoNV structure members -- Covers + // VUID-VkComputePipelineIndirectBufferInfoNV-sType-sType + + // No Validation code for VkImageViewSampleWeightCreateInfoQCOM structure members -- Covers + // VUID-VkImageViewSampleWeightCreateInfoQCOM-sType-sType + + // Validation code for VkExternalMemoryAcquireUnmodifiedEXT structure members + case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_ACQUIRE_UNMODIFIED_EXT: { // Covers + // VUID-VkExternalMemoryAcquireUnmodifiedEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExternalFormatResolveFeaturesANDROID); - if (!IsExtEnabled(device_extensions.vk_android_external_format_resolve)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkExternalMemoryAcquireUnmodifiedEXT); + if (!IsExtEnabled(device_extensions.vk_ext_external_memory_acquire_unmodified)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExternalFormatResolveFeaturesANDROID, but when " - "creating VkDevice, the parent extension " - "(VK_ANDROID_external_format_resolve) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_external_memory_acquire_unmodified"); } - VkPhysicalDeviceExternalFormatResolveFeaturesANDROID* structure = - (VkPhysicalDeviceExternalFormatResolveFeaturesANDROID*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::externalFormatResolve), structure->externalFormatResolve); + VkExternalMemoryAcquireUnmodifiedEXT* structure = (VkExternalMemoryAcquireUnmodifiedEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::acquireUnmodifiedMemory), structure->acquireUnmodifiedMemory); } } break; - // No Validation code for VkPhysicalDeviceExternalFormatResolvePropertiesANDROID structure members -- Covers - // VUID-VkPhysicalDeviceExternalFormatResolvePropertiesANDROID-sType-sType - - // No Validation code for VkAndroidHardwareBufferFormatResolvePropertiesANDROID structure members -- Covers - // VUID-VkAndroidHardwareBufferFormatResolvePropertiesANDROID-sType-sType -#endif // VK_USE_PLATFORM_ANDROID_KHR - - // Validation code for VkPhysicalDeviceShaderObjectFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_OBJECT_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceShaderObjectFeaturesEXT-sType-sType + // Validation code for VkRenderPassCreationControlEXT structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_CONTROL_EXT: { // Covers VUID-VkRenderPassCreationControlEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderObjectFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_shader_object)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassCreationControlEXT); + if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderObjectFeaturesEXT, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_shader_object) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_subpass_merge_feedback"); } - VkPhysicalDeviceShaderObjectFeaturesEXT* structure = (VkPhysicalDeviceShaderObjectFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderObject), structure->shaderObject); + VkRenderPassCreationControlEXT* structure = (VkRenderPassCreationControlEXT*)header; + skip |= ValidateBool32(pNext_loc.dot(Field::disallowMerging), structure->disallowMerging); } } break; - // No Validation code for VkPhysicalDeviceShaderObjectPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceShaderObjectPropertiesEXT-sType-sType - - // Validation code for VkPhysicalDeviceTilePropertiesFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TILE_PROPERTIES_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceTilePropertiesFeaturesQCOM-sType-sType + // Validation code for VkRenderPassCreationFeedbackCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_CREATION_FEEDBACK_CREATE_INFO_EXT: { // Covers + // VUID-VkRenderPassCreationFeedbackCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceTilePropertiesFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_tile_properties)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassCreationFeedbackCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceTilePropertiesFeaturesQCOM, but when creating " - "VkDevice, the parent extension " - "(VK_QCOM_tile_properties) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_subpass_merge_feedback"); + } + VkRenderPassCreationFeedbackCreateInfoEXT* structure = (VkRenderPassCreationFeedbackCreateInfoEXT*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pRenderPassFeedback), structure->pRenderPassFeedback, + "VUID-VkRenderPassCreationFeedbackCreateInfoEXT-pRenderPassFeedback-parameter"); + + if (structure->pRenderPassFeedback != nullptr) { + [[maybe_unused]] const Location pRenderPassFeedback_loc = pNext_loc.dot(Field::pRenderPassFeedback); } - VkPhysicalDeviceTilePropertiesFeaturesQCOM* structure = (VkPhysicalDeviceTilePropertiesFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::tileProperties), structure->tileProperties); } } break; - // Validation code for VkPhysicalDeviceAmigoProfilingFeaturesSEC structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_AMIGO_PROFILING_FEATURES_SEC: { // Covers - // VUID-VkPhysicalDeviceAmigoProfilingFeaturesSEC-sType-sType + // Validation code for VkRenderPassSubpassFeedbackCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_RENDER_PASS_SUBPASS_FEEDBACK_CREATE_INFO_EXT: { // Covers + // VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceAmigoProfilingFeaturesSEC); - if (!IsExtEnabled(device_extensions.vk_sec_amigo_profiling)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkRenderPassSubpassFeedbackCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_subpass_merge_feedback)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceAmigoProfilingFeaturesSEC, but when creating " - "VkDevice, the parent extension " - "(VK_SEC_amigo_profiling) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_subpass_merge_feedback"); + } + VkRenderPassSubpassFeedbackCreateInfoEXT* structure = (VkRenderPassSubpassFeedbackCreateInfoEXT*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pSubpassFeedback), structure->pSubpassFeedback, + "VUID-VkRenderPassSubpassFeedbackCreateInfoEXT-pSubpassFeedback-parameter"); + + if (structure->pSubpassFeedback != nullptr) { + [[maybe_unused]] const Location pSubpassFeedback_loc = pNext_loc.dot(Field::pSubpassFeedback); } - VkPhysicalDeviceAmigoProfilingFeaturesSEC* structure = (VkPhysicalDeviceAmigoProfilingFeaturesSEC*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::amigoProfiling), structure->amigoProfiling); } } break; - // No Validation code for VkAmigoProfilingSubmitInfoSEC structure members -- Covers - // VUID-VkAmigoProfilingSubmitInfoSEC-sType-sType + // Validation code for VkDirectDriverLoadingListLUNARG structure members + case VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_LIST_LUNARG: { // Covers VUID-VkDirectDriverLoadingListLUNARG-sType-sType + if (is_const_param) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkDirectDriverLoadingListLUNARG); + VkDirectDriverLoadingListLUNARG* structure = (VkDirectDriverLoadingListLUNARG*)header; + skip |= ValidateRangedEnum(pNext_loc.dot(Field::mode), vvl::Enum::VkDirectDriverLoadingModeLUNARG, structure->mode, + "VUID-VkDirectDriverLoadingListLUNARG-mode-parameter"); - // Validation code for VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_VIEWPORTS_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM-sType-sType + skip |= ValidateStructTypeArray(pNext_loc.dot(Field::driverCount), pNext_loc.dot(Field::pDrivers), + "VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG", structure->driverCount, + structure->pDrivers, VK_STRUCTURE_TYPE_DIRECT_DRIVER_LOADING_INFO_LUNARG, true, + true, "VUID-VkDirectDriverLoadingInfoLUNARG-sType-sType", + "VUID-VkDirectDriverLoadingListLUNARG-pDrivers-parameter", + "VUID-VkDirectDriverLoadingListLUNARG-driverCount-arraylength"); + + if (structure->pDrivers != nullptr) { + for (uint32_t driverIndex = 0; driverIndex < structure->driverCount; ++driverIndex) { + [[maybe_unused]] const Location pDrivers_loc = pNext_loc.dot(Field::pDrivers, driverIndex); + skip |= ValidateReservedFlags(pDrivers_loc.dot(Field::flags), structure->pDrivers[driverIndex].flags, + "VUID-VkDirectDriverLoadingInfoLUNARG-flags-zerobitmask"); + } + } + } + } break; + + // Validation code for VkPipelineShaderStageModuleIdentifierCreateInfoEXT structure members + case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT: { // Covers + // VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_multiview_per_view_viewports)) { + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPipelineShaderStageModuleIdentifierCreateInfoEXT); + if (!IsExtEnabled(device_extensions.vk_ext_shader_module_identifier)) { skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM, but when " - "creating VkDevice, the parent extension " - "(VK_QCOM_multiview_per_view_viewports) was not included in ppEnabledExtensionNames."); + "extended struct requires the extensions VK_EXT_shader_module_identifier"); } - VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM* structure = - (VkPhysicalDeviceMultiviewPerViewViewportsFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewPerViewViewports), structure->multiviewPerViewViewports); + VkPipelineShaderStageModuleIdentifierCreateInfoEXT* structure = + (VkPipelineShaderStageModuleIdentifierCreateInfoEXT*)header; + skip |= ValidateArray(pNext_loc.dot(Field::identifierSize), pNext_loc.dot(Field::pIdentifier), + structure->identifierSize, &structure->pIdentifier, false, true, kVUIDUndefined, + "VUID-VkPipelineShaderStageModuleIdentifierCreateInfoEXT-pIdentifier-parameter"); } } break; - // No Validation code for VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceRayTracingInvocationReorderPropertiesNV-sType-sType - - // Validation code for VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_INVOCATION_REORDER_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV-sType-sType + // Validation code for VkOpticalFlowImageFormatInfoNV structure members + case VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV: { // Covers VUID-VkOpticalFlowImageFormatInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_invocation_reorder)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_ray_tracing_invocation_reorder) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkOpticalFlowImageFormatInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_optical_flow)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_optical_flow"); } - VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV* structure = - (VkPhysicalDeviceRayTracingInvocationReorderFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingInvocationReorder), structure->rayTracingInvocationReorder); + VkOpticalFlowImageFormatInfoNV* structure = (VkOpticalFlowImageFormatInfoNV*)header; + skip |= ValidateFlags(pNext_loc.dot(Field::usage), vvl::FlagBitmask::VkOpticalFlowUsageFlagBitsNV, + AllVkOpticalFlowUsageFlagBitsNV, structure->usage, kRequiredFlags, + "VUID-VkOpticalFlowImageFormatInfoNV-usage-parameter", + "VUID-VkOpticalFlowImageFormatInfoNV-usage-requiredbitmask"); } } break; - // Validation code for VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_SPARSE_ADDRESS_SPACE_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV-sType-sType + // Validation code for VkOpticalFlowSessionCreatePrivateDataInfoNV structure members + case VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV: { // Covers + // VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-sType-sType if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_extended_sparse_address_space)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_extended_sparse_address_space) was not included in ppEnabledExtensionNames."); + [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkOpticalFlowSessionCreatePrivateDataInfoNV); + if (!IsExtEnabled(device_extensions.vk_nv_optical_flow)) { + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions VK_NV_optical_flow"); } - VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV* structure = - (VkPhysicalDeviceExtendedSparseAddressSpaceFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::extendedSparseAddressSpace), structure->extendedSparseAddressSpace); + VkOpticalFlowSessionCreatePrivateDataInfoNV* structure = (VkOpticalFlowSessionCreatePrivateDataInfoNV*)header; + skip |= ValidateRequiredPointer(pNext_loc.dot(Field::pPrivateData), structure->pPrivateData, + "VUID-VkOpticalFlowSessionCreatePrivateDataInfoNV-pPrivateData-parameter"); } } break; +#ifdef VK_USE_PLATFORM_ANDROID_KHR + + // No Validation code for VkAndroidHardwareBufferFormatResolvePropertiesANDROID structure members -- Covers + // VUID-VkAndroidHardwareBufferFormatResolvePropertiesANDROID-sType-sType +#endif // VK_USE_PLATFORM_ANDROID_KHR - // No Validation code for VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV structure members -- Covers - // VUID-VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV-sType-sType + // No Validation code for VkAmigoProfilingSubmitInfoSEC structure members -- Covers + // VUID-VkAmigoProfilingSubmitInfoSEC-sType-sType // Validation code for VkLayerSettingsCreateInfoEXT structure members case VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT: { // Covers VUID-VkLayerSettingsCreateInfoEXT-sType-sType @@ -8820,62 +9235,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const } } break; - // Validation code for VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_BUILTINS_FEATURES_ARM: { // Covers - // VUID-VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM); - if (!IsExtEnabled(device_extensions.vk_arm_shader_core_builtins)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM, but when creating " - "VkDevice, the parent extension " - "(VK_ARM_shader_core_builtins) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM* structure = (VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderCoreBuiltins), structure->shaderCoreBuiltins); - } - } break; - - // No Validation code for VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM structure members -- Covers - // VUID-VkPhysicalDeviceShaderCoreBuiltinsPropertiesARM-sType-sType - - // Validation code for VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_LIBRARY_GROUP_HANDLES_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_pipeline_library_group_handles)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_pipeline_library_group_handles) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT* structure = - (VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::pipelineLibraryGroupHandles), structure->pipelineLibraryGroupHandles); - } - } break; - - // Validation code for VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_dynamic_rendering_unused_attachments)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT, but " - "when creating VkDevice, the parent extension " - "(VK_EXT_dynamic_rendering_unused_attachments) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT* structure = - (VkPhysicalDeviceDynamicRenderingUnusedAttachmentsFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::dynamicRenderingUnusedAttachments), - structure->dynamicRenderingUnusedAttachments); - } - } break; - // No Validation code for VkLatencySubmissionPresentIdNV structure members -- Covers // VUID-VkLatencySubmissionPresentIdNV-sType-sType @@ -8894,24 +9253,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const // No Validation code for VkLatencySurfaceCapabilitiesNV structure members -- Covers // VUID-VkLatencySurfaceCapabilitiesNV-sType-sType - // Validation code for VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_multiview_per_view_render_areas)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM, but when " - "creating VkDevice, the parent extension " - "(VK_QCOM_multiview_per_view_render_areas) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM* structure = - (VkPhysicalDeviceMultiviewPerViewRenderAreasFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewPerViewRenderAreas), structure->multiviewPerViewRenderAreas); - } - } break; - // Validation code for VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM structure members case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM: { // Covers // VUID-VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM-sType-sType @@ -8938,44 +9279,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const } } break; - // Validation code for VkPhysicalDevicePerStageDescriptorSetFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV: { // Covers - // VUID-VkPhysicalDevicePerStageDescriptorSetFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDevicePerStageDescriptorSetFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_per_stage_descriptor_set)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDevicePerStageDescriptorSetFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_per_stage_descriptor_set) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDevicePerStageDescriptorSetFeaturesNV* structure = - (VkPhysicalDevicePerStageDescriptorSetFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::perStageDescriptorSet), structure->perStageDescriptorSet); - - skip |= ValidateBool32(pNext_loc.dot(Field::dynamicPipelineLayout), structure->dynamicPipelineLayout); - } - } break; - - // Validation code for VkPhysicalDeviceImageProcessing2FeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceImageProcessing2FeaturesQCOM-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceImageProcessing2FeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_image_processing2)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceImageProcessing2FeaturesQCOM, but when creating " - "VkDevice, the parent extension " - "(VK_QCOM_image_processing2) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceImageProcessing2FeaturesQCOM* structure = (VkPhysicalDeviceImageProcessing2FeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::textureBlockMatch2), structure->textureBlockMatch2); - } - } break; - - // No Validation code for VkPhysicalDeviceImageProcessing2PropertiesQCOM structure members -- Covers - // VUID-VkPhysicalDeviceImageProcessing2PropertiesQCOM-sType-sType - // Validation code for VkSamplerBlockMatchWindowCreateInfoQCOM structure members case VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM: { // Covers // VUID-VkSamplerBlockMatchWindowCreateInfoQCOM-sType-sType @@ -8992,22 +9295,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const } } break; - // Validation code for VkPhysicalDeviceCubicWeightsFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_WEIGHTS_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceCubicWeightsFeaturesQCOM-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCubicWeightsFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_filter_cubic_weights)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCubicWeightsFeaturesQCOM, but when creating " - "VkDevice, the parent extension " - "(VK_QCOM_filter_cubic_weights) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceCubicWeightsFeaturesQCOM* structure = (VkPhysicalDeviceCubicWeightsFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::selectableCubicWeights), structure->selectableCubicWeights); - } - } break; - // Validation code for VkSamplerCubicWeightsCreateInfoQCOM structure members case VK_STRUCTURE_TYPE_SAMPLER_CUBIC_WEIGHTS_CREATE_INFO_QCOM: { // Covers // VUID-VkSamplerCubicWeightsCreateInfoQCOM-sType-sType @@ -9038,22 +9325,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const } } break; - // Validation code for VkPhysicalDeviceYcbcrDegammaFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_DEGAMMA_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceYcbcrDegammaFeaturesQCOM-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceYcbcrDegammaFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_ycbcr_degamma)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceYcbcrDegammaFeaturesQCOM, but when creating " - "VkDevice, the parent extension " - "(VK_QCOM_ycbcr_degamma) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceYcbcrDegammaFeaturesQCOM* structure = (VkPhysicalDeviceYcbcrDegammaFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::ycbcrDegamma), structure->ycbcrDegamma); - } - } break; - // Validation code for VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM structure members case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM: { // Covers // VUID-VkSamplerYcbcrConversionYcbcrDegammaCreateInfoQCOM-sType-sType @@ -9070,42 +9341,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const skip |= ValidateBool32(pNext_loc.dot(Field::enableCbCrDegamma), structure->enableCbCrDegamma); } } break; - - // Validation code for VkPhysicalDeviceCubicClampFeaturesQCOM structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM: { // Covers - // VUID-VkPhysicalDeviceCubicClampFeaturesQCOM-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceCubicClampFeaturesQCOM); - if (!IsExtEnabled(device_extensions.vk_qcom_filter_cubic_clamp)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceCubicClampFeaturesQCOM, but when creating VkDevice, " - "the parent extension " - "(VK_QCOM_filter_cubic_clamp) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceCubicClampFeaturesQCOM* structure = (VkPhysicalDeviceCubicClampFeaturesQCOM*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::cubicRangeClamp), structure->cubicRangeClamp); - } - } break; - - // Validation code for VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_attachment_feedback_loop_dynamic_state)) { - skip |= - LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT, but when " - "creating VkDevice, the parent extension " - "(VK_EXT_attachment_feedback_loop_dynamic_state) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT* structure = - (VkPhysicalDeviceAttachmentFeedbackLoopDynamicStateFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::attachmentFeedbackLoopDynamicState), - structure->attachmentFeedbackLoopDynamicState); - } - } break; #ifdef VK_USE_PLATFORM_SCREEN_QNX // No Validation code for VkScreenBufferFormatPropertiesQNX structure members -- Covers @@ -9115,96 +9350,8 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const // VUID-VkImportScreenBufferInfoQNX-sType-sType // No Validation code for VkExternalFormatQNX structure members -- Covers VUID-VkExternalFormatQNX-sType-sType - - // Validation code for VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX: { // Covers - // VUID-VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX); - if (!IsExtEnabled(device_extensions.vk_qnx_external_memory_screen_buffer)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX, but when " - "creating VkDevice, the parent extension " - "(VK_QNX_external_memory_screen_buffer) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX* structure = - (VkPhysicalDeviceExternalMemoryScreenBufferFeaturesQNX*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::screenBufferImport), structure->screenBufferImport); - } - } break; #endif // VK_USE_PLATFORM_SCREEN_QNX - // No Validation code for VkPhysicalDeviceLayeredDriverPropertiesMSFT structure members -- Covers - // VUID-VkPhysicalDeviceLayeredDriverPropertiesMSFT-sType-sType - - // Validation code for VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = - loc.pNext(Struct::VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_descriptor_pool_overallocation)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_descriptor_pool_overallocation) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV* structure = - (VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorPoolOverallocation), structure->descriptorPoolOverallocation); - } - } break; - - // Validation code for VkPhysicalDeviceRawAccessChainsFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceRawAccessChainsFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRawAccessChainsFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_raw_access_chains)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRawAccessChainsFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_raw_access_chains) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRawAccessChainsFeaturesNV* structure = (VkPhysicalDeviceRawAccessChainsFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderRawAccessChains), structure->shaderRawAccessChains); - } - } break; - - // Validation code for VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT16_VECTOR_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_shader_atomic_float16_vector)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV, but when " - "creating VkDevice, the parent extension " - "(VK_NV_shader_atomic_float16_vector) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV* structure = - (VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::shaderFloat16VectorAtomics), structure->shaderFloat16VectorAtomics); - } - } break; - - // Validation code for VkPhysicalDeviceRayTracingValidationFeaturesNV structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_VALIDATION_FEATURES_NV: { // Covers - // VUID-VkPhysicalDeviceRayTracingValidationFeaturesNV-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingValidationFeaturesNV); - if (!IsExtEnabled(device_extensions.vk_nv_ray_tracing_validation)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayTracingValidationFeaturesNV, but when creating " - "VkDevice, the parent extension " - "(VK_NV_ray_tracing_validation) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRayTracingValidationFeaturesNV* structure = (VkPhysicalDeviceRayTracingValidationFeaturesNV*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingValidation), structure->rayTracingValidation); - } - } break; - // Validation code for VkWriteDescriptorSetAccelerationStructureKHR structure members case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: { // Covers // VUID-VkWriteDescriptorSetAccelerationStructureKHR-sType-sType @@ -9223,112 +9370,6 @@ bool StatelessValidation::ValidatePnextStructContents(const Location& loc, const } } break; - // Validation code for VkPhysicalDeviceAccelerationStructureFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceAccelerationStructureFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceAccelerationStructureFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_acceleration_structure)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceAccelerationStructureFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_acceleration_structure) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceAccelerationStructureFeaturesKHR* structure = - (VkPhysicalDeviceAccelerationStructureFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructure), structure->accelerationStructure); - - skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructureCaptureReplay), - structure->accelerationStructureCaptureReplay); - - skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructureIndirectBuild), - structure->accelerationStructureIndirectBuild); - - skip |= ValidateBool32(pNext_loc.dot(Field::accelerationStructureHostCommands), - structure->accelerationStructureHostCommands); - - skip |= ValidateBool32(pNext_loc.dot(Field::descriptorBindingAccelerationStructureUpdateAfterBind), - structure->descriptorBindingAccelerationStructureUpdateAfterBind); - } - } break; - - // No Validation code for VkPhysicalDeviceAccelerationStructurePropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceAccelerationStructurePropertiesKHR-sType-sType - - // Validation code for VkPhysicalDeviceRayTracingPipelineFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceRayTracingPipelineFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayTracingPipelineFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_ray_tracing_pipeline)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayTracingPipelineFeaturesKHR, but when creating " - "VkDevice, the parent extension " - "(VK_KHR_ray_tracing_pipeline) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRayTracingPipelineFeaturesKHR* structure = (VkPhysicalDeviceRayTracingPipelineFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipeline), structure->rayTracingPipeline); - - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineShaderGroupHandleCaptureReplay), - structure->rayTracingPipelineShaderGroupHandleCaptureReplay); - - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineShaderGroupHandleCaptureReplayMixed), - structure->rayTracingPipelineShaderGroupHandleCaptureReplayMixed); - - skip |= ValidateBool32(pNext_loc.dot(Field::rayTracingPipelineTraceRaysIndirect), - structure->rayTracingPipelineTraceRaysIndirect); - - skip |= ValidateBool32(pNext_loc.dot(Field::rayTraversalPrimitiveCulling), structure->rayTraversalPrimitiveCulling); - } - } break; - - // No Validation code for VkPhysicalDeviceRayTracingPipelinePropertiesKHR structure members -- Covers - // VUID-VkPhysicalDeviceRayTracingPipelinePropertiesKHR-sType-sType - - // Validation code for VkPhysicalDeviceRayQueryFeaturesKHR structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR: { // Covers - // VUID-VkPhysicalDeviceRayQueryFeaturesKHR-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceRayQueryFeaturesKHR); - if (!IsExtEnabled(device_extensions.vk_khr_ray_query)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceRayQueryFeaturesKHR, but when creating VkDevice, the " - "parent extension " - "(VK_KHR_ray_query) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceRayQueryFeaturesKHR* structure = (VkPhysicalDeviceRayQueryFeaturesKHR*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::rayQuery), structure->rayQuery); - } - } break; - - // Validation code for VkPhysicalDeviceMeshShaderFeaturesEXT structure members - case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_EXT: { // Covers - // VUID-VkPhysicalDeviceMeshShaderFeaturesEXT-sType-sType - if (is_const_param) { - [[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::VkPhysicalDeviceMeshShaderFeaturesEXT); - if (!IsExtEnabled(device_extensions.vk_ext_mesh_shader)) { - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a VkPhysicalDeviceMeshShaderFeaturesEXT, but when creating VkDevice, " - "the parent extension " - "(VK_EXT_mesh_shader) was not included in ppEnabledExtensionNames."); - } - VkPhysicalDeviceMeshShaderFeaturesEXT* structure = (VkPhysicalDeviceMeshShaderFeaturesEXT*)header; - skip |= ValidateBool32(pNext_loc.dot(Field::taskShader), structure->taskShader); - - skip |= ValidateBool32(pNext_loc.dot(Field::meshShader), structure->meshShader); - - skip |= ValidateBool32(pNext_loc.dot(Field::multiviewMeshShader), structure->multiviewMeshShader); - - skip |= ValidateBool32(pNext_loc.dot(Field::primitiveFragmentShadingRateMeshShader), - structure->primitiveFragmentShadingRateMeshShader); - - skip |= ValidateBool32(pNext_loc.dot(Field::meshShaderQueries), structure->meshShaderQueries); - } - } break; - - // No Validation code for VkPhysicalDeviceMeshShaderPropertiesEXT structure members -- Covers - // VUID-VkPhysicalDeviceMeshShaderPropertiesEXT-sType-sType - default: skip = false; } diff --git a/scripts/generators/stateless_validation_helper_generator.py b/scripts/generators/stateless_validation_helper_generator.py index cf04fce9316..410938c0d0b 100644 --- a/scripts/generators/stateless_validation_helper_generator.py +++ b/scripts/generators/stateless_validation_helper_generator.py @@ -21,7 +21,7 @@ import os import re from generators.generator_utils import buildListVUID, PlatformGuardHelper -from generators.vulkan_object import Member +from generators.vulkan_object import Member, Struct from generators.base_generator import BaseGenerator # This class is a container for any source code, data, or other behavior that is necessary to @@ -234,6 +234,8 @@ def __init__(self, # Map of flag bits typename to list of values self.flagBits = dict() + self.stype_version_dict = dict() + def generate(self): self.write(f'''// *** THIS FILE IS GENERATED - DO NOT EDIT *** // See {os.path.basename(__file__)} for modifications @@ -324,7 +326,6 @@ def generateSource(self): # VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT # VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT root = self.registry.reg - stype_version_dict = dict() for extensions in root.findall('extensions'): for extension in extensions.findall('extension'): extensionName = extension.get('name') @@ -336,124 +337,88 @@ def generateSource(self): if (entry.get('comment') is None or 'typo' not in entry.get('comment')): alias = entry.get('alias') if (alias is not None and promotedToCore): - stype_version_dict[alias] = extensionName - out = [] + self.stype_version_dict[alias] = extensionName + + # Generate the struct member checking code from the captured data + for struct in self.vk.structs.values(): + # The string returned will be nested in an if check for a NULL pointer, so needs its indent incremented + lines = self.genFuncBody(self.vk.structs[struct.name].members, '{funcName}', '{errorLoc}', '{valuePrefix}', '{displayNamePrefix}', struct.name, False) + if lines: + self.validatedStructs[struct.name] = lines + out = [] out.append(''' #include "chassis.h" #include "stateless/stateless_validation.h" #include "generated/enum_flag_bits.h" #include "generated/layer_chassis_dispatch.h" + ''') - bool StatelessValidation::ValidatePnextStructContents(const Location& loc, + # The reason we split this up into Feature and Properties struct is before be had a 450 case, 10k line function that broke MSVC + # reference: https://www.asawicki.info/news_1617_how_code_refactoring_can_fix_stack_overflow_error + extended_structs = [x for x in self.vk.structs.values() if x.extends] + feature_structs = [x for x in extended_structs if x.extends == ["VkPhysicalDeviceFeatures2", "VkDeviceCreateInfo"]] + property_structs = [x for x in extended_structs if x.extends == ["VkPhysicalDeviceProperties2"]] + other_structs = [x for x in extended_structs if x not in feature_structs and x not in property_structs] + + out.append(''' + bool StatelessValidation::ValidatePnextFeatureStructContents(const Location& loc, const VkBaseOutStructure* header, const char *pnext_vuid, VkPhysicalDevice caller_physical_device, bool is_const_param) const { bool skip = false; const bool is_physdev_api = caller_physical_device != VK_NULL_HANDLE; switch(header->sType) { ''') + guard_helper = PlatformGuardHelper() + for struct in feature_structs: + out.extend(guard_helper.add_guard(struct.protect)) + out.extend(self.genStructBody(struct)) + out.extend(guard_helper.add_guard(None)) + out.append(''' + default: + skip = false; + } + return skip; + } - # Generate the struct member checking code from the captured data - for struct in self.vk.structs.values(): - # The string returned will be nested in an if check for a NULL pointer, so needs its indent incremented - lines = self.genFuncBody(self.vk.structs[struct.name].members, '{funcName}', '{errorLoc}', '{valuePrefix}', '{displayNamePrefix}', struct.name, False) - if lines: - self.validatedStructs[struct.name] = lines + ''') + out.append(''' + bool StatelessValidation::ValidatePnextPropertyStructContents(const Location& loc, + const VkBaseOutStructure* header, const char *pnext_vuid, + VkPhysicalDevice caller_physical_device, bool is_const_param) const { + bool skip = false; + const bool is_physdev_api = caller_physical_device != VK_NULL_HANDLE; + switch(header->sType) { + ''') guard_helper = PlatformGuardHelper() - # Do some processing here to extract data from validatedstructs... - for struct in [x for x in self.vk.structs.values() if x.extends]: + for struct in property_structs: out.extend(guard_helper.add_guard(struct.protect)) + out.extend(self.genStructBody(struct)) + out.extend(guard_helper.add_guard(None)) + out.append(''' + default: + skip = false; + } + return skip; + } - pnext_case = '\n' - pnext_check = '' - - pnext_case += f' // Validation code for {struct.name} structure members\n' - pnext_case += f' case {struct.sType}: {{ // Covers VUID-{struct.name}-sType-sType\n' - - if struct.sType and struct.version and all(not x.promotedTo for x in struct.extensions): - pnext_check += f''' - if (is_physdev_api) {{ - VkPhysicalDeviceProperties device_properties = {{}}; - DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); - if (device_properties.apiVersion < {struct.version.nameApi}) {{ - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType ({struct.sType}) which was added in {struct.version.nameApi} but the " - "current effective API version is %s.", StringAPIVersion(api_version).c_str()); - }} - }} - ''' - - elif struct.sType in stype_version_dict.keys(): - ext_name = stype_version_dict[struct.sType] - - # Skip extensions that are not in the target API - # This check is needed because parts of the base generator code bypass the - # dependency resolution logic in the registry tooling and thus the generator - # may attempt to generate code for extensions which are not supported in the - # target API variant, thus this check needs to happen even if any specific - # target API variant may not specifically need it - if ext_name not in self.vk.extensions: - continue - - # Dependent on enabled extension - extension = self.vk.extensions[ext_name] - extension_check = '' - if extension.device: - extension_check = f'if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_{extension.name})) || (!is_physdev_api && !IsExtEnabled(device_extensions.{extension.name.lower()}))) {{' - else: - extension_check = f'if (!IsExtEnabled(instance_extensions.{extension.name.lower()})) {{' - pnext_check += f''' - {extension_check} - skip |= LogError( - pnext_vuid, instance, loc.dot(Field::pNext), - "includes a pointer to a VkStructureType ({struct.sType}), but its parent extension " - "{extension.name} has not been enabled."); - }} - ''' + ''') - expr = self.expandStructCode(struct.name, struct.name, 'pNext_loc', 'structure->', '', []) - struct_validation_source = self.ScrubStructCode(expr) - if struct_validation_source != '': - # Only reasonable to validate content of structs if const as otherwise the date inside has not been writen to yet - # https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/3122 - pnext_check += 'if (is_const_param) {\n' - pnext_check += f'[[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::{struct.name});\n' - - # We do the extension checking here at the pNext chaining because if the struct is only used in a new extended command, - # using that command will always trigger a "missing extension" VU - checkExpression = [] - resultExpression = [] - for extension in [x.name for x in struct.extensions if x.device]: - checkExpression.append(f'!IsExtEnabled(device_extensions.{extension.lower()})') - resultExpression.append(extension) - # TODO - Video session creation checks will fail tests if no extensions are found (need to fix test logic) - if len(checkExpression) > 0 and 'Video' not in struct.name: - # Special message for device features - if 'VkPhysicalDeviceFeatures2' in struct.extends and 'VkDeviceCreateInfo' in struct.extends: - pnext_check += f'''if ({" && ".join(checkExpression)}){{ - skip |= LogError(pnext_vuid, instance, pNext_loc, - "includes a pointer to a {struct.name}, but when creating VkDevice, the parent extension " - "({" or ".join(resultExpression)}) was not included in ppEnabledExtensionNames."); - }} - ''' - else: - pnext_check += f'''if ({" && ".join(checkExpression)}){{ - skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions {" or ".join(resultExpression)}"); - }} - ''' - - struct_validation_source = f'{struct.name} *structure = ({struct.name} *) header;\n{struct_validation_source}' - struct_validation_source += '}\n' - pnext_case += f'{pnext_check}{struct_validation_source}' - pnext_case += '} break;\n' - # Skip functions containing no validation - if struct_validation_source or pnext_check != '': - out.append(pnext_case) - else: - out.append(f'\n // No Validation code for {struct.name} structure members -- Covers VUID-{struct.name}-sType-sType\n') + out.append(''' + // All structs that are not a Feature or Property struct + bool StatelessValidation::ValidatePnextStructContents(const Location& loc, + const VkBaseOutStructure* header, const char *pnext_vuid, + VkPhysicalDevice caller_physical_device, bool is_const_param) const { + bool skip = false; + const bool is_physdev_api = caller_physical_device != VK_NULL_HANDLE; + switch(header->sType) { + ''') + guard_helper = PlatformGuardHelper() + for struct in other_structs: + out.extend(guard_helper.add_guard(struct.protect)) + out.extend(self.genStructBody(struct)) out.extend(guard_helper.add_guard(None)) out.append(''' default: @@ -1006,6 +971,96 @@ def genFuncBody(self, members: list[Member], funcName, errorLoc, valuePrefix, di lines.append('// No xml-driven validation\n') return lines + # This logic was broken into its own function because we need to fill multiple functions with these structs + def genStructBody(self, struct: Struct): + pnext_case = '\n' + pnext_check = '' + + pnext_case += f' // Validation code for {struct.name} structure members\n' + pnext_case += f' case {struct.sType}: {{ // Covers VUID-{struct.name}-sType-sType\n' + + if struct.sType and struct.version and all(not x.promotedTo for x in struct.extensions): + pnext_check += f''' + if (is_physdev_api) {{ + VkPhysicalDeviceProperties device_properties = {{}}; + DispatchGetPhysicalDeviceProperties(caller_physical_device, &device_properties); + if (device_properties.apiVersion < {struct.version.nameApi}) {{ + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType ({struct.sType}) which was added in {struct.version.nameApi} but the " + "current effective API version is %s.", StringAPIVersion(api_version).c_str()); + }} + }} + ''' + + elif struct.sType in self.stype_version_dict.keys(): + ext_name = self.stype_version_dict[struct.sType] + + # Skip extensions that are not in the target API + # This check is needed because parts of the base generator code bypass the + # dependency resolution logic in the registry tooling and thus the generator + # may attempt to generate code for extensions which are not supported in the + # target API variant, thus this check needs to happen even if any specific + # target API variant may not specifically need it + if ext_name not in self.vk.extensions: + return "" + + # Dependent on enabled extension + extension = self.vk.extensions[ext_name] + extension_check = '' + if extension.device: + extension_check = f'if ((is_physdev_api && !SupportedByPdev(physical_device, vvl::Extension::_{extension.name})) || (!is_physdev_api && !IsExtEnabled(device_extensions.{extension.name.lower()}))) {{' + else: + extension_check = f'if (!IsExtEnabled(instance_extensions.{extension.name.lower()})) {{' + pnext_check += f''' + {extension_check} + skip |= LogError( + pnext_vuid, instance, loc.dot(Field::pNext), + "includes a pointer to a VkStructureType ({struct.sType}), but its parent extension " + "{extension.name} has not been enabled."); + }} + ''' + + expr = self.expandStructCode(struct.name, struct.name, 'pNext_loc', 'structure->', '', []) + struct_validation_source = self.ScrubStructCode(expr) + if struct_validation_source != '': + # Only reasonable to validate content of structs if const as otherwise the date inside has not been writen to yet + # https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/3122 + pnext_check += 'if (is_const_param) {\n' + pnext_check += f'[[maybe_unused]] const Location pNext_loc = loc.pNext(Struct::{struct.name});\n' + + # We do the extension checking here at the pNext chaining because if the struct is only used in a new extended command, + # using that command will always trigger a "missing extension" VU + checkExpression = [] + resultExpression = [] + for extension in [x.name for x in struct.extensions if x.device]: + checkExpression.append(f'!IsExtEnabled(device_extensions.{extension.lower()})') + resultExpression.append(extension) + # TODO - Video session creation checks will fail tests if no extensions are found (need to fix test logic) + if len(checkExpression) > 0 and 'Video' not in struct.name: + # Special message for device features + if 'VkPhysicalDeviceFeatures2' in struct.extends and 'VkDeviceCreateInfo' in struct.extends: + pnext_check += f'''if ({" && ".join(checkExpression)}){{ + skip |= LogError(pnext_vuid, instance, pNext_loc, + "includes a pointer to a {struct.name}, but when creating VkDevice, the parent extension " + "({" or ".join(resultExpression)}) was not included in ppEnabledExtensionNames."); + }} + ''' + else: + pnext_check += f'''if ({" && ".join(checkExpression)}){{ + skip |= LogError(pnext_vuid, instance, pNext_loc, "extended struct requires the extensions {" or ".join(resultExpression)}"); + }} + ''' + + struct_validation_source = f'{struct.name} *structure = ({struct.name} *) header;\n{struct_validation_source}' + struct_validation_source += '}\n' + pnext_case += f'{pnext_check}{struct_validation_source}' + pnext_case += '} break;\n' + # Skip functions containing no validation + if struct_validation_source or pnext_check != '': + return pnext_case + else: + return f'\n // No Validation code for {struct.name} structure members -- Covers VUID-{struct.name}-sType-sType\n' # Helper for iterating over a list where each element is possibly a single element or another 1-dimensional list # Generates (setter, deleter, element) for each element where: