mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-18 08:10:37 +02:00
venus: add VK_EXT_custom_border_color extension
Implements all the necessary code in the device initialization and feature/property query functions. Signed-off-by: Igor Torrente <igor.torrente@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15026>
This commit is contained in:
parent
5252c6c009
commit
aa2652958a
2 changed files with 35 additions and 1 deletions
|
|
@ -172,6 +172,15 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev)
|
|||
&physical_dev->extended_dynamic_state_features;
|
||||
}
|
||||
|
||||
if (physical_dev->renderer_extensions.EXT_custom_border_color) {
|
||||
physical_dev->custom_border_color_features.sType =
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT;
|
||||
physical_dev->custom_border_color_features.pNext =
|
||||
physical_dev->features.pNext;
|
||||
physical_dev->features.pNext =
|
||||
&physical_dev->custom_border_color_features;
|
||||
}
|
||||
|
||||
vn_call_vkGetPhysicalDeviceFeatures2(
|
||||
instance, vn_physical_device_to_handle(physical_dev),
|
||||
&physical_dev->features);
|
||||
|
|
@ -485,6 +494,15 @@ vn_physical_device_init_properties(struct vn_physical_device *physical_dev)
|
|||
&physical_dev->transform_feedback_properties;
|
||||
}
|
||||
|
||||
if (physical_dev->renderer_extensions.EXT_custom_border_color) {
|
||||
physical_dev->custom_border_color_properties.sType =
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT;
|
||||
physical_dev->custom_border_color_properties.pNext =
|
||||
physical_dev->properties.pNext;
|
||||
physical_dev->properties.pNext =
|
||||
&physical_dev->custom_border_color_properties;
|
||||
}
|
||||
|
||||
vn_call_vkGetPhysicalDeviceProperties2(
|
||||
instance, vn_physical_device_to_handle(physical_dev),
|
||||
&physical_dev->properties);
|
||||
|
|
@ -974,7 +992,8 @@ vn_physical_device_get_passthrough_extensions(
|
|||
/* promoted to VK_VERSION_1_3 */
|
||||
.EXT_4444_formats = true,
|
||||
.EXT_extended_dynamic_state = true,
|
||||
/* EXT */
|
||||
/* EXT */
|
||||
.EXT_custom_border_color = true,
|
||||
#ifndef ANDROID
|
||||
.EXT_image_drm_format_modifier = true,
|
||||
#endif
|
||||
|
|
@ -1651,6 +1670,7 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
VkPhysicalDevice4444FormatsFeaturesEXT *argb_4444_formats;
|
||||
VkPhysicalDeviceTransformFeedbackFeaturesEXT *transform_feedback;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT *extended_dynamic_state;
|
||||
VkPhysicalDeviceCustomBorderColorFeaturesEXT *custom_border_color;
|
||||
} u;
|
||||
|
||||
u.pnext = (VkBaseOutStructure *)pFeatures;
|
||||
|
|
@ -1820,6 +1840,11 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
u.extended_dynamic_state->extendedDynamicState =
|
||||
physical_dev->extended_dynamic_state_features.extendedDynamicState;
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT:
|
||||
memcpy(u.custom_border_color,
|
||||
&physical_dev->custom_border_color_features,
|
||||
sizeof(physical_dev->custom_border_color_features));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -1860,6 +1885,7 @@ vn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||
|
||||
VkPhysicalDevicePCIBusInfoPropertiesEXT *pci_bus_info;
|
||||
VkPhysicalDeviceTransformFeedbackPropertiesEXT *transform_feedback;
|
||||
VkPhysicalDeviceCustomBorderColorPropertiesEXT *custom_border_color;
|
||||
VkPhysicalDevicePresentationPropertiesANDROID *presentation_properties;
|
||||
} u;
|
||||
|
||||
|
|
@ -2057,6 +2083,11 @@ vn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||
&physical_dev->transform_feedback_properties,
|
||||
sizeof(physical_dev->transform_feedback_properties));
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT:
|
||||
memcpy(u.custom_border_color,
|
||||
&physical_dev->custom_border_color_properties,
|
||||
sizeof(physical_dev->custom_border_color_properties));
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENTATION_PROPERTIES_ANDROID:
|
||||
u.presentation_properties->sharedImage = VK_FALSE;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -44,12 +44,15 @@ struct vn_physical_device {
|
|||
VkPhysicalDevice4444FormatsFeaturesEXT argb_4444_formats_features;
|
||||
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT
|
||||
extended_dynamic_state_features;
|
||||
VkPhysicalDeviceCustomBorderColorFeaturesEXT custom_border_color_features;
|
||||
|
||||
VkPhysicalDeviceProperties2 properties;
|
||||
VkPhysicalDeviceVulkan11Properties vulkan_1_1_properties;
|
||||
VkPhysicalDeviceVulkan12Properties vulkan_1_2_properties;
|
||||
VkPhysicalDeviceTransformFeedbackPropertiesEXT
|
||||
transform_feedback_properties;
|
||||
VkPhysicalDeviceCustomBorderColorPropertiesEXT
|
||||
custom_border_color_properties;
|
||||
|
||||
VkQueueFamilyProperties2 *queue_family_properties;
|
||||
uint32_t queue_family_count;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue