Make Context class to query extensions properties
Add functionality into Context class to query extension's
properties from default device.
Components: framework
VK-GL-CTS issue: 1924
Change-Id: If456123fa9214fdf0c8360bf645531b2a00fd9b2
diff --git a/AndroidGen.mk b/AndroidGen.mk
index 38a58a4..6a23cea 100644
--- a/AndroidGen.mk
+++ b/AndroidGen.mk
@@ -36,6 +36,7 @@
external/vulkancts/framework/vulkan/vkDebugReportUtil.cpp \
external/vulkancts/framework/vulkan/vkDefs.cpp \
external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp \
+ external/vulkancts/framework/vulkan/vkDeviceProperties.cpp \
external/vulkancts/framework/vulkan/vkDeviceUtil.cpp \
external/vulkancts/framework/vulkan/vkImageUtil.cpp \
external/vulkancts/framework/vulkan/vkImageWithMemory.cpp \
diff --git a/external/vulkancts/framework/vulkan/CMakeLists.txt b/external/vulkancts/framework/vulkan/CMakeLists.txt
index d713f91..0e30216 100644
--- a/external/vulkancts/framework/vulkan/CMakeLists.txt
+++ b/external/vulkancts/framework/vulkan/CMakeLists.txt
@@ -71,6 +71,9 @@
vkDeviceFeatures.hpp
vkDeviceFeatures.cpp
vkDeviceFeatures.inl
+ vkDeviceProperties.hpp
+ vkDeviceProperties.cpp
+ vkDeviceProperties.inl
)
set(VKUTIL_SRCS
diff --git a/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp b/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp
index b403cb6..e0455ff 100644
--- a/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp
+++ b/external/vulkancts/framework/vulkan/vkDeviceFeatures.cpp
@@ -115,6 +115,11 @@
return false;
}
+bool DeviceFeatures::isDeviceFeatureInitialized (VkStructureType sType) const
+{
+ return findStructureInChain(&m_coreFeatures2, sType) != DE_NULL;
+}
+
DeviceFeatures::~DeviceFeatures (void)
{
for (size_t i = 0; i < m_features.size(); ++i)
diff --git a/external/vulkancts/framework/vulkan/vkDeviceFeatures.hpp b/external/vulkancts/framework/vulkan/vkDeviceFeatures.hpp
index 966e94d..66425b1 100644
--- a/external/vulkancts/framework/vulkan/vkDeviceFeatures.hpp
+++ b/external/vulkancts/framework/vulkan/vkDeviceFeatures.hpp
@@ -78,16 +78,16 @@
class DeviceFeatures
{
public:
- DeviceFeatures (const InstanceInterface& vki,
- const deUint32 apiVersion,
- const VkPhysicalDevice physicalDevice,
- const std::vector<std::string>& instanceExtensions,
- const std::vector<std::string>& deviceExtensions);
+ DeviceFeatures (const InstanceInterface& vki,
+ const deUint32 apiVersion,
+ const VkPhysicalDevice physicalDevice,
+ const std::vector<std::string>& instanceExtensions,
+ const std::vector<std::string>& deviceExtensions);
- ~DeviceFeatures (void);
+ ~DeviceFeatures (void);
template<class FeatureType>
- bool getFeatureType (FeatureType& featureType) const
+ bool getFeatureType (FeatureType& featureType) const
{
typedef FeatureStructWrapper<FeatureType> *FeatureWrapperPtr;
@@ -106,7 +106,7 @@
}
template<class FeatureType>
- const FeatureType& getFeatureType (void) const
+ const FeatureType& getFeatureType (void) const
{
typedef FeatureStructWrapper<FeatureType> *FeatureWrapperPtr;
@@ -134,12 +134,13 @@
return static_cast<FeatureWrapperPtr>(p)->getFeatureTypeRef();
}
- const VkPhysicalDeviceFeatures2& getCoreFeatures2 (void) const { return m_coreFeatures2; }
+ const VkPhysicalDeviceFeatures2& getCoreFeatures2 (void) const { return m_coreFeatures2; }
- bool contains (const std::string& feature, bool throwIfNotExists = false) const;
+ bool contains (const std::string& feature, bool throwIfNotExists = false) const;
+
+ bool isDeviceFeatureInitialized (VkStructureType sType) const;
private:
-
static FeatureStruct* createFeatureStructWrapper (const std::string& s);
static bool verifyFeatureAddCriteria (const FeatureStructMapItem& item, const std::vector<VkExtensionProperties>& properties);
diff --git a/external/vulkancts/framework/vulkan/vkDeviceProperties.cpp b/external/vulkancts/framework/vulkan/vkDeviceProperties.cpp
new file mode 100644
index 0000000..73fc7b8
--- /dev/null
+++ b/external/vulkancts/framework/vulkan/vkDeviceProperties.cpp
@@ -0,0 +1,117 @@
+/*-------------------------------------------------------------------------
+* Vulkan CTS
+* ----------
+*
+* Copyright (c) 2019 The Khronos Group Inc.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "deSTLUtil.hpp"
+#include "deString.h"
+#include "vkQueryUtil.hpp"
+#include "vkDeviceProperties.inl"
+#include "vkDeviceProperties.hpp"
+
+namespace vk
+{
+
+static bool isPhysicalDeviceProperties2Supported (const deUint32 version, const std::vector<std::string>& instanceExtensions)
+{
+ return isInstanceExtensionSupported(version, instanceExtensions, "VK_KHR_get_physical_device_properties2");
+}
+
+DeviceProperties::DeviceProperties (const InstanceInterface& vki,
+ const deUint32 apiVersion,
+ const VkPhysicalDevice physicalDevice,
+ const std::vector<std::string>& instanceExtensions,
+ const std::vector<std::string>& deviceExtensions)
+{
+ m_coreProperties2 = initVulkanStructure();
+
+ if (isPhysicalDeviceProperties2Supported(apiVersion, instanceExtensions))
+ {
+ const std::vector<VkExtensionProperties> deviceExtensionProperties = enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
+ void** nextPtr = &m_coreProperties2.pNext;
+
+ for (size_t i = 0; i < DE_LENGTH_OF_ARRAY(propertyStructCreatorMap); ++i)
+ {
+ const char* propertyName = propertyStructCreatorMap[i].name;
+
+ if (de::contains(deviceExtensions.begin(), deviceExtensions.end(), propertyName))
+ {
+ PropertyStruct* p = createPropertyStructWrapper(propertyName);
+
+ if (p)
+ {
+ *nextPtr = p->getPropertyTypeRaw();
+ nextPtr = p->getPropertyTypeNext();
+ m_properties.push_back(p);
+ }
+ }
+ }
+
+ vki.getPhysicalDeviceProperties2(physicalDevice, &m_coreProperties2);
+ }
+ else
+ m_coreProperties2.properties = getPhysicalDeviceProperties(vki, physicalDevice);
+}
+
+bool DeviceProperties::contains (const std::string& property, bool throwIfNotExists) const
+{
+ const size_t typesSize = m_properties.size();
+
+ for (size_t typeIdx = 0; typeIdx < typesSize; ++typeIdx)
+ {
+ if (deStringEqual(m_properties[typeIdx]->getPropertyDesc().name, property.c_str()))
+ {
+ return true;
+ }
+ }
+
+ if (throwIfNotExists)
+ {
+ std::string msg("Property " + property + " is not supported");
+
+ TCU_THROW(NotSupportedError, msg);
+ }
+
+ return false;
+}
+
+bool DeviceProperties::isDevicePropertyInitialized (VkStructureType sType) const
+{
+ return findStructureInChain(&m_coreProperties2, sType) != DE_NULL;
+}
+
+DeviceProperties::~DeviceProperties (void)
+{
+ for (size_t i = 0; i < m_properties.size(); ++i)
+ delete m_properties[i];
+
+ m_properties.clear();
+}
+
+PropertyStruct* DeviceProperties::createPropertyStructWrapper (const std::string& s)
+{
+ for (size_t i = 0; i < DE_LENGTH_OF_ARRAY(propertyStructCreatorMap); ++i)
+ {
+ if (deStringEqual(propertyStructCreatorMap[i].name, s.c_str()))
+ return (*propertyStructCreatorMap[i].creator)();
+ }
+
+ return DE_NULL;
+}
+
+} // vk
+
diff --git a/external/vulkancts/framework/vulkan/vkDeviceProperties.hpp b/external/vulkancts/framework/vulkan/vkDeviceProperties.hpp
new file mode 100644
index 0000000..8254587
--- /dev/null
+++ b/external/vulkancts/framework/vulkan/vkDeviceProperties.hpp
@@ -0,0 +1,178 @@
+#ifndef _VKDEVICEPROPERTIES_HPP
+#define _VKDEVICEPROPERTIES_HPP
+/*-------------------------------------------------------------------------
+ * Vulkan CTS Framework
+ * --------------------
+ *
+ * Copyright (c) 2019 The Khronos Group Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *//*!
+ * \file
+ * \brief Vulkan DeviceProperties class utility.
+ *//*--------------------------------------------------------------------*/
+
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "deMemory.h"
+#include "vkDefs.hpp"
+
+namespace vk
+{
+
+struct PropertyDesc
+{
+ PropertyDesc (VkStructureType sType_, const char* name_, deUint32 specVersion_, deUint32 typeId_)
+ : name (name_)
+ , sType (sType_)
+ , specVersion (specVersion_)
+ , typeId (typeId_)
+ {}
+
+ const char* name;
+ VkStructureType sType;
+ const deUint32 specVersion;
+ const deUint32 typeId;
+};
+
+struct PropertyStruct
+{
+ virtual deUint32 getPropertyTypeId (void) const = 0;
+ virtual PropertyDesc getPropertyDesc (void) const = 0;
+ virtual void** getPropertyTypeNext (void) = 0;
+ virtual void* getPropertyTypeRaw (void) = 0;
+ virtual ~PropertyStruct (void) {}
+};
+
+
+struct PropertyStructMapItem
+{
+ PropertyStruct* (*creator)(void);
+ const char* name;
+ deUint32 specVersion;
+};
+
+template<class PropertyType> struct PropertyStructWrapper;
+template<class PropertyType> PropertyDesc makePropertyDesc (void);
+
+template<class PropertyType>
+PropertyStruct* createPropertyStructWrapper (void)
+{
+ return new PropertyStructWrapper<PropertyType>(makePropertyDesc<PropertyType>());
+}
+
+class DeviceProperties
+{
+public:
+ DeviceProperties (const InstanceInterface& vki,
+ const deUint32 apiVersion,
+ const VkPhysicalDevice physicalDevice,
+ const std::vector<std::string>& instanceExtensions,
+ const std::vector<std::string>& deviceExtensions);
+
+ ~DeviceProperties (void);
+
+ template<class PropertyType>
+ bool getPropertyType (PropertyType& propertyType) const
+ {
+ typedef PropertyStructWrapper<PropertyType> *PropertyWrapperPtr;
+
+ const VkStructureType sType = makePropertyDesc<PropertyType>().sType;
+ const size_t propCount = m_properties.size();
+
+ for (size_t propIdx = 0; propIdx < propCount; ++propIdx)
+ {
+ if (sType == m_properties[propIdx]->getPropertyDesc().sType)
+ {
+ propertyType = static_cast<PropertyWrapperPtr>(m_properties[propIdx])->getPropertyTypeRef();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ template<class PropertyType>
+ const PropertyType& getPropertyType (void) const
+ {
+ typedef PropertyStructWrapper<PropertyType> *PropertyWrapperPtr;
+
+ const PropertyDesc propDesc = makePropertyDesc<PropertyType>();
+ const VkStructureType sType = propDesc.sType;
+ const size_t propCount = m_properties.size();
+
+ for (size_t propIdx = 0; propIdx < propCount; ++propIdx)
+ {
+ if (sType == m_properties[propIdx]->getPropertyDesc().sType)
+ return static_cast<PropertyWrapperPtr>(m_properties[propIdx])->getPropertyTypeRef();
+ }
+
+ const deUint32 propertyId = propDesc.typeId;
+
+ for (size_t propIdx = 0; propIdx < propCount; ++propIdx)
+ {
+ if (propertyId == m_properties[propIdx]->getPropertyTypeId())
+ return static_cast<PropertyWrapperPtr>(m_properties[propIdx])->getPropertyTypeRef();
+ }
+
+ PropertyStruct* p = vk::createPropertyStructWrapper<PropertyType>();
+ m_properties.push_back(p);
+
+ return static_cast<PropertyWrapperPtr>(p)->getPropertyTypeRef();
+ }
+
+ const VkPhysicalDeviceProperties2& getCoreProperties2 (void) const { return m_coreProperties2; }
+
+ bool contains (const std::string& property, bool throwIfNotExists = false) const;
+
+ bool isDevicePropertyInitialized (VkStructureType sType) const;
+
+private:
+ static PropertyStruct* createPropertyStructWrapper (const std::string& s);
+
+ VkPhysicalDeviceProperties2 m_coreProperties2;
+ mutable std::vector<PropertyStruct*> m_properties;
+};
+
+template<class PropertyType>
+struct PropertyStructWrapper : PropertyStruct
+{
+ const PropertyDesc m_propertyDesc;
+ PropertyType m_propertyType;
+
+ PropertyStructWrapper (void)
+ : m_propertyDesc (VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, DE_NULL, ~0u, 0u)
+ {
+ deMemset(&m_propertyType, 0, sizeof(m_propertyType));
+ }
+
+ PropertyStructWrapper (const PropertyDesc& propertyDesc)
+ : m_propertyDesc (propertyDesc)
+ {
+ deMemset(&m_propertyType, 0, sizeof(m_propertyType));
+ m_propertyType.sType = propertyDesc.sType;
+ }
+
+ deUint32 getPropertyTypeId (void) const { return m_propertyDesc.typeId; }
+ PropertyDesc getPropertyDesc (void) const { return m_propertyDesc; }
+ void** getPropertyTypeNext (void) { return &m_propertyType.pNext; }
+ void* getPropertyTypeRaw (void) { return &m_propertyType; }
+ PropertyType& getPropertyTypeRef (void) { return m_propertyType; }
+};
+
+} // vk
+
+#endif // _VKDEVICEPROPERTIES_HPP
diff --git a/external/vulkancts/framework/vulkan/vkDeviceProperties.inl b/external/vulkancts/framework/vulkan/vkDeviceProperties.inl
new file mode 100644
index 0000000..fdc05dc
--- /dev/null
+++ b/external/vulkancts/framework/vulkan/vkDeviceProperties.inl
@@ -0,0 +1,118 @@
+/* WARNING: This is auto-generated file. Do not modify, since changes will
+ * be lost! Modify the generating script instead.
+ */
+#include "vkDeviceProperties.hpp"
+
+namespace vk
+{
+#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced"
+#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization"
+#define VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME "VK_NV_cooperative_matrix"
+#define VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME "VK_KHR_depth_stencil_resolve"
+#define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing"
+#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles"
+#define DECL_DRIVER_EXTENSION_NAME "not_existent_property"
+#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host"
+#define VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME "VK_KHR_shader_float_controls"
+#define VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME "VK_EXT_fragment_density_map"
+#define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group"
+#define VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME "VK_EXT_inline_uniform_block"
+#define VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME "VK_EXT_line_rasterization"
+#define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3"
+#define DECL_2_MEMORY_EXTENSION_NAME "not_existent_property"
+#define VK_EXT_MEMORY_BUDGET_EXTENSION_NAME "VK_EXT_memory_budget"
+#define VK_NV_MESH_SHADER_EXTENSION_NAME "VK_NV_mesh_shader"
+#define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview"
+#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes"
+#define VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME "VK_KHR_performance_query"
+#define DECL_POINT_CLIPPING_EXTENSION_NAME "not_existent_property"
+#define DECL_PROTECTED_MEMORY_EXTENSION_NAME "not_existent_property"
+#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor"
+#define VK_NV_RAY_TRACING_EXTENSION_NAME "VK_NV_ray_tracing"
+#define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax"
+#define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations"
+#define DECL_AMD_SHADER_CORE_EXTENSION_NAME "not_existent_property"
+#define VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME "VK_NV_shading_rate_image"
+#define DECL_SUBGROUP_EXTENSION_NAME "not_existent_property"
+#define VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME "VK_EXT_subgroup_size_control"
+#define VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME "VK_EXT_texel_buffer_alignment"
+#define VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME "VK_KHR_timeline_semaphore"
+#define VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME "VK_EXT_transform_feedback"
+#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor"
+
+
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT, VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME, VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION, 34); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceConservativeRasterizationPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME, VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION, 33); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceCooperativeMatrixPropertiesNV>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_NV, VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME, VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION, 32); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceDepthStencilResolveProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES, VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME, VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION, 31); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceDescriptorIndexingProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES, VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION, 30); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceDiscardRectanglePropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT, VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME, VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION, 29); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceDriverProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, DECL_DRIVER_EXTENSION_NAME, 0, 28); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceExternalMemoryHostPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT, VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME, VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION, 27); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceFloatControlsProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME, VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION, 26); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceFragmentDensityMapPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT, VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME, VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION, 25); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceGroupProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, VK_KHR_DEVICE_GROUP_EXTENSION_NAME, VK_KHR_DEVICE_GROUP_SPEC_VERSION, 24); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceInlineUniformBlockPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT, VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME, VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION, 23); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceLineRasterizationPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT, VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME, VK_EXT_LINE_RASTERIZATION_SPEC_VERSION, 22); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceMaintenance3Properties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, VK_KHR_MAINTENANCE3_EXTENSION_NAME, VK_KHR_MAINTENANCE3_SPEC_VERSION, 21); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceMemoryProperties2>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, DECL_2_MEMORY_EXTENSION_NAME, 0, 20); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceMemoryBudgetPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT, VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, VK_EXT_MEMORY_BUDGET_SPEC_VERSION, 19); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceMeshShaderPropertiesNV>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV, VK_NV_MESH_SHADER_EXTENSION_NAME, VK_NV_MESH_SHADER_SPEC_VERSION, 18); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceMultiviewProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, VK_KHR_MULTIVIEW_EXTENSION_NAME, VK_KHR_MULTIVIEW_SPEC_VERSION, 17); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX, VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME, VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION, 16); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDevicePerformanceQueryPropertiesKHR>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR, VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME, VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION, 15); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDevicePointClippingProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, DECL_POINT_CLIPPING_EXTENSION_NAME, 0, 14); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceProtectedMemoryProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES, DECL_PROTECTED_MEMORY_EXTENSION_NAME, 0, 13); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDevicePushDescriptorPropertiesKHR>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION, 12); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceRayTracingPropertiesNV>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV, VK_NV_RAY_TRACING_EXTENSION_NAME, VK_NV_RAY_TRACING_SPEC_VERSION, 11); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceSamplerFilterMinmaxProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES, VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME, VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION, 10); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceSampleLocationsPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION, 9); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceShaderCorePropertiesAMD>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD, DECL_AMD_SHADER_CORE_EXTENSION_NAME, 0, 8); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceShadingRateImagePropertiesNV>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV, VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME, VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION, 7); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceSubgroupProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, DECL_SUBGROUP_EXTENSION_NAME, 0, 6); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceSubgroupSizeControlPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT, VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME, VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION, 5); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT, VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME, VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION, 4); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceTimelineSemaphoreProperties>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES, VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME, VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION, 3); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceTransformFeedbackPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION, 2); }
+template<> PropertyDesc makePropertyDesc<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT>(void) { return PropertyDesc(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION, 1); }
+
+
+static const PropertyStructMapItem propertyStructCreatorMap[] =
+{
+ { createPropertyStructWrapper<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT>, VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME, VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceConservativeRasterizationPropertiesEXT>, VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME, VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceCooperativeMatrixPropertiesNV>, VK_NV_COOPERATIVE_MATRIX_EXTENSION_NAME, VK_NV_COOPERATIVE_MATRIX_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceDepthStencilResolveProperties>, VK_KHR_DEPTH_STENCIL_RESOLVE_EXTENSION_NAME, VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceDescriptorIndexingProperties>, VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceDiscardRectanglePropertiesEXT>, VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME, VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceDriverProperties>, DECL_DRIVER_EXTENSION_NAME, 0 },
+ { createPropertyStructWrapper<VkPhysicalDeviceExternalMemoryHostPropertiesEXT>, VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME, VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceFloatControlsProperties>, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME, VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceFragmentDensityMapPropertiesEXT>, VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME, VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceGroupProperties>, VK_KHR_DEVICE_GROUP_EXTENSION_NAME, VK_KHR_DEVICE_GROUP_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceInlineUniformBlockPropertiesEXT>, VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME, VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceLineRasterizationPropertiesEXT>, VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME, VK_EXT_LINE_RASTERIZATION_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceMaintenance3Properties>, VK_KHR_MAINTENANCE3_EXTENSION_NAME, VK_KHR_MAINTENANCE3_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceMemoryProperties2>, DECL_2_MEMORY_EXTENSION_NAME, 0 },
+ { createPropertyStructWrapper<VkPhysicalDeviceMemoryBudgetPropertiesEXT>, VK_EXT_MEMORY_BUDGET_EXTENSION_NAME, VK_EXT_MEMORY_BUDGET_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceMeshShaderPropertiesNV>, VK_NV_MESH_SHADER_EXTENSION_NAME, VK_NV_MESH_SHADER_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceMultiviewProperties>, VK_KHR_MULTIVIEW_EXTENSION_NAME, VK_KHR_MULTIVIEW_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX>, VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME, VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDevicePerformanceQueryPropertiesKHR>, VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME, VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDevicePointClippingProperties>, DECL_POINT_CLIPPING_EXTENSION_NAME, 0 },
+ { createPropertyStructWrapper<VkPhysicalDeviceProtectedMemoryProperties>, DECL_PROTECTED_MEMORY_EXTENSION_NAME, 0 },
+ { createPropertyStructWrapper<VkPhysicalDevicePushDescriptorPropertiesKHR>, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME, VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceRayTracingPropertiesNV>, VK_NV_RAY_TRACING_EXTENSION_NAME, VK_NV_RAY_TRACING_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceSamplerFilterMinmaxProperties>, VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME, VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceSampleLocationsPropertiesEXT>, VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME, VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceShaderCorePropertiesAMD>, DECL_AMD_SHADER_CORE_EXTENSION_NAME, 0 },
+ { createPropertyStructWrapper<VkPhysicalDeviceShadingRateImagePropertiesNV>, VK_NV_SHADING_RATE_IMAGE_EXTENSION_NAME, VK_NV_SHADING_RATE_IMAGE_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceSubgroupProperties>, DECL_SUBGROUP_EXTENSION_NAME, 0 },
+ { createPropertyStructWrapper<VkPhysicalDeviceSubgroupSizeControlPropertiesEXT>, VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME, VK_EXT_SUBGROUP_SIZE_CONTROL_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT>, VK_EXT_TEXEL_BUFFER_ALIGNMENT_EXTENSION_NAME, VK_EXT_TEXEL_BUFFER_ALIGNMENT_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceTimelineSemaphoreProperties>, VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME, VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceTransformFeedbackPropertiesEXT>, VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION },
+ { createPropertyStructWrapper<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT>, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION },
+};
+} // vk
+
diff --git a/external/vulkancts/framework/vulkan/vkDevicePropertiesForContextDecl.inl b/external/vulkancts/framework/vulkan/vkDevicePropertiesForContextDecl.inl
new file mode 100644
index 0000000..fba5421
--- /dev/null
+++ b/external/vulkancts/framework/vulkan/vkDevicePropertiesForContextDecl.inl
@@ -0,0 +1,37 @@
+/* WARNING: This is auto-generated file. Do not modify, since changes will
+ * be lost! Modify the generating script instead.
+ */
+const vk::VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT& getBlendOperationAdvancedPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceConservativeRasterizationPropertiesEXT& getConservativeRasterizationPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceCooperativeMatrixPropertiesNV& getCooperativeMatrixProperties (void) const;
+const vk::VkPhysicalDeviceDepthStencilResolveProperties& getDepthStencilResolveProperties (void) const;
+const vk::VkPhysicalDeviceDescriptorIndexingProperties& getDescriptorIndexingProperties (void) const;
+const vk::VkPhysicalDeviceDiscardRectanglePropertiesEXT& getDiscardRectanglePropertiesEXT (void) const;
+const vk::VkPhysicalDeviceDriverProperties& getDriverProperties (void) const;
+const vk::VkPhysicalDeviceExternalMemoryHostPropertiesEXT& getExternalMemoryHostPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceFloatControlsProperties& getFloatControlsProperties (void) const;
+const vk::VkPhysicalDeviceFragmentDensityMapPropertiesEXT& getFragmentDensityMapPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceGroupProperties& getGroupProperties (void) const;
+const vk::VkPhysicalDeviceInlineUniformBlockPropertiesEXT& getInlineUniformBlockPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceLineRasterizationPropertiesEXT& getLineRasterizationPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceMaintenance3Properties& getMaintenance3Properties (void) const;
+const vk::VkPhysicalDeviceMemoryProperties2& getMemoryProperties2 (void) const;
+const vk::VkPhysicalDeviceMemoryBudgetPropertiesEXT& getMemoryBudgetPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceMeshShaderPropertiesNV& getMeshShaderProperties (void) const;
+const vk::VkPhysicalDeviceMultiviewProperties& getMultiviewProperties (void) const;
+const vk::VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX& getMultiviewPerViewAttributesPropertiesX (void) const;
+const vk::VkPhysicalDevicePerformanceQueryPropertiesKHR& getPerformanceQueryProperties (void) const;
+const vk::VkPhysicalDevicePointClippingProperties& getPointClippingProperties (void) const;
+const vk::VkPhysicalDeviceProtectedMemoryProperties& getProtectedMemoryProperties (void) const;
+const vk::VkPhysicalDevicePushDescriptorPropertiesKHR& getPushDescriptorProperties (void) const;
+const vk::VkPhysicalDeviceRayTracingPropertiesNV& getRayTracingProperties (void) const;
+const vk::VkPhysicalDeviceSamplerFilterMinmaxProperties& getSamplerFilterMinmaxProperties (void) const;
+const vk::VkPhysicalDeviceSampleLocationsPropertiesEXT& getSampleLocationsPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceShaderCorePropertiesAMD& getShaderCorePropertiesAMD (void) const;
+const vk::VkPhysicalDeviceShadingRateImagePropertiesNV& getShadingRateImageProperties (void) const;
+const vk::VkPhysicalDeviceSubgroupProperties& getSubgroupProperties (void) const;
+const vk::VkPhysicalDeviceSubgroupSizeControlPropertiesEXT& getSubgroupSizeControlPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT& getTexelBufferAlignmentPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceTimelineSemaphoreProperties& getTimelineSemaphoreProperties (void) const;
+const vk::VkPhysicalDeviceTransformFeedbackPropertiesEXT& getTransformFeedbackPropertiesEXT (void) const;
+const vk::VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT& getVertexAttributeDivisorPropertiesEXT (void) const;
diff --git a/external/vulkancts/framework/vulkan/vkDevicePropertiesForContextDefs.inl b/external/vulkancts/framework/vulkan/vkDevicePropertiesForContextDefs.inl
new file mode 100644
index 0000000..53d6fe1
--- /dev/null
+++ b/external/vulkancts/framework/vulkan/vkDevicePropertiesForContextDefs.inl
@@ -0,0 +1,37 @@
+/* WARNING: This is auto-generated file. Do not modify, since changes will
+ * be lost! Modify the generating script instead.
+ */
+const vk::VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT& Context::getBlendOperationAdvancedPropertiesEXT (void) const { return m_device->getBlendOperationAdvancedPropertiesEXT(); }
+const vk::VkPhysicalDeviceConservativeRasterizationPropertiesEXT& Context::getConservativeRasterizationPropertiesEXT (void) const { return m_device->getConservativeRasterizationPropertiesEXT(); }
+const vk::VkPhysicalDeviceCooperativeMatrixPropertiesNV& Context::getCooperativeMatrixProperties (void) const { return m_device->getCooperativeMatrixProperties(); }
+const vk::VkPhysicalDeviceDepthStencilResolveProperties& Context::getDepthStencilResolveProperties (void) const { return m_device->getDepthStencilResolveProperties(); }
+const vk::VkPhysicalDeviceDescriptorIndexingProperties& Context::getDescriptorIndexingProperties (void) const { return m_device->getDescriptorIndexingProperties(); }
+const vk::VkPhysicalDeviceDiscardRectanglePropertiesEXT& Context::getDiscardRectanglePropertiesEXT (void) const { return m_device->getDiscardRectanglePropertiesEXT(); }
+const vk::VkPhysicalDeviceDriverProperties& Context::getDriverProperties (void) const { return m_device->getDriverProperties(); }
+const vk::VkPhysicalDeviceExternalMemoryHostPropertiesEXT& Context::getExternalMemoryHostPropertiesEXT (void) const { return m_device->getExternalMemoryHostPropertiesEXT(); }
+const vk::VkPhysicalDeviceFloatControlsProperties& Context::getFloatControlsProperties (void) const { return m_device->getFloatControlsProperties(); }
+const vk::VkPhysicalDeviceFragmentDensityMapPropertiesEXT& Context::getFragmentDensityMapPropertiesEXT (void) const { return m_device->getFragmentDensityMapPropertiesEXT(); }
+const vk::VkPhysicalDeviceGroupProperties& Context::getGroupProperties (void) const { return m_device->getGroupProperties(); }
+const vk::VkPhysicalDeviceInlineUniformBlockPropertiesEXT& Context::getInlineUniformBlockPropertiesEXT (void) const { return m_device->getInlineUniformBlockPropertiesEXT(); }
+const vk::VkPhysicalDeviceLineRasterizationPropertiesEXT& Context::getLineRasterizationPropertiesEXT (void) const { return m_device->getLineRasterizationPropertiesEXT(); }
+const vk::VkPhysicalDeviceMaintenance3Properties& Context::getMaintenance3Properties (void) const { return m_device->getMaintenance3Properties(); }
+const vk::VkPhysicalDeviceMemoryProperties2& Context::getMemoryProperties2 (void) const { return m_device->getMemoryProperties2(); }
+const vk::VkPhysicalDeviceMemoryBudgetPropertiesEXT& Context::getMemoryBudgetPropertiesEXT (void) const { return m_device->getMemoryBudgetPropertiesEXT(); }
+const vk::VkPhysicalDeviceMeshShaderPropertiesNV& Context::getMeshShaderProperties (void) const { return m_device->getMeshShaderProperties(); }
+const vk::VkPhysicalDeviceMultiviewProperties& Context::getMultiviewProperties (void) const { return m_device->getMultiviewProperties(); }
+const vk::VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX& Context::getMultiviewPerViewAttributesPropertiesX (void) const { return m_device->getMultiviewPerViewAttributesPropertiesX(); }
+const vk::VkPhysicalDevicePerformanceQueryPropertiesKHR& Context::getPerformanceQueryProperties (void) const { return m_device->getPerformanceQueryProperties(); }
+const vk::VkPhysicalDevicePointClippingProperties& Context::getPointClippingProperties (void) const { return m_device->getPointClippingProperties(); }
+const vk::VkPhysicalDeviceProtectedMemoryProperties& Context::getProtectedMemoryProperties (void) const { return m_device->getProtectedMemoryProperties(); }
+const vk::VkPhysicalDevicePushDescriptorPropertiesKHR& Context::getPushDescriptorProperties (void) const { return m_device->getPushDescriptorProperties(); }
+const vk::VkPhysicalDeviceRayTracingPropertiesNV& Context::getRayTracingProperties (void) const { return m_device->getRayTracingProperties(); }
+const vk::VkPhysicalDeviceSamplerFilterMinmaxProperties& Context::getSamplerFilterMinmaxProperties (void) const { return m_device->getSamplerFilterMinmaxProperties(); }
+const vk::VkPhysicalDeviceSampleLocationsPropertiesEXT& Context::getSampleLocationsPropertiesEXT (void) const { return m_device->getSampleLocationsPropertiesEXT(); }
+const vk::VkPhysicalDeviceShaderCorePropertiesAMD& Context::getShaderCorePropertiesAMD (void) const { return m_device->getShaderCorePropertiesAMD(); }
+const vk::VkPhysicalDeviceShadingRateImagePropertiesNV& Context::getShadingRateImageProperties (void) const { return m_device->getShadingRateImageProperties(); }
+const vk::VkPhysicalDeviceSubgroupProperties& Context::getSubgroupProperties (void) const { return m_device->getSubgroupProperties(); }
+const vk::VkPhysicalDeviceSubgroupSizeControlPropertiesEXT& Context::getSubgroupSizeControlPropertiesEXT (void) const { return m_device->getSubgroupSizeControlPropertiesEXT(); }
+const vk::VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT& Context::getTexelBufferAlignmentPropertiesEXT (void) const { return m_device->getTexelBufferAlignmentPropertiesEXT(); }
+const vk::VkPhysicalDeviceTimelineSemaphoreProperties& Context::getTimelineSemaphoreProperties (void) const { return m_device->getTimelineSemaphoreProperties(); }
+const vk::VkPhysicalDeviceTransformFeedbackPropertiesEXT& Context::getTransformFeedbackPropertiesEXT (void) const { return m_device->getTransformFeedbackPropertiesEXT(); }
+const vk::VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT& Context::getVertexAttributeDivisorPropertiesEXT (void) const { return m_device->getVertexAttributeDivisorPropertiesEXT(); }
diff --git a/external/vulkancts/framework/vulkan/vkDevicePropertiesForDefaultDeviceDefs.inl b/external/vulkancts/framework/vulkan/vkDevicePropertiesForDefaultDeviceDefs.inl
new file mode 100644
index 0000000..1bf6fe8
--- /dev/null
+++ b/external/vulkancts/framework/vulkan/vkDevicePropertiesForDefaultDeviceDefs.inl
@@ -0,0 +1,37 @@
+/* WARNING: This is auto-generated file. Do not modify, since changes will
+ * be lost! Modify the generating script instead.
+ */
+const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT& getBlendOperationAdvancedPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT>(); }
+const VkPhysicalDeviceConservativeRasterizationPropertiesEXT& getConservativeRasterizationPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceConservativeRasterizationPropertiesEXT>(); }
+const VkPhysicalDeviceCooperativeMatrixPropertiesNV& getCooperativeMatrixProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceCooperativeMatrixPropertiesNV>(); }
+const VkPhysicalDeviceDepthStencilResolveProperties& getDepthStencilResolveProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceDepthStencilResolveProperties>(); }
+const VkPhysicalDeviceDescriptorIndexingProperties& getDescriptorIndexingProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceDescriptorIndexingProperties>(); }
+const VkPhysicalDeviceDiscardRectanglePropertiesEXT& getDiscardRectanglePropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceDiscardRectanglePropertiesEXT>(); }
+const VkPhysicalDeviceDriverProperties& getDriverProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceDriverProperties>(); }
+const VkPhysicalDeviceExternalMemoryHostPropertiesEXT& getExternalMemoryHostPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceExternalMemoryHostPropertiesEXT>(); }
+const VkPhysicalDeviceFloatControlsProperties& getFloatControlsProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceFloatControlsProperties>(); }
+const VkPhysicalDeviceFragmentDensityMapPropertiesEXT& getFragmentDensityMapPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceFragmentDensityMapPropertiesEXT>(); }
+const VkPhysicalDeviceGroupProperties& getGroupProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceGroupProperties>(); }
+const VkPhysicalDeviceInlineUniformBlockPropertiesEXT& getInlineUniformBlockPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceInlineUniformBlockPropertiesEXT>(); }
+const VkPhysicalDeviceLineRasterizationPropertiesEXT& getLineRasterizationPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceLineRasterizationPropertiesEXT>(); }
+const VkPhysicalDeviceMaintenance3Properties& getMaintenance3Properties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceMaintenance3Properties>(); }
+const VkPhysicalDeviceMemoryProperties2& getMemoryProperties2 (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceMemoryProperties2>(); }
+const VkPhysicalDeviceMemoryBudgetPropertiesEXT& getMemoryBudgetPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceMemoryBudgetPropertiesEXT>(); }
+const VkPhysicalDeviceMeshShaderPropertiesNV& getMeshShaderProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceMeshShaderPropertiesNV>(); }
+const VkPhysicalDeviceMultiviewProperties& getMultiviewProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceMultiviewProperties>(); }
+const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX& getMultiviewPerViewAttributesPropertiesX (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX>(); }
+const VkPhysicalDevicePerformanceQueryPropertiesKHR& getPerformanceQueryProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDevicePerformanceQueryPropertiesKHR>(); }
+const VkPhysicalDevicePointClippingProperties& getPointClippingProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDevicePointClippingProperties>(); }
+const VkPhysicalDeviceProtectedMemoryProperties& getProtectedMemoryProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceProtectedMemoryProperties>(); }
+const VkPhysicalDevicePushDescriptorPropertiesKHR& getPushDescriptorProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDevicePushDescriptorPropertiesKHR>(); }
+const VkPhysicalDeviceRayTracingPropertiesNV& getRayTracingProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceRayTracingPropertiesNV>(); }
+const VkPhysicalDeviceSamplerFilterMinmaxProperties& getSamplerFilterMinmaxProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceSamplerFilterMinmaxProperties>(); }
+const VkPhysicalDeviceSampleLocationsPropertiesEXT& getSampleLocationsPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceSampleLocationsPropertiesEXT>(); }
+const VkPhysicalDeviceShaderCorePropertiesAMD& getShaderCorePropertiesAMD (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceShaderCorePropertiesAMD>(); }
+const VkPhysicalDeviceShadingRateImagePropertiesNV& getShadingRateImageProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceShadingRateImagePropertiesNV>(); }
+const VkPhysicalDeviceSubgroupProperties& getSubgroupProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceSubgroupProperties>(); }
+const VkPhysicalDeviceSubgroupSizeControlPropertiesEXT& getSubgroupSizeControlPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceSubgroupSizeControlPropertiesEXT>(); }
+const VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT& getTexelBufferAlignmentPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT>(); }
+const VkPhysicalDeviceTimelineSemaphoreProperties& getTimelineSemaphoreProperties (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceTimelineSemaphoreProperties>(); }
+const VkPhysicalDeviceTransformFeedbackPropertiesEXT& getTransformFeedbackPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceTransformFeedbackPropertiesEXT>(); }
+const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT& getVertexAttributeDivisorPropertiesEXT (void) const { return m_devicePropertiesFull.getPropertyType<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT>(); }
diff --git a/external/vulkancts/modules/vulkan/vktTestCase.cpp b/external/vulkancts/modules/vulkan/vktTestCase.cpp
index 4de69f2..259f940 100644
--- a/external/vulkancts/modules/vulkan/vktTestCase.cpp
+++ b/external/vulkancts/modules/vulkan/vktTestCase.cpp
@@ -31,6 +31,7 @@
#include "vkPlatform.hpp"
#include "vkDebugReportUtil.hpp"
#include "vkDeviceFeatures.hpp"
+#include "vkDeviceProperties.hpp"
#include "tcuCommandLine.hpp"
#include "tcuTestLog.hpp"
@@ -318,25 +319,29 @@
VkPhysicalDevice getPhysicalDevice (void) const { return m_physicalDevice; }
deUint32 getDeviceVersion (void) const { return m_deviceVersion; }
+
+ bool isDeviceFeatureInitialized (VkStructureType sType) const { return m_deviceFeatures.isDeviceFeatureInitialized(sType); }
const VkPhysicalDeviceFeatures& getDeviceFeatures (void) const { return m_deviceFeatures.getCoreFeatures2().features; }
const VkPhysicalDeviceFeatures2& getDeviceFeatures2 (void) const { return m_deviceFeatures.getCoreFeatures2(); }
#include "vkDeviceFeaturesForDefaultDeviceDefs.inl"
- VkDevice getDevice (void) const { return *m_device; }
- const DeviceInterface& getDeviceInterface (void) const { return m_deviceInterface; }
- const VkPhysicalDeviceProperties& getDeviceProperties (void) const { return m_deviceProperties; }
- const vector<string>& getDeviceExtensions (void) const { return m_deviceExtensions; }
+ bool isDevicePropertyInitialized (VkStructureType sType) const { return m_devicePropertiesFull.isDevicePropertyInitialized(sType); }
+ const VkPhysicalDeviceProperties& getDeviceProperties (void) const { return m_deviceProperties; }
+ const VkPhysicalDeviceProperties2& getDeviceProperties2 (void) const { return m_devicePropertiesFull.getCoreProperties2(); }
- deUint32 getUsedApiVersion (void) const { return m_usedApiVersion; }
+#include "vkDevicePropertiesForDefaultDeviceDefs.inl"
- deUint32 getUniversalQueueFamilyIndex (void) const { return m_universalQueueFamilyIndex; }
+ VkDevice getDevice (void) const { return *m_device; }
+ const DeviceInterface& getDeviceInterface (void) const { return m_deviceInterface; }
+ const vector<string>& getDeviceExtensions (void) const { return m_deviceExtensions; }
+ deUint32 getUsedApiVersion (void) const { return m_usedApiVersion; }
+ deUint32 getUniversalQueueFamilyIndex (void) const { return m_universalQueueFamilyIndex; }
VkQueue getUniversalQueue (void) const;
- deUint32 getSparseQueueFamilyIndex (void) const { return m_sparseQueueFamilyIndex; }
+ deUint32 getSparseQueueFamilyIndex (void) const { return m_sparseQueueFamilyIndex; }
VkQueue getSparseQueue (void) const;
private:
-
const deUint32 m_availableInstanceVersion;
const std::pair<deUint32, deUint32> m_deviceVersions;
@@ -355,10 +360,10 @@
const deUint32 m_universalQueueFamilyIndex;
const deUint32 m_sparseQueueFamilyIndex;
const VkPhysicalDeviceProperties m_deviceProperties;
+ const DeviceProperties m_devicePropertiesFull;
const Unique<VkDevice> m_device;
const DeviceDriver m_deviceInterface;
-
};
static deUint32 sanitizeApiVersion(deUint32 v)
@@ -383,6 +388,7 @@
, m_universalQueueFamilyIndex (findQueueFamilyIndexWithCaps(m_instanceInterface, m_physicalDevice, VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT))
, m_sparseQueueFamilyIndex (m_deviceFeatures.getCoreFeatures2().features.sparseBinding ? findQueueFamilyIndexWithCaps(m_instanceInterface, m_physicalDevice, VK_QUEUE_SPARSE_BINDING_BIT) : 0)
, m_deviceProperties (getPhysicalDeviceProperties(m_instanceInterface, m_physicalDevice))
+ , m_devicePropertiesFull (m_instanceInterface, m_usedApiVersion, m_physicalDevice, m_instanceExtensions, m_deviceExtensions)
, m_device (createDefaultDevice(vkPlatform, *m_instance, m_instanceInterface, m_physicalDevice, m_usedApiVersion, m_universalQueueFamilyIndex, m_sparseQueueFamilyIndex, m_deviceFeatures.getCoreFeatures2(), m_deviceExtensions, cmdLine))
, m_deviceInterface (vkPlatform, *m_instance, *m_device)
{
@@ -449,6 +455,10 @@
#include "vkDeviceFeaturesForContextDefs.inl"
const vk::VkPhysicalDeviceProperties& Context::getDeviceProperties (void) const { return m_device->getDeviceProperties(); }
+const vk::VkPhysicalDeviceProperties2& Context::getDeviceProperties2 (void) const { return m_device->getDeviceProperties2(); }
+
+#include "vkDevicePropertiesForContextDefs.inl"
+
const vector<string>& Context::getDeviceExtensions (void) const { return m_device->getDeviceExtensions(); }
vk::VkDevice Context::getDevice (void) const { return m_device->getDevice(); }
const vk::DeviceInterface& Context::getDeviceInterface (void) const { return m_device->getDeviceInterface(); }
@@ -464,6 +474,10 @@
{ return m_device->getUsedApiVersion() >= pack(version); }
bool Context::contextSupports (const deUint32 requiredApiVersionBits) const
{ return m_device->getUsedApiVersion() >= requiredApiVersionBits; }
+bool Context::isDeviceFeatureInitialized (vk::VkStructureType sType) const
+ { return m_device->isDeviceFeatureInitialized(sType); }
+bool Context::isDevicePropertyInitialized (vk::VkStructureType sType) const
+ { return m_device->isDevicePropertyInitialized(sType); }
bool Context::requireDeviceExtension (const std::string& required)
{
diff --git a/external/vulkancts/modules/vulkan/vktTestCase.hpp b/external/vulkancts/modules/vulkan/vktTestCase.hpp
index 37e532d..77745a2 100644
--- a/external/vulkancts/modules/vulkan/vktTestCase.hpp
+++ b/external/vulkancts/modules/vulkan/vktTestCase.hpp
@@ -73,12 +73,19 @@
const vk::InstanceInterface& getInstanceInterface (void) const;
vk::VkPhysicalDevice getPhysicalDevice (void) const;
deUint32 getDeviceVersion (void) const;
+
+ bool isDeviceFeatureInitialized (vk::VkStructureType sType) const;
const vk::VkPhysicalDeviceFeatures& getDeviceFeatures (void) const;
const vk::VkPhysicalDeviceFeatures2& getDeviceFeatures2 (void) const;
#include "vkDeviceFeaturesForContextDecl.inl"
+ bool isDevicePropertyInitialized (vk::VkStructureType sType) const;
const vk::VkPhysicalDeviceProperties& getDeviceProperties (void) const;
+ const vk::VkPhysicalDeviceProperties2& getDeviceProperties2 (void) const;
+
+#include "vkDevicePropertiesForContextDecl.inl"
+
const std::vector<std::string>& getDeviceExtensions (void) const;
vk::VkDevice getDevice (void) const;
const vk::DeviceInterface& getDeviceInterface (void) const;
diff --git a/external/vulkancts/scripts/gen_framework.py b/external/vulkancts/scripts/gen_framework.py
index 070c792..1f790bd 100644
--- a/external/vulkancts/scripts/gen_framework.py
+++ b/external/vulkancts/scripts/gen_framework.py
@@ -1555,6 +1555,36 @@
matchSpecVersion.group (1) if matchSpecVersion else '0') )
return defs
+def generateDevicePropertiesDefs(src):
+ # look for definitions
+ ptrnSType = r'VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_(\w+)_PROPERTIES(\w*)\s*='
+ matches = re.findall(ptrnSType, src, re.M)
+ matches = sorted(matches, key=lambda m: m[0])
+ # construct final list
+ defs = []
+ for sType, sSuffix in matches:
+ structName = re.sub("[_0-9][a-z]", lambda match: match.group(0).upper(), sType.capitalize()).replace('_', '')
+ ptrnStructName = r'\s*typedef\s+struct\s+(VkPhysicalDevice' + structName + 'Properties' + sSuffix[1:] + ')'
+ matchStructName = re.search(ptrnStructName, src, re.M)
+ if matchStructName:
+ if sType == 'VULKAN_1_1' or sType == 'VULKAN_1_2':
+ continue
+ extType = sType
+ if extType == "MAINTENANCE_3":
+ extType = "MAINTENANCE3"
+ elif extType == "DISCARD_RECTANGLE":
+ extType = "DISCARD_RECTANGLES"
+ # end handling special cases
+ ptrnExtensionName = r'^\s*#define\s+(\w+' + sSuffix + '_' + extType + '_EXTENSION_NAME).+$'
+ matchExtensionName = re.search(ptrnExtensionName, src, re.M)
+ ptrnSpecVersion = r'^\s*#define\s+(\w+' + sSuffix + '_' + extType + '_SPEC_VERSION).+$'
+ matchSpecVersion = re.search(ptrnSpecVersion, src, re.M)
+ defs.append( (sType, sSuffix, matchStructName.group(1), \
+ matchExtensionName.group(0) if matchExtensionName else None,
+ matchExtensionName.group(1) if matchExtensionName else None,
+ matchSpecVersion.group (1) if matchSpecVersion else '0') )
+ return defs
+
def writeDeviceFeatures(dfDefs, filename):
extensionDefines = []
makeFeatureDescDefinitions = []
@@ -1591,6 +1621,38 @@
stream.append('};\n} // vk\n')
writeInlFile(filename, INL_HEADER, stream)
+def writeDeviceProperties(dfDefs, filename):
+ extensionDefines = []
+ makePropertyDescDefinitions = []
+ propertyStructWrappers = []
+ for idx, (sType, sSuffix, extStruct, extLine, extName, specVer) in enumerate(dfDefs):
+ extensionNameDefinition = extName
+ if not extensionNameDefinition:
+ extensionNameDefinition = 'DECL{0}_{1}_EXTENSION_NAME'.format((sSuffix if sSuffix else ''), sType)
+ # construct defines with names
+ if extLine:
+ extensionDefines.append(extLine)
+ else:
+ extensionDefines.append('#define {0} "not_existent_property"'.format(extensionNameDefinition))
+ # construct makePropertyDesc template function definitions
+ sTypeName = "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_{0}_PROPERTIES{1}".format(sType, sSuffix)
+ makePropertyDescDefinitions.append("template<> PropertyDesc makePropertyDesc<{0}>(void) " \
+ "{{ return PropertyDesc({1}, {2}, {3}, {4}); }}".format(extStruct, sTypeName, extensionNameDefinition, specVer, len(dfDefs)-idx))
+ # construct CreateProperty struct wrapper block
+ propertyStructWrappers.append("\t{{ createPropertyStructWrapper<{0}>, {1}, {2} }},".format(extStruct, extensionNameDefinition, specVer))
+ # combine all definition lists
+ stream = [
+ '#include "vkDeviceProperties.hpp"\n',
+ 'namespace vk\n{']
+ stream.extend(extensionDefines)
+ stream.append('\n')
+ stream.extend(makePropertyDescDefinitions)
+ stream.append('\n')
+ stream.append('static const PropertyStructMapItem propertyStructCreatorMap[] =\n{')
+ stream.extend(propertyStructWrappers)
+ stream.append('};\n} // vk\n')
+ writeInlFile(filename, INL_HEADER, stream)
+
def genericDeviceFeaturesWriter(dfDefs, pattern, filename):
stream = []
for sType, sSuffix, extStruct, _, _, _ in dfDefs:
@@ -1598,18 +1660,37 @@
stream.append(pattern.format(extStruct, nameSubStr))
writeInlFile(filename, INL_HEADER, indentLines(stream))
-def writeDefaultDeviceDefs(dfDefs, filename):
+def writeDeviceFeaturesDefaultDeviceDefs(dfDefs, filename):
pattern = "const {0}&\tget{1}\t(void) const {{ return m_deviceFeatures.getFeatureType<{0}>();\t}}"
genericDeviceFeaturesWriter(dfDefs, pattern, filename)
-def writeContextDecl(dfDefs, filename):
+def writeDeviceFeaturesContextDecl(dfDefs, filename):
pattern = "const vk::{0}&\tget{1}\t(void) const;"
genericDeviceFeaturesWriter(dfDefs, pattern, filename)
-def writeContextDefs(dfDefs, filename):
+def writeDeviceFeaturesContextDefs(dfDefs, filename):
pattern = "const vk::{0}&\tContext::get{1}\t(void) const {{ return m_device->get{1}();\t}}"
genericDeviceFeaturesWriter(dfDefs, pattern, filename)
+def genericDevicePropertiesWriter(dfDefs, pattern, filename):
+ stream = []
+ for _, _, extStruct, _, _, _ in dfDefs:
+ nameSubStr = extStruct.replace("VkPhysicalDevice", "").replace("KHR", "").replace("NV", "")
+ stream.append(pattern.format(extStruct, nameSubStr))
+ writeInlFile(filename, INL_HEADER, indentLines(stream))
+
+def writeDevicePropertiesDefaultDeviceDefs(dfDefs, filename):
+ pattern = "const {0}&\tget{1}\t(void) const {{ return m_devicePropertiesFull.getPropertyType<{0}>();\t}}"
+ genericDevicePropertiesWriter(dfDefs, pattern, filename)
+
+def writeDevicePropertiesContextDecl(dfDefs, filename):
+ pattern = "const vk::{0}&\tget{1}\t(void) const;"
+ genericDevicePropertiesWriter(dfDefs, pattern, filename)
+
+def writeDevicePropertiesContextDefs(dfDefs, filename):
+ pattern = "const vk::{0}&\tContext::get{1}\t(void) const {{ return m_device->get{1}();\t}}"
+ genericDevicePropertiesWriter(dfDefs, pattern, filename)
+
def splitWithQuotation(line):
result = []
splitted = re.findall(r'[^"\s]\S*|".+?"', line)
@@ -1737,41 +1818,47 @@
instanceFuncs = [Function.TYPE_INSTANCE]
deviceFuncs = [Function.TYPE_DEVICE]
- dfd = generateDeviceFeaturesDefs(src)
- writeDeviceFeatures (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeatures.inl"))
- writeDefaultDeviceDefs (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeaturesForDefaultDeviceDefs.inl"))
- writeContextDecl (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeaturesForContextDecl.inl"))
- writeContextDefs (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeaturesForContextDefs.inl"))
+ dfd = generateDeviceFeaturesDefs(src)
+ writeDeviceFeatures (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeatures.inl"))
+ writeDeviceFeaturesDefaultDeviceDefs (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeaturesForDefaultDeviceDefs.inl"))
+ writeDeviceFeaturesContextDecl (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeaturesForContextDecl.inl"))
+ writeDeviceFeaturesContextDefs (dfd, os.path.join(VULKAN_DIR, "vkDeviceFeaturesForContextDefs.inl"))
- writeHandleType (api, os.path.join(VULKAN_DIR, "vkHandleType.inl"))
- writeBasicTypes (api, os.path.join(VULKAN_DIR, "vkBasicTypes.inl"))
- writeCompositeTypes (api, os.path.join(VULKAN_DIR, "vkStructTypes.inl"))
- writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkVirtualPlatformInterface.inl"), platformFuncs, False)
- writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkVirtualInstanceInterface.inl"), instanceFuncs, False)
- writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkVirtualDeviceInterface.inl"), deviceFuncs, False)
- writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkConcretePlatformInterface.inl"), platformFuncs, True)
- writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkConcreteInstanceInterface.inl"), instanceFuncs, True)
- writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkConcreteDeviceInterface.inl"), deviceFuncs, True)
- writeFunctionPtrTypes (api, os.path.join(VULKAN_DIR, "vkFunctionPointerTypes.inl"))
- writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkPlatformFunctionPointers.inl"), platformFuncs)
- writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInstanceFunctionPointers.inl"), instanceFuncs)
- writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkDeviceFunctionPointers.inl"), deviceFuncs)
- writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitPlatformFunctionPointers.inl"), platformFuncs, lambda f: f.name != "vkGetInstanceProcAddr")
- writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitInstanceFunctionPointers.inl"), instanceFuncs)
- writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitDeviceFunctionPointers.inl"), deviceFuncs)
- writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkPlatformDriverImpl.inl"), platformFuncs, "PlatformDriver")
- writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkInstanceDriverImpl.inl"), instanceFuncs, "InstanceDriver")
- writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkDeviceDriverImpl.inl"), deviceFuncs, "DeviceDriver")
- writeStrUtilProto (api, os.path.join(VULKAN_DIR, "vkStrUtil.inl"))
- writeStrUtilImpl (api, os.path.join(VULKAN_DIR, "vkStrUtilImpl.inl"))
- writeRefUtilProto (api, os.path.join(VULKAN_DIR, "vkRefUtil.inl"))
- writeRefUtilImpl (api, os.path.join(VULKAN_DIR, "vkRefUtilImpl.inl"))
- writeStructTraitsImpl (api, os.path.join(VULKAN_DIR, "vkGetStructureTypeImpl.inl"))
- writeNullDriverImpl (api, os.path.join(VULKAN_DIR, "vkNullDriverImpl.inl"))
- writeTypeUtil (api, os.path.join(VULKAN_DIR, "vkTypeUtil.inl"))
- writeSupportedExtenions (api, os.path.join(VULKAN_DIR, "vkSupportedExtensions.inl"))
- writeCoreFunctionalities (api, os.path.join(VULKAN_DIR, "vkCoreFunctionalities.inl"))
- writeExtensionFunctions (api, os.path.join(VULKAN_DIR, "vkExtensionFunctions.inl"))
- writeMandatoryFeatures ( os.path.join(VULKAN_DIR, "vkMandatoryFeatures.inl"))
- writeExtensionList ( os.path.join(VULKAN_DIR, "vkInstanceExtensions.inl"), 'INSTANCE')
- writeExtensionList ( os.path.join(VULKAN_DIR, "vkDeviceExtensions.inl"), 'DEVICE')
+ dpd = generateDevicePropertiesDefs(src)
+ writeDeviceProperties (dpd, os.path.join(VULKAN_DIR, "vkDeviceProperties.inl"))
+ writeDevicePropertiesDefaultDeviceDefs (dpd, os.path.join(VULKAN_DIR, "vkDevicePropertiesForDefaultDeviceDefs.inl"))
+ writeDevicePropertiesContextDecl (dpd, os.path.join(VULKAN_DIR, "vkDevicePropertiesForContextDecl.inl"))
+ writeDevicePropertiesContextDefs (dpd, os.path.join(VULKAN_DIR, "vkDevicePropertiesForContextDefs.inl"))
+
+ writeHandleType (api, os.path.join(VULKAN_DIR, "vkHandleType.inl"))
+ writeBasicTypes (api, os.path.join(VULKAN_DIR, "vkBasicTypes.inl"))
+ writeCompositeTypes (api, os.path.join(VULKAN_DIR, "vkStructTypes.inl"))
+ writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkVirtualPlatformInterface.inl"), platformFuncs, False)
+ writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkVirtualInstanceInterface.inl"), instanceFuncs, False)
+ writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkVirtualDeviceInterface.inl"), deviceFuncs, False)
+ writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkConcretePlatformInterface.inl"), platformFuncs, True)
+ writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkConcreteInstanceInterface.inl"), instanceFuncs, True)
+ writeInterfaceDecl (api, os.path.join(VULKAN_DIR, "vkConcreteDeviceInterface.inl"), deviceFuncs, True)
+ writeFunctionPtrTypes (api, os.path.join(VULKAN_DIR, "vkFunctionPointerTypes.inl"))
+ writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkPlatformFunctionPointers.inl"), platformFuncs)
+ writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInstanceFunctionPointers.inl"), instanceFuncs)
+ writeFunctionPointers (api, os.path.join(VULKAN_DIR, "vkDeviceFunctionPointers.inl"), deviceFuncs)
+ writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitPlatformFunctionPointers.inl"), platformFuncs, lambda f: f.name != "vkGetInstanceProcAddr")
+ writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitInstanceFunctionPointers.inl"), instanceFuncs)
+ writeInitFunctionPointers (api, os.path.join(VULKAN_DIR, "vkInitDeviceFunctionPointers.inl"), deviceFuncs)
+ writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkPlatformDriverImpl.inl"), platformFuncs, "PlatformDriver")
+ writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkInstanceDriverImpl.inl"), instanceFuncs, "InstanceDriver")
+ writeFuncPtrInterfaceImpl (api, os.path.join(VULKAN_DIR, "vkDeviceDriverImpl.inl"), deviceFuncs, "DeviceDriver")
+ writeStrUtilProto (api, os.path.join(VULKAN_DIR, "vkStrUtil.inl"))
+ writeStrUtilImpl (api, os.path.join(VULKAN_DIR, "vkStrUtilImpl.inl"))
+ writeRefUtilProto (api, os.path.join(VULKAN_DIR, "vkRefUtil.inl"))
+ writeRefUtilImpl (api, os.path.join(VULKAN_DIR, "vkRefUtilImpl.inl"))
+ writeStructTraitsImpl (api, os.path.join(VULKAN_DIR, "vkGetStructureTypeImpl.inl"))
+ writeNullDriverImpl (api, os.path.join(VULKAN_DIR, "vkNullDriverImpl.inl"))
+ writeTypeUtil (api, os.path.join(VULKAN_DIR, "vkTypeUtil.inl"))
+ writeSupportedExtenions (api, os.path.join(VULKAN_DIR, "vkSupportedExtensions.inl"))
+ writeCoreFunctionalities (api, os.path.join(VULKAN_DIR, "vkCoreFunctionalities.inl"))
+ writeExtensionFunctions (api, os.path.join(VULKAN_DIR, "vkExtensionFunctions.inl"))
+ writeMandatoryFeatures ( os.path.join(VULKAN_DIR, "vkMandatoryFeatures.inl"))
+ writeExtensionList ( os.path.join(VULKAN_DIR, "vkInstanceExtensions.inl"), 'INSTANCE')
+ writeExtensionList ( os.path.join(VULKAN_DIR, "vkDeviceExtensions.inl"), 'DEVICE')