Skip to content

Commit

Permalink
Updated to Vulkan headers 1.3.278
Browse files Browse the repository at this point in the history
Adds support for:
- VK_EXT_legacy_vertex_attributes
- VK_MESA_image_alignment_control
  • Loading branch information
SaschaWillems committed May 20, 2024
1 parent 0079c2c commit ac72639
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
44 changes: 44 additions & 0 deletions VulkanDeviceInfoExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,15 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_EXT() {
pushProperty2(extension, "shaderBinaryVersion", QVariant(extProps->shaderBinaryVersion));
delete extProps;
}
if (extensionSupported("VK_EXT_legacy_vertex_attributes")) {
const char* extension("VK_EXT_legacy_vertex_attributes");
VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT* extProps = new VkPhysicalDeviceLegacyVertexAttributesPropertiesEXT{};
extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_PROPERTIES_EXT;
deviceProps2 = initDeviceProperties2(extProps);
vulkanContext.vkGetPhysicalDeviceProperties2KHR(device, &deviceProps2);
pushProperty2(extension, "nativeUnalignedPerformance", QVariant(bool(extProps->nativeUnalignedPerformance)));
delete extProps;
}
}
void VulkanDeviceInfoExtensions::readPhysicalProperties_HUAWEI() {
VkPhysicalDeviceProperties2 deviceProps2{};
Expand Down Expand Up @@ -951,6 +960,18 @@ void VulkanDeviceInfoExtensions::readPhysicalProperties_KHR() {
delete extProps;
}
}
void VulkanDeviceInfoExtensions::readPhysicalProperties_MESA() {
VkPhysicalDeviceProperties2 deviceProps2{};
if (extensionSupported("VK_MESA_image_alignment_control")) {
const char* extension("VK_MESA_image_alignment_control");
VkPhysicalDeviceImageAlignmentControlPropertiesMESA* extProps = new VkPhysicalDeviceImageAlignmentControlPropertiesMESA{};
extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_PROPERTIES_MESA;
deviceProps2 = initDeviceProperties2(extProps);
vulkanContext.vkGetPhysicalDeviceProperties2KHR(device, &deviceProps2);
pushProperty2(extension, "supportedImageAlignmentMask", QVariant(extProps->supportedImageAlignmentMask));
delete extProps;
}
}
void VulkanDeviceInfoExtensions::readPhysicalProperties_MSFT() {
VkPhysicalDeviceProperties2 deviceProps2{};
if (extensionSupported("VK_MSFT_layered_driver")) {
Expand Down Expand Up @@ -1191,6 +1212,7 @@ void VulkanDeviceInfoExtensions::readExtendedProperties() {
readPhysicalProperties_EXT();
readPhysicalProperties_HUAWEI();
readPhysicalProperties_KHR();
readPhysicalProperties_MESA();
readPhysicalProperties_MSFT();
readPhysicalProperties_NV();
readPhysicalProperties_NVX();
Expand Down Expand Up @@ -2121,6 +2143,15 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_EXT() {
pushFeature2(extension, "mutableDescriptorType", extFeatures->mutableDescriptorType);
delete extFeatures;
}
if (extensionSupported("VK_EXT_legacy_vertex_attributes")) {
const char* extension("VK_EXT_legacy_vertex_attributes");
VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT* extFeatures = new VkPhysicalDeviceLegacyVertexAttributesFeaturesEXT{};
extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_VERTEX_ATTRIBUTES_FEATURES_EXT;
deviceFeatures2 = initDeviceFeatures2(extFeatures);
vulkanContext.vkGetPhysicalDeviceFeatures2KHR(device, &deviceFeatures2);
pushFeature2(extension, "legacyVertexAttributes", extFeatures->legacyVertexAttributes);
delete extFeatures;
}
if (extensionSupported("VK_EXT_pipeline_library_group_handles")) {
const char* extension("VK_EXT_pipeline_library_group_handles");
VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT* extFeatures = new VkPhysicalDevicePipelineLibraryGroupHandlesFeaturesEXT{};
Expand Down Expand Up @@ -2700,6 +2731,18 @@ void VulkanDeviceInfoExtensions::readPhysicalFeatures_KHR() {
delete extFeatures;
}
}
void VulkanDeviceInfoExtensions::readPhysicalFeatures_MESA() {
VkPhysicalDeviceFeatures2 deviceFeatures2{};
if (extensionSupported("VK_MESA_image_alignment_control")) {
const char* extension("VK_MESA_image_alignment_control");
VkPhysicalDeviceImageAlignmentControlFeaturesMESA* extFeatures = new VkPhysicalDeviceImageAlignmentControlFeaturesMESA{};
extFeatures->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ALIGNMENT_CONTROL_FEATURES_MESA;
deviceFeatures2 = initDeviceFeatures2(extFeatures);
vulkanContext.vkGetPhysicalDeviceFeatures2KHR(device, &deviceFeatures2);
pushFeature2(extension, "imageAlignmentControl", extFeatures->imageAlignmentControl);
delete extFeatures;
}
}
void VulkanDeviceInfoExtensions::readPhysicalFeatures_NV() {
VkPhysicalDeviceFeatures2 deviceFeatures2{};
if (extensionSupported("VK_NV_corner_sampled_image")) {
Expand Down Expand Up @@ -3155,6 +3198,7 @@ void VulkanDeviceInfoExtensions::readExtendedFeatures() {
readPhysicalFeatures_IMG();
readPhysicalFeatures_INTEL();
readPhysicalFeatures_KHR();
readPhysicalFeatures_MESA();
readPhysicalFeatures_NV();
readPhysicalFeatures_QCOM();
readPhysicalFeatures_QNX();
Expand Down
4 changes: 3 additions & 1 deletion VulkanDeviceInfoExtensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class VulkanDeviceInfoExtensions
void readPhysicalFeatures_INTEL();
void readPhysicalFeatures_KHR();
void readPhysicalProperties_KHR();
void readPhysicalFeatures_MESA();
void readPhysicalProperties_MESA();
void readPhysicalProperties_MSFT();
void readPhysicalFeatures_NV();
void readPhysicalProperties_NV();
Expand All @@ -95,7 +97,7 @@ class VulkanDeviceInfoExtensions
void readPhysicalFeatures_VALVE();

public:
const uint32_t vkHeaderVersion = 280;
const uint32_t vkHeaderVersion = 285;
std::vector<Feature2> features2;
std::vector<Property2> properties2;
std::vector<VkExtensionProperties> extensions;
Expand Down
3 changes: 3 additions & 0 deletions extensionlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ VK_EXT_legacy_dithering
VK_EXT_pipeline_protected_access
VK_EXT_shader_object
VK_EXT_mutable_descriptor_type
VK_EXT_legacy_vertex_attributes
VK_EXT_pipeline_library_group_handles
VK_EXT_dynamic_rendering_unused_attachments
VK_EXT_attachment_feedback_loop_dynamic_state
Expand Down Expand Up @@ -169,6 +170,8 @@ VK_KHR_index_type_uint8
VK_KHR_line_rasterization
VK_KHR_shader_expect_assume
VK_KHR_maintenance6
MESA
VK_MESA_image_alignment_control
MSFT
VK_MSFT_layered_driver
NV
Expand Down

0 comments on commit ac72639

Please sign in to comment.