venus: Add support to VK_KHR_maintenance4 extension
Signed-off-by: Igor Torrente <igor.torrente@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17399>
This commit is contained in:
parent
b16f9f8ba4
commit
1893c81521
|
@ -253,6 +253,7 @@ vn_buffer_cache_get_memory_requirements(
|
|||
*/
|
||||
for (uint32_t i = 0; i < cache->entry_count; i++) {
|
||||
const struct vn_buffer_cache_entry *entry = &cache->entries[i];
|
||||
// TODO: Fix the spec regarding the usage and alignment behavior
|
||||
if ((entry->create_info->flags == create_info->flags) &&
|
||||
((entry->create_info->usage & create_info->usage) ==
|
||||
create_info->usage)) {
|
||||
|
@ -528,3 +529,16 @@ vn_DestroyBufferView(VkDevice device,
|
|||
vn_object_base_fini(&view->base);
|
||||
vk_free(alloc, view);
|
||||
}
|
||||
|
||||
void
|
||||
vn_GetDeviceBufferMemoryRequirements(
|
||||
VkDevice device,
|
||||
const VkDeviceBufferMemoryRequirements *pInfo,
|
||||
VkMemoryRequirements2 *pMemoryRequirements)
|
||||
{
|
||||
struct vn_device *dev = vn_device_from_handle(device);
|
||||
|
||||
/* TODO per-device cache */
|
||||
vn_call_vkGetDeviceBufferMemoryRequirements(dev->instance, device, pInfo,
|
||||
pMemoryRequirements);
|
||||
}
|
||||
|
|
|
@ -746,3 +746,31 @@ vn_DestroySamplerYcbcrConversion(VkDevice device,
|
|||
vn_object_base_fini(&conv->base);
|
||||
vk_free(alloc, conv);
|
||||
}
|
||||
|
||||
void
|
||||
vn_GetDeviceImageMemoryRequirements(
|
||||
VkDevice device,
|
||||
const VkDeviceImageMemoryRequirements *pInfo,
|
||||
VkMemoryRequirements2 *pMemoryRequirements)
|
||||
{
|
||||
struct vn_device *dev = vn_device_from_handle(device);
|
||||
|
||||
/* TODO per-device cache */
|
||||
vn_call_vkGetDeviceImageMemoryRequirements(dev->instance, device, pInfo,
|
||||
pMemoryRequirements);
|
||||
}
|
||||
|
||||
void
|
||||
vn_GetDeviceImageSparseMemoryRequirements(
|
||||
VkDevice device,
|
||||
const VkDeviceImageMemoryRequirements *pInfo,
|
||||
uint32_t *pSparseMemoryRequirementCount,
|
||||
VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements)
|
||||
{
|
||||
struct vn_device *dev = vn_device_from_handle(device);
|
||||
|
||||
/* TODO per-device cache */
|
||||
vn_call_vkGetDeviceImageSparseMemoryRequirements(
|
||||
dev->instance, device, pInfo, pSparseMemoryRequirementCount,
|
||||
pSparseMemoryRequirements);
|
||||
}
|
||||
|
|
|
@ -132,6 +132,8 @@ vn_physical_device_init_features(struct vn_physical_device *physical_dev)
|
|||
VN_ADD_EXT_TO_PNEXT(exts->EXT_inline_uniform_block,
|
||||
feats->inline_uniform_block,
|
||||
INLINE_UNIFORM_BLOCK_FEATURES, features2);
|
||||
VN_ADD_EXT_TO_PNEXT(exts->KHR_maintenance4, feats->maintenance4,
|
||||
MAINTENANCE_4_FEATURES, features2);
|
||||
VN_ADD_EXT_TO_PNEXT(exts->EXT_shader_demote_to_helper_invocation,
|
||||
feats->shader_demote_to_helper_invocation,
|
||||
SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES,
|
||||
|
@ -491,6 +493,8 @@ vn_physical_device_init_properties(struct vn_physical_device *physical_dev)
|
|||
VN_ADD_EXT_TO_PNEXT(exts->EXT_transform_feedback,
|
||||
props->transform_feedback,
|
||||
TRANSFORM_FEEDBACK_PROPERTIES_EXT, properties2);
|
||||
VN_ADD_EXT_TO_PNEXT(exts->KHR_maintenance4, props->maintenance4,
|
||||
MAINTENANCE_4_PROPERTIES, properties2);
|
||||
VN_ADD_EXT_TO_PNEXT(exts->EXT_vertex_attribute_divisor,
|
||||
props->vertex_attribute_divisor,
|
||||
VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, properties2);
|
||||
|
@ -996,6 +1000,7 @@ vn_physical_device_get_passthrough_extensions(
|
|||
.EXT_inline_uniform_block = true,
|
||||
.EXT_shader_demote_to_helper_invocation = true,
|
||||
.KHR_copy_commands2 = true,
|
||||
.KHR_maintenance4 = true,
|
||||
|
||||
/* EXT */
|
||||
.EXT_calibrated_timestamps = true,
|
||||
|
@ -1621,6 +1626,7 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
*extended_dynamic_state2;
|
||||
VkPhysicalDeviceImageRobustnessFeaturesEXT *image_robustness;
|
||||
VkPhysicalDeviceInlineUniformBlockFeatures *inline_uniform_block;
|
||||
VkPhysicalDeviceMaintenance4Features *maintenance4;
|
||||
VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures
|
||||
*shader_demote_to_helper_invocation;
|
||||
|
||||
|
@ -1844,6 +1850,9 @@ vn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT:
|
||||
*u.vertex_attribute_divisor = feats->vertex_attribute_divisor;
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES:
|
||||
*u.maintenance4 = feats->maintenance4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1901,6 +1910,7 @@ vn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||
VkPhysicalDevicePresentationPropertiesANDROID *presentation_properties;
|
||||
VkPhysicalDeviceProvokingVertexPropertiesEXT *provoking_vertex;
|
||||
VkPhysicalDeviceRobustness2PropertiesEXT *robustness_2;
|
||||
VkPhysicalDeviceMaintenance4PropertiesKHR *maintenance4;
|
||||
VkPhysicalDeviceTransformFeedbackPropertiesEXT *transform_feedback;
|
||||
VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT
|
||||
*vertex_attribute_divisor;
|
||||
|
@ -2145,6 +2155,9 @@ vn_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT:
|
||||
*u.vertex_attribute_divisor = props->vertex_attribute_divisor;
|
||||
break;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES:
|
||||
*u.maintenance4 = props->maintenance4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ struct vn_physical_device_features {
|
|||
VkPhysicalDeviceExtendedDynamicState2FeaturesEXT extended_dynamic_state_2;
|
||||
VkPhysicalDeviceImageRobustnessFeaturesEXT image_robustness;
|
||||
VkPhysicalDeviceInlineUniformBlockFeatures inline_uniform_block;
|
||||
VkPhysicalDeviceMaintenance4Features maintenance4;
|
||||
VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures
|
||||
shader_demote_to_helper_invocation;
|
||||
|
||||
|
@ -51,6 +52,7 @@ struct vn_physical_device_properties {
|
|||
|
||||
/* Vulkan 1.3 */
|
||||
VkPhysicalDeviceInlineUniformBlockProperties inline_uniform_block;
|
||||
VkPhysicalDeviceMaintenance4Properties maintenance4;
|
||||
|
||||
/* EXT */
|
||||
VkPhysicalDeviceConservativeRasterizationPropertiesEXT
|
||||
|
|
Loading…
Reference in New Issue