nextPtr = &physicalDeviceScalarBlockLayoutFeaturesEXT.pNext;
}
- if (vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_subgroup_size_control"))
+ vk::VkPhysicalDeviceSubgroupSizeControlFeaturesEXT physicalDeviceSubgroupSizeControlFeaturesEXT;
- deMemset(&physicalDeviceSubgroupSizeControlFeaturesEXT, 0, sizeof(physicalDeviceSubgroupSizeControlFeaturesEXT));
++ deMemset(&physicalDeviceSubgroupSizeControlFeaturesEXT, 0, sizeof(physicalDeviceSubgroupSizeControlFeaturesEXT));
++
++ if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_EXT_subgroup_size_control")) )
+ {
+ physicalDeviceSubgroupSizeControlFeaturesEXT.sType = getStructureType<VkPhysicalDeviceSubgroupSizeControlFeaturesEXT>();
+ *nextPtr = &physicalDeviceSubgroupSizeControlFeaturesEXT;
+ nextPtr = &physicalDeviceSubgroupSizeControlFeaturesEXT.pNext;
+ }
+
vk::VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR physicalDeviceUniformBufferStandardLayoutFeaturesKHR;
- if (vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_uniform_buffer_standard_layout"))
+ deMemset(&physicalDeviceUniformBufferStandardLayoutFeaturesKHR, 0, sizeof(physicalDeviceUniformBufferStandardLayoutFeaturesKHR));
+
+ if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_KHR_uniform_buffer_standard_layout")) )
{
- deMemset(&physicalDeviceUniformBufferStandardLayoutFeaturesKHR, 0, sizeof(physicalDeviceUniformBufferStandardLayoutFeaturesKHR));
physicalDeviceUniformBufferStandardLayoutFeaturesKHR.sType = getStructureType<VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR>();
*nextPtr = &physicalDeviceUniformBufferStandardLayoutFeaturesKHR;
nextPtr = &physicalDeviceUniformBufferStandardLayoutFeaturesKHR.pNext;
nextPtr = &physicalDeviceVariablePointersFeatures.pNext;
}
- if (context.contextSupports(vk::ApiVersion(1, 2, 0)))
+ vk::VkPhysicalDeviceVulkan11Features physicalDeviceVulkan11Features;
- deMemset(&physicalDeviceVulkan11Features, 0, sizeof(physicalDeviceVulkan11Features));
++ deMemset(&physicalDeviceVulkan11Features, 0, sizeof(physicalDeviceVulkan11Features));
++
++ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
- if (context.contextSupports(vk::ApiVersion(1, 2, 0)))
+ physicalDeviceVulkan11Features.sType = getStructureType<VkPhysicalDeviceVulkan11Features>();
+ *nextPtr = &physicalDeviceVulkan11Features;
+ nextPtr = &physicalDeviceVulkan11Features.pNext;
+ }
+
+ vk::VkPhysicalDeviceVulkan12Features physicalDeviceVulkan12Features;
- deMemset(&physicalDeviceVulkan12Features, 0, sizeof(physicalDeviceVulkan12Features));
++ deMemset(&physicalDeviceVulkan12Features, 0, sizeof(physicalDeviceVulkan12Features));
++
++ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ physicalDeviceVulkan12Features.sType = getStructureType<VkPhysicalDeviceVulkan12Features>();
+ *nextPtr = &physicalDeviceVulkan12Features;
+ nextPtr = &physicalDeviceVulkan12Features.pNext;
+ }
+
context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &coreFeatures);
bool result = true;
}
}
- if ( vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_KHR_multiview") )
++ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
++ {
++ if ( physicalDeviceVulkan11Features.multiview == VK_FALSE )
++ {
++ log << tcu::TestLog::Message << "Mandatory feature multiview not supported" << tcu::TestLog::EndMessage;
++ result = false;
++ }
++ }
++
+ if ( context.contextSupports(vk::ApiVersion(1, 1, 0)) )
{
if ( physicalDeviceMultiviewFeatures.multiview == VK_FALSE )
{
}
}
- if ( vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_subgroup_size_control") )
++ if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_EXT_subgroup_size_control")) )
+ {
+ if ( physicalDeviceSubgroupSizeControlFeaturesEXT.subgroupSizeControl == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature subgroupSizeControl not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
- if ( vk::isDeviceExtensionSupported(context.getUsedApiVersion(), context.getDeviceExtensions(), "VK_EXT_subgroup_size_control") )
++ if ( isExtensionSupported(deviceExtensions, RequiredExtension("VK_EXT_subgroup_size_control")) )
+ {
+ if ( physicalDeviceSubgroupSizeControlFeaturesEXT.computeFullSubgroups == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature computeFullSubgroups not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ if ( physicalDeviceVulkan12Features.subgroupBroadcastDynamicId == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature subgroupBroadcastDynamicId not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ if ( physicalDeviceVulkan12Features.imagelessFramebuffer == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature imagelessFramebuffer not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ if ( physicalDeviceVulkan12Features.uniformBufferStandardLayout == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature uniformBufferStandardLayout not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ if ( physicalDeviceVulkan12Features.separateDepthStencilLayouts == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature separateDepthStencilLayouts not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ if ( physicalDeviceVulkan12Features.hostQueryReset == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature hostQueryReset not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) )
+ {
+ if ( physicalDeviceVulkan12Features.timelineSemaphore == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature timelineSemaphore not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayDynamicIndexing == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature shaderUniformTexelBufferArrayDynamicIndexing not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.shaderStorageTexelBufferArrayDynamicIndexing == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature shaderStorageTexelBufferArrayDynamicIndexing not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.shaderSampledImageArrayNonUniformIndexing == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature shaderSampledImageArrayNonUniformIndexing not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.shaderStorageBufferArrayNonUniformIndexing == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature shaderStorageBufferArrayNonUniformIndexing not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.shaderUniformTexelBufferArrayNonUniformIndexing == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature shaderUniformTexelBufferArrayNonUniformIndexing not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingSampledImageUpdateAfterBind == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingSampledImageUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingStorageImageUpdateAfterBind == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingStorageImageUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingStorageBufferUpdateAfterBind == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingStorageBufferUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingUniformTexelBufferUpdateAfterBind == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingUniformTexelBufferUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingStorageTexelBufferUpdateAfterBind == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingStorageTexelBufferUpdateAfterBind not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingUpdateUnusedWhilePending == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingUpdateUnusedWhilePending not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.descriptorBindingPartiallyBound == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature descriptorBindingPartiallyBound not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
+ if ( context.contextSupports(vk::ApiVersion(1, 2, 0)) && physicalDeviceVulkan12Features.descriptorIndexing )
+ {
+ if ( physicalDeviceVulkan12Features.runtimeDescriptorArray == VK_FALSE )
+ {
+ log << tcu::TestLog::Message << "Mandatory feature runtimeDescriptorArray not supported" << tcu::TestLog::EndMessage;
+ result = false;
+ }
+ }
+
return result;
}