#define VK_IMAGE_CREATE_ALIAS_BIT_KHR VK_IMAGE_CREATE_ALIAS_BIT
#define VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO
#define VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO
+ #define VK_KHR_MAINTENANCE3_SPEC_VERSION 1
#define VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT
#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES
+ #define VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION 1
+ #define VK_KHR_SHADER_FLOAT_CONTROLS_SPEC_VERSION 1
++#define VK_KHR_DEPTH_STENCIL_RESOLVE_SPEC_VERSION 1
+ #define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9
#define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
#define VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT
+ #define VK_NV_GLSL_SHADER_SPEC_VERSION 1
+ #define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1
+ #define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1
+ #define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
+ #define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1
+ #define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1
+ #define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4
+ #define VK_AMD_GCN_SHADER_SPEC_VERSION 1
+ #define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1
+ #define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
+ #define VK_KHR_DRAW_INDIRECT_COUNT_SPEC_VERSION 1
+ #define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1
+ #define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1
+ #define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1
+ #define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1
+ #define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1
+ #define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1
+ #define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1
+ #define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
+ #define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
+ #define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
+ #define VK_NN_VI_SURFACE_SPEC_VERSION 1
+ #define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1
+ #define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1
++#define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 1
+ #define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3
+ #define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1
+ #define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1
+ #define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
+ #define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1
#define VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT
+ #define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1
+ #define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1
+ #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1
+ #define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1
+ #define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1
+ #define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1
+ #define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1
+ #define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1
#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace"
+ #define VK_EXT_HDR_METADATA_SPEC_VERSION 1
+ #define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
+ #define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
+ #define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1
+ #define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1
+ #define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1
+ #define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1
+ #define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1
+ #define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1
+ #define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2
+ #define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1
+ #define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1
+ #define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1
+ #define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1
+ #define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1
+ #define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1
+ #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 2
++#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 3
+ #define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1
+ #define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2
+ #define VK_EXT_INLINE_UNIFORM_BLOCK_SPEC_VERSION 1
+ #define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1
+ #define VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION 2
+ #define VK_EXT_SCALAR_BLOCK_LAYOUT_SPEC_VERSION 1
variablePointerFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR;
descriptorIndexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT;
inlineUniformBlockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT;
+ float16Int8Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR;
+ vertexAttributeDivisorFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT;
+ descriptorIndexingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT;
+ inlineUniformBlockFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT;
vulkanMemoryModelFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR;
shaderAtomicInt64Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR;
+ conditionalRenderingFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT;
scalarBlockLayoutFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT;
- float16Int8Features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR;
+ vector<VkExtensionProperties> deviceExtensionProperties =
+ enumerateDeviceExtensionProperties(vki, physicalDevice, DE_NULL);
if (isPhysicalDeviceFeatures2Supported(apiVersion, instanceExtensions))
{
*nextPtr = &inlineUniformBlockFeatures;
nextPtr = &inlineUniformBlockFeatures.pNext;
}
+ if (de::contains(deviceExtensions.begin(), deviceExtensions.end(), "VK_KHR_shader_float16_int8"))
+ {
+ *nextPtr = &float16Int8Features;
+ nextPtr = &float16Int8Features.pNext;
+ }
+ if (de::contains(deviceExtensions.begin(), deviceExtensions.end(), "VK_EXT_vertex_attribute_divisor"))
+ {
+ *nextPtr = &vertexAttributeDivisorFeatures;
+ nextPtr = &vertexAttributeDivisorFeatures.pNext;
+ }
if (de::contains(deviceExtensions.begin(), deviceExtensions.end(), "VK_KHR_vulkan_memory_model"))
{
- *nextPtr = &vulkanMemoryModelFeatures;
- nextPtr = &vulkanMemoryModelFeatures.pNext;
+ for (size_t i = 0; i < deviceExtensionProperties.size(); ++i)
+ {
+ if (deStringEqual(deviceExtensionProperties[i].extensionName, "VK_KHR_vulkan_memory_model"))
+ {
+ if (deviceExtensionProperties[i].specVersion == VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION)
+ {
+ *nextPtr = &vulkanMemoryModelFeatures;
+ nextPtr = &vulkanMemoryModelFeatures.pNext;
+ }
+ break;
+ }
+ }
}
if (de::contains(deviceExtensions.begin(), deviceExtensions.end(), "VK_KHR_shader_atomic_int64"))
{